autonomy/communication/utils/osi_to_dds_converter.h (line 17)
Functions
Function CreateDdsMessageFromOsiProto
parameterlist {"type":"element","name":"parameterlist","attributes":{"kind":"templateparam"},"children":[{"type":"element","name":"parameteritem","attributes":{},"children":[{"type":"text","text":"\n"},{"type":"element","name":"parameternamelist","attributes":{},"children":[{"type":"text","text":"\n"},{"type":"element","name":"parametername","attributes":{},"children":[{"type":"text","text":"OsiProtoType"}]},{"type":"text","text":"\n"}]},{"type":"text","text":"\n"},{"type":"element","name":"parameterdescription","attributes":{},"children":[{"type":"text","text":"\n"},{"type":"element","name":"para","attributes":{},"children":[{"type":"text","text":"The OSI proto message type (e.g., osi3::SensorView, osi3::SensorData, osi3::TrafficUpdate) "}]},{"type":"text","text":"\n"}]},{"type":"text","text":"\n"}]},{"type":"text","text":"\n"}]}
Parameters:
- frame_counter: The frame counter for the message
- header_name: The header name to use for the DDS message (e.g., “SensorView”, “SensorData”, “TrafficUpdate”, “MotionRequest”)
- osi_proto_msg: The OSI proto message to convert
- timestamp() method returning an object with seconds() and nanos() methods
- ByteSizeLong() method
- SerializeToArray() method
- const int frame_counter
- const std::string & header_name
- const OsiProtoType & osi_proto_msg
Function ParseOsiProtoFromDdsMessage
parameterlist {"type":"element","name":"parameterlist","attributes":{"kind":"templateparam"},"children":[{"type":"element","name":"parameteritem","attributes":{},"children":[{"type":"text","text":"\n"},{"type":"element","name":"parameternamelist","attributes":{},"children":[{"type":"text","text":"\n"},{"type":"element","name":"parametername","attributes":{},"children":[{"type":"text","text":"OsiProtoType"}]},{"type":"text","text":"\n"}]},{"type":"text","text":"\n"},{"type":"element","name":"parameterdescription","attributes":{},"children":[{"type":"text","text":"\n"},{"type":"element","name":"para","attributes":{},"children":[{"type":"text","text":"The OSI proto message type (e.g., osi3::SensorView, osi3::SensorData, osi3::TrafficUpdate) "}]},{"type":"text","text":"\n"}]},{"type":"text","text":"\n"}]},{"type":"text","text":"\n"}]}
Parameters:
- dds_msg: The DDS GenericBytesMessage to convert
- osi_proto_msg: Reference to the OSI proto message to populate
- std::runtime_error: If parsing fails
- ParseFromArray() method
- const rtidds::GenericBytesMessage & dds_msg
- OsiProtoType & osi_proto_msg
Function ConvertAutonomyMsgToGenericBytes
- frame_counter: Frame counter to store in the DDS header.
- header_name: Header name for the DDS message.
- msg: The AutonomyMsg message to serialize into the GenericBytesMessage.
- std::runtime_error: If serialization fails (e.g., buffer overflow).
- const int frame_counter
- const std::string & header_name
- const messages::AutonomyMsg & msg
Function ConvertGenericBytesToAutonomyMsg
- dds_msg: The DDS GenericBytesMessage containing serialized bytes.
- msg: Reference to the message object to populate.
- std::runtime_error: If parsing fails (e.g., buffer underflow or malformed data).
- const rtidds::GenericBytesMessage & dds_msg
- messages::AutonomyMsg & msg