SS7PointCode Class Reference

SS7 Code Point. More...

#include <yatesig.h>

Inheritance diagram for SS7PointCode:

GenObject

List of all members.

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)
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 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

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)


Detailed Description

SS7 Code Point.

An universal SS7 Layer 3 routing Code Point


Member Enumeration Documentation

enum Type

Different incompatible types of points codes


Constructor & Destructor Documentation

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

Constructor from components

Parameters:
network ANSI Network Identifier / ITU-T Zone Identification
cluster ANSI Network Cluster / ITU-T Area/Network Identification
member ANSI Cluster Member / ITU-T Signalling Point Identification

SS7PointCode ( Type  type,
unsigned int  packed 
) [inline]

Constructor from unpacked format

Parameters:
type Type of the unpacking desired
packed Packed format of the point code

SS7PointCode ( const SS7PointCode original  )  [inline]

Copy constructor

Parameters:
original Code point to be copied

~SS7PointCode (  )  [inline]

Destructor


Member Function Documentation

unsigned char network (  )  const [inline]

Retrive the Network / Zone component of the Code Point

Returns:
ANSI Network Identifier / ITU-T Zone Identification

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

unsigned char cluster (  )  const [inline]

Retrive the Cluster / Area component of the Code Point

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

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

unsigned char member (  )  const [inline]

Retrive the Cluster / Point component of the Code Point

Returns:
ANSI Cluster Member / ITU-T Signalling Point Identification

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

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

Assignment from components

Parameters:
network ANSI Network Identifier / ITU-T Zone Identification
cluster ANSI Network Cluster / ITU-T Area/Network Identification
member ANSI Cluster Member / ITU-T Signalling Point Identification

bool assign ( const String src  ) 

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

Parameters:
src Source string
Returns:
False if the string has incorrect format or individual elements are not in the range 0..255

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

Assign data members from a packed memory block

Parameters:
type Type of the point code in memory
src Pointer to packed point code in memory
len Length of data, negative to not check validity
spare Pointer to variable to save spare bits, NULL to ignore them
Returns:
True if success, false if invalid type or memory area

SS7PointCode& operator= ( const SS7PointCode original  )  [inline]

Assignment operator

Parameters:
original Code point to be copied

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

bool operator== ( const SS7PointCode original  )  const [inline]

Equality operator

Parameters:
original Code point to be compared with

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

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

unsigned int pack ( Type  type  )  const

Pack the code point into a single integer number.

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

bool unpack ( Type  type,
unsigned int  packed 
)

Unpack an integer number into a point code

Parameters:
type Type of the unpacking desired
packed Packed format of the point code
Returns:
True if the unpacking succeeded and the point code was updated

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

Store the point code in a memory area

Parameters:
type Type of the packing desired
dest Location to store the label info, must be at least length() long
spare Spare bits to store after the point code if applicable (ITU)
Returns:
True if the unpacking succeeded and the memory was updated

static unsigned char size ( Type  type  )  [static]

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

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

static unsigned char length ( Type  type  )  [static]

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

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

static Type lookup ( const char *  text  )  [inline, static]

Get a point type associated to a given text

Parameters:
text Text to find
Returns:
Point code type as enumeration

References TelEngine::lookup().

static const char* lookup ( Type  type  )  [inline, static]

Get the text associated to a point type

Parameters:
type Type to find
Returns:
The requested text or 0 if not found

References TelEngine::lookup().


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

Generated on Mon Aug 11 16:17:54 2008 for Yate by  doxygen 1.5.6