Serial Device Driver Configuration
Plugin Configuration
The plugin configuration file is named settings.json
located in <install directory>\Config\HumanOS.UHAL.SerialDeviceDriver\
. It contains all global settings of the plugin.
See Generic Plugin Configuration for more details.
Figure 1: Configuration model of the plugin
Device Information File
The device information file is used to configure the access to the serial devices. It contains:
Id
: unique device id (GUID), which MUST match the device license id.DriverId
:7DCF8CCB-9878-4529-AD21-49F509807FB6"
Address
: Connection address- Data Access
See Device Information Model for more details.
Connection Address
The serial device driver needs the COM port settings as address. Additionally, further connection parameters must be specified as properties under the device info node:
- COM Port Number
- BaudRate
- ParityMode
- StopBitMode
- Number DataBits
- ...
The Address for serial device driver must be provided like following:
Name | Description | Data Type |
---|---|---|
Address | Connection string to device, e.g COM7 | System.String |
Additional connection parameters are specified as property under the device info node:
Name | Description | Data Type |
---|---|---|
Baudrate | BaudRate of communication | System.Int32 |
DataBits | Number of data bits | System.Int32 |
ParityMode | Parity mode (Optional) (None; Odd; Even; Mark; Space) | System.IO.Ports.Parity |
StopBitMode | Stop bits (Optional) (None; One; Two; OnPointFive) | System.IO.Ports.StopBits |
ReadBufferSize | Size of the reading buffer (Optional) | System.Int32 |
WriteBufferSize | Size of the writing buffer (Optional) | System.Int32 |
DtrEnable | Enabling the Dtr-Mode (Optional) | System.Boolean |
Example
{
"Name": "SerialClient1",
"Id": "3228f878-e1f3-4f62-84af-d9b6b0a18182",
"DriverId": "7DCF8CCB-9878-4529-AD21-49F509807FB6",
"Address": "COM50",
"Properties": [
{
"Name": "Baudrate",
"Value": 115200,
"DataType": "System.Int32"
},
{
"Name": "ReadBufferSize",
"Value": 32768,
"DataType": "System.Int32"
},
{
"Name": "WriteBufferSize",
"Value": 4096,
"DataType": "System.Int32"
},
{
"Name": "DtrEnable",
"Value": true,
"DataType": "System.Boolean"
},
{
"Name": "ParityMode",
"Value": "None"
},
{
"Name": "StopBitMode",
"Value": "None"
},
{
"Name": "DataBits",
"Value": 8,
"DataType": "System.Int32"
}
]
}