The conf file contains a JSON object that provides details about the IDI. This file must reside on the SSIoT and it’s absolute path must be specified in the IDL init call. The parameters in the conf file describe the IDI instance and how it works.
The following example shows a conf file. The parameters are described below the example.
{ "Protocol identifier": "example", "MQTT specific details": { "MQTT client ID": "example.0", "cleanSession": false }, "xif_dir_absolute_path": "/var/apollo/data/idl-example/res", "isDiscoverySupported": true, "timeouts": { "Device create timeout ms": 120000, "Device provision timeout ms": 60000, "Device deprovision timeout ms": 10000, "Device replace timeout ms": 60000, "Device delete timeout ms": 60000, "Datapoint read timeout ms": 1000, "Datapoint write timeout ms": 1000, "Discovery start callback timeout ms": 15000, "Discovery step callback timeout ms": 30000, "Discovery stop callback timeout ms": 15000 }, "about object details": { "device max count": 127, "name": "Example protocol engine", "desc": "Example protocol engine for SmartServer IoT" } }
Conf File Parameters
The following list describes the conf parameters.
Parameter | Description |
---|---|
Protocol identifier | (Required) Identifies the protocol to be used in any IAP/MQ topics used by this driver that require specifying the protocol. |
MQTT specific details | (Optional) This section allows you to specify whether the MQTT client is persistent. |
MQTT client ID | (Optional) A unique client ID. Persistent clients must specify a unique MQTT client ID, and must re-use the same client ID in every session. |
cleanSession | (Optional) Specifies whether the client is transient or persistent. Set to FALSE to implement persistence. Set to TRUE to for a transient client. The default is True. |
xif_dir_absolute_path | (Required) Specifies the location of the XIF files that are read by the protocol engine. |
isDiscoverySupported | (Optional) Specifies whether the driver and protocol support device discovery and the associated device discovery APIs. |
timeouts | (Optional) Specifies the timeouts to be used for each "Device create timeout ms": 120000, |
Device create timeout ms | (Optional) Specifies the timeout value (in milliseconds) that IDL waits after calling the IDI device create callback function ( |
Device provision timeout ms | (Optional) Specifies the timeout value (in milliseconds) that IDL waits after calling the IDI device provision callback function (OnDevProvision ) before timing out. If the IDI driver does not return a result through IdlDevProvisionResult () within this timeout period, IDL reports an error that the device provision action failed. |
Device deprovision timeout ms | (Optional) Specifies the timeout value (in milliseconds) that IDL waits after calling the IDI device deprovision callback function ( |
Device replace timeout ms | (Optional) Specifies the timeout value (in milliseconds) that IDL waits after calling the IDI device replace callback function ( |
Device delete timeout ms | (Optional) Specifies the timeout value (in milliseconds) that IDL waits after calling the IDI device delete callback function ( |
Datapoint read timeout ms | (Optional) Specifies the timeout value (in milliseconds) that IDL waits after calling the IDI data point read callback function ( |
Datapoint write timeout ms | (Optional) Specifies the timeout value (in milliseconds) that IDL waits after calling the IDI data point write callback function ( |
Discovery start callback timeout ms | (Optional) Specifies the timeout value (in milliseconds) during the start portion of device discovery for a protocol that supports discovery. If this timeout is not defined in the conf file, it defaults to 15000 (15 seconds). IDL passes this timeout value to IDI through the callback function as |
Discovery step callback timeout ms | (Optional) Specifies the timeout value (in milliseconds) during a step portion of device discovery for a protocol that supports discovery. If this timeout is not defined in the conf file, it defaults to 30000 (30 seconds). IDL passes this timeout value to IDI through the callback function as |
Discovery stop callback timeout ms | (Optional)Specifies the timeout value (in milliseconds) during the stop portion of device discovery for a protocol that supports discovery. If this timeout is not defined in the conf file, it defaults to 15000 (15 seconds). IDL passes this timeout value to IDI through the callback function as |
about object details | (Optional) Contains attributes such as "device max count" and "name", which describe the information that the IDL publishes in the IAP/MQ "about" object, on topic glp/0/./=engine/{Edge_Protocol}/about . |
device max count | (Optional) Specifies the maximum number of devices this driver supports. |
name | (Optional) Provides the name of the protocol engine. |
desc | (Optional) Provides a description of the protocol engine. |