-
Notifications
You must be signed in to change notification settings - Fork 3
Implementing_Device_Drivers
Leveraging the vocabulary, IoTSuite generate a vocabulary framework to aid the device developer (Step 8). The vocabulary framework contains interfaces and concrete classes corresponding to resources defined in the vocabulary. The concrete classes contain concrete methods for interacting with other software components and platform-specific device drivers. The interfaces are implemented by the device developer to write platform-specific device drivers.

For each resource declared in a vocabulary specification, interfaces are generated. Each interface contains synchronous and asynchronous abstract methods corresponding to a resource declaration. These methods are implemented by the device developer to write device specific drivers.

For example, IoTSuite generates a vocabulary framework that contains the interface ITemperatureSensor (in Listing 5) corresponding to the TemperatureSensor declaration in the vocabulary specification. The device developer programs Android-specific implementation in the Android TemperatureSensor class (in Listing 6) by implementing the methods getTemperatureMeasurement() and getTemperatureMeasurem ent(handler)of the generated interface ITemperatureSensor.
