本文整理汇总了C++中IPC::update方法的典型用法代码示例。如果您正苦于以下问题:C++ IPC::update方法的具体用法?C++ IPC::update怎么用?C++ IPC::update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPC
的用法示例。
在下文中一共展示了IPC::update方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ipc_thread_function
void ipc_thread_function()
{
while (true)
{
ipc.update();
Sleep(100);
}
}
示例2: load
void Reprojector::load(IPC& ipc, bool flipped)
{
bool serial_first_non_zero = false;
string serial = "";
for (int i = 4; i < 10; ++i)
{
string str_temp = "";
str_temp += serial_number[i];
if (!serial_first_non_zero && str_temp != "0")
serial_first_non_zero = true;
if (serial_first_non_zero)
serial += serial_number[i];
}
bool has_complete_calib_data = false;
if (directory_exists(data_path_current_module))
if (file_exists(data_path_current_module + "\\0.jpg"))
if (file_exists(data_path_current_module + "\\1.jpg"))
if (file_exists(data_path_current_module + "\\stereoCalibData.txt"))
if (file_exists(data_path_current_module + "\\rect0.txt"))
if (file_exists(data_path_current_module + "\\rect1.txt"))
has_complete_calib_data = true;
if (!has_complete_calib_data)
{
static bool block_thread = true;
ipc.send_message("menu_plus", "show window", "");
ipc.get_response("menu_plus", "show download", "", [](const string message_body)
{
COUT << "unblock" << endl;
block_thread = false;
});
while (block_thread)
{
ipc.update();
Sleep(100);
}
create_directory(data_path);
create_directory(data_path_current_module);
copy_file(executable_path + "\\rectifier.exe", data_path_current_module + "\\rectifier.exe");
copy_file(executable_path + "\\opencv_core249.dll", data_path_current_module + "\\opencv_core249.dll");
copy_file(executable_path + "\\opencv_highgui249.dll", data_path_current_module + "\\opencv_highgui249.dll");
copy_file(executable_path + "\\opencv_imgproc249.dll", data_path_current_module + "\\opencv_imgproc249.dll");
copy_file(executable_path + "\\opencv_calib3d249.dll", data_path_current_module + "\\opencv_calib3d249.dll");
copy_file(executable_path + "\\opencv_flann249.dll", data_path_current_module + "\\opencv_flann249.dll");
copy_file(executable_path + "\\opencv_features2d249.dll", data_path_current_module + "\\opencv_features2d249.dll");
//http://s3-us-west-2.amazonaws.com/ractiv.com/data/
//http://d2i9bzz66ghms6.cloudfront.net/data/
string param0 = "http://s3-us-west-2.amazonaws.com/ractiv.com/data/" + serial + "/0.jpg";
string param1 = data_path_current_module + "\\0.jpg";
string* serial_ptr = &serial;
IPC* ipc_ptr = &ipc;
ipc.get_response("menu_plus", "download", param0 + "`" + param1, [serial_ptr, ipc_ptr](const string message_body)
{
if (message_body == "false")
ipc_ptr->send_message("daemon_plus", "exit", "");
else
{
string param0 = "http://s3-us-west-2.amazonaws.com/ractiv.com/data/" + *serial_ptr + "/1.jpg";
string param1 = data_path_current_module + "\\1.jpg";
ipc_ptr->get_response("menu_plus", "download", param0 + "`" + param1, [serial_ptr, ipc_ptr](const string message_body)
{
if (message_body == "false")
ipc_ptr->send_message("daemon_plus", "exit", "");
else
{
string param0 = "http://s3-us-west-2.amazonaws.com/ractiv.com/data/" + *serial_ptr + "/stereoCalibData.txt";
string param1 = data_path_current_module + "\\stereoCalibData.txt";
ipc_ptr->get_response("menu_plus", "download", param0 + "`" + param1, [serial_ptr, ipc_ptr](const string message_body)
{
if (message_body == "false")
ipc_ptr->send_message("daemon_plus", "exit", "");
else
{
bool has_complete_calib_data = false;
while (!has_complete_calib_data)
{
system(("cd " + cmd_quote + data_path_current_module + cmd_quote + " && rectifier.exe").c_str());
if (directory_exists(data_path_current_module))
if (file_exists(data_path_current_module + "\\0.jpg"))
if (file_exists(data_path_current_module + "\\1.jpg"))
if (file_exists(data_path_current_module + "\\stereoCalibData.txt"))
if (file_exists(data_path_current_module + "\\rect0.txt"))
if (file_exists(data_path_current_module + "\\rect1.txt"))
has_complete_calib_data = true;
}
//.........这里部分代码省略.........