Documentation ¶
Index ¶
- Constants
- type ElementType
- type TLVBuffer
- func (b *TLVBuffer) Bytes() []byte
- func (b *TLVBuffer) WriteAnonList()
- func (b *TLVBuffer) WriteAnonStruct()
- func (b *TLVBuffer) WriteArray(tag byte)
- func (b *TLVBuffer) WriteBool(tag byte, val bool)
- func (b *TLVBuffer) WriteList(tag byte)
- func (b *TLVBuffer) WriteOctetString(tag byte, data []byte)
- func (b *TLVBuffer) WriteRaw(raw []byte)
- func (b *TLVBuffer) WriteStruct(tag byte)
- func (b *TLVBuffer) WriteStructEnd()
- func (b *TLVBuffer) WriteUInt(tag byte, typ int, val uint64)
- func (b *TLVBuffer) WriteUInt16(tag byte, val uint16)
- func (b *TLVBuffer) WriteUInt32(tag byte, val uint32)
- func (b *TLVBuffer) WriteUInt64(tag byte, val uint64)
- func (b *TLVBuffer) WriteUInt8(tag byte, val byte)
- type TlvItem
- func (i TlvItem) Dump(pad int)
- func (i TlvItem) DumpToString(buf *strings.Builder, pad int)
- func (i TlvItem) DumpWithDict(pad int, path string, dictionary map[string]string)
- func (i TlvItem) GetBool() bool
- func (i TlvItem) GetChild() []TlvItem
- func (i TlvItem) GetInt() int
- func (i TlvItem) GetIntRec(tag []int) (uint64, error)
- func (i TlvItem) GetItemRec(tag []int) *TlvItem
- func (i TlvItem) GetItemWithTag(tag int) *TlvItem
- func (i TlvItem) GetOctetString() []byte
- func (i TlvItem) GetOctetStringRec(tag []int) []byte
- func (i TlvItem) GetString() string
- func (i TlvItem) GetUint64() uint64
Constants ¶
View Source
const TYPE_UINT_1 = 4
View Source
const TYPE_UINT_2 = 5
View Source
const TYPE_UINT_4 = 6
View Source
const TYPE_UINT_8 = 7
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElementType ¶
type ElementType int
const TypeBool ElementType = 2
const TypeInt ElementType = 1
const TypeList ElementType = 5
const TypeNull ElementType = 6
const TypeOctetString ElementType = 4
const TypeUTF8String ElementType = 3
type TLVBuffer ¶
type TLVBuffer struct {
// contains filtered or unexported fields
}
TLVBuffer is buffer used to serialize matter TLV into bytes.
func (*TLVBuffer) WriteAnonList ¶
func (b *TLVBuffer) WriteAnonList()
WriteAnonList encodes start of list without tag
func (*TLVBuffer) WriteAnonStruct ¶
func (b *TLVBuffer) WriteAnonStruct()
WriteAnonStruct encodes start of structure without tag
func (*TLVBuffer) WriteArray ¶
WriteArray encodes start of array with specified tag
func (*TLVBuffer) WriteOctetString ¶
func (*TLVBuffer) WriteStruct ¶
WriteAnonList encodes start of structure with specified tag
func (*TLVBuffer) WriteStructEnd ¶
func (b *TLVBuffer) WriteStructEnd()
WriteList encodes end of structure. This is used to terminate also list and array.
func (*TLVBuffer) WriteUInt16 ¶
func (*TLVBuffer) WriteUInt32 ¶
func (*TLVBuffer) WriteUInt64 ¶
func (*TLVBuffer) WriteUInt8 ¶
type TlvItem ¶
type TlvItem struct { Tag int Type ElementType // contains filtered or unexported fields }
TlvItem represents one TLV entry.
func (TlvItem) DumpWithDict ¶
func (TlvItem) GetItemRec ¶
func (TlvItem) GetItemWithTag ¶
func (TlvItem) GetOctetString ¶
func (TlvItem) GetOctetStringRec ¶
Click to show internal directories.
Click to hide internal directories.