Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ola::rdm::RootPidStore Class Reference

Detailed Description

The root of the RDM parameter descriptor store.

The root parameter store holds the ESTA (formerly known as PLASA, formerly known as ESTA) parameters as well as any manufacturer defined parameters. Parameter definitions are loaded from .proto files, which are generated by the http://rdm.openlighting.org site.

Each parameter has an 16bit identifier (PID).

ESTA PIDs are those defined by the E1.X series of documents. To date this includes:

An overrides.proto file can be used as a local system override of any PID data. This allows manufacturers to specify their own manufacturer specific commands and for testing of draft PIDs.

Public Types

typedef std::map< uint16_t,
const PidStore * > 
ManufacturerMap
 

Public Member Functions

 RootPidStore (const PidStore *esta_store, const ManufacturerMap &manufacturer_stores, uint64_t version=0)
 Create a new RootPidStore. More...
 
uint64_t Version () const
 The version of the RDM parameter data. More...
 
const PidStoreEstaStore () const
 Return the PidStore for ESTA (PLASA) parameters. More...
 
const PidStoreManufacturerStore (uint16_t esta_id) const
 Return the PidStore for a manufacturer. More...
 
const PidDescriptorGetDescriptor (const std::string &pid_name) const
 Lookup an ESTA-defined parameter by name. More...
 
const PidDescriptorGetDescriptor (const std::string &pid_name, uint16_t manufacturer_id) const
 Lookup a parameter by name in both the ESTA and the specified manufacturer store. More...
 
const PidDescriptorGetDescriptor (uint16_t pid_value) const
 Look up a ESTA-defined parameter by PID. More...
 
const PidDescriptorGetDescriptor (uint16_t pid_value, uint16_t manufacturer_id) const
 Lookup a parameter by PID in both the ESTA and the specified manufacturer store. More...
 

Static Public Member Functions

static const RootPidStoreLoadFromFile (const std::string &file, bool validate=true)
 Load a RootPidStore from a file. More...
 
static const RootPidStoreLoadFromDirectory (const std::string &directory, bool validate=true)
 Load a RootPidStore from a directory. More...
 
static const std::string DataLocation ()
 Returns the location of the installed PID data. More...
 

Constructor & Destructor Documentation

ola::rdm::RootPidStore::RootPidStore ( const PidStore esta_store,
const ManufacturerMap &  manufacturer_stores,
uint64_t  version = 0 
)
inline

Create a new RootPidStore.

Most code shouldn't have to use this. Use RootPidStore::LoadFromFile or RootPidStore::LoadFromDirectory instead.

Member Function Documentation

const string ola::rdm::RootPidStore::DataLocation ( )
static

Returns the location of the installed PID data.

Returns
the directory where the pid data was installed.
const PidStore* ola::rdm::RootPidStore::EstaStore ( ) const
inline

Return the PidStore for ESTA (PLASA) parameters.

Returns
the PidStore for the ESTA parameters. The pointer is valid for the lifetime of the RootPidStore.
const PidDescriptor * ola::rdm::RootPidStore::GetDescriptor ( const std::string &  pid_name) const

Lookup an ESTA-defined parameter by name.

Parameters
pid_namethe name of the parameter.
Returns
a PidDescriptor or NULL if the parameter wasn't found.
const PidDescriptor * ola::rdm::RootPidStore::GetDescriptor ( const std::string &  pid_name,
uint16_t  manufacturer_id 
) const

Lookup a parameter by name in both the ESTA and the specified manufacturer store.

Parameters
pid_namethe name of the parameter to look for.
manufacturer_idthe ESTA id of the manufacturer.
Returns
a PidDescriptor or NULL if the parameter wasn't found.
const PidDescriptor * ola::rdm::RootPidStore::GetDescriptor ( uint16_t  pid_value) const

Look up a ESTA-defined parameter by PID.

Parameters
pid_valuethe PID to lookup.
Returns
a PidDescriptor or NULL if the parameter wasn't found.
const PidDescriptor * ola::rdm::RootPidStore::GetDescriptor ( uint16_t  pid_value,
uint16_t  manufacturer_id 
) const

Lookup a parameter by PID in both the ESTA and the specified manufacturer store.

Parameters
pid_valuethe pid to lookup
manufacturer_idthe ESTA id of the manufacturer.
Returns
a PidDescriptor or NULL if the parameter wasn't found.
const RootPidStore * ola::rdm::RootPidStore::LoadFromDirectory ( const std::string &  directory,
bool  validate = true 
)
static

Load a RootPidStore from a directory.

Parameters
directorythe directory containing the PID data. If directory is empty, the installed location will be used.
validatewhether to perform validation on the data. Validation can be turned off for faster load times.
const RootPidStore * ola::rdm::RootPidStore::LoadFromFile ( const std::string &  file,
bool  validate = true 
)
static

Load a RootPidStore from a file.

Parameters
filethe file to load
validatewhether to perform validation on the data. Validation can be turned off for faster load times.
const PidStore * ola::rdm::RootPidStore::ManufacturerStore ( uint16_t  esta_id) const

Return the PidStore for a manufacturer.

Parameters
esta_idthe manufacturer id.
Returns
A pointer to a PidStore or NULL if there were no parameters for this manufacturer.
uint64_t ola::rdm::RootPidStore::Version ( ) const
inline

The version of the RDM parameter data.

Returns
The version of the parameter data. A higher number is a more recent version.

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