Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModbusDevices ¶
type ModbusDevices struct { Points map[string]ModbusPoint UUID string DeviceIP string DevicePort int DeviceAddr int }
func NewDevice ¶
func NewDevice(uuid, deviceIP string, devicePort, deviceAddr int) *ModbusDevices
NewDevice creates a new Modbus device.
func (*ModbusDevices) AddPoint ¶
func (d *ModbusDevices) AddPoint(point ModbusPoint)
AddPoint adds a new point to the device.
func (*ModbusDevices) GetPoint ¶
func (d *ModbusDevices) GetPoint(uuid string) (ModbusPoint, bool)
GetPoint returns a point with the specified UUID.
func (*ModbusDevices) GetPoints ¶
func (d *ModbusDevices) GetPoints() map[string]ModbusPoint
GetPoints returns all points of a device.
type ModbusNetworks ¶
type ModbusNetworks struct { UUID string Devices map[string]*ModbusDevices }
func NewModbusNetwork ¶
func NewModbusNetwork(uuid string) *ModbusNetworks
NewModbusNetwork creates a new Modbus network.
func (*ModbusNetworks) AddDevice ¶
func (m *ModbusNetworks) AddDevice(device *ModbusDevices)
AddDevice adds a new device to the network.
func (*ModbusNetworks) GetDevices ¶
func (m *ModbusNetworks) GetDevices() map[string]*ModbusDevices
Click to show internal directories.
Click to hide internal directories.