Device Information Model
This chapter describes how to write a device information file for device drivers. This file is interpreted by the HumanOS® Kernel. Here all information is needed to build an internal structure representing the hardware device.
The file is typically located in $AppSettingsDir$\Config\Devices
The json file contains following semantical information about the hardware device:
- Device Information (including device UUID, connection address, driver id)
- Data access points for reading, writing, or monitoring items.
- Alarm and Event pooling
- Commands (accessors to perform actions)
- Groups containing data access points and commands.
The device info schema includes following information:
Attribute | Description | Data Type |
---|---|---|
Id | UUID of the device. Make sure there exist no other device with the same id!! | System.Guid |
Name | Name of the device | System.String |
DriverId | Id of the driver (see UHAL Connectors) | System.Guid |
Address | Connection address to hardware device. | System.String |
DataNodes | List of the UHAL data nodes | TUHALDataNodeInfo[] |
ConstantNodes | List of the constant nodes | TConstantNodeInfo[] |
Commands | List of UHAL commands | TUHALCommandNodeInfo[] |
Groups | List of UHAL group nodes | TUHALGroupRelationInfo[] |
TaskProcessors | List of task processors | TTaskProcessorInfo[] |
AlarmEventPool | UHAL Alarm event pool of the device | TUHALAlarmEventPoolNodeInfo |
ProcessingNetworks | List of processing and correlation networks. | TUHALProcessingNetworkInfo[] |
Skills | List of device skills. | TSkillNodeInfo[] |
Rules | List of rules. | TUHALRuleInfo[] |
Example:
{
"Id": "974f33ad-38e8-4d82-b3a4-37b22869651d",
"Name": "Balluff-BIS-V",
"DriverId": "ed53b0f7-0d3a-4b82-a9f6-191b0dd47ea5",
"Address": "10.197.12.50:10001",
"DataNodes": [],
"ConstantNodes": [],
"Commands": [],
"Groups": [],
"AlarmEventPool": {},
"ProcessingNetworks": [],
"Skills": [],
"TaskProcessors": [],
"Rules": []
}
Task Processor Information
The processor information describes a cyclic processing logic. The logic can be described in a separate script file.
Attributes | Description | Data Type |
---|---|---|
Name | Name of the processor. This should match the processor name of the driver configuration. | System.String |
Id | UUID of the processor. | System.Guid |
ScriptFile | Filename of the C# script. | System.String |
For script file coding, please check the driver manual for detailed information.
Example:
{
"TaskProcessors": [
{
"Id": "DABEA01B-CDA0-4DCD-9135-0FE1C17A46AE",
"Name": "MainTaskProcessor",
"ScriptFile": "TTestPayload.cs"
}
]
}