Function ouster::sdk::sensor::poll_client

Function Documentation

ClientState ouster::sdk::sensor::poll_client(const Client &cli, int timeout_sec = 1)

Block for up to timeout_sec until either data is ready or an error occurs.

NOTE: will return immediately if LIDAR_DATA or IMU_DATA are set and not cleared by read_lidar_packet() and read_imu_packet() before the next call.

Parameters:
  • cli[in] – client returned by init_client associated with the connection.

  • timeout_sec[in] – seconds to block while waiting for data.

Returns:

client_state s where (s & ERROR) is true if an error occured, (s & LIDAR_DATA) is true if lidar data is ready to read, and (s & IMU_DATA) is true if imu data is ready to read.