Documentation ¶
Index ¶
Constants ¶
View Source
const ( Coils = iota + 1 DiscreteInputs HoldingRegisters InputRegisters )
View Source
const MaximumNumberOfRegisters = 120
MaximumNumberOfRegisters is maximum number of registers that can be read in one request, a modbus message is limit to 256 bytes TODO: this should be checked when register groups are created
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LineReader ¶
type LineReader struct {
// contains filtered or unexported fields
}
LineReader reads lines from the connection and sends it on the mangos socket
func NewLineReader ¶
func NewLineReader(c *config.CollectorConfig) (*LineReader, error)
func (*LineReader) Collect ¶
func (l *LineReader) Collect(publisher mangos.Socket)
type ModbusClient ¶
type ModbusClient struct {
// contains filtered or unexported fields
}
func (*ModbusClient) Poll ¶
func (m *ModbusClient) Poll(stream chan<- []byte, rgc config.RegisterGroupConfig) error
type ModbusReader ¶
type ModbusReader struct {
// contains filtered or unexported fields
}
func NewModbusReader ¶
func NewModbusReader(c *config.CollectorConfig, rgs []config.RegisterGroupConfig) (*ModbusReader, error)
func (*ModbusReader) Collect ¶
func (m *ModbusReader) Collect(publisher mangos.Socket)
type UdpListenerReader ¶
type UdpListenerReader struct {
// contains filtered or unexported fields
}
UdpListenerReader implements the io.Reader interface
Click to show internal directories.
Click to hide internal directories.