messages

package
v0.0.0-...-1c86a79 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package messages provides protocol definitions and encoding/decoding feature of M3UA messages.

Specification: https://tools.ietf.org/html/rfc4666#section-3

Index

Constants

View Source
const (
	MsgClassManagement uint8 = iota
	MsgClassTransfer
	MsgClassSSNM
	MsgClassASPSM
	MsgClassASPTM

	MsgClassRKM
)

Message Class definitions.

View Source
const (
	MsgTypeError = iota
	MsgTypeNotify
)

Message Type definitions (Management).

View Source
const (
	MsgTypeDestinationUnavailable
	MsgTypeDestinationAvailable
	MsgTypeDestinationStateAudit
	MsgTypeSignallingCongestion
	MsgTypeDestinationUserPartUnavailable
	MsgTypeDestinationRestricted
)

Message Type definitions (SSNM).

View Source
const (
	MsgTypeAspUp uint8
	MsgTypeAspDown
	MsgTypeHeartbeat
	MsgTypeAspUpAck
	MsgTypeAspDownAck
	MsgTypeHeartbeatAck
)

Message Type definitions (ASPSM).

View Source
const (
	MsgTypeAspActive uint8
	MsgTypeAspInactive
	MsgTypeAspActiveAck
	MsgTypeAspInactiveAck
)

Message Type definitions (ASPTM).

View Source
const (
	MsgTypeRegistrationRequest uint8
	MsgTypeRegistrationResponse
	MsgTypeDeregistrationRequest
	MsgTypeDeregistrationResponse
)

Message Type definitions (RKM).

View Source
const (
	MsgTypePayloadData uint8
)

Message Type definitions (Transfer).

Variables

View Source
var (
	ErrTooShortToMarshalBinary = errors.New("insufficient buffer to serialize M3UA to")
	ErrTooShortToParse         = errors.New("too short to decode as M3UA")
	ErrInvalidParameter        = errors.New("got invalid parameter inside a message")
)

Error definitions.

Functions

func MarshalBinary

func MarshalBinary(m M3UA) ([]byte, error)

MarshalBinary returns the byte sequence generated from a M3UA instance. Better to use MarshalBinaryXxx instead if you know the type of data to be serialized.

Types

type AspActive

type AspActive struct {
	*Header
	TrafficModeType *params.Param
	RoutingContext  *params.Param
	InfoString      *params.Param
}

AspActive is a AspActive type of M3UA message.

Spec: 3.7.1, RFC4666.

func DecodeAspActive

func DecodeAspActive(b []byte) (*AspActive, error)

DecodeAspActive decodes given byte sequence as a AspActive.

DEPRECATED: use ParseAspActive instead.

func NewAspActive

func NewAspActive(tmt, rtCtx, info *params.Param) *AspActive

NewAspActive creates a new AspActive.

func ParseAspActive

func ParseAspActive(b []byte) (*AspActive, error)

ParseAspActive decodes given byte sequence as a AspActive.

func (*AspActive) DecodeFromBytes

func (a *AspActive) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*AspActive) Len

func (a *AspActive) Len() int

Len returns the serial length of AspActive.

DEPRECATED: use MarshalLen instead.

func (*AspActive) MarshalBinary

func (a *AspActive) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a AspActive.

func (*AspActive) MarshalLen

func (a *AspActive) MarshalLen() int

MarshalLen returns the serial length of AspActive.

func (*AspActive) MarshalTo

func (a *AspActive) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*AspActive) MessageClass

func (a *AspActive) MessageClass() uint8

MessageClass returns the message class in int.

func (*AspActive) MessageClassName

func (a *AspActive) MessageClassName() string

MessageClassName returns the name of message class.

func (*AspActive) MessageType

func (a *AspActive) MessageType() uint8

MessageType returns the message type in int.

func (*AspActive) MessageTypeName

func (a *AspActive) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*AspActive) Serialize

func (a *AspActive) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a AspActive.

DEPRECATED: use MarshalBinary instead.

func (*AspActive) SerializeTo

func (a *AspActive) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*AspActive) SetLength

func (a *AspActive) SetLength()

SetLength sets the length in Length field.

func (*AspActive) String

func (a *AspActive) String() string

String returns the AspActive values in human readable format.

func (*AspActive) UnmarshalBinary

func (a *AspActive) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*AspActive) Version

func (a *AspActive) Version() uint8

Version returns the version of M3UA in int.

type AspActiveAck

type AspActiveAck struct {
	*Header
	TrafficModeType *params.Param
	RoutingContext  *params.Param
	InfoString      *params.Param
}

AspActiveAck is a AspActiveAck type of M3UA message.

Spec: 3.7.2, RFC4666.

func DecodeAspActiveAck

func DecodeAspActiveAck(b []byte) (*AspActiveAck, error)

DecodeAspActiveAck decodes given byte sequence as a AspActiveAck.

DEPRECATED: use ParseAspActiveAck instead.

func NewAspActiveAck

func NewAspActiveAck(tmt, rtCtx, info *params.Param) *AspActiveAck

NewAspActiveAck creates a new AspActiveAck.

func ParseAspActiveAck

func ParseAspActiveAck(b []byte) (*AspActiveAck, error)

ParseAspActiveAck decodes given byte sequence as a AspActiveAck.

func (*AspActiveAck) DecodeFromBytes

func (a *AspActiveAck) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*AspActiveAck) Len

func (a *AspActiveAck) Len() int

Len returns the serial length of AspActiveAck.

DEPRECATED: use MarshalLen instead.

func (*AspActiveAck) MarshalBinary

func (a *AspActiveAck) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a AspActiveAck.

func (*AspActiveAck) MarshalLen

func (a *AspActiveAck) MarshalLen() int

MarshalLen returns the serial length of AspActiveAck.

func (*AspActiveAck) MarshalTo

func (a *AspActiveAck) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*AspActiveAck) MessageClass

func (a *AspActiveAck) MessageClass() uint8

MessageClass returns the message class in int.

func (*AspActiveAck) MessageClassName

func (a *AspActiveAck) MessageClassName() string

MessageClassName returns the name of message class.

func (*AspActiveAck) MessageType

func (a *AspActiveAck) MessageType() uint8

MessageType returns the message type in int.

func (*AspActiveAck) MessageTypeName

func (a *AspActiveAck) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*AspActiveAck) Serialize

func (a *AspActiveAck) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a AspActiveAck.

DEPRECATED: use MarshalBinary instead.

func (*AspActiveAck) SerializeTo

func (a *AspActiveAck) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*AspActiveAck) SetLength

func (a *AspActiveAck) SetLength()

SetLength sets the length in Length field.

func (*AspActiveAck) String

func (a *AspActiveAck) String() string

String returns the AspActiveAck values in human readable format.

func (*AspActiveAck) UnmarshalBinary

func (a *AspActiveAck) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*AspActiveAck) Version

func (a *AspActiveAck) Version() uint8

Version returns the version of M3UA in int.

type AspDown

type AspDown struct {
	*Header
	AspIdentifier *params.Param
	InfoString    *params.Param
}

AspDown is a AspDown type of M3UA message.

Spec: 3.5.3, RFC4666.

func DecodeAspDown

func DecodeAspDown(b []byte) (*AspDown, error)

DecodeAspDown decodes given byte sequence as a AspDown.

DEPRECATED: use ParseAspDown instead.

func NewAspDown

func NewAspDown(info *params.Param) *AspDown

NewAspDown creates a new AspDown.

func ParseAspDown

func ParseAspDown(b []byte) (*AspDown, error)

ParseAspDown decodes given byte sequence as a AspDown.

func (*AspDown) DecodeFromBytes

func (a *AspDown) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*AspDown) Len

func (a *AspDown) Len() int

Len returns the serial length of AspDown.

DEPRECATED: use MarshalLen instead.

func (*AspDown) MarshalBinary

func (a *AspDown) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a AspDown.

func (*AspDown) MarshalLen

func (a *AspDown) MarshalLen() int

MarshalLen returns the serial length of AspDown.

func (*AspDown) MarshalTo

func (a *AspDown) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*AspDown) MessageClass

func (a *AspDown) MessageClass() uint8

MessageClass returns the message class in int.

func (*AspDown) MessageClassName

func (a *AspDown) MessageClassName() string

MessageClassName returns the name of message class.

func (*AspDown) MessageType

func (a *AspDown) MessageType() uint8

MessageType returns the message type in int.

func (*AspDown) MessageTypeName

func (a *AspDown) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*AspDown) Serialize

func (a *AspDown) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a AspDown.

DEPRECATED: use MarshalBinary instead.

func (*AspDown) SerializeTo

func (a *AspDown) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*AspDown) SetLength

func (a *AspDown) SetLength()

SetLength sets the length in Length field.

func (*AspDown) String

func (a *AspDown) String() string

String returns the AspDown values in human readable format.

func (*AspDown) UnmarshalBinary

func (a *AspDown) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*AspDown) Version

func (a *AspDown) Version() uint8

Version returns the version of M3UA in int.

type AspDownAck

type AspDownAck struct {
	*Header
	AspIdentifier *params.Param
	InfoString    *params.Param
}

AspDownAck is a AspDownAck type of M3UA message.

Spec: 3.5.4, RFC4666.

func DecodeAspDownAck

func DecodeAspDownAck(b []byte) (*AspDownAck, error)

DecodeAspDownAck decodes given byte sequence as a AspDownAck.

DEPRECATED: use ParseAspDownAck instead.

func NewAspDownAck

func NewAspDownAck(info *params.Param) *AspDownAck

NewAspDownAck creates a new AspDownAck.

func ParseAspDownAck

func ParseAspDownAck(b []byte) (*AspDownAck, error)

ParseAspDownAck decodes given byte sequence as a AspDownAck.

func (*AspDownAck) DecodeFromBytes

func (a *AspDownAck) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*AspDownAck) Len

func (a *AspDownAck) Len() int

Len returns the serial length of AspDownAck.

DEPRECATED: use MarshalLen instead.

func (*AspDownAck) MarshalBinary

func (a *AspDownAck) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a AspDownAck.

func (*AspDownAck) MarshalLen

func (a *AspDownAck) MarshalLen() int

MarshalLen returns the serial length of AspDownAck.

func (*AspDownAck) MarshalTo

func (a *AspDownAck) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*AspDownAck) MessageClass

func (a *AspDownAck) MessageClass() uint8

MessageClass returns the message class in int.

func (*AspDownAck) MessageClassName

func (a *AspDownAck) MessageClassName() string

MessageClassName returns the name of message class.

func (*AspDownAck) MessageType

func (a *AspDownAck) MessageType() uint8

MessageType returns the message type in int.

func (*AspDownAck) MessageTypeName

func (a *AspDownAck) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*AspDownAck) Serialize

func (a *AspDownAck) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a AspDownAck.

DEPRECATED: use MarshalBinary instead.

func (*AspDownAck) SerializeTo

func (a *AspDownAck) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*AspDownAck) SetLength

func (a *AspDownAck) SetLength()

SetLength sets the length in Length field.

func (*AspDownAck) String

func (a *AspDownAck) String() string

String returns the AspDownAck values in human readable format.

func (*AspDownAck) UnmarshalBinary

func (a *AspDownAck) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*AspDownAck) Version

func (a *AspDownAck) Version() uint8

Version returns the version of M3UA in int.

type AspInactive

type AspInactive struct {
	*Header
	RoutingContext *params.Param
	InfoString     *params.Param
}

AspInactive is a AspInactive type of M3UA message.

Spec: 3.7.3, RFC4666.

func DecodeAspInactive

func DecodeAspInactive(b []byte) (*AspInactive, error)

DecodeAspInactive decodes given byte sequence as a AspInactive.

DEPRECATED: use ParseAspInactive instead.

func NewAspInactive

func NewAspInactive(rtCtx, info *params.Param) *AspInactive

NewAspInactive creates a new AspInactive.

func ParseAspInactive

func ParseAspInactive(b []byte) (*AspInactive, error)

ParseAspInactive decodes given byte sequence as a AspInactive.

func (*AspInactive) DecodeFromBytes

func (a *AspInactive) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*AspInactive) Len

func (a *AspInactive) Len() int

Len returns the serial length of AspInactive.

DEPRECATED: use MarshalLen instead.

func (*AspInactive) MarshalBinary

func (a *AspInactive) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a AspInactive.

func (*AspInactive) MarshalLen

func (a *AspInactive) MarshalLen() int

MarshalLen returns the serial length of AspInactive.

func (*AspInactive) MarshalTo

func (a *AspInactive) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*AspInactive) MessageClass

func (a *AspInactive) MessageClass() uint8

MessageClass returns the message class in int.

func (*AspInactive) MessageClassName

func (a *AspInactive) MessageClassName() string

MessageClassName returns the name of message class.

func (*AspInactive) MessageType

func (a *AspInactive) MessageType() uint8

MessageType returns the message type in int.

func (*AspInactive) MessageTypeName

func (a *AspInactive) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*AspInactive) Serialize

func (a *AspInactive) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a AspInactive.

DEPRECATED: use MarshalBinary instead.

func (*AspInactive) SerializeTo

func (a *AspInactive) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*AspInactive) SetLength

func (a *AspInactive) SetLength()

SetLength sets the length in Length field.

func (*AspInactive) String

func (a *AspInactive) String() string

String returns the AspInactive values in human readable format.

func (*AspInactive) UnmarshalBinary

func (a *AspInactive) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*AspInactive) Version

func (a *AspInactive) Version() uint8

Version returns the version of M3UA in int.

type AspInactiveAck

type AspInactiveAck struct {
	*Header
	RoutingContext *params.Param
	InfoString     *params.Param
}

AspInactiveAck is a AspInactiveAck type of M3UA message.

Spec: 3.7.4, RFC4666.

func DecodeAspInactiveAck

func DecodeAspInactiveAck(b []byte) (*AspInactiveAck, error)

DecodeAspInactiveAck decodes given byte sequence as a AspInactiveAck.

DEPRECATED: use ParseAspInactiveAck instead.

func NewAspInactiveAck

func NewAspInactiveAck(rtCtx, info *params.Param) *AspInactiveAck

NewAspInactiveAck creates a new AspInactiveAck.

func ParseAspInactiveAck

func ParseAspInactiveAck(b []byte) (*AspInactiveAck, error)

ParseAspInactiveAck decodes given byte sequence as a AspInactiveAck.

func (*AspInactiveAck) DecodeFromBytes

func (a *AspInactiveAck) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*AspInactiveAck) Len

func (a *AspInactiveAck) Len() int

Len returns the serial length of AspInactiveAck.

DEPRECATED: use MarshalLen instead.

func (*AspInactiveAck) MarshalBinary

func (a *AspInactiveAck) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a AspInactiveAck.

func (*AspInactiveAck) MarshalLen

func (a *AspInactiveAck) MarshalLen() int

MarshalLen returns the serial length of AspInactiveAck.

func (*AspInactiveAck) MarshalTo

func (a *AspInactiveAck) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*AspInactiveAck) MessageClass

func (a *AspInactiveAck) MessageClass() uint8

MessageClass returns the message class in int.

func (*AspInactiveAck) MessageClassName

func (a *AspInactiveAck) MessageClassName() string

MessageClassName returns the name of message class.

func (*AspInactiveAck) MessageType

func (a *AspInactiveAck) MessageType() uint8

MessageType returns the message type in int.

func (*AspInactiveAck) MessageTypeName

func (a *AspInactiveAck) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*AspInactiveAck) Serialize

func (a *AspInactiveAck) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a AspInactiveAck.

DEPRECATED: use MarshalBinary instead.

func (*AspInactiveAck) SerializeTo

func (a *AspInactiveAck) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*AspInactiveAck) SetLength

func (a *AspInactiveAck) SetLength()

SetLength sets the length in Length field.

func (*AspInactiveAck) String

func (a *AspInactiveAck) String() string

String returns the AspInactiveAck values in human readable format.

func (*AspInactiveAck) UnmarshalBinary

func (a *AspInactiveAck) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*AspInactiveAck) Version

func (a *AspInactiveAck) Version() uint8

Version returns the version of M3UA in int.

type AspUp

type AspUp struct {
	*Header
	AspIdentifier *params.Param
	InfoString    *params.Param
}

AspUp is a AspUp type of M3UA message.

Spec: 3.5.1, RFC4666.

func DecodeAspUp

func DecodeAspUp(b []byte) (*AspUp, error)

DecodeAspUp decodes given byte sequence as a AspUp.

DEPRECATED: use ParseAspUp instead.

func NewAspUp

func NewAspUp(aspID, info *params.Param) *AspUp

NewAspUp creates a new AspUp.

func ParseAspUp

func ParseAspUp(b []byte) (*AspUp, error)

ParseAspUp decodes given byte sequence as a AspUp.

func (*AspUp) DecodeFromBytes

func (a *AspUp) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*AspUp) Len

func (a *AspUp) Len() int

Len returns the serial length of AspUp.

DEPRECATED: use MarshalLen instead.

func (*AspUp) MarshalBinary

func (a *AspUp) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a AspUp.

func (*AspUp) MarshalLen

func (a *AspUp) MarshalLen() int

MarshalLen returns the serial length of AspUp.

func (*AspUp) MarshalTo

func (a *AspUp) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*AspUp) MessageClass

func (a *AspUp) MessageClass() uint8

MessageClass returns the message class in int.

func (*AspUp) MessageClassName

func (a *AspUp) MessageClassName() string

MessageClassName returns the name of message class.

func (*AspUp) MessageType

func (a *AspUp) MessageType() uint8

MessageType returns the message type in int.

func (*AspUp) MessageTypeName

func (a *AspUp) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*AspUp) Serialize

func (a *AspUp) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a AspUp.

DEPRECATED: use MarshalBinary instead.

func (*AspUp) SerializeTo

func (a *AspUp) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*AspUp) SetLength

func (a *AspUp) SetLength()

SetLength sets the length in Length field.

func (*AspUp) String

func (a *AspUp) String() string

String returns the AspUp values in human readable format.

func (*AspUp) UnmarshalBinary

func (a *AspUp) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*AspUp) Version

func (a *AspUp) Version() uint8

Version returns the version of M3UA in int.

type AspUpAck

type AspUpAck struct {
	*Header
	AspIdentifier *params.Param
	InfoString    *params.Param
}

AspUpAck is a AspUpAck type of M3UA message.

Spec: 3.5.2, RFC4666.

func DecodeAspUpAck

func DecodeAspUpAck(b []byte) (*AspUpAck, error)

DecodeAspUpAck decodes given byte sequence as a AspUpAck.

DEPRECATED: use ParseAspUpAck instead.

func NewAspUpAck

func NewAspUpAck(aspID, info *params.Param) *AspUpAck

NewAspUpAck creates a new AspUpAck.

func ParseAspUpAck

func ParseAspUpAck(b []byte) (*AspUpAck, error)

ParseAspUpAck decodes given byte sequence as a AspUpAck.

func (*AspUpAck) DecodeFromBytes

func (a *AspUpAck) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*AspUpAck) Len

func (a *AspUpAck) Len() int

Len returns the serial length of AspUpAck.

DEPRECATED: use MarshalLen instead.

func (*AspUpAck) MarshalBinary

func (a *AspUpAck) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a AspUpAck.

func (*AspUpAck) MarshalLen

func (a *AspUpAck) MarshalLen() int

MarshalLen returns the serial length of AspUpAck.

func (*AspUpAck) MarshalTo

func (a *AspUpAck) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*AspUpAck) MessageClass

func (a *AspUpAck) MessageClass() uint8

MessageClass returns the message class in int.

func (*AspUpAck) MessageClassName

func (a *AspUpAck) MessageClassName() string

MessageClassName returns the name of message class.

func (*AspUpAck) MessageType

func (a *AspUpAck) MessageType() uint8

MessageType returns the message type in int.

func (*AspUpAck) MessageTypeName

func (a *AspUpAck) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*AspUpAck) Serialize

func (a *AspUpAck) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a AspUpAck.

DEPRECATED: use MarshalBinary instead.

func (*AspUpAck) SerializeTo

func (a *AspUpAck) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*AspUpAck) SetLength

func (a *AspUpAck) SetLength()

SetLength sets the length in Length field.

func (*AspUpAck) String

func (a *AspUpAck) String() string

String returns the AspUpAck values in human readable format.

func (*AspUpAck) UnmarshalBinary

func (a *AspUpAck) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*AspUpAck) Version

func (a *AspUpAck) Version() uint8

Version returns the version of M3UA in int.

type Data

type Data struct {
	*Header
	NetworkAppearance *params.Param
	RoutingContext    *params.Param
	ProtocolData      *params.Param
	CorrelationID     *params.Param
}

Data is a PayloadData type of M3UA message.

Spec: 3.3.1, RFC4666.

func DecodeData

func DecodeData(b []byte) (*Data, error)

DecodeData decodes given byte sequence as a Data.

DEPRECATED: use ParseData instead.

func NewData

func NewData(nwApr, rtCtx, pd, corrID *params.Param) *Data

NewData creates a new Data.

func ParseData

func ParseData(b []byte) (*Data, error)

ParseData decodes given byte sequence as a Data.

func (*Data) DecodeFromBytes

func (d *Data) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*Data) Len

func (d *Data) Len() int

Len returns the serial length of Data.

DEPRECATED: use MarshalLen instead.

func (*Data) MarshalBinary

func (d *Data) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a Data.

func (*Data) MarshalLen

func (d *Data) MarshalLen() int

MarshalLen returns the serial length of Data.

func (*Data) MarshalTo

func (d *Data) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*Data) MessageClass

func (d *Data) MessageClass() uint8

MessageClass returns the message class in int.

func (*Data) MessageClassName

func (d *Data) MessageClassName() string

MessageClassName returns the name of message class.

func (*Data) MessageType

func (d *Data) MessageType() uint8

MessageType returns the message type in int.

func (*Data) MessageTypeName

func (d *Data) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*Data) Serialize

func (d *Data) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a Data.

DEPRECATED: use MarshalBinary instead.

func (*Data) SerializeTo

func (d *Data) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*Data) SetLength

func (d *Data) SetLength()

SetLength sets the length in Length field.

func (*Data) String

func (d *Data) String() string

String returns the Data values in human readable format.

func (*Data) UnmarshalBinary

func (d *Data) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*Data) Version

func (d *Data) Version() uint8

Version returns the version of M3UA in int.

type DestinationAvailable

type DestinationAvailable struct {
	*Header
	NetworkAppearance *params.Param
	RoutingContext    *params.Param
	AffectedPointCode *params.Param
	InfoString        *params.Param
}

DestinationAvailable is a DestinationAvailable type of M3UA message.

Spec: 3.4.2, RFC4666.

func DecodeDestinationAvailable

func DecodeDestinationAvailable(b []byte) (*DestinationAvailable, error)

DecodeDestinationAvailable decodes given byte sequence as a DestinationAvailable.

DEPRECATED: use ParseDestinationAvailable instead.

func NewDestinationAvailable

func NewDestinationAvailable(nwApr, rtCtx, apcs, info *params.Param) *DestinationAvailable

NewDestinationAvailable creates a new DestinationAvailable.

func ParseDestinationAvailable

func ParseDestinationAvailable(b []byte) (*DestinationAvailable, error)

ParseDestinationAvailable decodes given byte sequence as a DestinationAvailable.

func (*DestinationAvailable) DecodeFromBytes

func (d *DestinationAvailable) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*DestinationAvailable) Len

func (d *DestinationAvailable) Len() int

Len returns the serial length of DestinationAvailable.

DEPRECATED: use MarshalLen instead.

func (*DestinationAvailable) MarshalBinary

func (d *DestinationAvailable) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a DestinationAvailable.

func (*DestinationAvailable) MarshalLen

func (d *DestinationAvailable) MarshalLen() int

MarshalLen returns the serial length of DestinationAvailable.

func (*DestinationAvailable) MarshalTo

func (d *DestinationAvailable) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*DestinationAvailable) MessageClass

func (d *DestinationAvailable) MessageClass() uint8

MessageClass returns the message class in int.

func (*DestinationAvailable) MessageClassName

func (d *DestinationAvailable) MessageClassName() string

MessageClassName returns the name of message class.

func (*DestinationAvailable) MessageType

func (d *DestinationAvailable) MessageType() uint8

MessageType returns the message type in int.

func (*DestinationAvailable) MessageTypeName

func (d *DestinationAvailable) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*DestinationAvailable) Serialize

func (d *DestinationAvailable) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a DestinationAvailable.

DEPRECATED: use MarshalBinary instead.

func (*DestinationAvailable) SerializeTo

func (d *DestinationAvailable) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*DestinationAvailable) SetLength

func (d *DestinationAvailable) SetLength()

SetLength sets the length in Length field.

func (*DestinationAvailable) UnmarshalBinary

func (d *DestinationAvailable) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*DestinationAvailable) Version

func (d *DestinationAvailable) Version() uint8

Version returns the version of M3UA in int.

type DestinationRestricted

type DestinationRestricted struct {
	*Header
	NetworkAppearance *params.Param
	RoutingContext    *params.Param
	AffectedPointCode *params.Param
	InfoString        *params.Param
}

DestinationRestricted is a DestinationRestricted type of M3UA message.

Spec: 3.4.6, RFC4666.

func DecodeDestinationRestricted

func DecodeDestinationRestricted(b []byte) (*DestinationRestricted, error)

DecodeDestinationRestricted decodes given byte sequence as a DestinationRestricted.

DEPRECATED: use ParseDestinationRestricted instead.

func NewDestinationRestricted

func NewDestinationRestricted(nwApr, rtCtx, apcs, info *params.Param) *DestinationRestricted

NewDestinationRestricted creates a new DestinationRestricted.

func ParseDestinationRestricted

func ParseDestinationRestricted(b []byte) (*DestinationRestricted, error)

ParseDestinationRestricted decodes given byte sequence as a DestinationRestricted.

func (*DestinationRestricted) DecodeFromBytes

func (d *DestinationRestricted) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*DestinationRestricted) Len

func (d *DestinationRestricted) Len() int

Len returns the serial length of DestinationRestricted.

DEPRECATED: use MarshalLen instead.

func (*DestinationRestricted) MarshalBinary

func (d *DestinationRestricted) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a DestinationRestricted.

func (*DestinationRestricted) MarshalLen

func (d *DestinationRestricted) MarshalLen() int

MarshalLen returns the serial length of DestinationRestricted.

func (*DestinationRestricted) MarshalTo

func (d *DestinationRestricted) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*DestinationRestricted) MessageClass

func (d *DestinationRestricted) MessageClass() uint8

MessageClass returns the message class in int.

func (*DestinationRestricted) MessageClassName

func (d *DestinationRestricted) MessageClassName() string

MessageClassName returns the name of message class.

func (*DestinationRestricted) MessageType

func (d *DestinationRestricted) MessageType() uint8

MessageType returns the message type in int.

func (*DestinationRestricted) MessageTypeName

func (d *DestinationRestricted) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*DestinationRestricted) Serialize

func (d *DestinationRestricted) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a DestinationRestricted.

DEPRECATED: use MarshalBinary instead.

func (*DestinationRestricted) SerializeTo

func (d *DestinationRestricted) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*DestinationRestricted) SetLength

func (d *DestinationRestricted) SetLength()

SetLength sets the length in Length field.

func (*DestinationRestricted) UnmarshalBinary

func (d *DestinationRestricted) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*DestinationRestricted) Version

func (d *DestinationRestricted) Version() uint8

Version returns the version of M3UA in int.

type DestinationStateAudit

type DestinationStateAudit struct {
	*Header
	NetworkAppearance *params.Param
	RoutingContext    *params.Param
	AffectedPointCode *params.Param
	InfoString        *params.Param
}

DestinationStateAudit is a DestinationStateAudit type of M3UA message.

Spec: 3.4.3, RFC4666.

func DecodeDestinationStateAudit

func DecodeDestinationStateAudit(b []byte) (*DestinationStateAudit, error)

DecodeDestinationStateAudit decodes given byte sequence as a DestinationStateAudit.

DEPRECATED: use ParseDestinationStateAudit instead.

func NewDestinationStateAudit

func NewDestinationStateAudit(nwApr, rtCtx, apcs, info *params.Param) *DestinationStateAudit

NewDestinationStateAudit creates a new DestinationStateAudit.

func ParseDestinationStateAudit

func ParseDestinationStateAudit(b []byte) (*DestinationStateAudit, error)

ParseDestinationStateAudit decodes given byte sequence as a DestinationStateAudit.

func (*DestinationStateAudit) DecodeFromBytes

func (d *DestinationStateAudit) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*DestinationStateAudit) Len

func (d *DestinationStateAudit) Len() int

Len returns the serial length of DestinationStateAudit.

DEPRECATED: use MarshalLen instead.

func (*DestinationStateAudit) MarshalBinary

func (d *DestinationStateAudit) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a DestinationStateAudit.

func (*DestinationStateAudit) MarshalLen

func (d *DestinationStateAudit) MarshalLen() int

MarshalLen returns the serial length of DestinationStateAudit.

func (*DestinationStateAudit) MarshalTo

func (d *DestinationStateAudit) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*DestinationStateAudit) MessageClass

func (d *DestinationStateAudit) MessageClass() uint8

MessageClass returns the message class in int.

func (*DestinationStateAudit) MessageClassName

func (d *DestinationStateAudit) MessageClassName() string

MessageClassName returns the name of message class.

func (*DestinationStateAudit) MessageType

func (d *DestinationStateAudit) MessageType() uint8

MessageType returns the message type in int.

func (*DestinationStateAudit) MessageTypeName

func (d *DestinationStateAudit) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*DestinationStateAudit) Serialize

func (d *DestinationStateAudit) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a DestinationStateAudit.

DEPRECATED: use MarshalBinary instead.

func (*DestinationStateAudit) SerializeTo

func (d *DestinationStateAudit) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*DestinationStateAudit) SetLength

func (d *DestinationStateAudit) SetLength()

SetLength sets the length in Length field.

func (*DestinationStateAudit) UnmarshalBinary

func (d *DestinationStateAudit) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*DestinationStateAudit) Version

func (d *DestinationStateAudit) Version() uint8

Version returns the version of M3UA in int.

type DestinationUnavailable

type DestinationUnavailable struct {
	*Header
	NetworkAppearance *params.Param
	RoutingContext    *params.Param
	AffectedPointCode *params.Param
	InfoString        *params.Param
}

DestinationUnavailable is a DestinationUnavailable type of M3UA message.

Spec: 3.4.1, RFC4666.

func DecodeDestinationUnavailable

func DecodeDestinationUnavailable(b []byte) (*DestinationUnavailable, error)

DecodeDestinationUnavailable decodes given byte sequence as a DestinationUnavailable.

DEPRECATED: use ParseDestinationUnavailable instead.

func NewDestinationUnavailable

func NewDestinationUnavailable(nwApr, rtCtx, apcs, info *params.Param) *DestinationUnavailable

NewDestinationUnavailable creates a new DestinationUnavailable.

func ParseDestinationUnavailable

func ParseDestinationUnavailable(b []byte) (*DestinationUnavailable, error)

ParseDestinationUnavailable decodes given byte sequence as a DestinationUnavailable.

func (*DestinationUnavailable) DecodeFromBytes

func (d *DestinationUnavailable) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*DestinationUnavailable) Len

func (d *DestinationUnavailable) Len() int

Len returns the serial length of DestinationUnavailable.

DEPRECATED: use MarshalLen instead.

func (*DestinationUnavailable) MarshalBinary

func (d *DestinationUnavailable) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a DestinationUnavailable.

func (*DestinationUnavailable) MarshalLen

func (d *DestinationUnavailable) MarshalLen() int

MarshalLen returns the serial length of DestinationUnavailable.

func (*DestinationUnavailable) MarshalTo

func (d *DestinationUnavailable) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*DestinationUnavailable) MessageClass

func (d *DestinationUnavailable) MessageClass() uint8

MessageClass returns the message class in int.

func (*DestinationUnavailable) MessageClassName

func (d *DestinationUnavailable) MessageClassName() string

MessageClassName returns the name of message class.

func (*DestinationUnavailable) MessageType

func (d *DestinationUnavailable) MessageType() uint8

MessageType returns the message type in int.

func (*DestinationUnavailable) MessageTypeName

func (d *DestinationUnavailable) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*DestinationUnavailable) Serialize

func (d *DestinationUnavailable) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a DestinationUnavailable.

DEPRECATED: use MarshalBinary instead.

func (*DestinationUnavailable) SerializeTo

func (d *DestinationUnavailable) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*DestinationUnavailable) SetLength

func (d *DestinationUnavailable) SetLength()

SetLength sets the length in Length field.

func (*DestinationUnavailable) UnmarshalBinary

func (d *DestinationUnavailable) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*DestinationUnavailable) Version

func (d *DestinationUnavailable) Version() uint8

Version returns the version of M3UA in int.

type DestinationUserPartUnavailable

type DestinationUserPartUnavailable struct {
	*Header
	NetworkAppearance *params.Param
	RoutingContext    *params.Param
	AffectedPointCode *params.Param
	UserCause         *params.Param
	InfoString        *params.Param
}

DestinationUserPartUnavailable is a DestinationUserPartUnavailable type of M3UA message.

Spec: 3.4.5, RFC4666.

func NewDestinationUserPartUnavailable

func NewDestinationUserPartUnavailable(nwApr, rtCtx, apcs, cause, info *params.Param) *DestinationUserPartUnavailable

NewDestinationUserPartUnavailable creates a new DestinationUserPartUnavailable.

func ParseDestinationUserPartUnavailable

func ParseDestinationUserPartUnavailable(b []byte) (*DestinationUserPartUnavailable, error)

ParseDestinationUserPartUnavailable decodes given byte sequence as a DestinationUserPartUnavailable.

func (*DestinationUserPartUnavailable) MarshalBinary

func (d *DestinationUserPartUnavailable) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a DestinationUserPartUnavailable.

func (*DestinationUserPartUnavailable) MarshalLen

func (d *DestinationUserPartUnavailable) MarshalLen() int

MarshalLen returns the serial length of DestinationUserPartUnavailable.

func (*DestinationUserPartUnavailable) MarshalTo

func (d *DestinationUserPartUnavailable) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*DestinationUserPartUnavailable) MessageClass

func (d *DestinationUserPartUnavailable) MessageClass() uint8

MessageClass returns the message class in int.

func (*DestinationUserPartUnavailable) MessageClassName

func (d *DestinationUserPartUnavailable) MessageClassName() string

MessageClassName returns the name of message class.

func (*DestinationUserPartUnavailable) MessageType

func (d *DestinationUserPartUnavailable) MessageType() uint8

MessageType returns the message type in int.

func (*DestinationUserPartUnavailable) MessageTypeName

func (d *DestinationUserPartUnavailable) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*DestinationUserPartUnavailable) SetLength

func (d *DestinationUserPartUnavailable) SetLength()

SetLength sets the length in Length field.

func (*DestinationUserPartUnavailable) UnmarshalBinary

func (d *DestinationUserPartUnavailable) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*DestinationUserPartUnavailable) Version

Version returns the version of M3UA in int.

type Error

type Error struct {
	*Header
	ErrorCode             *params.Param
	RoutingContext        *params.Param
	NetworkAppearance     *params.Param
	AffectedPointCode     *params.Param
	DiagnosticInformation *params.Param
}

Error is a Error type of M3UA message.

Spec: 3.8.1, RFC4666.

func DecodeError

func DecodeError(b []byte) (*Error, error)

DecodeError decodes given byte sequence as a Error.

DEPRECATED: use ParseError instead.

func NewError

func NewError(code, rtCtx, nwApr, apc, info *params.Param) *Error

NewError creates a new Error.

func ParseError

func ParseError(b []byte) (*Error, error)

ParseError decodes given byte sequence as a Error.

func (*Error) DecodeFromBytes

func (e *Error) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*Error) Len

func (e *Error) Len() int

Len returns the serial length of Error.

DEPRECATED: use MarshalLen instead.

func (*Error) MarshalBinary

func (e *Error) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a Error.

func (*Error) MarshalLen

func (e *Error) MarshalLen() int

MarshalLen returns the serial length of Error.

func (*Error) MarshalTo

func (e *Error) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*Error) MessageClass

func (e *Error) MessageClass() uint8

MessageClass returns the message class in int.

func (*Error) MessageClassName

func (e *Error) MessageClassName() string

MessageClassName returns the name of message class.

func (*Error) MessageType

func (e *Error) MessageType() uint8

MessageType returns the message type in int.

func (*Error) MessageTypeName

func (e *Error) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*Error) Serialize

func (e *Error) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a Error.

DEPRECATED: use MarshalBinary instead.

func (*Error) SerializeTo

func (e *Error) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*Error) SetLength

func (e *Error) SetLength()

SetLength sets the length in Length field.

func (*Error) String

func (e *Error) String() string

String returns the Error values in human readable format.

func (*Error) UnmarshalBinary

func (e *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*Error) Version

func (e *Error) Version() uint8

Version returns the version of M3UA in int.

type Generic

type Generic struct {
	*Header
	Params []*params.Param
}

Generic is generic structure of M3UA. This is used when

  • Parse() method does not understand the class & type of M3UA message.
  • users manually create this for the specific purpose.

func DecodeGeneric

func DecodeGeneric(b []byte) (*Generic, error)

DecodeGeneric decodes given byte sequence as a Generic.

DEPRECATED: use ParseGeneric instead.

func New

func New(ver, mcls, mtype uint8, params ...*params.Param) *Generic

New creates a new generic M3UA message.

func ParseGeneric

func ParseGeneric(b []byte) (*Generic, error)

ParseGeneric decodes given byte sequence as a M3UA Generic message.

func (*Generic) DecodeFromBytes

func (g *Generic) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*Generic) Len

func (g *Generic) Len() int

Len returns the serial length of Generic.

DEPRECATED: use MarshalLen instead.

func (*Generic) MarshalBinary

func (g *Generic) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a Generic.

func (*Generic) MarshalLen

func (g *Generic) MarshalLen() int

MarshalLen returns the serial length of Data.

func (*Generic) MarshalTo

func (g *Generic) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*Generic) MessageClass

func (g *Generic) MessageClass() uint8

MessageClass returns the message class in int.

func (*Generic) MessageClassName

func (g *Generic) MessageClassName() string

MessageClassName returns the name of message class.

func (*Generic) MessageType

func (g *Generic) MessageType() uint8

MessageType returns the message type in int.

func (*Generic) MessageTypeName

func (g *Generic) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*Generic) Serialize

func (g *Generic) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a Generic.

DEPRECATED: use MarshalBinary instead.

func (*Generic) SerializeTo

func (g *Generic) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*Generic) SetLength

func (g *Generic) SetLength()

SetLength sets the length in Length field.

func (*Generic) String

func (g *Generic) String() string

String returns the Generic values in human readable format.

func (*Generic) UnmarshalBinary

func (g *Generic) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*Generic) Version

func (g *Generic) Version() uint8

Version returns the version of M3UA in int.

type Header struct {
	Version  uint8
	Reserved uint8
	Class    uint8
	Type     uint8
	Length   uint32
	Payload  []byte
}

Header is a M3UA common header.

func DecodeHeader

func DecodeHeader(b []byte) (*Header, error)

DecodeHeader decodes given byte sequence as a Header.

DEPRECATED: use ParseHeader instead.

func NewHeader

func NewHeader(version, class, mtype uint8, payload []byte) *Header

NewHeader creates a new Header.

func ParseHeader

func ParseHeader(b []byte) (*Header, error)

ParseHeader decodes given byte sequence as a M3UA common header.

func (*Header) DecodeFromBytes

func (h *Header) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*Header) Len

func (h *Header) Len() int

Len returns the serial length of Header.

DEPRECATED: use MarshalLen instead.

func (*Header) MarshalBinary

func (h *Header) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a Header instance.

func (*Header) MarshalLen

func (h *Header) MarshalLen() int

MarshalLen returns the serial length of Header.

func (*Header) MarshalTo

func (h *Header) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*Header) Serialize

func (h *Header) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a Header.

DEPRECATED: use MarshalBinary instead.

func (*Header) SerializeTo

func (h *Header) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*Header) SetLength

func (h *Header) SetLength()

SetLength sets the length in Length field.

func (*Header) String

func (h *Header) String() string

String returns the M3UA common header values in human readable format.

func (*Header) UnmarshalBinary

func (h *Header) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

type Heartbeat

type Heartbeat struct {
	*Header
	AspIdentifier *params.Param
	HeartbeatData *params.Param
}

Heartbeat is a Heartbeat type of M3UA message.

Spec: 3.5.5, RFC4666.

func DecodeHeartbeat

func DecodeHeartbeat(b []byte) (*Heartbeat, error)

DecodeHeartbeat decodes given byte sequence as a Heartbeat.

DEPRECATED: use ParseHeartbeat instead.

func NewHeartbeat

func NewHeartbeat(hbData *params.Param) *Heartbeat

NewHeartbeat creates a new Heartbeat.

func ParseHeartbeat

func ParseHeartbeat(b []byte) (*Heartbeat, error)

ParseHeartbeat decodes given byte sequence as a Heartbeat.

func (*Heartbeat) DecodeFromBytes

func (h *Heartbeat) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*Heartbeat) Len

func (h *Heartbeat) Len() int

Len returns the serial length of Heartbeat.

DEPRECATED: use MarshalLen instead.

func (*Heartbeat) MarshalBinary

func (h *Heartbeat) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a Heartbeat.

func (*Heartbeat) MarshalLen

func (h *Heartbeat) MarshalLen() int

MarshalLen returns the serial length of Heartbeat.

func (*Heartbeat) MarshalTo

func (h *Heartbeat) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*Heartbeat) MessageClass

func (h *Heartbeat) MessageClass() uint8

MessageClass returns the message class in int.

func (*Heartbeat) MessageClassName

func (h *Heartbeat) MessageClassName() string

MessageClassName returns the name of message class.

func (*Heartbeat) MessageType

func (h *Heartbeat) MessageType() uint8

MessageType returns the message type in int.

func (*Heartbeat) MessageTypeName

func (h *Heartbeat) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*Heartbeat) Serialize

func (h *Heartbeat) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a Heartbeat.

DEPRECATED: use MarshalBinary instead.

func (*Heartbeat) SerializeTo

func (h *Heartbeat) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*Heartbeat) SetLength

func (h *Heartbeat) SetLength()

SetLength sets the length in Length field.

func (*Heartbeat) String

func (h *Heartbeat) String() string

String returns the Heartbeat values in human readable format.

func (*Heartbeat) UnmarshalBinary

func (h *Heartbeat) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*Heartbeat) Version

func (h *Heartbeat) Version() uint8

Version returns the version of M3UA in int.

type HeartbeatAck

type HeartbeatAck struct {
	*Header
	AspIdentifier *params.Param
	HeartbeatData *params.Param
}

HeartbeatAck is a HeartbeatAck type of M3UA message.

Spec: 3.5.6, RFC4666.

func DecodeHeartbeatAck

func DecodeHeartbeatAck(b []byte) (*HeartbeatAck, error)

DecodeHeartbeatAck decodes given byte sequence as a HeartbeatAck.

DEPRECATED: use ParseHeartbeatAck instead.

func NewHeartbeatAck

func NewHeartbeatAck(hbData *params.Param) *HeartbeatAck

NewHeartbeatAck creates a new HeartbeatAck.

func ParseHeartbeatAck

func ParseHeartbeatAck(b []byte) (*HeartbeatAck, error)

ParseHeartbeatAck decodes given byte sequence as a HeartbeatAck.

func (*HeartbeatAck) DecodeFromBytes

func (h *HeartbeatAck) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*HeartbeatAck) Len

func (h *HeartbeatAck) Len() int

Len returns the serial length of HeartbeatAck.

DEPRECATED: use MarshalLen instead.

func (*HeartbeatAck) MarshalBinary

func (h *HeartbeatAck) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a HeartbeatAck.

func (*HeartbeatAck) MarshalLen

func (h *HeartbeatAck) MarshalLen() int

MarshalLen returns the serial length of HeartbeatAck.

func (*HeartbeatAck) MarshalTo

func (h *HeartbeatAck) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*HeartbeatAck) MessageClass

func (h *HeartbeatAck) MessageClass() uint8

MessageClass returns the message class in int.

func (*HeartbeatAck) MessageClassName

func (h *HeartbeatAck) MessageClassName() string

MessageClassName returns the name of message class.

func (*HeartbeatAck) MessageType

func (h *HeartbeatAck) MessageType() uint8

MessageType returns the message type in int.

func (*HeartbeatAck) MessageTypeName

func (h *HeartbeatAck) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*HeartbeatAck) Serialize

func (h *HeartbeatAck) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a HeartbeatAck.

DEPRECATED: use MarshalBinary instead.

func (*HeartbeatAck) SerializeTo

func (h *HeartbeatAck) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*HeartbeatAck) SetLength

func (h *HeartbeatAck) SetLength()

SetLength sets the length in Length field.

func (*HeartbeatAck) String

func (h *HeartbeatAck) String() string

String returns the HeartbeatAck values in human readable format.

func (*HeartbeatAck) UnmarshalBinary

func (h *HeartbeatAck) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*HeartbeatAck) Version

func (h *HeartbeatAck) Version() uint8

Version returns the version of M3UA in int.

type M3UA

type M3UA interface {
	MarshalBinary() ([]byte, error)
	MarshalTo([]byte) error
	UnmarshalBinary([]byte) error
	MarshalLen() int
	Version() uint8
	MessageClass() uint8
	MessageType() uint8
	MessageClassName() string
	MessageTypeName() string
}

M3UA is an interface that defines M3UA messages.

func Decode

func Decode(b []byte) (M3UA, error)

Decode decodes the given bytes. This function checks the Message Class and Message Type and chooses the appropriate type.

DEPRECATED: use Parse instead.

func Parse

func Parse(b []byte) (M3UA, error)

Parse decodes the given bytes. This function checks the Message Class and Message Type and chooses the appropriate type.

type Notify

type Notify struct {
	*Header
	Status         *params.Param
	AspIdentifier  *params.Param
	RoutingContext *params.Param
	InfoString     *params.Param
}

Notify is a Notify type of M3UA message.

Spec: 3.8.2, RFC4666.

func DecodeNotify

func DecodeNotify(b []byte) (*Notify, error)

DecodeNotify decodes given byte sequence as a Notify.

DEPRECATED: use ParseNotify instead.

func NewNotify

func NewNotify(status, aspID, rtCtx, info *params.Param) *Notify

NewNotify creates a new Notify.

func ParseNotify

func ParseNotify(b []byte) (*Notify, error)

ParseNotify decodes given byte sequence as a Notify.

func (*Notify) DecodeFromBytes

func (n *Notify) DecodeFromBytes(b []byte) error

DecodeFromBytes sets the values retrieved from byte sequence in a M3UA common header.

DEPRECATED: use UnmarshalBinary instead.

func (*Notify) Len

func (n *Notify) Len() int

Len returns the serial length of Notify.

DEPRECATED: use MarshalLen instead.

func (*Notify) MarshalBinary

func (n *Notify) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a Notify.

func (*Notify) MarshalLen

func (n *Notify) MarshalLen() int

MarshalLen returns the serial length of Notify.

func (*Notify) MarshalTo

func (n *Notify) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*Notify) MessageClass

func (n *Notify) MessageClass() uint8

MessageClass returns the message class in int.

func (*Notify) MessageClassName

func (n *Notify) MessageClassName() string

MessageClassName returns the name of message class.

func (*Notify) MessageType

func (n *Notify) MessageType() uint8

MessageType returns the message type in int.

func (*Notify) MessageTypeName

func (n *Notify) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*Notify) Serialize

func (n *Notify) Serialize() ([]byte, error)

Serialize returns the byte sequence generated from a Notify.

DEPRECATED: use MarshalBinary instead.

func (*Notify) SerializeTo

func (n *Notify) SerializeTo(b []byte) error

SerializeTo puts the byte sequence in the byte array given as b.

DEPRECATED: use MarshalTo instead.

func (*Notify) SetLength

func (n *Notify) SetLength()

SetLength sets the length in Length field.

func (*Notify) String

func (n *Notify) String() string

String returns the Notify values in human readable format.

func (*Notify) UnmarshalBinary

func (n *Notify) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*Notify) Version

func (n *Notify) Version() uint8

Version returns the version of M3UA in int.

type SignallingCongestion

type SignallingCongestion struct {
	*Header
	NetworkAppearance     *params.Param
	RoutingContext        *params.Param
	AffectedPointCode     *params.Param
	ConcernedDestination  *params.Param
	CongestionIndications *params.Param
	InfoString            *params.Param
}

SignallingCongestion is a SignallingCongestion type of M3UA message.

Spec: 3.4.4, RFC4666.

func NewSignallingCongestion

func NewSignallingCongestion(nwApr, rtCtx, apc, cdst, ind, info *params.Param) *SignallingCongestion

NewSignallingCongestion creates a new SignallingCongestion.

func ParseSignallingCongestion

func ParseSignallingCongestion(b []byte) (*SignallingCongestion, error)

ParseSignallingCongestion decodes given byte sequence as a SignallingCongestion.

func (*SignallingCongestion) MarshalBinary

func (s *SignallingCongestion) MarshalBinary() ([]byte, error)

MarshalBinary returns the byte sequence generated from a SignallingCongestion.

func (*SignallingCongestion) MarshalLen

func (s *SignallingCongestion) MarshalLen() int

MarshalLen returns the serial length of SignallingCongestion.

func (*SignallingCongestion) MarshalTo

func (s *SignallingCongestion) MarshalTo(b []byte) error

MarshalTo puts the byte sequence in the byte array given as b.

func (*SignallingCongestion) MessageClass

func (s *SignallingCongestion) MessageClass() uint8

MessageClass returns the message class in int.

func (*SignallingCongestion) MessageClassName

func (s *SignallingCongestion) MessageClassName() string

MessageClassName returns the name of message class.

func (*SignallingCongestion) MessageType

func (s *SignallingCongestion) MessageType() uint8

MessageType returns the message type in int.

func (*SignallingCongestion) MessageTypeName

func (s *SignallingCongestion) MessageTypeName() string

MessageTypeName returns the name of message type.

func (*SignallingCongestion) SetLength

func (s *SignallingCongestion) SetLength()

SetLength sets the length in Length field.

func (*SignallingCongestion) String

func (s *SignallingCongestion) String() string

String returns the SignallingCongestion values in human readable format.

func (*SignallingCongestion) UnmarshalBinary

func (s *SignallingCongestion) UnmarshalBinary(b []byte) error

UnmarshalBinary sets the values retrieved from byte sequence in a M3UA common header.

func (*SignallingCongestion) Version

func (s *SignallingCongestion) Version() uint8

Version returns the version of M3UA in int.

Directories

Path Synopsis
Package params provides the protocol definition and encoding/decoding feature of M3UA Common Paratemeters and M3UA-specific parameters.
Package params provides the protocol definition and encoding/decoding feature of M3UA Common Paratemeters and M3UA-specific parameters.

Jump to

Keyboard shortcuts

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