Yate
SIGAdaptation Class Referenceabstract

Abstract SIGTRAN User Adaptation component. More...

#include <yatesig.h>

Inheritance diagram for SIGAdaptation:
SignallingComponent SIGTRAN Mutex RefObject DebugEnabler Lockable GenObject SIGAdaptClient SIGAdaptServer ISDNIUAClient SS7M2UAClient

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 Types inherited from SIGTRAN
enum  MsgClass {
  MGMT = 0 , TRAN = 1 , SSNM = 2 , ASPSM = 3 ,
  ASPTM = 4 , QPTM = 5 , MAUP = 6 , CLMSG = 7 ,
  COMSG = 8 , RKM = 9 , IIM = 10 , M2PA = 11
}
 
enum  MsgMGMT { MgmtERR = 0 , MgmtNTFY = 1 }
 
enum  MsgSSNM {
  SsnmDUNA = 1 , SsnmDAVA = 2 , SsnmDAUD = 3 , SsnmSCON = 4 ,
  SsnmDUPU = 5 , SsnmDRST = 6
}
 
enum  MsgASPSM {
  AspsmUP = 1 , AspsmDOWN = 2 , AspsmBEAT = 3 , AspsmUP_ACK = 4 ,
  AspsmDOWN_ACK = 5 , AspsmBEAT_ACK = 6
}
 
enum  MsgASPTM { AsptmACTIVE = 1 , AsptmINACTIVE = 2 , AsptmACTIVE_ACK = 3 , AsptmINACTIVE_ACK = 4 }
 
enum  MsgRKM { RkmREG_REQ = 1 , RkmREG_RSP = 2 , RkmDEREG_REQ = 3 , RkmDEREG_RSP = 4 }
 
enum  MsgIIM { IimREG_REQ = 1 , IimREG_RSP = 2 , IimDEREG_REQ = 3 , IimDEREG_RSP = 4 }
 

Public Member Functions

virtual ~SIGAdaptation ()
 
virtual bool initialize (const NamedList *config)
 
void notifyLayer (SignallingInterface::Notification status)
 
- Public Member Functions inherited from SignallingComponent
virtual ~SignallingComponent ()
 
virtual const StringtoString () const
 
virtual bool control (NamedList &params)
 
virtual NamedListcontrolCreate (const char *oper=0)
 
virtual bool controlExecute (NamedList *params)
 
virtual void engine (SignallingEngine *eng)
 
SignallingEngineengine () const
 
int debugLevel (int level)
 
const StringcomponentType () const
 
- Public Member Functions inherited from RefObject
 RefObject ()
 
virtual ~RefObject ()
 
virtual void * getObject (const String &name) const
 
virtual bool alive () const
 
bool ref ()
 
bool deref ()
 
int refcount () const
 
virtual void destruct ()
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from DebugEnabler
 DebugEnabler (int level=TelEngine::debugLevel(), bool enabled=true)
 
int debugLevel () const
 
int debugLevel (int level)
 
bool debugEnabled () const
 
void debugEnabled (bool enable)
 
const char * debugName () const
 
bool debugAt (int level) const
 
bool debugChained () const
 
void debugChain (const DebugEnabler *chain=0)
 
void debugCopy (const DebugEnabler *original=0)
 
- Public Member Functions inherited from SIGTRAN
 SIGTRAN (u_int32_t payload=0, u_int16_t port=0)
 
virtual ~SIGTRAN ()
 
virtual void attach (SIGTransport *trans)
 
SIGTransporttransport () const
 
u_int32_t payload () const
 
u_int16_t defPort () const
 
bool connected (int streamId=0) const
 
bool transmitMSG (unsigned char msgVersion, unsigned char msgClass, unsigned char msgType, const DataBlock &msg, int streamId=0) const
 
bool transmitMSG (unsigned char msgClass, unsigned char msgType, const DataBlock &msg, int streamId=0) const
 
bool restart (bool force)
 
bool getSocketParams (const String &params, NamedList &result)
 
virtual bool transportNotify (SIGTransport *newTransport, const SocketAddr &addr)
 
bool hasTransportThread ()
 
void stopTransportThread ()
 
- Public Member Functions inherited from Mutex
 Mutex (bool recursive=false, const char *name=0)
 
 Mutex (const Mutex &original)
 
 ~Mutex ()
 
Mutexoperator= (const Mutex &original)
 
virtual bool lock (long maxwait=-1)
 
virtual bool unlock ()
 
virtual bool locked () const
 
const char * owner () const
 
bool recursive () const
 
- Public Member Functions inherited from Lockable
virtual ~Lockable ()
 
virtual bool check (long maxwait=-1)
 
virtual bool unlockAll ()
 

Static Public Member Functions

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)
 
- Static Public Member Functions inherited from SignallingComponent
static bool resolveConfig (const String &cmpName, NamedList &params, const NamedList *config)
 
- Static Public Member Functions inherited from RefObject
static bool alive (const RefObject *obj)
 
static bool efficientIncDec ()
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 
- Static Public Member Functions inherited from SIGTRAN
static const TokenDictclassNames ()
 
static const char * typeName (unsigned char msgClass, unsigned char msgType, const char *defValue=0)
 
- Static Public Member Functions inherited from Mutex
static int count ()
 
static int locks ()
 
static bool efficientTimedLock ()
 
- Static Public Member Functions inherited from Lockable
static void wait (unsigned long maxwait)
 
static unsigned long wait ()
 
static void startUsingNow ()
 
static void enableSafety (bool safe=true)
 
static bool safety ()
 

Protected Member Functions

 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)=0
 
virtual bool processAspsmMSG (unsigned char msgType, const DataBlock &msg, int streamId)=0
 
virtual bool processAsptmMSG (unsigned char msgType, const DataBlock &msg, int streamId)=0
 
virtual void timerTick (const Time &when)
 
bool processHeartbeat (unsigned char msgType, const DataBlock &msg, int streamId)
 
void resetHeartbeat ()
 
void enableHeartbeat (unsigned char streamId)
 
- Protected Member Functions inherited from SignallingComponent
 SignallingComponent (const char *name=0, const NamedList *params=0, const char *type="unknown")
 
virtual void destroyed ()
 
void insert (SignallingComponent *component)
 
virtual void detach ()
 
void setName (const char *name)
 
void setCompType (const char *type)
 
unsigned long tickSleep (unsigned long usec=1000000) const
 
- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 
- Protected Member Functions inherited from DebugEnabler
void debugName (const char *name)
 
- Protected Member Functions inherited from SIGTRAN
virtual bool processMSG (unsigned char msgVersion, unsigned char msgClass, unsigned char msgType, const DataBlock &msg, int streamId)=0
 

Detailed Description

Abstract SIGTRAN User Adaptation component.

An interface to a Signalling Transport User Adaptation component

Member Enumeration Documentation

◆ TrafficMode

Traffic modes

Constructor & Destructor Documentation

◆ ~SIGAdaptation()

virtual ~SIGAdaptation ( )
virtual

Destructor

◆ SIGAdaptation()

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

Constructs an uninitialized User Adaptation component

Parameters
nameName of this component
paramsOptional pointer to creation parameters
payloadSCTP payload code, ignored for other transports
portSCTP/TCP/UDP default port used for transport

References SIGTRAN::payload().

Referenced by SIGAdaptServer::SIGAdaptServer().

Member Function Documentation

◆ addTag() [1/3]

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

Add a raw binary parameter

Parameters
dataBlock of data containing TLV parameters
tagType tag of parameter to add
valueValue of parameter to add

◆ addTag() [2/3]

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

Add a String parameter

Parameters
dataBlock of data containing TLV parameters
tagType tag of parameter to add
valueValue of parameter to add

◆ addTag() [3/3]

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

Add a 32 bit integer parameter

Parameters
dataBlock of data containing TLV parameters
tagType tag of parameter to add
valueValue of parameter to add

◆ enableHeartbeat()

void enableHeartbeat ( unsigned char streamId)
inlineprotected

Enable heartbeat for the specifyed steam id

Parameters
streamIdThe stream id

◆ findTag()

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

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

Parameters
dataBlock of data containing TLV parameters
offsetOffset of current parameter in block, gets updated
tagType tag of searched parameter
lengthUnpadded length of returned parameter in octets
Returns
True if the requested parameter was found

◆ getTag() [1/3]

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

Get the value of a raw binary parameter

Parameters
dataBlock of data containing TLV parameters
tagType tag of searched parameter
valueVariable to store the decoded parameter if found
Returns
True if the requested parameter was found and decoded

◆ getTag() [2/3]

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

Get the value of a String parameter

Parameters
dataBlock of data containing TLV parameters
tagType tag of searched parameter
valueVariable to store the decoded parameter if found
Returns
True if the requested parameter was found and decoded

◆ getTag() [3/3]

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

Get the value of a 32 bit integer parameter

Parameters
dataBlock of data containing TLV parameters
tagType tag of searched parameter
valueVariable to store the decoded parameter if found
Returns
True if the requested parameter was found and decoded

◆ initialize()

virtual bool initialize ( const NamedList * config)
virtual

Transport initialization

Parameters
configConfiguration section for the adaptation

Reimplemented from SignallingComponent.

◆ nextTag()

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

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

Parameters
dataBlock of data containing TLV parameters
offsetOffset of current parameter in block, initialize to negative for first tag
tagType tag of returned parameter
lengthUnpadded length of returned parameter in octets
Returns
True if the current parameter was valid

◆ notifyLayer()

void notifyLayer ( SignallingInterface::Notification status)
virtual

Method called when the transport status has been changed

Parameters
statusStatus of the transport causing the notification

Reimplemented from SIGTRAN.

Reimplemented in SIGAdaptClient.

◆ processAspsmMSG()

virtual bool processAspsmMSG ( unsigned char msgType,
const DataBlock & msg,
int streamId )
protectedpure virtual

Abstract processing of ASP State Maintenance messages

Parameters
msgTypeType of the message, depends on the class
msgMessage data, may be empty
streamIdIdentifier of the stream the message was received on
Returns
True if the message was handled

Implemented in SIGAdaptClient, and SIGAdaptServer.

◆ processAsptmMSG()

virtual bool processAsptmMSG ( unsigned char msgType,
const DataBlock & msg,
int streamId )
protectedpure virtual

Abstract processing of ASP Traffic Maintenance messages

Parameters
msgTypeType of the message, depends on the class
msgMessage data, may be empty
streamIdIdentifier of the stream the message was received on
Returns
True if the message was handled

Implemented in SIGAdaptClient, and SIGAdaptServer.

◆ processCommonMSG()

virtual bool processCommonMSG ( unsigned char msgClass,
unsigned char msgType,
const DataBlock & msg,
int streamId )
protectedvirtual

Processing of common management messages

Parameters
msgClassClass of the message
msgTypeType of the message, depends on the class
msgMessage data, may be empty
streamIdIdentifier of the stream the message was received on
Returns
True if the message was handled

◆ processHeartbeat()

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

Process the heartbeat messages

Parameters
msgTypeThe message type
msgMessage data
streamIdIdentifier of the stream the message was received on
Returns
True if the message was handled

◆ processMgmtMSG()

virtual bool processMgmtMSG ( unsigned char msgType,
const DataBlock & msg,
int streamId )
protectedpure virtual

Abstract processing of Management messages

Parameters
msgTypeType of the message, depends on the class
msgMessage data, may be empty
streamIdIdentifier of the stream the message was received on
Returns
True if the message was handled

Implemented in SIGAdaptClient, and SIGAdaptServer.

◆ resetHeartbeat()

void resetHeartbeat ( )
inlineprotected

Reset heartbeat for all streams

◆ timerTick()

virtual void timerTick ( const Time & when)
protectedvirtual

Method called periodically by the engine to keep everything alive

Parameters
whenTime to use as computing base for events and timeouts

Reimplemented from SignallingComponent.


The documentation for this class was generated from the following file: