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

| Open Lighting Architecture 0.10.9

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

## Public Member Functions
| PidStoreHelper (const std::string &pid_location, unsigned int initial_indent=0)
| Set up a new PidStoreHelper object.
| ~PidStoreHelper ()
| Clean up.
bool | Init ()
| Init the PidStoreHelper, this loads the PID store.
const PidDescriptor * | GetDescriptor (const std::string &pid_name, uint16_t manufacturer_id) const
| Lookup a PidDescriptor by name.
const PidDescriptor * | GetDescriptor (uint16_t param_id, uint16_t manufacturer_id) const
| Lookup a PidDescriptor by PID value.
const ola::messaging::Message * | BuildMessage (const ola::messaging::Descriptor *descriptor, const std::vector< std::string > &inputs)
| Build a Message object from a series of input strings.
const uint8_t * | SerializeMessage (const ola::messaging::Message *message, unsigned int *data_length)
| Serialize a message to binary format.
const ola::messaging::Message * | DeserializeMessage (const ola::messaging::Descriptor *descriptor, const uint8_t *data, unsigned int data_length)
| DeSerialize a message.
const std::string | MessageToString (const ola::messaging::Message *message)
| Convert a message to a string.
const std::string | PrettyPrintMessage (uint16_t manufacturer_id, bool is_set, uint16_t pid, const ola::messaging::Message *message)
| Pretty print a RDM message based on the PID.
const std::string | SchemaAsString (const ola::messaging::Descriptor *descriptor)
| Return a string describing the schema for a descriptor.
void | SupportedPids (uint16_t manufacturer_id, std::vector< std::string > *pid_names) const
| Return the list of PIDs supported including manufacturer PIDs.
void | SupportedPids (uint16_t manufacturer_id, std::vector< const PidDescriptor * > *descriptors) const
| Return the list of PidDescriptors supported.

## Member Function Documentation

## ◆ GetDescriptor() [1/2]

const ola::rdm::PidDescriptor * ola::rdm::PidStoreHelper::GetDescriptor | ( | const std::string & | pid_name,
|  | uint16_t | manufacturer_id ) const

Lookup a PidDescriptor by name.

Parameters

  manufacturer_id | the ESTA id of the manufacturer_id
  pid_name | the name of the pid

Returns
  a PidDescriptor or NULL if the pid wasn't found.

## ◆ GetDescriptor() [2/2]

const ola::rdm::PidDescriptor * ola::rdm::PidStoreHelper::GetDescriptor | ( | uint16_t | pid_value,
|  | uint16_t | manufacturer_id ) const

Lookup a PidDescriptor by PID value.

Parameters

  manufacturer_id | the ESTA id of the manufacturer_id
  pid_value | the pid to lookup

Returns
  a PidDescriptor or NULL if the pid wasn't found.

## ◆ MessageToString()

const string ola::rdm::PidStoreHelper::MessageToString | ( | const ola::messaging::Message * | message | ) |

Convert a message to a string.

Parameters

  message | the Message object to print

Returns
  a formatted string representation of the message.

## ◆ PrettyPrintMessage()

const string ola::rdm::PidStoreHelper::PrettyPrintMessage | ( | uint16_t | manufacturer_id,
|  | bool | is_set,
|  | uint16_t | pid,
|  | const ola::messaging::Message * | message )

Pretty print a RDM message based on the PID.

If we can't find a custom MessagePrinter we default to the GenericMessagePrinter.

Parameters

  manufacturer_id | the manufacturer ID
  is_set | true if the message is a set command, false otherwise
  pid | the pid value
  message | the Message object to print

Returns
  a formatted string representation of the message.

## ◆ SupportedPids()

void ola::rdm::PidStoreHelper::SupportedPids | ( | uint16_t | manufacturer_id,
|  | std::vector< const PidDescriptor * > * | descriptors ) const

Return the list of PidDescriptors supported.

The caller does not own the pointers, they are valid for the lifetime of the PidStoreHelper.

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

- include/ola/rdm/PidStoreHelper.h
- common/rdm/PidStoreHelper.cpp