|
Voyant API 0.2.1
|
Wrapper for VoyantHeader messages. More...
#include <voyant_header_wrapper.hpp>
Public Member Functions | |
| VoyantHeaderWrapper ()=default | |
| Default constructor. | |
| ~VoyantHeaderWrapper () override=default | |
| Destructor. | |
| void | fromProto (VoyantHeader::Reader reader) override |
| Update wrapper fields from a Cap'n Proto reader. | |
| void | toProto (VoyantHeader::Builder &builder) const override |
| Write wrapper fields to a Cap'n Proto builder. | |
| void | debugString (std::ostream &os) const override |
| Generate a debug string representation. | |
| std::string | deviceId () const |
| Get formatted device ID string. | |
| DeviceClass | deviceClass () const |
| Get device class. | |
| uint16_t | deviceNumber () const |
| Get device number. | |
| MessageType | messageType () const |
| Get message type. | |
| int64_t | timestampSeconds () const |
| Get timestamp seconds. | |
| int32_t | timestampNanoseconds () const |
| Get timestamp nanoseconds. | |
| uint32_t | frameIndex () const |
| Get frame index. | |
| const VoyantVersionWrapper & | protoVersion () const |
| Get protocol version information. | |
| VoyantVersionWrapper & | protoVersionMut () |
| Get mutable protocol version object. | |
| const VoyantVersionWrapper & | apiVersion () const |
| Get API version information. | |
| VoyantVersionWrapper & | apiVersionMut () |
| Get mutable API version object. | |
| const VoyantVersionWrapper & | firmwareVersion () const |
| Get firmware version information. | |
| VoyantVersionWrapper & | firmwareVersionMut () |
| Get mutable firmware version object. | |
| const VoyantVersionWrapper & | hdlVersion () const |
| Get HDL version information. | |
| VoyantVersionWrapper & | hdlVersionMut () |
| Get mutable HDL version object. | |
| void | setDeviceClass (DeviceClass value) |
| Set device class. | |
| void | setDeviceNumber (uint16_t value) |
| Set device number. | |
| void | setMessageType (MessageType value) |
| Set message type. | |
| void | setTimestampSeconds (int64_t value) |
| Set timestamp seconds. | |
| void | setTimestampNanoseconds (int32_t value) |
| Set timestamp nanoseconds. | |
| void | setFrameIndex (uint32_t value) |
| Set frame index. | |
| bool | setVersion (uint8_t major, uint8_t minor, uint8_t patch, VersionStatus status, VersionComponent component) |
| Helper method to set version details for a specific component. | |
| virtual void | fromProto (typename T::Reader reader)=0 |
| Update wrapper fields from a Cap'n Proto reader. | |
| virtual void | toProto (typename T::Builder &builder) const=0 |
| Write wrapper fields to a Cap'n Proto builder. | |
| void | fromBuffer (const uint8_t *buffer, size_t size) |
| Update wrapper fields from a serialized message buffer. | |
| size_t | toBuffer (uint8_t *buffer, size_t buffer_size) const |
| Serialize this wrapper to a buffer using Cap'n Proto format. | |
Private Attributes | |
| MessageType | message_type_ = MessageType::UNKNOWN |
| int64_t | timestamp_seconds_ = 0 |
| int32_t | timestamp_nanoseconds_ = 0 |
| uint32_t | frame_index_ = 0 |
| DeviceClass | device_class_ = DeviceClass::Unknown |
| uint16_t | device_number_ = 0 |
| VoyantVersionWrapper | proto_version_ |
| VoyantVersionWrapper | api_version_ |
| VoyantVersionWrapper | firmware_version_ |
| VoyantVersionWrapper | hdl_version_ |
Wrapper for VoyantHeader messages.
Provides a C++ interface for handling Voyant message headers with metadata about device identity, message type, timestamps, and version information.
|
default |
Default constructor.
|
overridedefault |
Destructor.
|
inline |
Get API version information.
|
inline |
Get mutable API version object.
|
overridevirtual |
Generate a debug string representation.
| os | The output stream to write to |
Implements CapnpWrapper< VoyantHeader >.
|
inline |
Get device class.
| std::string VoyantHeaderWrapper::deviceId | ( | ) | const |
Get formatted device ID string.
|
inline |
Get device number.
|
inline |
Get firmware version information.
|
inline |
Get mutable firmware version object.
|
inline |
Get frame index.
|
inlineinherited |
Update wrapper fields from a serialized message buffer.
| buffer | Pointer to the buffer containing serialized Cap'n Proto data |
| size | Size of the buffer in bytes |
|
pure virtualinherited |
Update wrapper fields from a Cap'n Proto reader.
| reader | The Cap'n Proto reader to extract data from |
|
override |
Update wrapper fields from a Cap'n Proto reader.
| reader | The VoyantHeader reader to extract data from |
|
inline |
Get HDL version information.
|
inline |
Get mutable HDL version object.
|
inline |
Get message type.
|
inline |
Get protocol version information.
|
inline |
Get mutable protocol version object.
|
inline |
Set device class.
| value | Device class enum value |
|
inline |
Set device number.
| value | Device number |
|
inline |
Set frame index.
| value | Frame counter value |
|
inline |
Set message type.
| value | Message type enum value |
|
inline |
Set timestamp nanoseconds.
| value | Nanoseconds component of timestamp |
|
inline |
Set timestamp seconds.
| value | Seconds component of timestamp |
| bool VoyantHeaderWrapper::setVersion | ( | uint8_t | major, |
| uint8_t | minor, | ||
| uint8_t | patch, | ||
| VersionStatus | status, | ||
| VersionComponent | component | ||
| ) |
Helper method to set version details for a specific component.
| major | Major version number |
| minor | Minor version number |
| patch | Patch version number |
| status | Version status |
| component | Component type |
|
inline |
Get timestamp nanoseconds.
|
inline |
Get timestamp seconds.
|
inlineinherited |
Serialize this wrapper to a buffer using Cap'n Proto format.
| buffer | Pointer to the buffer to write serialized data to |
| buffer_size | Size of the buffer in bytes |
| std::runtime_error | if the buffer is too small |
|
pure virtualinherited |
Write wrapper fields to a Cap'n Proto builder.
| builder | The Cap'n Proto builder to write data to |
|
override |
Write wrapper fields to a Cap'n Proto builder.
| builder | The VoyantHeader builder to write data to |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |