Device Service Component Configuration
The following table describes the configuration variables that can be used with all Device Service components:
Parameter | Type | Description | Valid Values | Required |
---|---|---|---|---|
Library |
String | The shared library implementing the Device Service component | libxrt-{protocol}-device-service.so | Y - When using dynamic linking |
Factory |
String | The name of the C function used to instantiate the component | xrt_{protocol}_device_service_factory | Y - When using dynamic linking |
Name |
String | The name of the Device Service | Y | |
TelemetryTopic |
String | The name of the topic on which to publish data from a service including scheduled events, COVs and more | Y | |
NotificationTopic |
String | The name of the topic on which to publish notifications from connected devices | N | |
RequestTopic |
String | The name of the topic on which to receive requests from the Bus | Y | |
ReplyTopic |
String | The name of the topic on which to publish request replies to the Bus | Y | |
DiscoveryTopic |
String | The name of the topic on which to publish discovery requests to the Bus | N | |
StatusTopic |
String | The name of the topic on which to publish change of operational state events to the Bus | N | |
RequestQueueMax |
Unsigned Integer | The maximum size of the queue for requests | Default: 4 | N |
DiscoveryInterval |
Unsigned Integer | The interval in seconds in which discovery will be triggered | Default: 0 | N |
ScheduleDeadBand |
Unsigned Integer | A schedules initial start time can be anytime within its interval. This option can reduce the range of the start time by setting a dead band at the end of the potential start time in milliseconds. For example, a schedule with an interval of 10 seconds, a dead band of 2000 ms would mean the initial start time of the schedule would occur within 0 to 8 seconds instead of 0 to 10 | Default: 0 | N |
Timestamp |
Boolean | Include timestamp in reading | Default: false | N |
AutoRegister |
Boolean | Automatically add discovered devices | Default: false | N |
PublishRegisteredDevices |
Boolean | On starting Xrt, details of the devices already registered will be published | Default: false | N |
PublishAttributes |
Boolean | Include attributes in reading | Default: false | N |
SchedulesThreadPool |
String | Assign a dedicated Threadpool component for Schedules to use. By default all Schedule events will run in the common Threadpool | A string with the name of the ThreadPool component to use | N |
RequestsThreadPool |
String | Assign a dedicated Threadpool component for explicit put/get operations. By default all put/get operations will run in the common Threadpool | A string with the name of the ThreadPool component to use | N |
SyncPostData |
Boolean | Set whether to publish messages synchronously (true) or asynchronously (false) | Default: false | N |
EdgeXCompat |
Boolean | Determines whether returned readings should be EdgeX compatible | Default: false | N |
ZeroNullReadings |
Boolean | If a device service returns a null reading, then the value will be converted to a zeroed value of the readings type |
Default: false | N |
DiscardUnchangedReadings |
Boolean | If the on_change option is set on a schedule for multiple resources, only those resources which have changed values will be published. Set this option to false to cause all resources in a schedule to be published whenever one or more of them has changed |
Default: true | N |
EnableDiscovery |
Boolean | Enable discovery for the service | Default: false | N |
PreloadCache |
Boolean |
Specify true to load resource metadata cache with device profiles on initialization
Specify false to cache resource metadata on demand Provides the optimal response time for the first request for a specified resource at the cost of increased memory use and start-up time |
Default: false | N |
ProfileDir |
String | The full path of the directory containing the device profiles and ProfileListFile | Y | |
ProfileListFile |
String |
The name of the JSON file that contains the list of device profiles to load
The file list is represented as an array of strings This JSON file and the entries in the array are relative to the path defined in ProfileDir and have a .json extension If not present, a profiles.json file in the path defined in ProfileDir is read to provide the profile files to load A JSON file that matches the name of the JSON file specified in this parameter must be present in the path defined in ProfileDir |
Default: profiles | N |
DevicesFile |
String |
The name of the JSON file that contains the list of devices to load
The file list is represented as an array of device objects This JSON file and the entries in the array are relative to the path defined in StateDir and have a .json extension If not present, a devices.json file in the path defined in StateDir is read to provide the devices to load A JSON file that matches the name of the JSON file specified in this parameter must be present in the path defined in StateDir |
Default: devices | N |
SchedulesFile |
String |
The name of the JSON file that contains the list of schedules to load
The file list is represented as an array of schedule objects This JSON file and the entries in the array are relative to the path defined in StateDir and have a .json extension If not present, a schedules.json file in the path defined in StateDir is read to provide the devices to load A JSON file that matches the name of the JSON file specified in this parameter must be present in the path defined in StateDir |
Default: schedules | N |
StateDir |
String | The full path of the directory containing the DevicesFile and SchedulesFile | Y | |
Driver |
Object |
Device Service-specific configuration
See the supported Device Service components for the available options |
N | |
Scheduler |
String | The name of the Scheduler component to use | The name of an existing Scheduler component | Y |
ThreadPool |
String | The name of the ThreadPool component to use | The name of an existing ThreadPool component | Y |
Bus |
String | The name of the Bus component to use | The name of an existing Bus component | Y |
Logger |
String | The name of the Logger component to use | The name of an existing Logger component | N |
ValidateProfilesOnStart |
Boolean |
Specify true for Xrt to validate that every profile loaded on startup is correct
Specify false for no profile validation to occur on startup | Default: true | N |
DiscoverInitialValues |
Boolean |
Specify true for Xrt to include initially discovered values in generated profiles
Specify false for no initial values to be included in generated profiles | Default: false | N |
AllowedFails |
Unsigned Integer |
The number of consecutive failed device requests after which a device is
automatically marked non-operational
Set to zero to disable automatic marking of devices as non-operational | Default: 0 | N |
DeviceDownTimeout |
Unsigned Integer |
Time (in seconds) before re-enabling a device which has been automatically
marked non-operational
Set to zero to disable automatic re-enablement of devices | Default: 0 | N |
AutoBatchSize |
Unsigned Integer |
XRT will batch together consecutive scheduled readings in groups of up to the size specified
This group will then be executed as one command | Default is 0 which disables the auto-batching feature | N |
AutoBatchTimeout |
Unsigned Integer |
XRT will batch together consecutive scheduled readings into a group until the time limit (in milliseconds) has been reached.
This group will then be executed as one command | Default: 250 | N |