Difference between revisions of "How to develop a new Device"
(Created page with "Assuming you already have the protocol, you need a device implementation. There are (at least) two possible ways. A) Implement the new device in Java, like the SensorTag. In...")
|(2 intermediate revisions by 2 users not shown)|
|Line 1:||Line 1:|
) device in the . one the device in the . is the the on the . is
Implement the device the -, . in . .
Latest revision as of 09:06, 6 March 2018
To support a specific device (e.g. SensorTag with default TI BLE GATT firmware and characteristics) on top of a generic protocol (e.g. BLE GATT), AGILE requires a device type implementation to be deployed in the system. Device types are deployed in device factories (one factory can implement several device types) and device representations are instantiated by the factory when a device is registered in the system. Device factories and the device registration is managed by the device manager. Once the device is instantiated it is also registered on the D-Bus. Communication with the device implementation is direct and does not involve the device manager after the registration step.
The system currently contains one Java based DeviceFactory only. Other factories (e.g. one in Python) can be added to the system by modifying the DeviceManager.
Implementing a device type in the default DeviceFactory
Implement the new device in the DeviceFactory (part of agile-core) in Java, like the SensorTag. You should write one class implementing the device type, inheriting from the base device class (or some more specific class in the hierarchy). Please follow the example at https://github.com/Agile-IoT/agile-core/pull/45