Class PackageHeader

Class Documentation

class PackageHeader

This class represents the header for RTDE packages.

Public Types

using _package_size_type = uint16_t

Public Functions

PackageHeader() = default
virtual ~PackageHeader() = default

Public Static Functions

static inline size_t getPackageLength(uint8_t *buf)

Reads a buffer, interpreting the next bytes as the size of the contained package.

Parameters:

buf – The given byte stream containing a serialized package

Returns:

The size of the given serialized package

static inline size_t serializeHeader(uint8_t *buffer, PackageType package_type, uint16_t payload_length)

Creates a serialization of a header based on given values.

Parameters:
  • buffer – The buffer to write the serialization to

  • package_type – The type of the package

  • payload_length – The length of the package’s payload

Returns: