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

| Open Lighting Architecture 0.10.9

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

## Detailed Description

Holds the PidDescriptors for a single manufacturer.

## Public Member Functions
| PidStore (const std::vector< const PidDescriptor * > &pids)
| Create a new PidStore with the given PidDescriptors.
| ~PidStore ()
| Clean up.
unsigned int | PidCount () const
| The number of PidDescriptors in this store.
void | AllPids (std::vector< const PidDescriptor * > *pids) const
| Return a list of all PidDescriptors.
const PidDescriptor * | LookupPID (uint16_t pid_value) const
| Lookup a PidDescriptor by PID.
const PidDescriptor * | LookupPID (const std::string &pid_name) const
| Lookup a PidDescriptor by parameter name.

## Constructor & Destructor Documentation

## ◆ PidStore()

ola::rdm::PidStore::PidStore | ( | const std::vector< const PidDescriptor * > & | pids | ) |
| explicit

Create a new PidStore with the given PidDescriptors.

Parameters

  pids | a list of PidDescriptors to use.

Precondition
  the names and values for the pids in the vector are unique.

Note
  Most code shouldn't have to use this. Call RootPidStore::LoadFromFile() or RootPidStore::LoadFromDirectory() instead.

## Member Function Documentation

## ◆ AllPids()

void ola::rdm::PidStore::AllPids | ( | std::vector< const PidDescriptor * > * | pids | ) | const

Return a list of all PidDescriptors.

Parameters

  [out] | pids | a vector which is populated with a list of PidDescriptors.

The pointers returned are valid for the life of the PidStore object.

## ◆ LookupPID() [1/2]

const PidDescriptor * ola::rdm::PidStore::LookupPID | ( | const std::string & | pid_name | ) | const

Lookup a PidDescriptor by parameter name.

Parameters

  pid_name | the name of the parameter to look for.

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

Lookup a PID by name

Parameters

  pid_name | the name of the pid.

## ◆ LookupPID() [2/2]

const PidDescriptor * ola::rdm::PidStore::LookupPID | ( | uint16_t | pid_value | ) | const

Lookup a PidDescriptor by PID.

Parameters

  pid_value | the PID to lookup.

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

Lookup a PID by value.

Parameters

  pid_value | the 16 bit pid value.

## ◆ PidCount()

unsigned int ola::rdm::PidStore::PidCount | ( |  | ) | const
| inline

The number of PidDescriptors in this store.

Returns
  the number of PidDescriptors in this store.

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

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