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

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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 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).

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

- E1.20, Remote Device Management.
- E1.37-1, Additional Message Sets for Dimmers.
- E1.37-2, Additional Message Sets for IPv4 & DNS Configuration.

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.
uint64_t | Version () const
| The version of the RDM parameter data.
const PidStore * | EstaStore () const
| Return the PidStore for PLASA (ESTA) parameters.
const PidStore * | ManufacturerStore (uint16_t esta_id) const
| Return the PidStore for a manufacturer.
const PidDescriptor * | GetDescriptor (const std::string &pid_name) const
| Lookup a PLASA-defined parameter by name.
const PidDescriptor * | GetDescriptor (const std::string &pid_name, uint16_t manufacturer_id) const
| Lookup a parameter by name in both the PLASA and the specified manufacturer store.
const PidDescriptor * | GetDescriptor (uint16_t pid_value) const
| Look up a PLASA-defined parameter by PID.
const PidDescriptor * | GetDescriptor (uint16_t pid_value, uint16_t manufacturer_id) const
| Lookup a parameter by PID in both the PLASA and the specified manufacturer store.

## Static Public Member Functions
static const RootPidStore * | LoadFromFile (const std::string &file, bool validate=true)
| Load a RootPidStore from a file.
static const RootPidStore * | LoadFromDirectory (const std::string &directory, bool validate=true)
| Load a RootPidStore from a directory.
static const std::string | DataLocation ()
| Returns the location of the installed PID data.

## Constructor & Destructor Documentation

## ◆ RootPidStore()

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

## ◆ DataLocation()

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

Returns the location of the installed PID data.

Returns
  the directory where the pid data was installed.

## ◆ EstaStore()

const PidStore * ola::rdm::RootPidStore::EstaStore | ( |  | ) | const
| inline

Return the PidStore for PLASA (ESTA) parameters.

Returns
  the PidStore for the PLASA parameters. The pointer is valid for the lifetime of the RootPidStore.

## ◆ GetDescriptor() [1/4]

const PidDescriptor * ola::rdm::RootPidStore::GetDescriptor | ( | const std::string & | pid_name | ) | const

Lookup a PLASA-defined parameter by name.

Parameters

  pid_name | the name of the parameter.

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

## ◆ GetDescriptor() [2/4]

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

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

Parameters

  pid_name | the name of the parameter to look for.
  manufacturer_id | the ESTA id of the manufacturer.

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

## ◆ GetDescriptor() [3/4]

const PidDescriptor * ola::rdm::RootPidStore::GetDescriptor | ( | uint16_t | pid_value | ) | const

Look up a PLASA-defined parameter by PID.

Parameters

  pid_value | the PID to lookup.

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

## ◆ GetDescriptor() [4/4]

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

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

Parameters

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

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

## ◆ LoadFromDirectory()

const RootPidStore * ola::rdm::RootPidStore::LoadFromDirectory | ( | const std::string & | directory,
|  | bool | validate = true )
| static

Load a RootPidStore from a directory.

Parameters

  directory | the directory containing the PID data. If directory is empty, the installed location will be used.
  validate | whether to perform validation on the data. Validation can be turned off for faster load times.

## ◆ LoadFromFile()

const RootPidStore * ola::rdm::RootPidStore::LoadFromFile | ( | const std::string & | file,
|  | bool | validate = true )
| static

Load a RootPidStore from a file.

Parameters

  file | the file to load
  validate | whether to perform validation on the data. Validation can be turned off for faster load times.

## ◆ ManufacturerStore()

const PidStore * ola::rdm::RootPidStore::ManufacturerStore | ( | uint16_t | esta_id | ) | const

Return the PidStore for a manufacturer.

Parameters

  esta_id | the manufacturer id.

Returns
  A pointer to a PidStore or NULL if there were no parameters for this manufacturer.

## ◆ Version()

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:

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