Documentation
¶
Index ¶
- Constants
- func CheckCRC(src []byte, crc []byte) bool
- func GetCrC(buff []byte) []byte
- func IsComplete(src []byte, dst []byte) bool
- func NewHTLVCRCDecoder() ziface.IDecoder
- func NewLTV_Little_Decoder() ziface.IDecoder
- func NewTLVDecoder() ziface.IDecoder
- type HtlvCrcDecoder
- type LTV_Little_Decoder
- type TLVDecoder
Constants ¶
View Source
const HEADER_SIZE = 5
View Source
const LTV_HEADER_SIZE = 8 //表示TLV空包长度
View Source
const TLV_HEADER_SIZE = 8 //表示TLV空包长度
Variables ¶
This section is empty.
Functions ¶
func IsComplete ¶
func NewHTLVCRCDecoder ¶
func NewLTV_Little_Decoder ¶ added in v1.1.17
func NewTLVDecoder ¶
Types ¶
type HtlvCrcDecoder ¶
type HtlvCrcDecoder struct {
Head byte //头码
Funcode byte //功能码
Length byte //数据长度
Body []byte //数据内容
Crc []byte //CRC校验
Data []byte //原始数据内容
}
func (*HtlvCrcDecoder) GetLengthField ¶
func (hcd *HtlvCrcDecoder) GetLengthField() *ziface.LengthField
type LTV_Little_Decoder ¶ added in v1.1.17
func (*LTV_Little_Decoder) GetLengthField ¶ added in v1.1.17
func (ltv *LTV_Little_Decoder) GetLengthField() *ziface.LengthField
type TLVDecoder ¶
func (*TLVDecoder) GetLengthField ¶
func (tlv *TLVDecoder) GetLengthField() *ziface.LengthField
Click to show internal directories.
Click to hide internal directories.