modbus_ss.yml
---
# Modbus serial server
Options:
PeriodMs: 1000
ModbusSetup:
Type: SerialServer
Baud: 9600
Parity: N
Databit: 8
Stopbit: 1
SlaveId: 17
Port: COM1
ParameterPacks:
PositionField: {Table: HoldingRegister, Range: [-10, 10]}
ModbusToDDS:
TestTopic:
Index: 0
Table: InputRegister
Type: DoubleVal
Partition: Example
Scale: 1.0
Offset: 0
VesselPosition:
Type: PositionGlobal2D
Partition: Example
Fields:
lon: {Index: 1, ParameterPacks: PositionField}
lat: {Index: 2, ParameterPacks: PositionField}
DDSToModbus:
SecondTestTopic:
Type: DoubleVal
Partition: Example
# The following entries are those usually in Fields:
# 'Fields:' was skipped here, since the Type is a scalar
Index: 0
Table: HoldingRegister
Range: [-10.0, 10.0]
SecondVesselPosition:
Type: PositionGlobal2D
Partition: Example
Fields:
lon: {Index: 3, Table: HoldingRegister, Scale: 100.0, Offset: 0.0}
lat: {Index: 4, Table: HoldingRegister, Scale: 100.0, Offset: 0.0}