# class SIGAdaptation | Abstract SIGTRAN User Adaptation component. More...
Contains pure virtuals
Full name | `TelEngine::SIGAdaptation`
Definition | `#include <libs/ysig/yatesig.h>`
Inherits | TelEngine::Mutex [public ], TelEngine::SIGTRAN [public ], TelEngine::SignallingComponent [public ]
Inherited by | ISDNIUAClient, SIGAdaptClient, SIGAdaptServer, SS7M2UAClient
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum TrafficMode { TrafficUnused = 0, TrafficOverride = 1, TrafficLoadShare = 2, TrafficBroadcast = 3, }
- enum HeartbeatState { HeartbeatDisabled = 0, HeartbeatEnabled = 1, HeartbeatWaitResponse = 2, }
- enum Errors { InvalidVersion = 0x01, InvalidIID = 0x02, UnsupportedMessageClass = 0x03, UnsupportedMessageType = 0x04, UnsupportedTrafficMode = 0x05, UnexpectedMessage = 0x06, ProtocolError = 0x07, UnsupportedIIDType = 0x08, InvalidStreamIdentifier = 0x09, UnassignedTEI = 0x0a, UnrecognizedSAPI = 0x0b, InvalidTEISAPI = 0x0c, ManagementBlocking = 0x0d, ASPIDRequired = 0x0e, InvalidASPID = 0x0f, ASPActiveIID = 0x10, InvalidParameterValue = 0x11, ParameterFieldError = 0x12, UnexpectedParameter = 0x13, DestinationStatusUnknown = 0x14, InvalidNetworkAppearance = 0x15, MissingParameter = 0x16, InvalidRoutingContext = 0x19, NotConfiguredAS = 0x1a, SubsystemStatusUnknown = 0x1b, InvalidLoadsharingLabel = 0x1c }

#### Public Methods

- virtual ~SIGAdaptation ()
- virtual bool initialize (const NamedList* config)
- void notifyLayer (SignallingInterface::Notification status)

#### Public Static Methods

- static bool nextTag (const DataBlock& data, int& offset, uint16_t& tag, uint16_t& length)
- static bool findTag (const DataBlock& data, int& offset, uint16_t tag, uint16_t& length)
- static bool getTag (const DataBlock& data, uint16_t tag, uint32_t& value)
- static bool getTag (const DataBlock& data, uint16_t tag, String& value)
- static bool getTag (const DataBlock& data, uint16_t tag, DataBlock& value)
- static void addTag (DataBlock& data, uint16_t tag, uint32_t value)
- static void addTag (DataBlock& data, uint16_t tag, const String& value)
- static void addTag (DataBlock& data, uint16_t tag, const DataBlock& value)

#### Protected Methods

- explicit SIGAdaptation (const char* name = 0, const NamedList* params = 0, u_int32_t payload = 0, u_int16_t port = 0)
- virtual bool processCommonMSG (unsigned char msgClass, unsigned char msgType, const DataBlock& msg, int streamId)
- virtual bool processMgmtMSG (unsigned char msgType, const DataBlock& msg, int streamId)
- virtual bool processAspsmMSG (unsigned char msgType, const DataBlock& msg, int streamId)
- virtual bool processAsptmMSG (unsigned char msgType, const DataBlock& msg, int streamId)
- virtual void timerTick (const Time& when)
- bool processHeartbeat (unsigned char msgType, const DataBlock& msg, int streamId)
- inline void resetHeartbeat ()
- inline void enableHeartbeat (unsigned char streamId)

## Detailed Description

An interface to a Signalling Transport User Adaptation component

enum TrafficMode { TrafficUnused = 0, TrafficOverride = 1, TrafficLoadShare = 2, TrafficBroadcast = 3, } | ### TrafficMode

Traffic modes

enum HeartbeatState { HeartbeatDisabled = 0, HeartbeatEnabled = 1, HeartbeatWaitResponse = 2, } | ### HeartbeatState

enum Errors { InvalidVersion = 0x01, InvalidIID = 0x02, UnsupportedMessageClass = 0x03, UnsupportedMessageType = 0x04, UnsupportedTrafficMode = 0x05, UnexpectedMessage = 0x06, ProtocolError = 0x07, UnsupportedIIDType = 0x08, InvalidStreamIdentifier = 0x09, UnassignedTEI = 0x0a, UnrecognizedSAPI = 0x0b, InvalidTEISAPI = 0x0c, ManagementBlocking = 0x0d, ASPIDRequired = 0x0e, InvalidASPID = 0x0f, ASPActiveIID = 0x10, InvalidParameterValue = 0x11, ParameterFieldError = 0x12, UnexpectedParameter = 0x13, DestinationStatusUnknown = 0x14, InvalidNetworkAppearance = 0x15, MissingParameter = 0x16, InvalidRoutingContext = 0x19, NotConfiguredAS = 0x1a, SubsystemStatusUnknown = 0x1b, InvalidLoadsharingLabel = 0x1c } | ### Errors

~SIGAdaptation () | ### ~SIGAdaptation

[virtual]

Destructor

bool initialize (const NamedList* config) | ### initialize

[virtual]

Transport initialization

Parameters:

config | Configuration section for the adaptation

Reimplemented from SignallingComponent.

bool nextTag (const DataBlock& data, int& offset, uint16_t& tag, uint16_t& length) | ### nextTag

[static]

Advance to next tag in a Type-Length-Value set of parameters

Parameters:

data | Block of data containing TLV parameters
offset | Offset of current parameter in block, initialize to negative for first tag
tag | Type tag of returned parameter
length | Unpadded length of returned parameter in octets

Returns: True if the current parameter was valid

bool findTag (const DataBlock& data, int& offset, uint16_t tag, uint16_t& length) | ### findTag

[static]

Find a specific tag in a Type-Length-Value set of parameters

Parameters:

data | Block of data containing TLV parameters
offset | Offset of current parameter in block, gets updated
tag | Type tag of searched parameter
length | Unpadded length of returned parameter in octets

Returns: True if the requested parameter was found

bool getTag (const DataBlock& data, uint16_t tag, uint32_t& value) | ### getTag

[static]

Get the value of a 32 bit integer parameter

Parameters:

data | Block of data containing TLV parameters
tag | Type tag of searched parameter
value | Variable to store the decoded parameter if found

Returns: True if the requested parameter was found and decoded

bool getTag (const DataBlock& data, uint16_t tag, String& value) | ### getTag

[static]

Get the value of a String parameter

Parameters:

data | Block of data containing TLV parameters
tag | Type tag of searched parameter
value | Variable to store the decoded parameter if found

Returns: True if the requested parameter was found and decoded

bool getTag (const DataBlock& data, uint16_t tag, DataBlock& value) | ### getTag

[static]

Get the value of a raw binary parameter

Parameters:

data | Block of data containing TLV parameters
tag | Type tag of searched parameter
value | Variable to store the decoded parameter if found

Returns: True if the requested parameter was found and decoded

void addTag (DataBlock& data, uint16_t tag, uint32_t value) | ### addTag

[static]

Add a 32 bit integer parameter

Parameters:

data | Block of data containing TLV parameters
tag | Type tag of parameter to add
value | Value of parameter to add

void addTag (DataBlock& data, uint16_t tag, const String& value) | ### addTag

[static]

Add a String parameter

Parameters:

data | Block of data containing TLV parameters
tag | Type tag of parameter to add
value | Value of parameter to add

void addTag (DataBlock& data, uint16_t tag, const DataBlock& value) | ### addTag

[static]

Add a raw binary parameter

Parameters:

data | Block of data containing TLV parameters
tag | Type tag of parameter to add
value | Value of parameter to add

void notifyLayer (SignallingInterface::Notification status) | ### notifyLayer

Method called when the transport status has been changed

Parameters:

status | Status of the transport causing the notification

Reimplemented from SIGTRAN.

explicit SIGAdaptation (const char* name = 0, const NamedList* params = 0, u_int32_t payload = 0, u_int16_t port = 0) | ### SIGAdaptation

[protected]

Constructs an uninitialized User Adaptation component

Parameters:

name | Name of this component
params | Optional pointer to creation parameters
payload | SCTP payload code, ignored for other transports
port | SCTP/TCP/UDP default port used for transport

bool processCommonMSG (unsigned char msgClass, unsigned char msgType, const DataBlock& msg, int streamId) | ### processCommonMSG

[protected virtual]

Processing of common management messages

Parameters:

msgClass | Class of the message
msgType | Type of the message, depends on the class
msg | Message data, may be empty
streamId | Identifier of the stream the message was received on

Returns: True if the message was handled

bool processMgmtMSG (unsigned char msgType, const DataBlock& msg, int streamId) | ### processMgmtMSG

[protected pure virtual]

Abstract processing of Management messages

Parameters:

msgType | Type of the message, depends on the class
msg | Message data, may be empty
streamId | Identifier of the stream the message was received on

Returns: True if the message was handled

bool processAspsmMSG (unsigned char msgType, const DataBlock& msg, int streamId) | ### processAspsmMSG

[protected pure virtual]

Abstract processing of ASP State Maintenance messages

Parameters:

msgType | Type of the message, depends on the class
msg | Message data, may be empty
streamId | Identifier of the stream the message was received on

Returns: True if the message was handled

bool processAsptmMSG (unsigned char msgType, const DataBlock& msg, int streamId) | ### processAsptmMSG

[protected pure virtual]

Abstract processing of ASP Traffic Maintenance messages

Parameters:

msgType | Type of the message, depends on the class
msg | Message data, may be empty
streamId | Identifier of the stream the message was received on

Returns: True if the message was handled

void timerTick (const Time& when) | ### timerTick

[protected virtual]

Method called periodically by the engine to keep everything alive

Parameters:

when | Time to use as computing base for events and timeouts

Reimplemented from SignallingComponent.

bool processHeartbeat (unsigned char msgType, const DataBlock& msg, int streamId) | ### processHeartbeat

[protected]

Process the heartbeat messages

Parameters:

msgType | The message type
msg | Message data
streamId | Identifier of the stream the message was received on

Returns: True if the message was handled

inline void resetHeartbeat () | ### resetHeartbeat

[protected]

Reset heartbeat for all streams

inline void enableHeartbeat (unsigned char streamId) | ### enableHeartbeat

[protected]

Enable heartbeat for the specifyed steam id

Parameters:

streamId | The stream id

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