| { |
| "$schema1": "http://json-schema.org/draft-07/schema#", |
| "$defs": { |
| "ModbusRTUDetect": { |
| "additionalProperties": false, |
| "description": "The definition for the modbus device.", |
| "type": "object", |
| "properties": { |
| "Type": { |
| "description": "The type of configuration object.", |
| "const": "ModbusRTUDetect" |
| }, |
| "Name": { |
| "description": "The name of the modbus device.", |
| "type": "string" |
| }, |
| "Address": { |
| "description": "The address ranges for the modbus device.", |
| "type": "array", |
| "items": { |
| "type": "object", |
| "additionalProperties": false, |
| "properties": { |
| "RangeStart": { |
| "description": "The start address for the address range of the modbus device.", |
| "type": "number" |
| }, |
| "RangeEnd": { |
| "description": "The end address for the address range of the modbus device.", |
| "type": "number" |
| }, |
| "SerialPort": { |
| "description": "The name of the serial port from SerialPort definition.", |
| "type": "string" |
| } |
| }, |
| "required": ["RangeStart", "RangeEnd", "SerialPort"] |
| } |
| }, |
| "Registers": { |
| "description": "The Modbus register definition.", |
| "type": "array", |
| "items": { |
| "type": "object", |
| "additionalProperties": false, |
| "properties": { |
| "Name": { |
| "description": "The name of the register.", |
| "enum": [ |
| "PartNumber", |
| "SparePartNumber", |
| "SerialNumber", |
| "BuildDate", |
| "Model", |
| "Manufacturer" |
| ] |
| }, |
| "Address": { |
| "description": "The address of the register.", |
| "type": "number" |
| }, |
| "Size": { |
| "description": "The size of the register in bytes.", |
| "type": "number" |
| } |
| }, |
| "required": ["Name", "Address", "Size"] |
| } |
| }, |
| "DataParity": { |
| "description": "The parity to use for data transmission.", |
| "enum": ["Odd", "Even", "None"] |
| }, |
| "BaudRate": { |
| "description": "The baudrate of the communication channel.", |
| "enum": [9600, 19200, 57600, 115200] |
| } |
| }, |
| "required": [ |
| "Name", |
| "Type", |
| "Address", |
| "Registers", |
| "DataParity", |
| "BaudRate" |
| ] |
| } |
| } |
| } |