RCP API  6.61.0

◆ rcp_discovery_start()

void rcp_discovery_start ( rcp_broadcast_data_to_cameras_cb_t  cb,
void *  cb_user_data 
)

Start camera discovery process.

This function is used to start the camera discovery processes. For GigE or wireless networks, this process is performed via broadcast UDP packets on port 1112.

msc_inline_mscgraph_2

After this call is made rcp_discovery_step must be called RCP_DISCOVERY_STEP_LOOP_COUNT times, with a delay of RCP_DISCOVERY_STEP_SLEEP_MS after the call to rcp_discovery_start and after each call to rcp_discovery_step. The list of cameras discovered can be retrieved with a call to rcp_discovery_get_list. Once the data in the camera list has been copied, a call to rcp_discovery_free_list should be made to free the memory. Finally, a call to rcp_discovery_end should be made to clear all memory used internally by the discovery process.

During the discovery process all incoming data must be fed into the RCP API using rcp_discovery_process_data. It is recommended to have a helper thread listening for incoming UDP packets on port 1112 and relaying all data via this call.

Parameters
[in]cbcallback used for broadcasting data to all cameras. WHen this callback is called, the data should be sent as a broadcast UDP packet out port 1112.
[in]cb_user_dataadditional user data passed into the callback. If not required, use NULL.