Versions in this module Expand all Collapse all v0 v0.0.3 Feb 6, 2026 v0.0.2 Nov 24, 2025 Changes in this version + type ConnectionManager struct + Config *config.ConnectionConfig + Devices map[uint8]*Device + Listener net.Listener + func NewConnectionManager(cfg *config.ConnectionConfig, devices []*Device) *ConnectionManager + func (cm *ConnectionManager) GetDevice(unitID uint8) (*Device, bool) + func (cm *ConnectionManager) HandleReadCoils(unitID uint8, addr uint16, quantity uint16) ([]bool, error) + func (cm *ConnectionManager) HandleReadDiscreteInputs(unitID uint8, addr uint16, quantity uint16) ([]bool, error) + func (cm *ConnectionManager) HandleReadHoldingRegisters(unitID uint8, addr uint16, quantity uint16) ([]uint16, error) + func (cm *ConnectionManager) HandleReadInputRegisters(unitID uint8, addr uint16, quantity uint16) ([]uint16, error) + func (cm *ConnectionManager) HandleWriteCoils(unitID uint8, addr uint16, values []bool) error + func (cm *ConnectionManager) HandleWriteRegisters(unitID uint8, addr uint16, values []uint16) error + func (cm *ConnectionManager) Start() error + func (cm *ConnectionManager) Stop() error + type Device struct + Config *config.DeviceConfig + Type *config.DeviceType + func NewDevice(cfg *config.DeviceConfig, devType *config.DeviceType) *Device + func (d *Device) AddEventListener(cb EventCallback) + func (d *Device) GetParameterValue(paramName string) (interface{}, error) + func (d *Device) ReadCoil(addr uint16) (bool, error) + func (d *Device) ReadDiscreteInput(addr uint16) (bool, error) + func (d *Device) ReadRegister(fc int, addr uint16) (uint16, error) + func (d *Device) UpdateLoop(stopChan <-chan struct{}) + func (d *Device) WriteCoil(addr uint16, val bool) error + func (d *Device) WriteRegister(fc int, addr uint16, val uint16) error + type EventCallback func(eventType EventType, paramName string, details string) + type EventType string + const EventError + const EventRead + const EventWrite + type Generator struct + func NewGenerator() *Generator + func (g *Generator) Evaluate(script string) (interface{}, error) + type LogLevel int + const LogLevelDebug + const LogLevelError + const LogLevelInfo + type Logger struct + func GetLogger() *Logger + func (l *Logger) Debug(format string, args ...interface{}) + func (l *Logger) Error(format string, args ...interface{}) + func (l *Logger) Info(format string, args ...interface{}) + func (l *Logger) Log(level LogLevel, format string, args ...interface{}) + func (l *Logger) Subscribe(handler func(level LogLevel, msg string))