Open Lighting Architecture  0.9.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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:
ola::messaging::FieldDescriptorVisitor

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 *)
- Public Member Functions inherited from ola::messaging::FieldDescriptorVisitor
virtual void Visit (const IntegerFieldDescriptor< uint8_t > *)=0
virtual void Visit (const IntegerFieldDescriptor< uint16_t > *)=0
virtual void Visit (const IntegerFieldDescriptor< uint32_t > *)=0
virtual void Visit (const IntegerFieldDescriptor< int8_t > *)=0
virtual void Visit (const IntegerFieldDescriptor< int16_t > *)=0
virtual void Visit (const IntegerFieldDescriptor< int32_t > *)=0

Member Function Documentation

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
descriptorThe descriptor to use to build the Message
Returns
A Message object, or NULL if the inputs failed.

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