When writing a device type using the Java Code approach you need to write the device plugin, APIs, transports, UI, and analytics components from scratch. This section describes how to write the device plugin.
|title||Why do we need a device plugin?|
|title||Click here for more information.|
A device plugin is an OSGi bundle that gets wired with the WSO2 Connected Device Management Framework (CDMF). Whenwrtinga device type using the Java code approach the device requires a specific device plugin. A specific device plugin is required due to the following reasons:
- Enables its the device manufacturer or the device type creators to have control over the device.
- A device can have its own unique set of attributes. Therefore it is necessary to maintain a separate data store to keep track of the data. This can be achieved by maintaining a separate data store for each device in the plugin layer.
To understand the device plugin implementation let's take a look at the Raspberry Pi device implementation. Follow the steps given below to create a new device plugin: