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

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
ola::rdm::VariableFieldSizeCalculator Class Reference

## Detailed Description

Calculate the size of a variable field when unpacking a Message from a raw data stream.

Inheritance diagram for ola::rdm::VariableFieldSizeCalculator:

## Public Types
enum | calculator_state { TOO_SMALL , TOO_LARGE , FIXED_SIZE , VARIABLE_STRING , VARIABLE_GROUP , MULTIPLE_VARIABLE_FIELDS , NESTED_VARIABLE_GROUPS , MISMATCHED_SIZE }

## Public Member Functions
bool | Descend () const
calculator_state | CalculateFieldSize (unsigned int data_size, const class ola::messaging::Descriptor *, unsigned int *variable_field_repeat_count)
void | Visit (const ola::messaging::BoolFieldDescriptor *)
void | Visit (const ola::messaging::IPV4FieldDescriptor *)
void | Visit (const ola::messaging::MACFieldDescriptor *)
void | Visit (const ola::messaging::UIDFieldDescriptor *)
void | Visit (const ola::messaging::StringFieldDescriptor *)
void | Visit (const ola::messaging::UInt8FieldDescriptor *)
void | Visit (const ola::messaging::UInt16FieldDescriptor *)
void | Visit (const ola::messaging::UInt32FieldDescriptor *)
void | Visit (const ola::messaging::Int8FieldDescriptor *)
void | Visit (const ola::messaging::Int16FieldDescriptor *)
void | Visit (const ola::messaging::Int32FieldDescriptor *)
void | Visit (const ola::messaging::FieldDescriptorGroup *)
void | PostVisit (const ola::messaging::FieldDescriptorGroup *)

## Member Function Documentation

## ◆ CalculateFieldSize()

VariableFieldSizeCalculator::calculator_state ola::rdm::VariableFieldSizeCalculator::CalculateFieldSize | ( | unsigned int | data_size,
|  | const class ola::messaging::Descriptor * | descriptor,
|  | unsigned int * | variable_field_size )

Figure out the size of a variable-length field in a descriptor. The variable field may be a string or a repeated group of fields. Multiple-variable length fields are not supported as this doesn't allow us to determine the boundary of the individual fields within a message.

This method is not re-entrant.

Parameters

  data_size | the size in bytes of the data in this message
  descriptor | The descriptor to use to build the Message
  variable_field_size | a pointer to a int which is set to the length of the variable field within this message.

Returns
  A enum which indicates if one (or more) variable length fields exist, and if only one exists, what type it is.

## ◆ Descend()

bool ola::rdm::VariableFieldSizeCalculator::Descend | ( |  | ) | const
| inlinevirtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ PostVisit()

void ola::rdm::VariableFieldSizeCalculator::PostVisit | ( | const ola::messaging::FieldDescriptorGroup * |  | ) |
| inlinevirtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [1/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::BoolFieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [2/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::FieldDescriptorGroup * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [3/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::Int16FieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [4/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::Int32FieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [5/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::Int8FieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [6/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::IPV4FieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [7/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::MACFieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [8/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::StringFieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [9/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::UIDFieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [10/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::UInt16FieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [11/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::UInt32FieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

## ◆ Visit() [12/12]

void ola::rdm::VariableFieldSizeCalculator::Visit | ( | const ola::messaging::UInt8FieldDescriptor * | descriptor | ) |
| virtual

Implements ola::messaging::FieldDescriptorVisitor.

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

- common/rdm/VariableFieldSizeCalculator.h
- common/rdm/VariableFieldSizeCalculator.cpp