TLV

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DONT_CHECK_LIMIT = -1

Functions

This section is empty.

Types

type ITLV

type ITLV interface {
	GetTag() int16
	SetTag(tag int16)
	SetData(bb *Utils.ByteBuffer) (err *Exception.Exception)
	GetData() (*Utils.ByteBuffer, *Exception.Exception)
	HasValue() bool
	GetValueData() (*Utils.ByteBuffer, *Exception.Exception)
	SetValueData(buffer *Utils.ByteBuffer) *Exception.Exception
}

type TLV

type TLV struct {
	Common.ByteData
	Tag        int16
	ValueIsSet bool
	MinLength  int
	MaxLength  int
}

func NewTLV

func NewTLV() *TLV

func NewTLVWithTag

func NewTLVWithTag(tag int16) *TLV

func NewTLVWithTagAndLength

func NewTLVWithTagAndLength(tag int16, minLenght, maxLength int) *TLV

func (*TLV) CheckLength

func (c *TLV) CheckLength(length int) bool

func (*TLV) CheckLengthBuffer

func (c *TLV) CheckLengthBuffer(buffer *Utils.ByteBuffer) bool

func (*TLV) Construct

func (c *TLV) Construct()

func (*TLV) GetData

func (c *TLV) GetData() (*Utils.ByteBuffer, *Exception.Exception)

func (*TLV) GetLength

func (c *TLV) GetLength() (len int, err *Exception.Exception)

func (*TLV) GetTag

func (c *TLV) GetTag() int16

func (*TLV) GetValueData

func (c *TLV) GetValueData() (*Utils.ByteBuffer, *Exception.Exception)

func (*TLV) HasValue

func (c *TLV) HasValue() bool

func (*TLV) MarkValueSet

func (c *TLV) MarkValueSet()

func (*TLV) SetData

func (c *TLV) SetData(bb *Utils.ByteBuffer) (err *Exception.Exception)

func (*TLV) SetTag

func (c *TLV) SetTag(tag int16)

func (*TLV) SetValueData

func (c *TLV) SetValueData(buffer *Utils.ByteBuffer) *Exception.Exception

type TLVByte

type TLVByte struct {
	TLV
	Value byte
}

func NewTLVByte

func NewTLVByte() *TLVByte

func NewTLVByteWithTag

func NewTLVByteWithTag(tag int16) *TLVByte

func NewTLVByteWithTagValue

func NewTLVByteWithTagValue(tag int16, value byte) *TLVByte

func (*TLVByte) Construt

func (c *TLVByte) Construt()

func (*TLVByte) GetValue

func (c *TLVByte) GetValue() (byte, *Exception.Exception)

func (*TLVByte) GetValueData

func (c *TLVByte) GetValueData() (b *Utils.ByteBuffer, er *Exception.Exception)

func (*TLVByte) SetValue

func (c *TLVByte) SetValue(value byte) *Exception.Exception

func (*TLVByte) SetValueData

func (c *TLVByte) SetValueData(buffer *Utils.ByteBuffer) *Exception.Exception

type TLVEmpty

type TLVEmpty struct {
	TLV
	Present bool
}

func NewTLVEmpty

func NewTLVEmpty() *TLVEmpty

func NewTLVEmptyWithTag

func NewTLVEmptyWithTag(tag int16) *TLVEmpty

func NewTLVEmptyWithTagValue

func NewTLVEmptyWithTagValue(tag int16, present bool) *TLVEmpty

func (*TLVEmpty) Construct

func (c *TLVEmpty) Construct()

func (*TLVEmpty) GetValue

func (c *TLVEmpty) GetValue() (bool, *Exception.Exception)

func (*TLVEmpty) GetValueData

func (c *TLVEmpty) GetValueData() (b *Utils.ByteBuffer, er *Exception.Exception)

func (*TLVEmpty) SetValue

func (c *TLVEmpty) SetValue(value bool) *Exception.Exception

func (*TLVEmpty) SetValueData

func (c *TLVEmpty) SetValueData(buffer *Utils.ByteBuffer) *Exception.Exception

type TLVInt

type TLVInt struct {
	TLV
	Value int32
}

func NewTLVInt

func NewTLVInt() *TLVInt

func NewTLVIntWithTag

func NewTLVIntWithTag(tag int16) *TLVInt

func NewTLVIntWithTagValue

func NewTLVIntWithTagValue(tag int16, value int) *TLVInt

func (*TLVInt) Construct

func (c *TLVInt) Construct()

func (*TLVInt) GetValue

func (c *TLVInt) GetValue() (int32, *Exception.Exception)

func (*TLVInt) GetValueData

func (c *TLVInt) GetValueData() (b *Utils.ByteBuffer, er *Exception.Exception)

func (*TLVInt) SetValue

func (c *TLVInt) SetValue(value int32) *Exception.Exception

func (*TLVInt) SetValueData

func (c *TLVInt) SetValueData(buffer *Utils.ByteBuffer) *Exception.Exception

type TLVOctets

type TLVOctets struct {
	TLV
	Value *Utils.ByteBuffer
}

func NewTLVOctets

func NewTLVOctets() *TLVOctets

func NewTLVOctetsWithTag

func NewTLVOctetsWithTag(tag int16) *TLVOctets

func NewTLVOctetsWithTagLength

func NewTLVOctetsWithTagLength(tag int16, min, max int) *TLVOctets

func NewTLVOctetsWithTagLengthValue

func NewTLVOctetsWithTagLengthValue(tag int16, min, max int, buf *Utils.ByteBuffer) *TLVOctets

func NewTLVOctetsWithTagValue

func NewTLVOctetsWithTagValue(tag int16, buf *Utils.ByteBuffer) *TLVOctets

func (*TLVOctets) Construct

func (c *TLVOctets) Construct()

func (*TLVOctets) GetValue

func (c *TLVOctets) GetValue() (*Utils.ByteBuffer, *Exception.Exception)

func (*TLVOctets) GetValueData

func (c *TLVOctets) GetValueData() (*Utils.ByteBuffer, *Exception.Exception)

func (*TLVOctets) SetValue

func (c *TLVOctets) SetValue(buffer *Utils.ByteBuffer) *Exception.Exception

func (*TLVOctets) SetValueData

func (c *TLVOctets) SetValueData(buffer *Utils.ByteBuffer) *Exception.Exception

type TLVShort

type TLVShort struct {
	TLV
	Value int16
}

func NewTLVShort

func NewTLVShort() *TLVShort

func NewTLVShortWithTag

func NewTLVShortWithTag(tag int16) *TLVShort

func NewTLVShortWithTagValue

func NewTLVShortWithTagValue(tag int16, value int16) *TLVShort

func (*TLVShort) Construct

func (c *TLVShort) Construct()

func (*TLVShort) GetValue

func (c *TLVShort) GetValue() (int16, *Exception.Exception)

func (*TLVShort) GetValueData

func (c *TLVShort) GetValueData() (b *Utils.ByteBuffer, er *Exception.Exception)

func (*TLVShort) SetValue

func (c *TLVShort) SetValue(value int16) *Exception.Exception

func (*TLVShort) SetValueData

func (c *TLVShort) SetValueData(buffer *Utils.ByteBuffer) *Exception.Exception

type TLVString

type TLVString struct {
	TLV
	Value string
}

func NewTLVString

func NewTLVString() *TLVString

func NewTLVStringWithTag

func NewTLVStringWithTag(tag int16) *TLVString

func NewTLVStringWithTagLength

func NewTLVStringWithTagLength(tag int16, min, max int) *TLVString

func NewTLVStringWithTagLengthValue

func NewTLVStringWithTagLengthValue(tag int16, min, max int, value string) *TLVString

func NewTLVStringWithTagValue

func NewTLVStringWithTagValue(tag int16, value string) *TLVString

func (*TLVString) Construct

func (c *TLVString) Construct()

func (*TLVString) GetValue

func (c *TLVString) GetValue() (string, *Exception.Exception)

func (*TLVString) GetValueData

func (c *TLVString) GetValueData() (b *Utils.ByteBuffer, er *Exception.Exception)

func (*TLVString) SetValue

func (c *TLVString) SetValue(value string) *Exception.Exception

func (*TLVString) SetValueData

func (c *TLVString) SetValueData(buffer *Utils.ByteBuffer) *Exception.Exception

type TLVUByte

type TLVUByte struct {
	TLV
	Value uint8
}

func NewTLVUByte

func NewTLVUByte() *TLVUByte

func NewTLVUByteWithTag

func NewTLVUByteWithTag(tag int16) *TLVUByte

func NewTLVUByteWithTagValue

func NewTLVUByteWithTagValue(tag int16, value uint8) *TLVUByte

func (*TLVUByte) Construct

func (c *TLVUByte) Construct()

func (*TLVUByte) GetValue

func (c *TLVUByte) GetValue() (uint8, *Exception.Exception)

func (*TLVUByte) GetValueData

func (c *TLVUByte) GetValueData() (b *Utils.ByteBuffer, er *Exception.Exception)

func (*TLVUByte) SetValue

func (c *TLVUByte) SetValue(value uint8) *Exception.Exception

func (*TLVUByte) SetValueData

func (c *TLVUByte) SetValueData(buffer *Utils.ByteBuffer) *Exception.Exception

Jump to

Keyboard shortcuts

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