Yate
|
Library wide services and data provider. More...
#include <yatesig.h>
Static Public Member Functions | |
static const TokenDict * | codings () |
static const TokenDict * | locations () |
static const TokenDict * | dict (unsigned int index, unsigned char coding=0) |
static bool | hasFlag (const NamedList &list, const char *param, const char *flag) |
static bool | removeFlag (String &flags, const char *flag) |
static void | addKeyword (NamedList &list, const char *param, const TokenDict *tokens, unsigned int val) |
static void | dumpData (const SignallingComponent *comp, NamedList &list, const char *param, const unsigned char *buf, unsigned int len, char sep= ' ') |
static unsigned int | dumpDataExt (const SignallingComponent *comp, NamedList &list, const char *param, const unsigned char *buf, unsigned int len, char sep= ' ') |
static bool | decodeFlags (const SignallingComponent *comp, NamedList &list, const char *param, const SignallingFlags *flags, const unsigned char *buf, unsigned int len) |
static bool | decodeCause (const SignallingComponent *comp, NamedList &list, const unsigned char *buf, unsigned int len, const char *prefix, bool isup) |
static bool | decodeCaps (const SignallingComponent *comp, NamedList &list, const unsigned char *buf, unsigned int len, const char *prefix, bool isup) |
static void | encodeFlags (const SignallingComponent *comp, int &dest, const String &flags, TokenDict *dict) |
static bool | encodeCause (const SignallingComponent *comp, DataBlock &buf, const NamedList ¶ms, const char *prefix, bool isup, bool fail=false) |
static bool | encodeCaps (const SignallingComponent *comp, DataBlock &buf, const NamedList ¶ms, const char *prefix, bool isup) |
static unsigned int * | parseUIntArray (const String &source, unsigned int minVal, unsigned int maxVal, unsigned int &count, bool discardDup) |
Library wide services and data provider.
Provides data and services for SS7 and ISDN
static void addKeyword | ( | NamedList & | list, |
const char * | param, | ||
const TokenDict * | tokens, | ||
unsigned int | val | ||
) | [static] |
Add string (keyword) if found in a dictionary or integer parameter to a named list
list | Destination list |
param | Parameter to add to the list |
tokens | The dictionary used to find the given value |
val | The value to find/add to the list |
static const TokenDict* codings | ( | ) | [static] |
Retreive the dictionary keeping the coding standard flags of ISUP and ISDN parameters as defined in Q.850
static bool decodeCaps | ( | const SignallingComponent * | comp, |
NamedList & | list, | ||
const unsigned char * | buf, | ||
unsigned int | len, | ||
const char * | prefix, | ||
bool | isup | ||
) | [static] |
Decode bearer capabilities as defined in Q.931 (Bearer Capabilities) and Q.763 (User Service Information)
comp | Signalling component requesting the service. Used to print debug messages |
list | The destination list |
buf | The buffer containing the data to parse |
len | Buffer's length |
prefix | The prefix to add to the fields before adding to the destination list |
isup | True if the requestor is ISUP, false for ISDN requestor |
static bool decodeCause | ( | const SignallingComponent * | comp, |
NamedList & | list, | ||
const unsigned char * | buf, | ||
unsigned int | len, | ||
const char * | prefix, | ||
bool | isup | ||
) | [static] |
Decode cause parameters as defined in Q.850
comp | Signalling component requesting the service. Used to print debug messages |
list | The destination list |
buf | The buffer containing the data to parse |
len | Buffer's length |
prefix | The prefix to add to the fields before adding to the destination list |
isup | True if the requestor is ISUP, false for ISDN requestor |
static bool decodeFlags | ( | const SignallingComponent * | comp, |
NamedList & | list, | ||
const char * | param, | ||
const SignallingFlags * | flags, | ||
const unsigned char * | buf, | ||
unsigned int | len | ||
) | [static] |
Decode a received buffer to a comma separated list of flags and add it to a list of parameters
comp | Signalling component requesting the service. Used to print debug messages |
list | The destination list |
param | The parameter to add to the list |
flags | The flags description to use |
buf | The buffer containing the data to parse |
len | Buffer's length |
static const TokenDict* dict | ( | unsigned int | index, |
unsigned char | coding = 0 |
||
) | [inline, static] |
Retreive a dictionary given by index and coding standard for ISUP and ISDN parameters
index | The desired disctionary: 0: The release causes of ISUP and ISDN calls as defined in Q.850. 1: The formats negotiated in ISDN and ISUP parameters as defined in Q.931/Q.763. 2: The transfer capability negotiated in ISDN and ISUP parameters as defined in Q.931/Q.763. 3: The transfer mode negotiated in ISDN and ISUP parameters as defined in Q.931/Q.763. 4: The transfer rate negotiated in ISDN and ISUP parameters as defined in Q.931/Q.763. |
coding | Optional coding standard. Defaults to CCITT if 0 |
static void dumpData | ( | const SignallingComponent * | comp, |
NamedList & | list, | ||
const char * | param, | ||
const unsigned char * | buf, | ||
unsigned int | len, | ||
char | sep = ' ' |
||
) | [static] |
Dump a buffer to a list of parameters
comp | Signalling component requesting the service. Used to print debug messages |
list | The destination list |
param | Parameter to add to the list |
buf | The buffer containing the data to dump |
len | Buffer's length |
sep | The separator between elements |
static unsigned int dumpDataExt | ( | const SignallingComponent * | comp, |
NamedList & | list, | ||
const char * | param, | ||
const unsigned char * | buf, | ||
unsigned int | len, | ||
char | sep = ' ' |
||
) | [static] |
Dump data from a buffer to a list of parameters. The buffer is parsed until (and including) the first byte with the extension bit (the most significant one) set
comp | Signalling component requesting the service. Used to print debug messages |
list | The destination list |
param | Parameter to add to the list |
buf | The buffer containing the data to dump |
len | Buffer's length |
sep | The separator between elements |
static bool encodeCaps | ( | const SignallingComponent * | comp, |
DataBlock & | buf, | ||
const NamedList & | params, | ||
const char * | prefix, | ||
bool | isup | ||
) | [static] |
Encode bearer capabilities as defined in Q.931 (Bearer Capabilities) and Q.763 (User Service Information)
comp | Signalling component requesting the service. Used to print debug messages |
buf | The destination buffer |
params | The list with the parameters |
prefix | The prefix of the fields obtained from parameter list |
isup | True if the requestor is ISUP, false for ISDN requestor |
static bool encodeCause | ( | const SignallingComponent * | comp, |
DataBlock & | buf, | ||
const NamedList & | params, | ||
const char * | prefix, | ||
bool | isup, | ||
bool | fail = false |
||
) | [static] |
Encode cause parameters as defined in Q.850. Create with normal clearing value if parameter is missing. Don't encode diagnostic if total length exceeds 32 bytes for Q.931 requestor
comp | Signalling component requesting the service. Used to print debug messages |
buf | The destination buffer |
params | The list with the parameters |
prefix | The prefix of the fields obtained from parameter list |
isup | True if the requestor is ISUP, false for ISDN requestor |
fail | Fail if the buffer is too long. Ignored if isup is true |
static void encodeFlags | ( | const SignallingComponent * | comp, |
int & | dest, | ||
const String & | flags, | ||
TokenDict * | dict | ||
) | [static] |
Encode a comma separated list of flags. Flags can be prefixed with the '-' character to be reset if previously set
comp | Signalling component requesting the service. Used to print debug messages |
dest | Destination flak mask |
flags | The flag list |
dict | Dictionary used to retrive the flag names and values |
static bool hasFlag | ( | const NamedList & | list, |
const char * | param, | ||
const char * | flag | ||
) | [static] |
Check if a list's parameter (comma separated list of flags) has a given flag
list | The parameter list |
param | The parameter to check |
flag | The flag to check |
static const TokenDict* locations | ( | ) | [static] |
Retreive the dictionary keeping the location flags of ISUP and ISDN parameters as defined in Q.850
static unsigned int* parseUIntArray | ( | const String & | source, |
unsigned int | minVal, | ||
unsigned int | maxVal, | ||
unsigned int & | count, | ||
bool | discardDup | ||
) | [static] |
Parse a list of unsigned integers or unsigned integer intervals. Source elements must be separated by a '.' or ',' character. Interval margins must be separated by a '-' character. Empty elements are ignored
source | The string to parse |
minVal | The minimum value for each element in the array |
maxVal | The maximum value for each element in the array |
count | On exit will contain the length of the returned array (0 on failure) |
discardDup | True to discard duplicate values |
static bool removeFlag | ( | String & | flags, |
const char * | flag | ||
) | [static] |
Remove a flag from a comma separated list of flags
flags | The list of flags |
flag | The flag to remove |