Yate
Public Types | Public Member Functions | Static Public Member Functions | Friends
SS7Route Class Reference

A SS7 MSU route. More...

#include <yatesig.h>

Inheritance diagram for SS7Route:
RefObject Mutex GenObject Lockable

List of all members.

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=272)
 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 ()

Static Public Member Functions

static const TokenDictstateNames ()
static const char * stateName (State state)

Friends

class SS7Layer3
class SS7Router

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

enum State

Route state


Constructor & Destructor Documentation

SS7Route ( unsigned int  packed,
SS7PointCode::Type  type,
unsigned int  priority = 0,
unsigned int  shift = 0,
unsigned int  maxDataLength = 272 
) [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
SS7Route ( const SS7Route original) [inline]

Copy constructor

Parameters:
originalThe original route
virtual ~SS7Route ( ) [inline, virtual]

Destructor


Member Function Documentation

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
bool congested ( )

Check the current congestion status according to Q.704 11.2.3.1

Returns:
True if a TFC should be sent
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
unsigned int getMaxDataLength ( ) const [inline]

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

Returns:
The maximum data length
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
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
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
unsigned int packed ( ) const [inline]

Get the packed Point Code of this route

Returns:
Packed Point Code of the route's destination
unsigned int priority ( ) const [inline]

Get the priority of this route

Returns:
Route priority, zero = highest (adjacent)
void reroute ( )

Initiate controlled rerouting procedure, buffer user part messages for T6

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
State state ( ) const [inline]

Retrieve the current state of the route

Returns:
Current route state
const char* stateName ( ) const [inline]

Retrieve the name of the current state

Returns:
Name of the state, NULL if invalid

References TelEngine::lookup().

static const char* stateName ( State  state) [inline, static]

Retrieve the name of an arbitrary state

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

References TelEngine::lookup().

static const TokenDict* stateNames ( ) [static]

Retrieve the state names token table

Returns:
Pointer to the token table mapping states to names
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: