Documentation
¶
Index ¶
Constants ¶
View Source
const ( //MSpNa1 不带游标的单点遥信,3个字节的地址,1个字节的值 MSpNa1 = 1 //MMeNc1 带品质描述的测量值,每个遥测值占3个字节 MMeNc1 = 9 //MSpTb1 带游标的单点遥信,3个字节的地址,1个字节的值,7个字节短时标 MSpTb1 = 30 )
数据类型
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APCI ¶
APCI ..
type APDU ¶
type APDU struct { APCI *APCI ASDU *ASDU Len int ASDULen int CtrType byte CtrFrame interface{} Signals []*Signal }
APDU 104数据包
type ASDU ¶
type ASDU struct { TypeID byte //类型标识 Sequence bool //是否连续 Length byte //可变结构限定词 Cause uint16 //传输原因 PublicAddress uint16 //公共地址 Ts float64 //毫秒级时间戳 }
ASDU 应用服务数据单元
func (*ASDU) ParseASDU ¶
ParseASDU 解析asdu
func (*ASDU) ParseTime ¶
ParseTime 解析asdu中7个字节时表,转为带毫秒的时间戳
type Client ¶
type Client struct { Ctx context.Context Logger *logrus.Logger DataChan chan *APDU // contains filtered or unexported fields }
Client 104客户端
func NewClient ¶
NewClient 初始化客户端,连接失败,每隔10秒重试
Click to show internal directories.
Click to hide internal directories.