# class GSML3Codec |
Full name | `TelEngine::GSML3Codec`
Definition | `#include <libs/ygsm/yategsm.h>`
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum Flags { XmlDumpMsg = 0x01, XmlDumpIEs = 0x02, MSCoder = 0x04, }
- enum Status { NoError = 0, MsgTooShort, UnknownProto, ParserErr, MissingParam, IncorrectOptionalIE, IncorrectMandatoryIE, MissingMandatoryIE, UnknownMsgType, }
- enum Protocol { GCC = 0x00, BCC = 0x01, EPS_SM = 0x02, CC = 0x03, GTTP = 0x04, MM = 0x05, RRM = 0x06, EPS_MM = 0x07, GPRS_MM = 0x08, SMS = 0x09, GPRS_SM = 0x0a, SS = 0x0b, LCS = 0x0c, Extension = 0x0e, Test = 0x0f, Unknown = 0xff, }
- enum Type { NoType = 0, T, V, TV, LV, TLV, LVE, TLVE, }
- enum XmlType { Skip, XmlElem, XmlRoot, }
- enum EPSSecurityHeader { PlainNAS = 0x00, IntegrityProtect = 0x01, IntegrityProtectCiphered = 0x02, IntegrityProtectNewEPSCtxt = 0x03, IntegrityProtectCipheredNewEPSCtxt = 0x04, ServiceRequestHeader = 0xa0, }

#### Public Methods

- GSML3Codec (DebugEnabler* dbg = 0)
- unsigned int decode (const uint8_t* in, unsigned int len, XmlElement*& out, const NamedList& params = NamedList::empty())
- unsigned int encode (const XmlElement* in, DataBlock& out, const NamedList& params = NamedList::empty())
- unsigned int decode (XmlElement* xml, const NamedList& params = NamedList::empty())
- unsigned int encode (XmlElement* xml, const NamedList& params = NamedList::empty())
- void setCodecDebug (DebugEnabler* enabler = 0, void* ptr = 0)
- inline uint8_t flags () const
- inline void setFlags (uint8_t flgs, bool reset = false)
- inline void resetFlags (uint8_t flgs = 0)
- inline void setPrintDbg (bool on = false)
- inline bool printDbg () const
- inline DebugEnabler* dbg () const
- inline void* ptr () const

#### Public Static Methods

- static void decodeGSM7Bit (unsigned char* buf, unsigned int len, String& text)
- static void encodeGSM7Bit (const String& text, DataBlock& buf)

#### Public Members

- static const TokenDict s_typeDict[]
- static const TokenDict s_protoDict[]
- static const TokenDict s_securityHeaders[]
- static const TokenDict s_errorsDict[]

## Detailed Description

enum Flags { XmlDumpMsg = 0x01, XmlDumpIEs = 0x02, MSCoder = 0x04, } | ### Flags

Codec flags

enum Status { NoError = 0, MsgTooShort, UnknownProto, ParserErr, MissingParam, IncorrectOptionalIE, IncorrectMandatoryIE, MissingMandatoryIE, UnknownMsgType, } | ### Status

Codec return status

enum Protocol { GCC = 0x00, BCC = 0x01, EPS_SM = 0x02, CC = 0x03, GTTP = 0x04, MM = 0x05, RRM = 0x06, EPS_MM = 0x07, GPRS_MM = 0x08, SMS = 0x09, GPRS_SM = 0x0a, SS = 0x0b, LCS = 0x0c, Extension = 0x0e, Test = 0x0f, Unknown = 0xff, } | ### Protocol

Protocol discriminator according to ETSI TS 124 007 V11.0.0, section 11.2.3.1.1

enum Type { NoType = 0, T, V, TV, LV, TLV, LVE, TLVE, } | ### Type

IE types

enum XmlType { Skip, XmlElem, XmlRoot, } | ### XmlType

Type of XML data to generate

enum EPSSecurityHeader { PlainNAS = 0x00, IntegrityProtect = 0x01, IntegrityProtectCiphered = 0x02, IntegrityProtectNewEPSCtxt = 0x03, IntegrityProtectCipheredNewEPSCtxt = 0x04, ServiceRequestHeader = 0xa0, } | ### EPSSecurityHeader

EPS Security Headers

GSML3Codec (DebugEnabler* dbg = 0) | ### GSML3Codec

Constructor

unsigned int decode (const uint8_t* in, unsigned int len, XmlElement*& out, const NamedList& params = NamedList::empty()) | ### decode

Decode layer 3 message payload

Parameters:

in | Input buffer containing the data to be decoded
len | Length of input buffer
out | XmlElement into which the decoded data is returned
params | Encoder parameters

Returns: Parsing result: 0 (NoError) if succeeded, error status otherwise

unsigned int encode (const XmlElement* in, DataBlock& out, const NamedList& params = NamedList::empty()) | ### encode

Encode a layer 3 message

Parameters:

in | Layer 3 message in XML form
out | Output buffer into which to put encoded data
params | Encoder parameters

Returns: Parsing result: 0 (NoError) if succeeded, error status otherwise

unsigned int decode (XmlElement* xml, const NamedList& params = NamedList::empty()) | ### decode

Decode layer 3 message from an existing XML

Parameters:

xml | XML which contains layer 3 messages to decode and into which the decoded XML will be put
params | Decoder parameters

Returns: Parsing result: 0 (NoError) if succeeded, error status otherwise

unsigned int encode (XmlElement* xml, const NamedList& params = NamedList::empty()) | ### encode

Encode a layer 3 message from an existing XML

Parameters:

in | XML which contains a layer 3 message in XML form. The message will be replaced with its encoded buffer
params | Encoder parameters

Returns: Parsing result: 0 (NoError) if succeeded, error status otherwise

void setCodecDebug (DebugEnabler* enabler = 0, void* ptr = 0) | ### setCodecDebug

Set data used in debug

Parameters:

enabler | The DebugEnabler to use (0 to to use the engine)
ptr | Pointer to print, 0 to use the codec pointer

inline uint8_t flags () | ### flags

[const]

Retrieve codec flags

Returns: Codec flags

inline void setFlags (uint8_t flgs, bool reset = false) | ### setFlags

Set codec flags

Parameters:

flgs | Flags to set
reset | Reset flags before setting these ones

inline void resetFlags (uint8_t flgs = 0) | ### resetFlags

Reset codec flags

Parameters:

flgs | Flags to reset. If 0, all flags are reset

inline void setPrintDbg (bool on = false) | ### setPrintDbg

Activate printing of debug messages

Parameters:

on | True to activate, false to disable

inline bool printDbg () | ### printDbg

[const]

Get printing of debug messages flag

Returns: True if debugging is activated, false otherwise

inline DebugEnabler* dbg () | ### dbg

[const]

Get DebugEnabler used by this codec

Returns: DebugEnabler used by the codec

inline void* ptr () | ### ptr

[const]

Retrieve the codec pointer used for debug messages

Returns: Codec pointer used for debug messages

void decodeGSM7Bit (unsigned char* buf, unsigned int len, String& text) | ### decodeGSM7Bit

[static]

Decode GSM 7bit buffer

Parameters:

buf | Input buffer
len | Input buffer length
text | Destination text

void encodeGSM7Bit (const String& text, DataBlock& buf) | ### encodeGSM7Bit

[static]

Encode GSM 7bit buffer

Parameters:

text | Input text
buf | Destination buffer

static const TokenDict s_typeDict[] | ### s_typeDict[]

static const TokenDict s_protoDict[] | ### s_protoDict[]

static const TokenDict s_securityHeaders[] | ### s_securityHeaders[]

static const TokenDict s_errorsDict[] | ### s_errorsDict[]

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.