Function ouster::sdk::core::validate_packet

Function Documentation

PacketValidationFailure ouster::sdk::core::validate_packet(const SensorInfo &info, const PacketFormat &format, const uint8_t *buf, uint64_t buf_size, PacketType type = PacketType::Unknown)

Validate a packet buffer against a given type.

Parameters:
  • info[in] – The sensor info to try to check the buffer against.

  • format[in] – The packet format to try to check the buffer against.

  • buf[in] – The packet buffer to validate.

  • buf_size[in] – The size of the packet buffer.

  • type[in] – Optional type of packet to try and validate as. Unknown will try and guess the packet type

Returns:

Result of the validation