tlv

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToInt

func BytesToInt(b []byte) int32

func DecodeData

func DecodeData(tag *Tag, data []byte)

func DecodeJson

func DecodeJson(tlvContent []byte) string

func DecodeToJson

func DecodeToJson(tlvContent []byte) string

func Encode

func Encode(frame *TagFrame) string

func EncodeTlv

func EncodeTlv(frame *TagFrame) string

func EncodeTlvTxt

func EncodeTlvTxt(data string) string

func IntToBytes

func IntToBytes(n int32, len int32) []byte

func IntToString

func IntToString(n int32) string

func StrToInt

func StrToInt(str string) int32

Types

type Tag

type Tag struct {
	TagId        int32  `json:"tagId"`
	TagType      int32  `json:"tagType"`
	TagTypeLabel string `json:"tagTypeLabel"`
	TagLength    int32  `json:"tagLength"`
	TagData      string `json:"tagData"`
}

func DecodeTlv

func DecodeTlv(data []byte) []Tag

func DecodeTlvTag

func DecodeTlvTag(b []byte) (Tag, int32)

type TagFrame

type TagFrame struct {
	Tags []Tag `json:"tags"`
}

func DecodeToFrame

func DecodeToFrame(tlvContent []byte) *TagFrame

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL