|
|
An universal SS7 Layer 3 routing Code Point
enum Type { Other = 0, ITU = 1, ANSI = 2, ANSI8 = 3, China = 4, Japan = 5, Japan5 = 6, DefinedTypes } | Type |
Different incompatible types of points codes
inline SS7PointCode (unsigned char network = 0, unsigned char cluster = 0, unsigned char member = 0)
| SS7PointCode |
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 |
inline SS7PointCode (Type type, unsigned int packed)
| SS7PointCode |
Constructor from unpacked format
Parameters:
type | Type of the unpacking desired |
packed | Packed format of the point code |
inline SS7PointCode (const SS7PointCode& original)
| SS7PointCode |
Copy constructor
Parameters:
original | Code point to be copied |
inline ~SS7PointCode ()
| ~SS7PointCode |
Destructor
inline unsigned char network ()
| network |
[const]
Retrieve the Network / Zone component of the Code Point
Returns: ANSI Network Identifier / ITU-T Zone Identification
inline unsigned char cluster ()
| cluster |
[const]
Retrieve the Cluster / Area component of the Code Point
Returns: ANSI Network Cluster / ITU-T Area/Network Identification
inline unsigned char member ()
| member |
[const]
Retrieve the Cluster / Point component of the Code Point
Returns: ANSI Cluster Member / ITU-T Signalling Point Identification
inline void assign (unsigned char network, unsigned char cluster, unsigned char member)
| assign |
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, Type type = Other)
| assign |
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
bool assign (Type type, const unsigned char* src, int len = -1, unsigned char* spare = 0)
| assign |
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
inline SS7PointCode& operator= (const SS7PointCode& original)
| operator= |
Assignment operator
Parameters:
original | Code point to be copied |
inline bool operator== (const SS7PointCode& original)
| operator== |
[const]
Equality operator
Parameters:
original | Code point to be compared with |
inline bool operator!= (const SS7PointCode& original)
| operator!= |
[const]
Inequality operator
Parameters:
original | Code point to be compared with |
bool compatible (Type type)
| compatible |
[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)
| pack |
[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 |
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)
| store |
[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
unsigned char size (Type type)
| size |
[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
unsigned char length (Type type)
| length |
[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
Type lookup (const char* text)
| lookup |
[static]
Get a point type associated to a given text
Parameters:
text | Text to find |
Returns: Point code type as enumeration
const char* lookup (Type type)
| lookup |
[static]
Get the text associated to a point type
Parameters:
type | Type to find |
Returns: The requested text or 0 if not found
Generated by: paulc on bussard on Tue Apr 12 17:15:21 2011, using kdoc 2.0a54. |