XRT allows you to create connected edge applications by assembling and configuring specific combinations of standard XRT components to fulfill a use case.
A typical connected XRT application that supports communication between an edge device or sensor and a Cloud endpoint consists of the following components and supporting configuration files:
- XRT Core, which consists of the Bus, Scheduler, ThreadPool, and Logger components
- One or more Device Service components, which communicate with devices or sensors using protocols such as Modbus
- An Export component, which sends device data to a Cloud or IT endpoint such as AWS IoT Core
- Optionally, a Lua scripting engine component and user-defined scripts, which support local analytics, data transformation, or data filtering
To create an application of this type, the following steps can be taken:
Model the properties of each target device or sensor using IOTech's Device Configuration Tool. This tool can be used to create protocol-specific configuration files for the XRT Device Service components, called device profiles. These files can be created manually, although this is not recommended.
For each type of device, the Device Configuration Tool can also be used to generate thirdparty configuration files, such as Device Twins Definition Language (DTDL) files that are used to specify Microsoft Azure digital twin representations and AWS Asset Model files used with the AWS SiteWise cloud services
IOTech customers are automatically provided with log in credentials for the Device Configuration Tool when purchasing an XRT license. Alternatively, you can request log in credentials when evaluating XRT.
Copy the device profile to an appropriate location on the target file system and configure the corresponding Device Service JSON configuration file to point at the device profile
Create a main.json file, which specifies all components that are to be included in the application
Create configuration files for each component defined in the main.json file, named for the component. For example, there could be: bus.json, logger.json, pool.json, sched.json, log_exporter.json, modbus_device_service.json and export_aws.json files
Configure and run the XRT application
The XRT package includes a comprehensive set of examples and supporting build scripts, as described in Example Code
To get started with your own development, do the following:
Copy the most appropriate example for your requirement
Add further components to, or remove redundant components from, the main.json file
Modify existing, or add new, component configuration files