Open Lighting Architecture: ola::rdm::FieldDescriptorGroup Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
ola::rdm::FieldDescriptorGroup Class Reference

## Detailed Description

A FieldDescriptor that consists of a group of FieldDescriptors. Groups can vary in size two ways. First, the group may contain a field which itself is of variable size (i.e. a string or another group). This type of message structure requires some other data in the message itself to indicate the field/group length and as such isn't supported.

An example of this type of group would be:

+-------------—+ | bool (1) | +-------------—+ | string (0, 32) | +-------------—+

This could hold data like: (true, "foo"), (false, "bar) The second (and simpler) type is where the group size is fixed (i.e. contains only fixed length fields) and the number of times the group appears in the message varies. By knowing the length of the message we can work out the number of times a group occurs (see VariableFieldSizeCalculator.h which does this). An example of this type of group would be: +-------------&mdash;+ | bool (1) | +-------------&mdash;+ | uint16 (2) | +-------------&mdash;+ This could hold data like: (true, 1000), (false, 34) DescriptorConsistencyChecker.h checks that a descriptor is the second type, that is contains at most one variable-sized field. We refer to the datatypes within a group as fields, the actual instantiations of a group as blocks. In the examples above, bool, string and uint16 are the fields (represented by FieldDescriptorInterface objects) and (true, "foo") & (true, 1000) are the blocks.

Inheritance diagram for ola::rdm::FieldDescriptorGroup:

## Public Member Functions
| FieldDescriptorGroup (const std::string &name, const std::vector< const FieldDescriptor * > &fields, uint16_t min_blocks, int16_t max_blocks)
bool | FixedSize () const
bool | LimitedSize () const
unsigned int | MaxSize () const
unsigned int | FieldCount () const
bool | FixedBlockSize () const
unsigned int | BlockSize () const
unsigned int | MaxBlockSize () const
uint16_t | MinBlocks () const
int16_t | MaxBlocks () const
bool | FixedBlockCount () const
const class FieldDescriptor * | GetField (unsigned int index) const
virtual void | Accept (FieldDescriptorVisitor *visitor) const
Public Member Functions inherited from ola::messaging::FieldDescriptor
| FieldDescriptor (const std::string &name)
const std::string & | Name () const

## Static Public Attributes
static const int16_t | UNLIMITED_BLOCKS = -1

## Protected Attributes
std::vector< const class FieldDescriptor * > | m_fields

## Member Function Documentation

## ◆ Accept()

void ola::messaging::FieldDescriptorGroup::Accept | ( | FieldDescriptorVisitor * | visitor | ) | const
| virtual

Implements ola::messaging::FieldDescriptorInterface.

## ◆ FixedSize()

bool ola::messaging::FieldDescriptorGroup::FixedSize | ( |  | ) | const
| inlinevirtual

Implements ola::messaging::FieldDescriptorInterface.

## ◆ LimitedSize()

bool ola::messaging::FieldDescriptorGroup::LimitedSize | ( |  | ) | const
| virtual

Implements ola::messaging::FieldDescriptorInterface.

## ◆ MaxSize()

unsigned int ola::messaging::FieldDescriptorGroup::MaxSize | ( |  | ) | const
| virtual

Implements ola::messaging::FieldDescriptorInterface.

The documentation for this class was generated from the following files:

- include/ola/messaging/Descriptor.h
- common/messaging/Descriptor.cpp