-
Notifications
You must be signed in to change notification settings - Fork 6
Device Registry
Device registry system stores every device's information inside a global registry for RadCat system to see it. Most of RadCat systems check devices properties even before they are activated/instantiated by the system. Thats because there may be hundreds of devices at system yet you may only be using few.
To register your device properly you need to do 2 steps. First you need to implement the registery macro in your device's cpp file:
REGISTER_DEVICE(class, "Name");
Then you need to fill the device information struct. Every device registry holds a device information struct for each device:
struct DeviceInfo {
string deviceName;
string serialNumber;
string model;
string firmwareVersion;
}
You can fill the device information struct by defining your device information with fallowing code in your hpp file.
static inline const DeviceRegistry::RegistryEntry::DeviceInfo deviceInfo = {"Device Name", "Serial Number", "Model", "FWV"};
With these 2 steps your device is registered to the system.