Yate
SS7MTP2 Class Reference

SS7 Layer 2 implementation on top of a hardware interface. More...

#include <yatesig.h>

Inheritance diagram for SS7MTP2:
SS7Layer2 SignallingReceiver SignallingDumpable Mutex SignallingComponent SignallingComponent Lockable RefObject DebugEnabler RefObject DebugEnabler GenObject GenObject

Public Types

enum  ErrorCorrection { Basic , Preventive , Adaptive }
 
- Public Types inherited from SS7Layer2
enum  LinkStatus {
  OutOfAlignment = 0 , NormalAlignment = 1 , EmergencyAlignment = 2 , OutOfService = 3 ,
  ProcessorOutage = 4 , Busy = 5 , O = OutOfAlignment , N = NormalAlignment ,
  E = EmergencyAlignment , OS = OutOfService , PO = ProcessorOutage , B = Busy
}
 
enum  Operation { Pause = 0x100 , Resume = 0x200 , Align = 0x300 , Status = 0x400 }
 
enum  Inhibitions { Unchecked = 0x01 , Inactive = 0x02 , Local = 0x04 , Remote = 0x08 }
 

Public Member Functions

 SS7MTP2 (const NamedList &params, unsigned int status=OutOfService)
 
virtual ~SS7MTP2 ()
 
virtual bool initialize (const NamedList *config)
 
virtual bool transmitMSU (const SS7MSU &msu)
 
virtual void recoverMSU (int sequence)
 
virtual unsigned int status () const
 
virtual bool aligned () const
 
virtual bool operational () const
 
virtual bool control (Operation oper, NamedList *params=0)
 
virtual bool notify (SignallingInterface::Notification event)
 
- Public Member Functions inherited from SS7Layer2
virtual const char * statusName (unsigned int status, bool brief) const
 
const char * statusName (bool brief=false) const
 
unsigned int upTime () const
 
void attach (SS7L2User *l2user)
 
SS7L2Useruser () const
 
int sls () const
 
void sls (int linkSel)
 
int inhibited () const
 
bool inhibited (int flags) const
 
virtual unsigned int congestion ()
 
virtual int getSequence ()
 
- Public Member Functions inherited from SignallingComponent
virtual ~SignallingComponent ()
 
virtual const StringtoString () const
 
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 SignallingReceiver
 SignallingReceiver (const char *name=0)
 
virtual ~SignallingReceiver ()
 
virtual SignallingInterfaceattach (SignallingInterface *iface)
 
SignallingInterfaceiface () const
 
bool control (SignallingInterface::Operation oper, NamedList *params=0)
 
- Public Member Functions inherited from SignallingDumpable
 ~SignallingDumpable ()
 
- 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 ()
 

Protected Member Functions

virtual void destroyed ()
 
virtual void timerTick (const Time &when)
 
virtual bool receivedPacket (const DataBlock &packet)
 
virtual void processFISU ()
 
virtual void processLSSU (unsigned int status)
 
bool transmitLSSU (unsigned int status)
 
bool transmitLSSU ()
 
bool transmitFISU ()
 
void startAlignment (bool emergency=false)
 
void abortAlignment (bool retry=true)
 
bool startProving ()
 
- Protected Member Functions inherited from SS7Layer2
 SS7Layer2 ()
 
bool receivedMSU (const SS7MSU &msu)
 
bool recoveredMSU (const SS7MSU &msu)
 
void notify ()
 
bool inhibit (int setFlags, int clrFlags=0)
 
bool getEmergency (NamedList *params=0, bool emg=false) const
 
- Protected Member Functions inherited from SignallingComponent
 SignallingComponent (const char *name=0, const NamedList *params=0, const char *type="unknown")
 
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 SignallingReceiver
bool transmitPacket (const DataBlock &packet, bool repeat, SignallingInterface::PacketType type=SignallingInterface::Unknown)
 
- Protected Member Functions inherited from SignallingDumpable
 SignallingDumpable (SignallingDumper::Type type, bool network=false)
 
bool dump (void *buf, unsigned int len, bool sent=false, int link=0)
 
bool dump (const DataBlock &data, bool sent=false, int link=0)
 
void setDumpNetwork (bool network)
 
void setDumper (SignallingDumper *dumper=0)
 
bool setDumper (const String &name, bool create=true, bool append=false)
 
bool control (NamedList &params, SignallingComponent *owner=0)
 

Additional Inherited Members

- 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 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 Attributes inherited from SS7Layer2
bool m_autoEmergency
 
int m_lastSeqRx
 
unsigned int m_congestion
 

Detailed Description

SS7 Layer 2 implementation on top of a hardware interface.

Q.703 SS7 Layer 2 (Data Link) implementation on top of a hardware interface

Member Enumeration Documentation

◆ ErrorCorrection

Types of error correction

Constructor & Destructor Documentation

◆ SS7MTP2()

SS7MTP2 ( const NamedList & params,
unsigned int status = OutOfService )

Constructor

Parameters
paramsLayer's parameters
statusInitial status

References status().

◆ ~SS7MTP2()

virtual ~SS7MTP2 ( )
virtual

Destructor

Member Function Documentation

◆ abortAlignment()

void abortAlignment ( bool retry = true)
protected

Abort an alignment procedure if link errors occur

Parameters
retryKeep trying to align

◆ aligned()

virtual bool aligned ( ) const
virtual

Check if the link is aligned. The link may not be operational, the other side may be still proving.

Returns
True if the link is aligned

◆ control()

virtual bool control ( Operation oper,
NamedList * params = 0 )
virtual

Execute a control operation. Operations can change the link status or can query the aligned status.

Parameters
operOperation to execute
paramsOptional parameters for the operation
Returns
True if the command completed successfully, for query operations also indicates the data link is aligned and operational

Reimplemented from SS7Layer2.

Referenced by startProving().

◆ destroyed()

virtual void destroyed ( )
inlineprotectedvirtual

Remove all attachements. Disposes the memory

Reimplemented from SignallingComponent.

References SignallingReceiver::attach(), SS7Layer2::attach(), and SignallingComponent::destroyed().

◆ initialize()

virtual bool initialize ( const NamedList * config)
virtual

Configure and initialize MTP2 and its interface

Parameters
configOptional configuration parameters override
Returns
True if MTP2 and the interface were initialized properly

Reimplemented from SignallingComponent.

◆ notify()

virtual bool notify ( SignallingInterface::Notification event)
virtual

Process a notification generated by the attached interface

Parameters
eventNotification event reported by the interface
Returns
True if notification was processed

Reimplemented from SignallingReceiver.

◆ operational()

virtual bool operational ( ) const
virtual

Check if the link is aligned and operational

Returns
True if the link is operational

Implements SS7Layer2.

◆ processFISU()

virtual void processFISU ( )
protectedvirtual

Process a received Fill-In Signal Unit

◆ processLSSU()

virtual void processLSSU ( unsigned int status)
protectedvirtual

Process a received Link Status Signal Unit

Parameters
statusLink status indications

References status().

◆ receivedPacket()

virtual bool receivedPacket ( const DataBlock & packet)
protectedvirtual

Process a Signalling Packet received by the hardware interface

Returns
True if message was successfully processed

Implements SignallingReceiver.

◆ recoverMSU()

virtual void recoverMSU ( int sequence)
virtual

Remove the MSUs waiting in the transmit queue and return them

Parameters
sequenceFirst sequence number to recover, flush earlier packets

Reimplemented from SS7Layer2.

◆ startAlignment()

void startAlignment ( bool emergency = false)
protected

Initiates alignment and proving procedure

Parameters
emergencyTrue if emergency alignment is desired

◆ startProving()

bool startProving ( )
protected

Start the link proving period

Returns
True if proving period was started

References control().

◆ status()

virtual unsigned int status ( ) const
virtual

Retrieve the current link status indications

Returns
Link status indication bits

Reimplemented from SS7Layer2.

Referenced by processLSSU(), SS7MTP2(), and transmitLSSU().

◆ timerTick()

virtual void timerTick ( const Time & when)
protectedvirtual

Periodical timer tick used to perform alignment and housekeeping

Parameters
whenTime to use as computing base for events and timeouts

Reimplemented from SS7Layer2.

◆ transmitFISU()

bool transmitFISU ( )
protected

Push a Fill-In Signal Unit down the protocol stack

Returns
True if message was successfully queued

◆ transmitLSSU() [1/2]

bool transmitLSSU ( )
inlineprotected

Push a Link Status Signal Unit with the current status down the protocol stack

Returns
True if message was successfully queued

References transmitLSSU().

◆ transmitLSSU() [2/2]

bool transmitLSSU ( unsigned int status)
protected

Push a Link Status Signal Unit down the protocol stack

Parameters
statusLink status indications
Returns
True if message was successfully queued

References status().

Referenced by transmitLSSU().

◆ transmitMSU()

virtual bool transmitMSU ( const SS7MSU & msu)
virtual

Push a Message Signal Unit down the protocol stack

Parameters
msuMSU data to transmit
Returns
True if message was successfully queued

Implements SS7Layer2.


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