# class SS7Route | A SS7 MSU route. More...
Full name | `TelEngine::SS7Route`
Definition | `#include <libs/ysig/yatesig.h>`
Inherits | TelEngine::Mutex [public ], TelEngine::RefObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### 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 Methods

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

- static const TokenDict* stateNames ()
- static const char* stateName (State state)

## Detailed Description

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

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

Route state

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

Constructor

Parameters:

packed | The packed value of the destination point code
type | The destination point code type
priority | Optional value of the network priority
shift | SLS right shift to apply for balancing between linksets
maxDataLength | The maximum data that can be transported on this route

inline SS7Route (const SS7Route& original) | ### SS7Route

Copy constructor

Parameters:

original | The original route

~SS7Route () | ### ~SS7Route

[virtual]

Destructor

State state () | ### state

[const]

Retrieve the current state of the route

Returns: Current route state

const TokenDict* stateNames () | ### stateNames

[static]

Retrieve the state names token table

Returns: Pointer to the token table mapping states to names

const char* stateName () | ### stateName

[const]

Retrieve the name of the current state

Returns: Name of the state, NULL if invalid

const char* stateName (State state) | ### stateName

[static]

Retrieve the name of an arbitrary state

Parameters:

state | Route state whose name to return

Returns: Name of the state, NULL if invalid

unsigned int priority () | ### priority

[const]

Get the priority of this route

Returns: Route priority, zero = highest (adjacent)

unsigned int getMaxDataLength () | ### getMaxDataLength

[const]

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

Returns: The maximum data length

unsigned int packed () | ### packed

[const]

Get the packed Point Code of this route

Returns: Packed Point Code of the route's destination

unsigned int shift () | ### shift

[const]

Get the SLS right shift for this route

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

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

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

Parameters:

network | The network to attach or change priority
type | The point code type used to get the priority from the given network or the networks already in the list

bool detach (SS7Layer3* network) | ### detach

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

Parameters:

network | The network to remove

Returns: False if the list of networks is empty

bool hasNetwork (const SS7Layer3* network) | ### hasNetwork

Check if this route goes to a specific network

Parameters:

network | Pointer to the network to search

Returns: True if the network was found in the route's list

bool hasNetwork (const SS7Layer3* network) | ### hasNetwork

[const]

Check if this route goes to a specific network

Parameters:

network | Pointer to the network to search

Returns: True if the network was found in the route's list

bool operational (int sls = -1) | ### operational

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

Parameters:

sls | Signalling Link to check, negative to check if any is operational

Returns: True if the route has at least one linkset operational

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

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

Parameters:

router | The router requesting the operation (used for debug)
msu | Message data, starting with Service Indicator Octet
label | Routing label of the MSU
sls | Signalling Link Selection, negative to choose best
source | Avoided network where the packet was received from
states | The states a network can have to be a transmission candidate

Returns: Link the message was successfully queued to, negative for error

bool congested () | ### congested

Check the current congestion status according to Q.704 11.2.3.1

Returns: True if a TFC should be sent

void reroute () | ### reroute

Initiate controlled rerouting procedure, buffer user part messages for T6

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.