int main() { time_t t = time(NULL); tm* local = new tm; char buf[26] = {0}; localtime_r(&t,local); strftime(buf, 64, "%Y-%m-%d %H-%M-%S", local); mkdir(buf,S_IRWXU | S_IRWXG); chdir(buf); visionsensor.viewcloud(); visionsensor.start(); #if ARIS_PLATFORM_==_PLATFORM_LINUX_ //char RemoteIp[] = "192.168.1.100"; char RemoteIp[] = "127.0.0.1"; #endif CONN VisualSystem; pVisualSystem = &VisualSystem; /*注册所有的消息函数*/ Aris::Core::RegisterMsgCallback(VisualSystemDataNeeded, OnVisualSystemDataNeeded); Aris::Core::RegisterMsgCallback(VisualSystemLost, OnVisualSystemLost); Aris::Core::RegisterMsgCallback(NeedUpperControl, OnUpperControl); Aris::Core::RegisterMsgCallback(NeedStepUp, OnStepUp); Aris::Core::RegisterMsgCallback(NeedStepDown, OnStepDown); Aris::Core::RegisterMsgCallback(NeedStepOver, OnStepOver); /*设置所有CONN类型的回调函数*/ VisualSystem.SetCallBackOnReceivedData(OnConnDataReceived); VisualSystem.SetCallBackOnLoseConnection(OnConnectionLost); /*连接服务器*/ VisualSystem.Connect(RemoteIp, "5691"); //VisualSystem.Connect(RemoteIp, "5688"); /*开始消息循环*/ Aris::Core::RunMsgLoop(); }
static void openflkinect_start(value ref) { val_check_kind(ref, k_Kinect); Kinect* k = static_cast<Kinect*>(val_data(ref)); k->start(); }