Skip to content

Implementing_Application_Logic

Pankesh Patel edited this page Apr 5, 2016 · 3 revisions

To describe the application logic of each computational service, the application developer leverages a generated architecture framework (Step 5). It contains abstract classes (we assume that the application developer uses an object-oriented language), corresponding to each computational service, that hide interaction details with other software components and allow the application developer to focus only on application logic. The application developer implements only the abstract methods of generated abstract classes.

For the next step - Specifying target deployment

Figure 2 IoT Application Development Process: Overall Process

Implementing Application Logic

For each input declared by a computational service, an abstract method is generated for receiving data. This abstract method is then implemented by the application developer.

From the tempMeasurement input of the RoomAvgTemp declaration in the architecture specification (Listing 2, line 4), the onNewTempMeasurement() abstract method is generated. This method is implemented by the application developer. Listing 4 illustrates the implementation of onNewTempMeasurement(). It calculates average temperate and generates roomAvgTempMeasurement using setToomAvgTempMeasurement() method.