29 #ifndef INCLUDE_OLA_RDM_PIDSTORE_H_
30 #define INCLUDE_OLA_RDM_PIDSTORE_H_
33 #include <ola/messaging/Descriptor.h>
66 typedef std::map<uint16_t, const PidStore*> ManufacturerMap;
75 const ManufacturerMap &manufacturer_stores,
77 : m_esta_store(esta_store),
78 m_manufacturer_store(manufacturer_stores),
89 uint64_t
Version()
const {
return m_version; }
97 return m_esta_store.get();
123 uint16_t manufacturer_id)
const;
140 uint16_t manufacturer_id)
const;
149 bool validate =
true);
159 bool validate =
true);
168 std::auto_ptr<const PidStore> m_esta_store;
169 ManufacturerMap m_manufacturer_store;
173 const std::string &pid_name)
const;
192 explicit PidStore(
const std::vector<const PidDescriptor*> &pids);
203 unsigned int PidCount()
const {
return m_pid_by_value.size(); }
212 void AllPids(std::vector<const PidDescriptor*> *pids)
const;
229 typedef std::map<uint16_t, const PidDescriptor*> PidMap;
230 typedef std::map<std::string, const PidDescriptor*> PidNameMap;
231 PidMap m_pid_by_value;
232 PidNameMap m_pid_by_name;
249 NON_BROADCAST_SUB_DEVICE,
251 } sub_device_validator;
259 sub_device_validator get_sub_device_range,
260 sub_device_validator set_sub_device_range)
263 m_get_request(get_request),
264 m_get_response(get_response),
265 m_set_request(set_request),
266 m_set_response(set_response),
267 m_get_subdevice_range(get_sub_device_range),
268 m_set_subdevice_range(set_sub_device_range) {
272 const std::string &Name()
const {
return m_name; }
273 uint16_t Value()
const {
return m_pid_value; }
276 return m_get_response;
280 return m_set_response;
287 const std::string m_name;
288 uint16_t m_pid_value;
293 sub_device_validator m_get_subdevice_range;
294 sub_device_validator m_set_subdevice_range;
296 bool RequestValid(uint16_t sub_device,
297 const sub_device_validator &validator)
const;
303 #endif // INCLUDE_OLA_RDM_PIDSTORE_H_