Yate
SS7Route Class Reference

A SS7 MSU route. More...

#include <yatesig.h>

Inheritance diagram for SS7Route:
RefObject Mutex GenObject Lockable

Public Types

enum  State {
  Unknown = 0x80 , Prohibited = 0x01 , Restricted = 0x02 , Congestion = 0x04 ,
  Allowed = 0x08 , NotAllowed = 0x77 , NotCongested = 0x78 , NotRestricted = 0x7c ,
  NotProhibited = 0x7e , KnownState = 0x7f , AnyState = 0xff
}
 

Public Member Functions

 SS7Route (unsigned int packed, SS7PointCode::Type type, unsigned int priority=0, unsigned int shift=0, unsigned int maxDataLength=MAX_TDM_MSU_SIZE)
 
 SS7Route (const SS7Route &original)
 
virtual ~SS7Route ()
 
State state () const
 
const char * stateName () const
 
unsigned int priority () const
 
unsigned int getMaxDataLength () const
 
unsigned int packed () const
 
unsigned int shift () const
 
void attach (SS7Layer3 *network, SS7PointCode::Type type)
 
bool detach (SS7Layer3 *network)
 
bool hasNetwork (const SS7Layer3 *network)
 
bool hasNetwork (const SS7Layer3 *network) const
 
bool operational (int sls=-1)
 
int transmitMSU (const SS7Router *router, const SS7MSU &msu, const SS7Label &label, int sls, State states, const SS7Layer3 *source=0)
 
bool congested ()
 
void reroute ()
 
- 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 StringtoString () const
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- 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 const TokenDictstateNames ()
 
static const char * stateName (State state)
 
- 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 ()
 

Friends

class SS7Layer3
 
class SS7Router
 

Additional Inherited Members

- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 
virtual void destroyed ()
 

Detailed Description

A SS7 MSU route.

Keeps a packed destination point code, a network priority or a list of networks used to route to the enclosed destination point code

Member Enumeration Documentation

◆ State

enum State

Route state

Constructor & Destructor Documentation

◆ SS7Route() [1/2]

SS7Route ( unsigned int packed,
SS7PointCode::Type type,
unsigned int priority = 0,
unsigned int shift = 0,
unsigned int maxDataLength = MAX_TDM_MSU_SIZE )
inline

Constructor

Parameters
packedThe packed value of the destination point code
typeThe destination point code type
priorityOptional value of the network priority
shiftSLS right shift to apply for balancing between linksets
maxDataLengthThe maximum data that can be transported on this route

References Mutex::Mutex(), packed(), priority(), and shift().

Referenced by SS7Route().

◆ SS7Route() [2/2]

SS7Route ( const SS7Route & original)
inline

Copy constructor

Parameters
originalThe original route

References getMaxDataLength(), Mutex::Mutex(), packed(), priority(), shift(), SS7Route(), and state().

◆ ~SS7Route()

virtual ~SS7Route ( )
inlinevirtual

Destructor

Member Function Documentation

◆ attach()

void attach ( SS7Layer3 * network,
SS7PointCode::Type type )

Attach a network to use for this destination or change its priority. This method is thread safe

Parameters
networkThe network to attach or change priority
typeThe point code type used to get the priority from the given network or the networks already in the list

◆ congested()

bool congested ( )

Check the current congestion status according to Q.704 11.2.3.1

Returns
True if a TFC should be sent

◆ detach()

bool detach ( SS7Layer3 * network)

Remove a network from the list without deleting it. This method is thread safe

Parameters
networkThe network to remove
Returns
False if the list of networks is empty

◆ getMaxDataLength()

unsigned int getMaxDataLength ( ) const
inline

Get the maximum data length that can be transported on this route

Returns
The maximum data length

Referenced by SS7Route().

◆ hasNetwork() [1/2]

bool hasNetwork ( const SS7Layer3 * network)

Check if this route goes to a specific network

Parameters
networkPointer to the network to search
Returns
True if the network was found in the route's list

◆ hasNetwork() [2/2]

bool hasNetwork ( const SS7Layer3 * network) const

Check if this route goes to a specific network

Parameters
networkPointer to the network to search
Returns
True if the network was found in the route's list

◆ operational()

bool operational ( int sls = -1)

Check if the at least one network/linkset is fully operational

Parameters
slsSignalling Link to check, negative to check if any is operational
Returns
True if the route has at least one linkset operational

◆ packed()

unsigned int packed ( ) const
inline

Get the packed Point Code of this route

Returns
Packed Point Code of the route's destination

Referenced by SS7Route(), and SS7Route().

◆ priority()

unsigned int priority ( ) const
inline

Get the priority of this route

Returns
Route priority, zero = highest (adjacent)

Referenced by SS7Route(), and SS7Route().

◆ reroute()

void reroute ( )

Initiate controlled rerouting procedure, buffer user part messages for T6

◆ shift()

unsigned int shift ( ) const
inline

Get the SLS right shift for this route

Returns
How many bits of SLS to shift off right when selecting linkset

Referenced by SS7Route(), and SS7Route().

◆ state()

State state ( ) const
inline

Retrieve the current state of the route

Returns
Current route state

Referenced by SS7Route(), and stateName().

◆ stateName() [1/2]

const char * stateName ( ) const
inline

Retrieve the name of the current state

Returns
Name of the state, NULL if invalid

References stateNames().

◆ stateName() [2/2]

static const char * stateName ( State state)
inlinestatic

Retrieve the name of an arbitrary state

Parameters
stateRoute state whose name to return
Returns
Name of the state, NULL if invalid

References state(), and stateNames().

◆ stateNames()

static const TokenDict * stateNames ( )
static

Retrieve the state names token table

Returns
Pointer to the token table mapping states to names

Referenced by stateName(), and stateName().

◆ transmitMSU()

int transmitMSU ( const SS7Router * router,
const SS7MSU & msu,
const SS7Label & label,
int sls,
State states,
const SS7Layer3 * source = 0 )

Try to transmit a MSU through one of the attached networks. This method is thread safe

Parameters
routerThe router requesting the operation (used for debug)
msuMessage data, starting with Service Indicator Octet
labelRouting label of the MSU
slsSignalling Link Selection, negative to choose best
sourceAvoided network where the packet was received from
statesThe states a network can have to be a transmission candidate
Returns
Link the message was successfully queued to, negative for error

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