Advertisement
Guest User

tflite data

a guest
Jan 9th, 2025
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | Source Code | 0 0
  1. int subscribe_to_pipe(const char* sub_name, const char* client_name) {
  2.         std::lock_guard<std::mutex> lock(mtx);
  3.  
  4.         if (pipe_expand_location_string(sub_name, pipe_name) < 0) {
  5.             std::cerr << "ERROR: Invalid pipe name: " << sub_name << std::endl;
  6.             return -1;
  7.         }
  8.  
  9.         sub_channel = pipe_client_get_next_available_channel();
  10.         pipe_client_set_simple_helper_cb(sub_channel, detection_callback, nullptr);
  11.  
  12.         if (pipe_client_open(sub_channel, pipe_name, client_name, EN_PIPE_CLIENT_SIMPLE_HELPER, sizeof(ai_detection_t) * 32) < 0) {
  13.             std::cerr << "ERROR: Failed to subscribe to pipe" << std::endl;
  14.             return -1;
  15.         }
  16.  
  17.         return sub_channel;
  18.     }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement