COMMS
Template library intended to help with implementation of communication protocols.
comms::option::def::VarLength< TMin, TMax > Struct Template Reference

#include "comms/options.h"

Detailed Description

template<std::size_t TMin, std::size_t TMax>
struct comms::option::def::VarLength< TMin, TMax >

Option used to specify that field may have variable serialisation length.

Applicable only to numeric fields, such as comms::field::IntValue or comms::field::EnumValue. Use this option to specify that serialised value has Base-128 encoding, i.e. the most significant bit in the byte indicates whether the encoding of the value is complete or the next byte in sequence still encodes the current integer value. For example field which value can be serialised using between 1 and 4 bytes can be defined as:

using MyField =
MyFieldBase,
std::uint32_t,
>;
Base class to all the field classes.
Definition: Field.h:33
Field that represent integral value.
Definition: IntValue.h:72
Option used to specify that field may have variable serialisation length.
Definition: options.h:337
Template Parameters
TMinMinimal length the field may consume.
TMaxMaximal length the field may consume.
Precondition
TMin <= TMax

The documentation for this struct was generated from the following file: