Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type COMStruct ¶
type COMStruct struct { SerialPort string `json:"serialPort"` BaudRate int64 `json:"baudRate"` DataBits int64 `json:"dataBits"` Parity string `json:"parity"` StopBits int64 `json:"stopBits"` }
COMStruct is the serial configuration.
type CustomizedValue ¶
type CustomizedValue map[string]interface{}
CustomizedValue is the customized part for modbus protocol.
type ModbusProtocolCommonConfig ¶
type ModbusProtocolCommonConfig struct { COM COMStruct `json:"com,omitempty"` TCP TCPStruct `json:"tcp,omitempty"` CustomizedValues CustomizedValue `json:"customizedValues,omitempty"` }
ModbusProtocolCommonConfig is the modbus protocol configuration.
type ModbusProtocolConfig ¶
type ModbusProtocolConfig struct {
SlaveID int16 `json:"slaveID,omitempty"`
}
ModbusProtocolConfig is the protocol configuration.
type ModbusVisitorConfig ¶
type ModbusVisitorConfig struct { Register string `json:"register"` Offset uint16 `json:"offset"` Limit int `json:"limit"` Scale float64 `json:"scale,omitempty"` IsSwap bool `json:"isSwap,omitempty"` IsRegisterSwap bool `json:"isRegisterSwap,omitempty"` }
ModbusVisitorConfig is the modbus register configuration.
Click to show internal directories.
Click to hide internal directories.