Versions in this module Expand all Collapse all v1 v1.0.0 May 11, 2024 Changes in this version + const CCiNa1 + const CIcNa1 + const MDpNa1 + const MEiNA1 + const MItNa1 + const MMeNa1 + const MMeNc1 + const MSpNa1 + const MSpTb1 + type APCI struct + ApduLen int + Ctr1 byte + Ctr2 byte + Ctr3 byte + Ctr4 byte + func (apci *APCI) ParseCtr() (byte, interface{}, error) + type APDU struct + APCI *APCI + ASDU *ASDU + ASDULen int + CtrFrame interface{} + CtrType byte + Len int + Signals []*Signal + type ASDU struct + Cause uint16 + Length byte + PublicAddress uint16 + Sequence bool + Ts float64 + TypeID byte + func (asdu *ASDU) ParseASDU(asduBytes []byte) (signals []*Signal, err error) + func (asdu *ASDU) ParseTime(asduBytes []byte) float64 + func (asdu *ASDU) ParseVariable(b byte) (sq bool, length byte) + type Client struct + IsConnected bool + Logger *logrus.Logger + func NewClient(handler DataHandlerInterface, address string, logger *logrus.Logger, ...) *Client + func (c *Client) Close() error + func (c *Client) Run() + func (c *Client) SendDoubleCmd(address uint, val uint) (err error) + func (c *Client) SendElectricityTotalCall() + func (c *Client) SendSingleCmd(address uint, val uint) (err error) + func (c *Client) SendTotalCall() + type DataHandlerInterface interface + Datahandler func(*APDU) error + type IFrame struct + Recv int16 + Send int16 + type SFrame struct + Recv int16 + type Signal struct + Address uint32 + Quality byte + Ts float64 + TypeID uint + Value float64 + type UFrame struct