Yate
SS7PointCode Class Reference

SS7 Code Point. More...

#include <yatesig.h>

Inheritance diagram for SS7PointCode:
GenObject

Public Types

enum  Type {
  Other = 0 , ITU = 1 , ANSI = 2 , ANSI8 = 3 ,
  China = 4 , Japan = 5 , Japan5 = 6 , DefinedTypes
}
 

Public Member Functions

 SS7PointCode (unsigned char network=0, unsigned char cluster=0, unsigned char member=0)
 
 SS7PointCode (Type type, unsigned int packed)
 
 SS7PointCode (const SS7PointCode &original)
 
 ~SS7PointCode ()
 
unsigned char network () const
 
unsigned char cluster () const
 
unsigned char member () const
 
void assign (unsigned char network, unsigned char cluster, unsigned char member)
 
bool assign (const String &src, Type type=Other)
 
bool assign (Type type, const unsigned char *src, int len=-1, unsigned char *spare=0)
 
SS7PointCodeoperator= (const SS7PointCode &original)
 
bool operator== (const SS7PointCode &original) const
 
bool operator!= (const SS7PointCode &original) const
 
bool compatible (Type type) const
 
unsigned int pack (Type type) const
 
bool unpack (Type type, unsigned int packed)
 
bool store (Type type, unsigned char *dest, unsigned char spare=0) const
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Static Public Member Functions

static unsigned char size (Type type)
 
static unsigned char length (Type type)
 
static Type lookup (const char *text)
 
static const char * lookup (Type type)
 
- 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 ()
 

Detailed Description

SS7 Code Point.

An universal SS7 Layer 3 routing Code Point

Member Enumeration Documentation

◆ Type

enum Type

Different incompatible types of points codes

Constructor & Destructor Documentation

◆ SS7PointCode() [1/3]

SS7PointCode ( unsigned char network = 0,
unsigned char cluster = 0,
unsigned char member = 0 )
inline

Constructor from components

Parameters
networkANSI Network Identifier / ITU-T Zone Identification
clusterANSI Network Cluster / ITU-T Area/Network Identification
memberANSI Cluster Member / ITU-T Signalling Point Identification

References cluster(), member(), and network().

Referenced by operator!=(), operator=(), operator==(), and SS7PointCode().

◆ SS7PointCode() [2/3]

SS7PointCode ( Type type,
unsigned int packed )
inline

Constructor from unpacked format

Parameters
typeType of the unpacking desired
packedPacked format of the point code

References unpack().

◆ SS7PointCode() [3/3]

SS7PointCode ( const SS7PointCode & original)
inline

Copy constructor

Parameters
originalCode point to be copied

References cluster(), member(), network(), and SS7PointCode().

◆ ~SS7PointCode()

~SS7PointCode ( )
inline

Destructor

Member Function Documentation

◆ assign() [1/3]

bool assign ( const String & src,
Type type = Other )

Assign data members from a given string of form 'network-cluster-member'

Parameters
srcSource string
typeType of the point code if numeric (packed) representation is used
Returns
False if the string has incorrect format or individual elements are not in the range 0..255

◆ assign() [2/3]

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

Assign data members from a packed memory block

Parameters
typeType of the point code in memory
srcPointer to packed point code in memory
lenLength of data, negative to not check validity
sparePointer to variable to save spare bits, NULL to ignore them
Returns
True if success, false if invalid type or memory area

◆ assign() [3/3]

void assign ( unsigned char network,
unsigned char cluster,
unsigned char member )
inline

Assignment from components

Parameters
networkANSI Network Identifier / ITU-T Zone Identification
clusterANSI Network Cluster / ITU-T Area/Network Identification
memberANSI Cluster Member / ITU-T Signalling Point Identification

References cluster(), member(), and network().

Referenced by operator=().

◆ cluster()

unsigned char cluster ( ) const
inline

Retrieve the Cluster / Area component of the Code Point

Returns
ANSI Network Cluster / ITU-T Area/Network Identification

Referenced by assign(), operator!=(), operator=(), operator==(), SS7PointCode(), and SS7PointCode().

◆ compatible()

bool compatible ( Type type) const

Check if the point code is compatible with a packing type

Returns
True if the Network and Member fit in the packing format

◆ length()

static unsigned char length ( Type type)
static

Get the length (in octets) of a packed code point according to its type

Parameters
typeType of the packing
Returns
Number of octets required to represent the code point, zero if unknown

◆ lookup() [1/2]

static Type lookup ( const char * text)
inlinestatic

Get a point type associated to a given text

Parameters
textText to find
Returns
Point code type as enumeration

Referenced by SccpRemote::getPointCodeType().

◆ lookup() [2/2]

static const char * lookup ( Type type)
inlinestatic

Get the text associated to a point type

Parameters
typeType to find
Returns
The requested text or 0 if not found

◆ member()

unsigned char member ( ) const
inline

Retrieve the Cluster / Point component of the Code Point

Returns
ANSI Cluster Member / ITU-T Signalling Point Identification

Referenced by assign(), operator!=(), operator=(), operator==(), SS7PointCode(), and SS7PointCode().

◆ network()

unsigned char network ( ) const
inline

Retrieve the Network / Zone component of the Code Point

Returns
ANSI Network Identifier / ITU-T Zone Identification

Referenced by assign(), operator!=(), operator=(), operator==(), SS7PointCode(), and SS7PointCode().

◆ operator!=()

bool operator!= ( const SS7PointCode & original) const
inline

Inequality operator

Parameters
originalCode point to be compared with

References cluster(), member(), network(), and SS7PointCode().

◆ operator=()

SS7PointCode & operator= ( const SS7PointCode & original)
inline

Assignment operator

Parameters
originalCode point to be copied

References assign(), cluster(), member(), network(), and SS7PointCode().

◆ operator==()

bool operator== ( const SS7PointCode & original) const
inline

Equality operator

Parameters
originalCode point to be compared with

References cluster(), member(), network(), and SS7PointCode().

◆ pack()

unsigned int pack ( Type type) const

Pack the code point into a single integer number.

Parameters
typeType of the packing desired
Returns
Compact code point as integer or zero if the packing type is not supported

Referenced by SS7Layer3::getRoutePriority(), SS7Layer3::getRouteState(), and SS7Router::setRouteState().

◆ size()

static unsigned char size ( Type type)
static

Get the size (in bits) of a packed code point according to its type

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

◆ store()

bool store ( Type type,
unsigned char * dest,
unsigned char spare = 0 ) const

Store the point code in a memory area

Parameters
typeType of the packing desired
destLocation to store the label info, must be at least length() long
spareSpare bits to store after the point code if applicable (ITU)
Returns
True if the unpacking succeeded and the memory was updated

◆ unpack()

bool unpack ( Type type,
unsigned int packed )

Unpack an integer number into a point code

Parameters
typeType of the unpacking desired
packedPacked format of the point code
Returns
True if the unpacking succeeded and the point code was updated

Referenced by SS7PointCode().


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