COMMS
Template library intended to help with implementation of communication protocols.
comms::option::def::FixedLength< TLen, TSignExtend > Struct Template Reference

#include "comms/options.h"

Detailed Description

template<std::size_t TLen, bool TSignExtend = true>
struct comms::option::def::FixedLength< TLen, TSignExtend >

Option used to specify number of bytes that is used for field serialisation.

Applicable only to numeric fields, such as comms::field::IntValue or comms::field::EnumValue.

For example, protocol specifies that some field is serialised using only 3 bytes. There is no basic integral type that takes 3 bytes of space exactly. The closest alternative is std::int32_t or std::uint32_t. Such field may 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 number of bytes that is used for field serialisation.
Definition: options.h:280
Template Parameters
TLenLength of the serialised value.
TSignExtendPerform sign extension, relevant only to signed types.

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