29 #ifndef INCLUDE_OLA_RDM_PIDSTORE_H_
30 #define INCLUDE_OLA_RDM_PIDSTORE_H_
33 #include <ola/messaging/Descriptor.h>
70 typedef std::map<uint16_t, const PidStore*> ManufacturerMap;
79 const ManufacturerMap &manufacturer_stores,
81 : m_esta_store(esta_store),
82 m_manufacturer_store(manufacturer_stores),
93 uint64_t
Version()
const {
return m_version; }
101 return m_esta_store.get();
127 uint16_t manufacturer_id)
const;
144 uint16_t manufacturer_id)
const;
153 bool validate =
true);
163 bool validate =
true);
172 std::auto_ptr<const PidStore> m_esta_store;
173 ManufacturerMap m_manufacturer_store;
177 const std::string &pid_name)
const;
196 explicit PidStore(
const std::vector<const PidDescriptor*> &pids);
207 unsigned int PidCount()
const {
return m_pid_by_value.size(); }
216 void AllPids(std::vector<const PidDescriptor*> *pids)
const;
233 typedef std::map<uint16_t, const PidDescriptor*> PidMap;
234 typedef std::map<std::string, const PidDescriptor*> PidNameMap;
235 PidMap m_pid_by_value;
236 PidNameMap m_pid_by_name;
253 NON_BROADCAST_SUB_DEVICE,
255 } sub_device_validator;
263 sub_device_validator get_sub_device_range,
264 sub_device_validator set_sub_device_range)
267 m_get_request(get_request),
268 m_get_response(get_response),
269 m_set_request(set_request),
270 m_set_response(set_response),
271 m_get_subdevice_range(get_sub_device_range),
272 m_set_subdevice_range(set_sub_device_range) {
276 const std::string &Name()
const {
return m_name; }
277 uint16_t Value()
const {
return m_pid_value; }
280 return m_get_response;
284 return m_set_response;
291 const std::string m_name;
292 uint16_t m_pid_value;
297 sub_device_validator m_get_subdevice_range;
298 sub_device_validator m_set_subdevice_range;
300 bool RequestValid(uint16_t sub_device,
301 const sub_device_validator &validator)
const;
307 #endif // INCLUDE_OLA_RDM_PIDSTORE_H_