Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Info
titleWhy do we need a device plugin?
Expand
titleClick 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.

Image Added

Tip
titleBefore you begin

Make sure you have the required folder structure, and the databases and datasources configured.

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:

...