|
Yate
|
A Q.931 ISDN Layer 3 message. More...
#include <yatesig.h>
Public Types | |
| enum | Type { Alerting = 0x01, Proceeding = 0x02, Connect = 0x07, ConnectAck = 0x0f, Progress = 0x03, Setup = 0x05, SetupAck = 0x0d, Resume = 0x26, ResumeAck = 0x2e, ResumeRej = 0x22, Suspend = 0x25, SuspendAck = 0x2d, SuspendRej = 0x21, UserInfo = 0x20, Disconnect = 0x45, Release = 0x4d, ReleaseComplete = 0x5a, Restart = 0x46, RestartAck = 0x4e, Segment = 0x60, CongestionCtrl = 0x79, Info = 0x7b, Notify = 0x6e, Status = 0x7d, StatusEnquiry = 0x75 } |
Public Member Functions | |
| ISDNQ931Message (Type type, bool initiator, u_int32_t callRef, u_int8_t callRefLen) | |
| ISDNQ931Message (Type type) | |
| ISDNQ931Message (Type type, ISDNQ931Call *call) | |
| virtual | ~ISDNQ931Message () |
| Type | type () const |
| bool | initiator () const |
| u_int32_t | callRef () const |
| u_int8_t | callRefLen () const |
| bool | dummyCallRef () const |
| bool | unknownMandatory () const |
| void | setUnknownMandatory () |
| ObjList * | ieList () |
| ISDNQ931IE * | getIE (ISDNQ931IE::Type type, ISDNQ931IE *base=0) |
| ISDNQ931IE * | removeIE (ISDNQ931IE::Type type, ISDNQ931IE *base=0) |
| const char * | getIEValue (ISDNQ931IE::Type type, const char *param, const char *defVal=0) |
| ISDNQ931IE * | appendIEValue (ISDNQ931IE::Type type, const char *param, const char *value) |
| bool | append (ISDNQ931IE *ie) |
| bool | appendSafe (ISDNQ931IE *ie) |
| void | toString (String &dest, bool extendedDebug, const char *indent=0) const |
| virtual void * | getObject (const String &name) const |
| u_int8_t | encode (ISDNQ931ParserData &parserData, ObjList &dest) |
Static Public Member Functions | |
| static ISDNQ931Message * | parse (ISDNQ931ParserData &parserData, const DataBlock &buffer, DataBlock *segData) |
| static const char * | typeName (int t) |
Public Attributes | |
| DataBlock | m_buffer |
Static Public Attributes | |
| static const TokenDict | s_type [] |
A Q.931 ISDN Layer 3 message.
Q.931 ISDN Layer 3 message
| ISDNQ931Message | ( | Type | type, |
| bool | initiator, | ||
| u_int32_t | callRef, | ||
| u_int8_t | callRefLen | ||
| ) |
Constructor Constructs a message from given data. Used for incoming messages
| type | Message type |
| initiator | The call initiator flag: True: this is the initiator |
| callRef | The call reference |
| callRefLen | The call reference length |
| ISDNQ931Message | ( | Type | type | ) |
Constructor Constructs a message with dummy call reference
| type | Message type |
| ISDNQ931Message | ( | Type | type, |
| ISDNQ931Call * | call | ||
| ) |
Constructor Constructs a message for a given call. Used for outgoing messages
| type | Message type |
| call | The call this message belongs to |
| virtual ~ISDNQ931Message | ( | ) | [virtual] |
Destructor
| bool append | ( | ISDNQ931IE * | ie | ) | [inline] |
Append an information element to this message
| ie | Information element to add |
References String::append().
| ISDNQ931IE* appendIEValue | ( | ISDNQ931IE::Type | type, |
| const char * | param, | ||
| const char * | value | ||
| ) | [inline] |
Append an IE with a given parameter
| type | IE's type |
| param | IE's parameter. Set to 0 to use IE's name |
| value | IE parameter's value |
References NamedList::addParam(), and String::c_str().
| bool appendSafe | ( | ISDNQ931IE * | ie | ) |
Append/insert an information element to this message. Check the IE list consistency The given IE is 'consumed': deleted or appended to the list
| ie | Information element to add |
| u_int32_t callRef | ( | ) | const [inline] |
Get the id of the call this message belongs to
| u_int8_t callRefLen | ( | ) | const [inline] |
Get the length of the call reference
| bool dummyCallRef | ( | ) | const [inline] |
Check if this message has a dummy call reference
| u_int8_t encode | ( | ISDNQ931ParserData & | parserData, |
| ObjList & | dest | ||
| ) |
Encode this message If message segmentation is allowed and the message is longer then maximum allowed, split it into Segment messages
| parserData | The parser settings |
| dest | The destination list. If 1 is returned the list contains a DataBuffer with this message. If more then 1 is returned, the list is filled with data buffers with Segment messages |
| ISDNQ931IE* getIE | ( | ISDNQ931IE::Type | type, |
| ISDNQ931IE * | base = 0 |
||
| ) |
Get a pointer to the first IE with the given type
| type | Requested IE's type |
| base | Optional search starting element. If 0, search is started from the first IE following base |
| const char* getIEValue | ( | ISDNQ931IE::Type | type, |
| const char * | param, | ||
| const char * | defVal = 0 |
||
| ) | [inline] |
Get the value of a given parameter of a given IE
| type | Requested IE's type |
| param | Requested IE's parameter. Set to 0 to use IE's name |
| defVal | Default value to return if IE is missing or the parameter is missing |
References String::c_str(), and NamedList::getValue().
Get a pointer to a data member or this message
| name | Object name |
Reimplemented from RefObject.
Get the IE list of this message
| bool initiator | ( | ) | const [inline] |
Check if the sender of this message is the call initiator
| static ISDNQ931Message* parse | ( | ISDNQ931ParserData & | parserData, |
| const DataBlock & | buffer, | ||
| DataBlock * | segData | ||
| ) | [static] |
Parse received data If the message type is Segment, decode only the header and the first IE If valid, fills the given buffer with the rest of the message. If segData is 0, drop the message.
| parserData | The parser settings |
| buffer | The received data |
| segData | Segment message data. If 0, received segmented messages will be dropped |
| ISDNQ931IE* removeIE | ( | ISDNQ931IE::Type | type, |
| ISDNQ931IE * | base = 0 |
||
| ) |
Remove an IE from list without destroying it
| type | Requested IE's type |
| base | Optional search starting element. If 0, search is started from the first IE following base |
| void setUnknownMandatory | ( | ) | [inline] |
Set the unknown mandatory IE(s) flag
Put this message into a string for debug purposes
| dest | The destination string |
| extendedDebug | True to add the content of IEs and dump data. If false, only the IE name is added to the destination string |
| indent | The line indent |
Get the type of this message
| static const char* typeName | ( | int | t | ) | [inline, static] |
Get the string associated with a given message type
| t | The message type whose string we want to get |
References TelEngine::lookup().
| bool unknownMandatory | ( | ) | const [inline] |
Check if this message contains unknown mandatory IE(s)
1.7.6.1