Documentation ¶
Index ¶
- Constants
- func CoilsToBytes(rgc config.RegisterGroupConfig, values []bool) []byte
- func FrameToBytes(frm can.Frame) []byte
- func RegistersToBytes(rgc config.RegisterGroupConfig, values []uint16) []byte
- func StartBytes(slave uint8, functionCode uint16, address uint16, ...) []byte
- type CanBusCollector
- type Collector
- type HttpCollector
- type LineCollector
- type ModbusClient
- type ModbusCollector
- type UdpListenerReader
Constants ¶
View Source
const MaximumNumberOfCoils = 2000
View Source
const MaximumNumberOfRegisters = 125
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 ¶
func CoilsToBytes ¶ added in v0.1.9
func CoilsToBytes(rgc config.RegisterGroupConfig, values []bool) []byte
func FrameToBytes ¶ added in v0.1.26
func RegistersToBytes ¶ added in v0.1.9
func RegistersToBytes(rgc config.RegisterGroupConfig, values []uint16) []byte
Types ¶
type CanBusCollector ¶ added in v0.1.26
type CanBusCollector struct {
// contains filtered or unexported fields
}
func NewCanBusCollector ¶ added in v0.1.26
func NewCanBusCollector(c *config.CollectorConfig) (*CanBusCollector, error)
func (*CanBusCollector) Collect ¶ added in v0.1.26
func (r *CanBusCollector) Collect(publisher mangos.Socket)
type HttpCollector ¶ added in v0.1.43
type HttpCollector struct {
// contains filtered or unexported fields
}
func NewHttpCollector ¶ added in v0.1.43
func NewHttpCollector(c *config.CollectorConfig, ugc []config.UrlGroupConfig) (*HttpCollector, error)
func (*HttpCollector) Collect ¶ added in v0.1.43
func (r *HttpCollector) Collect(publisher mangos.Socket)
type LineCollector ¶ added in v0.1.24
type LineCollector struct {
// contains filtered or unexported fields
}
LineCollector reads lines from the connection and sends it on the mangos socket
func NewLineCollector ¶ added in v0.1.24
func NewLineCollector(c *config.CollectorConfig) (*LineCollector, error)
func (*LineCollector) Collect ¶ added in v0.1.24
func (r *LineCollector) 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
func (*ModbusClient) Read ¶
func (m *ModbusClient) Read(rgc config.RegisterGroupConfig) ([]byte, error)
type ModbusCollector ¶ added in v0.1.24
type ModbusCollector struct {
// contains filtered or unexported fields
}
func NewModbusCollector ¶ added in v0.1.24
func NewModbusCollector(c *config.CollectorConfig, rgcs []config.RegisterGroupConfig) (*ModbusCollector, error)
func (*ModbusCollector) Collect ¶ added in v0.1.24
func (r *ModbusCollector) 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.