COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
comms::option::def::FixedBitLength< TLen, TSignExtend > Struct Template Reference

#include "comms/options.h"

Detailed Description

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

Option used to specify number of bits that is used for field serialisation when a field is a member of comms::field::Bitfield.

For example, the protocol specifies that two independent integer values of 6 and 10 bits respectively packed into two bytes to save space. Such combined field may be defined as:

using MyField =
MyFieldBase,
std::tuple<
MyFieldBase,
std::uint8_t,
>,
MyFieldBase,
std::uint16_t,
>
>
>;
Base class to all the field classes.
Definition Field.h:33
Bitfield field.
Definition Bitfield.h:98
Field that represent integral value.
Definition IntValue.h:72
Option used to specify number of bits that is used for field serialisation when a field is a member o...
Definition options.h:310
Template Parameters
TLenLength of the serialised value in bits.
TSignExtendPerform sign extension, relevant only to signed types.

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