Common

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SMPP_TIME_DATE_FORMAT string = "060102150405"
	MaxUint               uint   = ^uint(0)
	MinUint               uint   = 0
	MaxInt                int    = int(MaxUint >> 1)
	MinInt                int    = -MaxInt - 1
)

Variables

This section is empty.

Functions

func DecodeUnsigned

func DecodeUnsigned(signed byte) int16

func DecodeUnsignedFromInt16

func DecodeUnsignedFromInt16(signed int16) int

func EncodeUnsigned

func EncodeUnsigned(positive int16) byte

func EncodeUnsignedFromInt

func EncodeUnsignedFromInt(positive int) int16

Types

type ByteData

type ByteData struct {
	LibraryCheckDateFormat bool
	This                   interface{}
}

func (*ByteData) CheckCStringMax

func (c *ByteData) CheckCStringMax(st string, max int) *Exception.Exception

func (*ByteData) CheckCStringMinMax

func (c *ByteData) CheckCStringMinMax(String string, min int, max int) *Exception.Exception

func (*ByteData) CheckDate

func (c *ByteData) CheckDate(dateStr string) (err *Exception.Exception)

func (*ByteData) CheckStringMax

func (c *ByteData) CheckStringMax(st string, max int) *Exception.Exception

func (*ByteData) CheckStringMaxEncoding

func (c *ByteData) CheckStringMaxEncoding(st string, max int, enc Data.Encoding) *Exception.Exception

func (*ByteData) CheckStringMinMax

func (c *ByteData) CheckStringMinMax(String string, min int, max int) *Exception.Exception

func (*ByteData) CheckStringMinMaxEncoding

func (c *ByteData) CheckStringMinMaxEncoding(String string, min int, max int, enc Data.Encoding) *Exception.Exception

func (*ByteData) Construct

func (c *ByteData) Construct()

func (*ByteData) SetRealReference

func (c *ByteData) SetRealReference(real interface{})

type ByteDataList

type ByteDataList struct {
	ByteData
	Values       []IByteData
	MaxSize      int
	LengthOfSize byte
}

func NewByteDataList

func NewByteDataList() *ByteDataList

func NewByteDataListWithSize

func NewByteDataListWithSize(max int, lengthOfSize int) (*ByteDataList, error)

func (*ByteDataList) AddValue

func (c *ByteDataList) AddValue(val IByteData) *Exception.Exception

func (*ByteDataList) Construct

func (c *ByteDataList) Construct()

func (*ByteDataList) GetCount

func (c *ByteDataList) GetCount() int

func (*ByteDataList) GetData

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

func (*ByteDataList) GetValue

func (c *ByteDataList) GetValue(index int) IByteData

func (*ByteDataList) ResetValues

func (c *ByteDataList) ResetValues()

func (*ByteDataList) SetData

func (c *ByteDataList) SetData(buffer *Utils.ByteBuffer) (err *Exception.Exception)

type IByteData

type IByteData interface {
	SetData(*Utils.ByteBuffer) *Exception.Exception
	GetData() (*Utils.ByteBuffer, *Exception.Exception)
}

type IByteDataList

type IByteDataList interface {
	CreateValue() IByteData
}

Jump to

Keyboard shortcuts

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