-
Notifications
You must be signed in to change notification settings - Fork 3
Command Line Interface: Application Development Using IoTSuite
The application development using IoTSuite involves an application development process to follow. It involves writing high-level specifications (i.e., domain specification, architecture specification, user interaction specification, deployment specification), compilation of these specifications that results into programming frameworks (i.e., domain framework, architecture framework, User interface framework), and writing code on top of these frameworks at different stages of the application development process.
IoTSuite is depended on some external library. So, Before downloading ToolSuite, users have to set-up. See [set up guide] (https://github.com/pankeshlinux/IoTSuite/wiki/Set-up:-Command-line-version-of--IoTSuite-in-Eclipse)
Application development using IoTSuite involves the following steps:
This stage involves the following steps:
-
Create
vocab.mydslfile. -
Write domain specification in the
vocab.mydslfile. (Examples are availableIoTSuite\Examples)
- Copy the
vocab.mydslfile intoSpecfolder. You can find this folder in the directory where you put `IoTSuiteproject. For instance, If you copy IoTSuite project inD:/IoTSuite``, you have to copy ``vocab.mydsl`` file into the ``D:/IoTSuite/Spec/`` path.
[For understanding theory behind compiling vocabulary specification stage, please refer this link]
This stage involves the invoking IoTSuite from the command-line interface. The command involves two arguments: (1) Activity name (in our case - compile-vocab-spec) (2) a path where you want to generates output. (for instance, C:\IoTSuite-Template\)
In Eclipse, you can invoke IoTSuite in the following way:
- Go to
RunMenu >Run Configurationoption > PressArgumentTab - Write the following two line command in the
Argumenttab, as shown in the following image.

This stage involves the following steps:
-
Create "arch.txt" file.
-
Write architecture specification in the "arch.txt" file. [For detail - how can developer write architecture specification, please refer this [link] (https://github.com/pankeshlinux/IoTSuite/wiki/Specifying_Application_Architecture).]
-
Copy the "arch.txt" file into "Spec" folder. You can find this folder in the directory where you put IoTSuite project. For instance, If you copy IoTSuite project in "D:/IoTSuite", you have to copy "arch.txt" file into the "D:/IoTSuite/Spec/" path.
[For understanding theory behind compiling architecture specification stage, please refer this link]
This stage involves the invoking IoTSuite from the command-line interface. The command involves two arguments: (1) Activity name (in our case - "compile-arch-spec") (2) a path where you want to generates output. (for instance, "**D:\Template**")
In Eclipse, you can invoke IoTSuite in the following way:
- Please check the Setup Guide before go to the step 2.
- Go to "Run" Menu > "Run Configuration" > Press "Argument" Tab
- Write the following two line command in the Argument tab, as shown in the following image.

[For detail - how can developer write application logic, please refer this [link] (https://github.com/pankeshlinux/IoTSuite/wiki/Implementing_Application_Logic).]
The compilation of the architecture specification generates an "architecture framework" in the "ApplicationLogic" folder, which can be found in the "Template" folder. To implement the application logic, a developer has to follow the following steps:
-
Import "ApplicationLogic" folder into Eclipse IDE ( File > Import > Existing Projects into Workspace > Select root directory > Press Browse button > Provide path of "ApplicationLogic" folder (in our case, it can be found in D:\Template\ApplicationLogic) > Finish ).
-
Open "Logic" package of the "ApplicationLogic" folder.
-
Write application logic in each generated files (i.e., LogicRoomAvgTemp.java, LogicRoomController.java)
The following image shows the imported "ApplicationLogic" folder into EclipseIDE and a place, where application developer writes application logic.

-
Create "deply.txt" file.
-
Write deployment specification in the "deply.txt" file. For detail - how can developer write target deployment specification, please refer this [link] (https://github.com/pankeshlinux/IoTSuite/wiki/Specifying_Target_Deployment).]
-
Copy the "deply.txt" file into "Spec" folder. You can find this folder in the directory where you put IoTSuite project. For instance, If you copy IoTSuite project in "D:/IoTSuite", you have to copy "deply.txt" file into the "D:/IoTSuite/Spec/" path.
[For understanding theory behind Mapping stage, please refer this link]
This stage involves the invoking IoTSuite from the command-line interface. The command involves two arguments: (1) Activity name (in our case - "invoke-mapper") (2) a path where you want to generates output. (for instance, "**D:\Template**")
In Eclipse, you can invoke IoTSuite in the following way:
- Please check the Setup Guide before go to the step 2.
- Go to "Run" Menu > "Run Configuration" > Press "Argument" Tab
- Write the following two line command in the Argument tab, as shown in the following image.

For detail - how can developer write device drivers, please refer this [link] (https://github.com/pankeshlinux/IoTSuite/wiki/Implementing_Device_Drivers).]
The compilation of the vocabulary specification generates an vocabulary framework in the two folders "JavaSEDeviceDrivers" and "AndroidDeviceDrivers" folder, which can be found in the "Template" folder. To implements the device driver, a developer has to follow the following steps:
-
Import both "JavaSEDeviceDrivers" and "AndroidDeviceDrivers" folders into Eclipse IDE ( File > Import > Existing Projects into Workspace > Select root directory > Press Browse button > Provide path of JavaSEDeviceDrivers/AndroidDeviceDrivers folders (in our case, it can be found in D:\Template) > Finish ).
-
Open "deviceImpl" package of the JavaSEDeviceDrivers/AndroidDeviceDrivers folder.
-
Write device drivers code in each generated files . In JavaSEDeviceDriver folder, you find the files name start with "JavaSE" (e.g., JavaSETemperatureSensor, JavaSEHeater) and in AndroidDeviceDriver folder, you find the files start with "Android" (e.g., AndroidTemperatureSensor, AndroidHeater).
The following image shows the imported "AndroidDeviceDriver" folder into EclipseIDE and a place, where device developer writes devicedriver code.

[For understanding theory behind Linking stage, please refer this link]
This stage involves the invoking IoTSuite from the command-line interface. The command involves two arguments: (1) Activity name (in our case - "invoke-linker") (2) a path where you want to generates output. (for instance, "**D:\Template**")
In Eclipse, you can invoke IoTSuite in the following way:
- Please check the Setup Guide before go to the step 2.
- Go to "Run" Menu > "Run Configuration" > Press "Argument" Tab
- Write the following two line command in the Argument tab, as shown in the following image.

The output of the linker is a set of platform-specific projects for devices, specified in the deployment specification. These projects are not binaries. They need to be compiled, which can be done by any device-specific compiler designed for the target platform. In the following, we present an output of the linker module in case of a deployment scenario of Hello World Application.
The linker module generates projects in to "CodeForDeployment" folder, which can be found in the "Template" folder.
