23 #ifndef COMMON_RDM_PIDSTORELOADER_H_
24 #define COMMON_RDM_PIDSTORELOADER_H_
26 #include <ola/messaging/Descriptor.h>
32 #include "common/rdm/DescriptorConsistencyChecker.h"
33 #include "common/rdm/Pids.pb.h"
53 bool validate =
true);
65 bool validate =
true);
75 bool validate =
true);
78 typedef std::map<uint16_t, const PidDescriptor*> PidMap;
79 typedef std::map<uint16_t, PidMap*> ManufacturerMap;
83 bool ReadFile(
const std::string &file_path,
84 ola::rdm::pid::PidStore *proto);
86 const RootPidStore *BuildStore(
const ola::rdm::pid::PidStore &store_pb,
87 const ola::rdm::pid::PidStore &override_pb,
90 bool LoadFromProto(ManufacturerMap *pid_data,
91 const ola::rdm::pid::PidStore &proto,
94 template <
typename pb_
object>
95 bool GetPidList(PidMap *pid_map,
96 const pb_object &store,
98 bool limit_pid_values);
100 PidDescriptor *PidToDescriptor(
const ola::rdm::pid::Pid &pid,
103 const ola::rdm::pid::FrameFormat &format,
106 const ola::rdm::pid::Field &field);
108 template <
typename descriptor_
class>
110 const ola::rdm::pid::Field &field);
113 const ola::rdm::pid::Field &field);
115 const ola::rdm::pid::Field &field);
116 PidDescriptor::sub_device_validator ConvertSubDeviceValidator(
117 const ola::rdm::pid::SubDeviceRange &sub_device_range);
119 void FreeManufacturerMap(ManufacturerMap *data);
121 static const char OVERRIDE_FILE_NAME[];
122 static const uint16_t ESTA_MANUFACTURER_ID;
123 static const uint16_t MANUFACTURER_PID_MIN;
124 static const uint16_t MANUFACTURER_PID_MAX;
130 #endif // COMMON_RDM_PIDSTORELOADER_H_
const RootPidStore * LoadFromDirectory(const std::string &directory, bool validate=true)
Load PID information from a directory, including overrides.
Definition: PidStoreLoader.cpp:71
Definition: PidStoreLoader.h:41
Definition: Descriptor.h:66
Holds information about RDM PIDs.
const RootPidStore * LoadFromFile(const std::string &file, bool validate=true)
Load PID information from a file.
Definition: PidStoreLoader.cpp:57
const RootPidStore * LoadFromStream(std::istream *data, bool validate=true)
Load Pid information from a stream.
Definition: PidStoreLoader.cpp:118
Definition: DescriptorConsistencyChecker.h:43
Definition: Descriptor.h:399
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
The root of the RDM parameter descriptor store.
Definition: PidStore.h:68
Definition: PidStore.h:246