Yate
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
SS7Layer2 Class Reference

Abstract SS7 layer 2 (data link) message transfer part. More...

#include <yatesig.h>

Inheritance diagram for SS7Layer2:
SignallingComponent RefObject DebugEnabler GenObject SS7M2PA SS7M2UA SS7MTP2

List of all members.

Public Types

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

virtual bool transmitMSU (const SS7MSU &msu)=0
virtual void recoverMSU (int sequence)
virtual unsigned int status () const
virtual const char * statusName (unsigned int status, bool brief) const
const char * statusName (bool brief=false) const
virtual bool operational () const =0
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 ()
virtual bool control (Operation oper, NamedList *params=0)
virtual bool control (NamedList &params)

Protected Member Functions

 SS7Layer2 ()
virtual void timerTick (const Time &when)
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 Attributes

bool m_autoEmergency
int m_lastSeqRx
unsigned int m_congestion

Friends

class SS7MTP3

Detailed Description

Abstract SS7 layer 2 (data link) message transfer part.

An interface to a Layer 2 (data link) SS7 message transfer part


Member Enumeration Documentation

Link inhibition reason bits

enum LinkStatus

LSSU Status Indications

Reimplemented in SS7M2PA.

enum Operation

Control primitives


Constructor & Destructor Documentation

SS7Layer2 ( ) [inline, protected]

Constructor


Member Function Documentation

void attach ( SS7L2User l2user)

Attach a Layer 2 user component to the data link. Detach from the old one if valid

Parameters:
l2userPointer to Layer 2 user component to attach

Referenced by SS7MTP2::destroyed().

virtual unsigned int congestion ( ) [inline, virtual]

Get the current congestion level of the link

Returns:
Congestion level, 0 if not congested, 3 if maximum congestion
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 in SS7MTP2, and SS7M2UA.

virtual bool control ( NamedList params) [virtual]

Query or modify layer's settings or operational parameters

Parameters:
paramsThe list of parameters to query or change
Returns:
True if the control operation was executed

Reimplemented from SignallingComponent.

Reimplemented in SS7M2PA.

bool getEmergency ( NamedList params = 0,
bool  emg = false 
) const [protected]

Get a best guess of the emergency alignment requirement

Parameters:
paramsOptional parameters whose "emergency" is used
emgDefault emergency state
Returns:
True if emergency alignment should be used
virtual int getSequence ( ) [inline, virtual]

Get the sequence number of the last MSU received

Returns:
Last FSN received, negative if not available

Reimplemented in SS7M2UA.

bool inhibit ( int  setFlags,
int  clrFlags = 0 
) [protected]

Set and clear inhibition flags, method used by MTP3

Parameters:
setFlagsFlag bits to set ORed together
clrFlagsFlag bits to clear ORed together (optional)
Returns:
True if inhibition flags were set
int inhibited ( ) const [inline]

Retrieve the inhibition flags set by MTP3 Management

Returns:
Inhibition flags ORed together, zero if not inhibited
bool inhibited ( int  flags) const [inline]

Check some of the inhibition flags set by MTP3 Management

Parameters:
flagsFlags to check for, ORed together
Returns:
True if any of the specified inhibition flags is active
void notify ( ) [protected]

Set the notify flag. The user part will be notified on timer tick about status change

virtual bool operational ( ) const [pure virtual]

Check if the link is fully operational

Returns:
True if the link is aligned and operational

Implemented in SS7MTP2, SS7M2UA, and SS7M2PA.

bool receivedMSU ( const SS7MSU msu) [inline, protected]

Push a received Message Signal Unit up the protocol stack

Parameters:
msuMessage data, starting with Service Indicator Octet
Returns:
True if message was successfully delivered to the user component
bool recoveredMSU ( const SS7MSU msu) [inline, protected]

Push a recovered Message Signal Unit back up the protocol stack

Parameters:
msuMessage data, starting with Service Indicator Octet
Returns:
True if message was successfully delivered to the user component
virtual void recoverMSU ( int  sequence) [inline, virtual]

Remove the MSUs waiting in the transmit queue and return them

Parameters:
sequenceFirst sequence number to recover, flush earlier packets

Reimplemented in SS7MTP2, SS7M2UA, and SS7M2PA.

int sls ( ) const [inline]

Get the Signalling Link Selection number allocated to this link

Returns:
SLS value assigned by the upper layer
void sls ( int  linkSel) [inline]

Assign a new Signalling Link Selection number

Parameters:
linkSelNew SLS to assign to this link
virtual unsigned int status ( ) const [virtual]

Retrieve the current link status indications

Returns:
Link status indication bits

Reimplemented in SS7MTP2, SS7M2UA, and SS7M2PA.

virtual const char* statusName ( unsigned int  status,
bool  brief 
) const [virtual]

Get the name of a Layer 2 status

Parameters:
statusStatus indication value
briefRequest to return the short status name
Returns:
String describing the status
const char* statusName ( bool  brief = false) const [inline]

Get the name of the current local Layer 2 status

Parameters:
briefRequest to return the short status name
Returns:
String describing the status

References SS7Layer2::statusName().

Referenced by SS7Layer2::statusName().

virtual void timerTick ( const Time when) [protected, virtual]

Method called periodically by the engine to keep everything alive

Parameters:
whenTime to use as computing base for events and timeouts

Reimplemented from SignallingComponent.

Reimplemented in SS7MTP2, SS7M2UA, and SS7M2PA.

virtual bool transmitMSU ( const SS7MSU msu) [pure virtual]

Push a Message Signal Unit down the protocol stack

Parameters:
msuMessage data, starting with Service Indicator Octet
Returns:
True if message was successfully queued

Implemented in SS7MTP2, SS7M2UA, and SS7M2PA.

unsigned int upTime ( ) const [inline]

Get the uptime of the link

Returns:
Time since link got up in seconds

References Time::secNow().

SS7L2User* user ( ) const [inline]

Get the Layer 2 user component that works with this data link

Returns:
Pointer to the user component to which the messages are sent

Member Data Documentation

bool m_autoEmergency [protected]

Flag to automatically perform emergency alignment when linkset is down

unsigned int m_congestion [protected]

Current congestion level

int m_lastSeqRx [protected]

Last received MSU sequence number, -1 if unknown, bit 24 set if long FSN


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