Open Lighting Architecture  0.10.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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. More...
 
 ~PidStore ()
 Clean up.
 
unsigned int PidCount () const
 The number of PidDescriptors in this store. More...
 
void AllPids (std::vector< const PidDescriptor * > *pids) const
 Return a list of all PidDescriptors. More...
 
const PidDescriptorLookupPID (uint16_t pid_value) const
 Lookup a PidDescriptor by PID. More...
 
const PidDescriptorLookupPID (const std::string &pid_name) const
 Lookup a PidDescriptor by parameter name. More...
 

Constructor & Destructor Documentation

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

Create a new PidStore with the given PidDescriptors.

Parameters
pidsa 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

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

Return a list of all PidDescriptors.

Parameters
[out]pidsa vector which is populated with a list of PidDescriptors.

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

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

Lookup a PidDescriptor by PID.

Parameters
pid_valuethe PID to lookup.
Returns
a PidDescriptor or NULL if the parameter wasn't found.

Lookup a PID by value.

Parameters
pid_valuethe 16 bit pid value.
const PidDescriptor * ola::rdm::PidStore::LookupPID ( const std::string &  pid_name) const

Lookup a PidDescriptor by parameter name.

Parameters
pid_namethe 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_namethe name of the pid.
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: