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);
87 const ola::rdm::pid::PidStore &store_pb,
88 const ola::rdm::pid::PidStore &override_pb,
89 const ola::rdm::pid::PidStore &manufacturer_names_pb,
93 const ola::rdm::pid::PidStore &store_pb,
94 const ola::rdm::pid::PidStore &override_pb,
96 ola::rdm::pid::PidStore manufacturer_names_pb;
97 return BuildStore(store_pb, override_pb, manufacturer_names_pb, validate);
100 bool LoadFromProto(ManufacturerMap *pid_data,
101 const ola::rdm::pid::PidStore &proto,
104 template <
typename pb_
object>
105 bool GetPidList(PidMap *pid_map,
106 const pb_object &store,
108 bool limit_pid_values);
110 PidDescriptor *PidToDescriptor(
const ola::rdm::pid::Pid &pid,
113 const ola::rdm::pid::FrameFormat &format,
116 const ola::rdm::pid::Field &field);
118 template <
typename descriptor_
class>
120 const ola::rdm::pid::Field &field);
123 const ola::rdm::pid::Field &field);
125 const ola::rdm::pid::Field &field);
126 PidDescriptor::sub_device_validator ConvertSubDeviceValidator(
127 const ola::rdm::pid::SubDeviceRange &sub_device_range);
129 void FreeManufacturerMap(ManufacturerMap *data);
131 static const char OVERRIDE_FILE_NAME[];
132 static const char MANUFACTURER_NAMES_FILE_NAME[];
133 static const uint16_t ESTA_MANUFACTURER_ID;
134 static const uint16_t MANUFACTURER_PID_MIN;
135 static const uint16_t MANUFACTURER_PID_MAX;
141 #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:73
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:59
const RootPidStore * LoadFromStream(std::istream *data, bool validate=true)
Load Pid information from a stream.
Definition: PidStoreLoader.cpp:142
Definition: DescriptorConsistencyChecker.h:43
Definition: Descriptor.h:403
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