Example: Create Adapter for FILE Based Communication
This example helps you to create a gateway protocol of type file, which enables you to connect devices to this gateway through file. You start a gateway on the local file system, which hosts the local files to send data to sensors.
Prerequisites
You have created an adapter project as described in section Create the Adapter Project with the adapter type File.
Build the Target Folder
Procedure
Run the Adapter Project
Procedure
Test the Adapter Project
Prerequisites
Input files present as examples have some prerequisites:
Example 1
- A capability MyTemperature with the Alternate ID 1 and with a property temperature(float) exists.
- A capability MyPressure with the Alternate ID 2 and with two properties pressure(string) and unit of measure - p exists.
- A capability MyCommand with the Alternate ID 25 and with a property param(string) exists.
- A capability MyPosition with the Alternate ID 4 and with three properties, latitude(float), longitude(float), and quote(float) exists.
- A sensor type with Alternate ID 999 containing capabilities:
-
1 (MyTemperature)
-
2 (MyPressure)
-
25 (MyCommand)
-
4 (MyPosition)
-
Example 2:
- A capability WindTurbineMainInfo with the Alternate ID 100 and with properties:
- rotation_speed (float) uom m/s
- wind_speed (float) uom knots
- operating_temperature (integer) uom C
- blade_angle (integer) uom rad
- critical_state (string)
Send Data
Procedure
Delete a Device
Procedure
- Search and select the device you want to delete.
- In the header area of the device, choose .
- Choose Confirm.
Delete an Adapter
Procedure
- Stop the local gateway by closing the console client.
- Search for and choose the gateway you want to delete.
- In the header area of the details page of the gateway, choose .
- Choose Confirm.