29 #ifndef INCLUDE_OLA_RDM_PIDSTORE_H_
30 #define INCLUDE_OLA_RDM_PIDSTORE_H_
33 #include <ola/messaging/Descriptor.h>
55 typedef map<uint16_t, const PidStore*> ManufacturerMap;
58 const ManufacturerMap &manufacturer_stores,
60 : m_esta_store(esta_store),
61 m_manufacturer_store(manufacturer_stores),
67 uint64_t Version()
const {
return m_version; }
80 uint16_t manufacturer_id)
const;
84 uint16_t manufacturer_id)
const;
88 bool validate =
true);
92 bool validate =
true);
96 ManufacturerMap m_manufacturer_store;
101 const PidDescriptor *InternalESTANameLookup(
const string &pid_name)
const;
111 explicit PidStore(
const vector<const PidDescriptor*> &pids);
114 unsigned int PidCount()
const {
return m_pid_by_value.size(); }
115 void AllPids(vector<const PidDescriptor*> *pids)
const;
120 typedef map<uint16_t, const PidDescriptor*> PidMap;
121 typedef map<string, const PidDescriptor*> PidNameMap;
122 PidMap m_pid_by_value;
123 PidNameMap m_pid_by_name;
141 NON_BROADCAST_SUB_DEVICE,
143 } sub_device_valiator;
151 sub_device_valiator get_sub_device_range,
152 sub_device_valiator set_sub_device_range)
155 m_get_request(get_request),
156 m_get_response(get_response),
157 m_set_request(set_request),
158 m_set_response(set_response),
159 m_get_subdevice_range(get_sub_device_range),
160 m_set_subdevice_range(set_sub_device_range) {
164 const string &Name()
const {
return m_name; }
165 uint16_t Value()
const {
return m_pid_value; }
166 const Descriptor *GetRequest()
const {
return m_get_request; }
167 const Descriptor *GetResponse()
const {
return m_get_response; }
168 const Descriptor *SetRequest()
const {
return m_set_request; }
169 const Descriptor *SetResponse()
const {
return m_set_response; }
176 uint16_t m_pid_value;
181 sub_device_valiator m_get_subdevice_range;
182 sub_device_valiator m_set_subdevice_range;
187 bool RequestValid(uint16_t sub_device,
188 const sub_device_valiator &validator)
const;
192 #endif // INCLUDE_OLA_RDM_PIDSTORE_H_