Open Lighting Architecture  Latest Git
Public Types | Public Member Functions | List of all members
ola::rdm::GroupSizeCalculator Class Reference

Detailed Description

Calculate the number of repeats of a group required, given a certain number of tokens.

Inheritance diagram for ola::rdm::GroupSizeCalculator:
Inheritance graph
[legend]
Collaboration diagram for ola::rdm::GroupSizeCalculator:
Collaboration graph
[legend]

Public Types

enum  calculator_state {
  INSUFFICIENT_TOKENS, EXTRA_TOKENS, NO_VARIABLE_GROUPS, SINGLE_VARIABLE_GROUP,
  MULTIPLE_VARIABLE_GROUPS, NESTED_VARIABLE_GROUPS, MISMATCHED_TOKENS
}
 

Public Member Functions

bool Descend () const
 
calculator_state CalculateGroupSize (unsigned int token_count, const class ola::messaging::Descriptor *descriptor, unsigned int *group_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

◆ CalculateGroupSize()

GroupSizeCalculator::calculator_state ola::rdm::GroupSizeCalculator::CalculateGroupSize ( unsigned int  token_count,
const class ola::messaging::Descriptor descriptor,
unsigned int *  group_repeat_count 
)

Figure out the number of group repetitions required.

This method is not re-entrant.

Parameters
token_countthe number of tokens supplied
descriptorthe descriptor to use to build the Message
[out]group_repeat_countthe number of repeated groups
Returns
the state of the calculator as a calculator_state.

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