After unpacking and installing the framework, and modifying literals.js, to run the Driver Framework as supplied on the SmartServer IoT, perform the following steps:
- From a console connection, run the framework from the driver-framework directory ($APOLLO_DATA/driver-framework) using the following script:
- For verbose messaging, run the framework using the following script:
node index.js -v 4
You will need to create a suitable DTD file in CSV format to allow you to create a "logical device" in the CMS with the contents shown below (without any indents). You can do this using Notepad.exe:
- Then, import the DTD file using the Devices widget (see Collecting or Creating Device Interface (XIF) Definitions):
- At this point, you will be able to create, provision, and test an IOX device type in the Devices widget, and view and edit datapoints in the Datapoint Browser widget. Use any format for the UID when creating a device (see Discovering, Defining, or Importing Devices). You might wish to change this in your custom driver by modifying create_action.js: createActionValidator() as required.
Create Device (first view)
Create Device (second view)
The following screen capture shows the console output after starting the application using verbose mode, and provisioning a device after it has been created in the CMS:
After the device is created and provisioned, you can test it from the Device widget (see Testing Devices).
Once you have finished creating your custom driver, you can configure the supervisor to start it automatically.
See Configuring the Supervisor for more information.