Yate
Public Member Functions | Static Public Member Functions | List of all members
SS7Label Class Reference

SS7 Routing Label. More...

#include <yatesig.h>

Public Member Functions

 SS7Label ()
 
 SS7Label (const SS7Label &original)
 
 SS7Label (const SS7Label &original, unsigned char sls, unsigned char spare=0)
 
 SS7Label (SS7PointCode::Type type, const SS7PointCode &dpc, const SS7PointCode &opc, unsigned char sls, unsigned char spare=0)
 
 SS7Label (SS7PointCode::Type type, unsigned int dpc, unsigned int opc, unsigned char sls, unsigned char spare=0)
 
 SS7Label (SS7PointCode::Type type, const SS7MSU &msu)
 
void assign (SS7PointCode::Type type, const SS7PointCode &dpc, const SS7PointCode &opc, unsigned char sls, unsigned char spare=0)
 
void assign (SS7PointCode::Type type, unsigned int dpc, unsigned int opc, unsigned char sls, unsigned char spare=0)
 
bool assign (SS7PointCode::Type type, const SS7MSU &msu)
 
bool assign (SS7PointCode::Type type, const unsigned char *src, int len=-1)
 
bool store (unsigned char *dest) const
 
bool compatible (SS7PointCode::Type type) const
 
SS7PointCode::Type type () const
 
const SS7PointCodedpc () const
 
SS7PointCodedpc ()
 
const SS7PointCodeopc () const
 
SS7PointCodeopc ()
 
unsigned char sls () const
 
void setSls (unsigned char sls)
 
unsigned char spare () const
 
void setSpare (unsigned char spare)
 
unsigned int length () const
 
unsigned char size () const
 

Static Public Member Functions

static unsigned int length (SS7PointCode::Type type)
 
static unsigned char size (SS7PointCode::Type type)
 

Detailed Description

SS7 Routing Label.

A SS7 Layer 3 routing label, both ANSI and ITU capable

Constructor & Destructor Documentation

◆ SS7Label() [1/6]

SS7Label ( )

Constructor of an empty, invalid label

◆ SS7Label() [2/6]

SS7Label ( const SS7Label original)

Copy constructor

Parameters
originalLabel to copy

◆ SS7Label() [3/6]

SS7Label ( const SS7Label original,
unsigned char  sls,
unsigned char  spare = 0 
)

Swapping constructor, puts SPC into DPC and the other way around

Parameters
originalLabel to swap
slsSignalling Link Selection
spareSpare bits

◆ SS7Label() [4/6]

SS7Label ( SS7PointCode::Type  type,
const SS7PointCode dpc,
const SS7PointCode opc,
unsigned char  sls,
unsigned char  spare = 0 
)

Constructor from label components

Parameters
typeType of point code used to pack the label
dpcDestination Point Code
opcOriginating Point Code
slsSignalling Link Selection
spareSpare bits

◆ SS7Label() [5/6]

SS7Label ( SS7PointCode::Type  type,
unsigned int  dpc,
unsigned int  opc,
unsigned char  sls,
unsigned char  spare = 0 
)

Constructor from packed label components

Parameters
typeType of point code used to pack the label
dpcDestination Point Code
opcOriginating Point Code
slsSignalling Link Selection
spareSpare bits

◆ SS7Label() [6/6]

SS7Label ( SS7PointCode::Type  type,
const SS7MSU msu 
)

Constructor from type and received MSU

Parameters
typeType of point code to use to decode the MSU
msuA received MSU to be parsed

Member Function Documentation

◆ assign() [1/4]

bool assign ( SS7PointCode::Type  type,
const SS7MSU msu 
)

Assignment from type and received MSU

Parameters
typeType of point code to use to decode the MSU
msuA received MSU to be parsed
Returns
True if the assignment succeeded

◆ assign() [2/4]

void assign ( SS7PointCode::Type  type,
const SS7PointCode dpc,
const SS7PointCode opc,
unsigned char  sls,
unsigned char  spare = 0 
)

Assignment from label components

Parameters
typeType of point code used to pack the label
dpcDestination Point Code
opcOriginating Point Code
slsSignalling Link Selection
spareSpare bits

Referenced by SS7ISUP::setLabel().

◆ assign() [3/4]

bool assign ( SS7PointCode::Type  type,
const unsigned char *  src,
int  len = -1 
)

Assignment from a packed memory block

Parameters
typeType of the point codes in memory block
srcPointer to packed label in memory
lenLength of data, negative to not check validity
Returns
True if success, false if invalid type or memory area

◆ assign() [4/4]

void assign ( SS7PointCode::Type  type,
unsigned int  dpc,
unsigned int  opc,
unsigned char  sls,
unsigned char  spare = 0 
)

Assignment from packed label components

Parameters
typeType of point code used to pack the label
dpcDestination Point Code
opcOriginating Point Code
slsSignalling Link Selection
spareSpare bits

◆ compatible()

bool compatible ( SS7PointCode::Type  type) const

Check if the label is compatible with another packing type

Returns
True if the DLC, SLC and SLS fit in the new packing format

◆ dpc() [1/2]

SS7PointCode & dpc ( )
inline

Get a writable reference to the Destination Code Point inside the label

Returns
Reference of the destination code point

◆ dpc() [2/2]

const SS7PointCode & dpc ( ) const
inline

Get the Destination Code Point inside the label

Returns
Reference of the destination code point

◆ length() [1/2]

unsigned int length ( ) const
inline

Get the length (in bytes) of this routing label

Returns
Number of bytes required to represent the label, zero if unknown

Referenced by SS7MSU::getData().

◆ length() [2/2]

static unsigned int length ( SS7PointCode::Type  type)
static

Get the length (in bytes) of a packed routing label according to its type

Parameters
typeType of the packing
Returns
Number of bytes required to represent the label, zero if unknown

◆ opc() [1/2]

SS7PointCode & opc ( )
inline

Get a writable reference to the Originating Code Point inside the label

Returns
Reference of the originating code point

◆ opc() [2/2]

const SS7PointCode & opc ( ) const
inline

Get the Originating Code Point inside the label

Returns
Reference of the source code point

◆ setSls()

void setSls ( unsigned char  sls)
inline

Set the Signalling Link Selection inside the label

Parameters
slsNew value of the SLS/SLC field

◆ setSpare()

void setSpare ( unsigned char  spare)
inline

Set the spare bits inside the label

Parameters
spareNew value of the spare bits

◆ size() [1/2]

unsigned char size ( ) const
inline

Get the size (in bits) of this routing label except the spare bits

Returns
Number of bits required to represent this label, zero if unknown

◆ size() [2/2]

static unsigned char size ( SS7PointCode::Type  type)
static

Get the size (in bits) of a packed routing label according to its type

Parameters
typeType of the packing
Returns
Number of bits required to represent the label, zero if unknown

◆ sls()

unsigned char sls ( ) const
inline

Get the Signalling Link Selection inside the label

Returns
Value of the SLS field

◆ spare()

unsigned char spare ( ) const
inline

Get the spare bits inside the label

Returns
Value of the bits not included in DPC, OPC, or SLS

◆ store()

bool store ( unsigned char *  dest) const

Pack and store the label in a memory location

Parameters
destLocation to store the label info, must be at least length() long
Returns
True on success, false if type is invalid

◆ type()

SS7PointCode::Type type ( ) const
inline

Get the type (SS7 dialect) of the routing label

Returns
Dialect of the routing label as enumeration

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