SS7PointCode Class Reference
SS7 Code Point.
More...
#include <yatesig.h>
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, Type type=Other) |
bool | assign (Type type, const unsigned char *src, int len=-1, unsigned char *spare=0) |
SS7PointCode & | operator= (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
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 |
Constructor from unpacked format
- Parameters:
-
| type | Type of the unpacking desired |
| packed | Packed format of the point code |
Copy constructor
- Parameters:
-
| original | Code point to be copied |
Member Function Documentation
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
bool assign |
( |
const String & |
src, |
|
|
Type |
type = Other | |
|
) |
| | |
Assign data members from a given string of form 'network-cluster-member'
- Parameters:
-
| src | Source string |
| type | Type 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
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 |
unsigned char cluster |
( |
|
) |
const [inline] |
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
static unsigned char length |
( |
Type |
type |
) |
[static] |
Get the length (in octets) of a packed code point according to its type
- Parameters:
-
- Returns:
- Number of octets required to represent the code point, zero if unknown
static const char* lookup |
( |
Type |
type |
) |
[inline, static] |
Get the text associated to a point type
- Parameters:
-
- Returns:
- The requested text or 0 if not found
References TelEngine::lookup().
static Type lookup |
( |
const char * |
text |
) |
[inline, static] |
Get a point type associated to a given text
- Parameters:
-
- Returns:
- Point code type as enumeration
References TelEngine::lookup().
unsigned char member |
( |
|
) |
const [inline] |
unsigned char network |
( |
|
) |
const [inline] |
bool operator== |
( |
const SS7PointCode & |
original |
) |
const [inline] |
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
static unsigned char size |
( |
Type |
type |
) |
[static] |
Get the size (in bits) of a packed code point according to its type
- Parameters:
-
- Returns:
- Number of bits required to represent the code point, zero if unknown
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
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
The documentation for this class was generated from the following file: