|
| ||||||||||||||||||
An interface to a Layer 2 (data link) SS7 message transfer part
| 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, } | LinkStatus |
LSSU Status Indications
| enum Operation { Pause = 0x100, Resume = 0x200, Align = 0x300, Status = 0x400, } | Operation |
Control primitives
| enum Inhibitions { Unchecked = 0x01, Inactive = 0x02, Local = 0x04, Remote = 0x08, } | Inhibitions |
Link inhibition reason bits
| bool transmitMSU (const SS7MSU& msu)
| transmitMSU |
[pure virtual]
Push a Message Signal Unit down the protocol stack
Parameters:
| msu | Message data, starting with Service Indicator Octet |
Returns: True if message was successfully queued
| void recoverMSU (int sequence)
| recoverMSU |
[virtual]
Remove the MSUs waiting in the transmit queue and return them
Parameters:
| sequence | First sequence number to recover, flush earlier packets |
| unsigned int status ()
| status |
[const virtual]
Retrieve the current link status indications
Returns: Link status indication bits
| const char* statusName (unsigned int status, bool brief)
| statusName |
[const virtual]
Get the name of a Layer 2 status
Parameters:
| status | Status indication value |
| brief | Request to return the short status name |
Returns: String describing the status
| inline const char* statusName (bool brief = false)
| statusName |
[const]
Get the name of the current local Layer 2 status
Parameters:
| brief | Request to return the short status name |
Returns: String describing the status
| bool operational ()
| operational |
[const pure virtual]
Check if the link is fully operational
Returns: True if the link is aligned and operational
| unsigned int upTime ()
| upTime |
[const]
Get the uptime of the link
Returns: Time since link got up in seconds
| void attach (SS7L2User* l2user)
| attach |
Attach a Layer 2 user component to the data link. Detach from the old one if valid
Parameters:
| l2user | Pointer to Layer 2 user component to attach |
| inline SS7L2User* user ()
| user |
[const]
Get the Layer 2 user component that works with this data link
Returns: Pointer to the user component to which the messages are sent
| inline int sls ()
| sls |
[const]
Get the Signalling Link Selection number allocated to this link
Returns: SLS value assigned by the upper layer
| inline void sls (int linkSel)
| sls |
Assign a new Signalling Link Selection number
Parameters:
| linkSel | New SLS to assign to this link |
| inline int inhibited ()
| inhibited |
[const]
Retrieve the inhibition flags set by MTP3 Management
Returns: Inhibition flags ORed together, zero if not inhibited
| inline bool inhibited (int flags)
| inhibited |
[const]
Check some of the inhibition flags set by MTP3 Management
Parameters:
| flags | Flags to check for, ORed together |
Returns: True if any of the specified inhibition flags is active
| unsigned int congestion ()
| congestion |
[virtual]
Get the current congestion level of the link
Returns: Congestion level, 0 if not congested, 3 if maximum congestion
| int getSequence ()
| getSequence |
[virtual]
Get the sequence number of the last MSU received
Returns: Last FSN received, negative if not available
| bool control (Operation oper, NamedList* params = 0)
| control |
[virtual]
Execute a control operation. Operations can change the link status or can query the aligned status.
Parameters:
| oper | Operation to execute |
| params | Optional 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 SignallingComponent.
| bool control (NamedList& params)
| control |
[virtual]
Query or modify layer's settings or operational parameters
Parameters:
| params | The list of parameters to query or change |
Returns: True if the control operation was executed
Reimplemented from SignallingComponent.
| inline SS7Layer2 ()
| SS7Layer2 |
[protected]
Constructor
| 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.
| inline bool receivedMSU (const SS7MSU& msu)
| receivedMSU |
[protected]
Push a received Message Signal Unit up the protocol stack
Parameters:
| msu | Message data, starting with Service Indicator Octet |
Returns: True if message was successfully delivered to the user component
| inline bool recoveredMSU (const SS7MSU& msu)
| recoveredMSU |
[protected]
Push a recovered Message Signal Unit back up the protocol stack
Parameters:
| msu | Message data, starting with Service Indicator Octet |
Returns: True if message was successfully delivered to the user component
| void notify ()
| notify |
[protected]
Set the notify flag. The user part will be notified on timer tick about status change
| bool inhibit (int setFlags, int clrFlags = 0)
| inhibit |
[protected]
Set and clear inhibition flags, method used by MTP3
Parameters:
| setFlags | Flag bits to set ORed together |
| clrFlags | Flag bits to clear ORed together (optional) |
Returns: True if inhibition flags were set
| bool getEmergency (NamedList* params = 0, bool emg = false)
| getEmergency |
[protected const]
Get a best guess of the emergency alignment requirement
Parameters:
| params | Optional parameters whose "emergency" is used |
| emg | Default emergency state |
Returns: True if emergency alignment should be used
| bool m_autoEmergency | m_autoEmergency |
[protected]
| int m_lastSeqRx | m_lastSeqRx |
[protected]
| unsigned int m_congestion | m_congestion |
[protected]
| Generated by: paulc on bussard on Thu Jul 24 18:41:02 2014, using kdoc 2.0a54. |