Function ouster::sdk::sensor::get_metadata

Function Documentation

std::string ouster::sdk::sensor::get_metadata(Client &cli, int timeout_sec = LONG_HTTP_REQUEST_TIMEOUT_SECONDS)

Get metadata text blob from the sensor.

Will attempt to fetch from the network if not already populated.

Throws:

runtime_error – if the sensor is in ERROR state, the firmware version used to initialize the HTTP or TCP client is invalid, the metadata could not be retrieved from the sensor within the timeout period, a timeout occured while waiting for the sensor to finish initializing, or the response could not be parsed.

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

  • timeout_sec[in] how long to wait for the sensor to initialize.

Returns:

a text blob of metadata parseable into a sensor_info struct.