ISDNQ921Management Class Reference
ISDN Layer 2 BRI TEI management or PRI with D-channel(s) backup.
More...
#include <yatesig.h>
List of all members.
Public Member Functions |
| ISDNQ921Management (const NamedList ¶ms, const char *name=0, bool net=true) |
virtual | ~ISDNQ921Management () |
virtual bool | initialize (const NamedList *config) |
virtual void | engine (SignallingEngine *eng) |
virtual bool | multipleFrame (u_int8_t tei, bool establish, bool force) |
virtual bool | sendData (const DataBlock &data, u_int8_t tei, bool ack) |
bool | sendFrame (const ISDNFrame *frame, const ISDNQ921 *q921=0) |
virtual void | cleanup () |
virtual void | multipleFrameEstablished (u_int8_t tei, bool confirm, bool timeout, ISDNLayer2 *layer2) |
virtual void | multipleFrameReleased (u_int8_t tei, bool confirm, bool timeout, ISDNLayer2 *layer2) |
virtual void | dataLinkState (u_int8_t tei, bool cmd, bool value, ISDNLayer2 *layer2) |
virtual void | receiveData (const DataBlock &data, u_int8_t tei, ISDNLayer2 *layer2) |
Protected Member Functions |
virtual void | timerTick (const Time &when) |
virtual bool | receivedPacket (const DataBlock &packet) |
virtual bool | notify (SignallingInterface::Notification event) |
bool | processTeiManagement (ISDNFrame *frame) |
bool | sendTeiManagement (ISDNFrame::TeiManagement type, u_int16_t ri, u_int8_t ai, u_int8_t tei=127, bool pf=false) |
void | processTeiRequest (u_int16_t ri, u_int8_t ai, bool pf) |
void | processTeiRemove (u_int8_t ai) |
void | processTeiCheckRequest (u_int8_t ai, bool pf) |
void | processTeiCheckResponse (u_int16_t ri, u_int8_t ai) |
void | processTeiAssigned (u_int16_t ri, u_int8_t ai) |
void | processTeiDenied (u_int16_t ri) |
void | processTeiVerify (u_int8_t ai, bool pf) |
void | sendTeiReq (u_int8_t tei) |
void | sendTeiRemove () |
Detailed Description
ISDN Layer 2 BRI TEI management or PRI with D-channel(s) backup.
This class is intended to be used as a proxy between an ISDN Layer 3 and multiple Layer 2 objects sharing the same signalling interface. It is used for BRI TEI management or PRI with D-channel backup. It also keeps a list of ISDN Layer 2 object(s) used for the designated purpose
Constructor & Destructor Documentation
Constructor - initialize this Layer 2 and the component
- Parameters:
-
| params | Layer's parameters |
| name | Optional name of the component |
| net | True if managing the network side of Q.921 |
Member Function Documentation
virtual void cleanup |
( |
|
) |
[virtual] |
Emergency release. Cleanup all Layer 2 objects attached to this Management
Implements ISDNLayer2.
virtual void dataLinkState |
( |
u_int8_t |
tei, |
|
|
bool |
cmd, |
|
|
bool |
value, |
|
|
ISDNLayer2 * |
layer2 | |
|
) |
| | [virtual] |
Notification from layer 2 of data link set/release command or response Used for stateless layer 2
- Parameters:
-
| tei | This layer TEI |
| cmd | True if received a command, false if received a response |
| value | The value of the notification If 'cmd' is true (command), the value is true if a request to establish data link was received or false if received a request to release data link If 'cmd' is false (response), the value is the response |
| layer2 | Pointer to the notifier |
Reimplemented from ISDNLayer3.
Set the engine for this management and all Layer 2 children
- Parameters:
-
| eng | Pointer to the engine that will manage this mangement |
Reimplemented from SignallingComponent.
virtual bool initialize |
( |
const NamedList * |
config |
) |
[virtual] |
Configure and initialize Q.921 Management and its children
- Parameters:
-
| config | Optional configuration parameters override |
- Returns:
- True if Q.921 management was initialized properly
Reimplemented from SignallingComponent.
virtual bool multipleFrame |
( |
u_int8_t |
tei, |
|
|
bool |
establish, |
|
|
bool |
force | |
|
) |
| | [virtual] |
Implements Q.921 DL-ESTABLISH and DL-RELEASE request primitives
- Parameters:
-
| tei | This layer TEI (-1 to apply it to all targets this object may have attached) |
| establish | True to establish. False to release |
| force | True to establish even if we already are established. |
- Returns:
- True if the request was accepted
Reimplemented from ISDNLayer2.
virtual void multipleFrameEstablished |
( |
u_int8_t |
tei, |
|
|
bool |
confirm, |
|
|
bool |
timeout, |
|
|
ISDNLayer2 * |
layer2 | |
|
) |
| | [virtual] |
Implements Q.921 DL-ESTABLISH indication/confirmation primitive: 'multiple frame acknowledged' mode established
- Parameters:
-
| tei | This layer TEI |
| confirm | True if this is a confirmation of a previous request, false if it is an indication of state change on remote request |
| timeout | True if the reason is a timeout |
| layer2 | Pointer to the notifier |
Reimplemented from ISDNLayer3.
virtual void multipleFrameReleased |
( |
u_int8_t |
tei, |
|
|
bool |
confirm, |
|
|
bool |
timeout, |
|
|
ISDNLayer2 * |
layer2 | |
|
) |
| | [virtual] |
Implements Q.921 DL-RELEASE indication/confirmation primitive: 'multiple frame acknowledged' mode released
- Parameters:
-
| tei | This layer TEI |
| confirm | True if this is a confirmation of a previous request, false if it is an indication of state change on remote request |
| timeout | True if the reason is a timeout. |
| layer2 | Pointer to the notifier |
Reimplemented from ISDNLayer3.
Process a notification generated by the attached interface
- Parameters:
-
| event | Notification event reported by the interface |
- Returns:
- True if notification was processed
Reimplemented from SignallingReceiver.
void processTeiAssigned |
( |
u_int16_t |
ri, |
|
|
u_int8_t |
ai | |
|
) |
| | [protected] |
Process TEI Assigned message
- Parameters:
-
| ri | The reference number assigned to the ai |
| ai | The TEI value assigned |
void processTeiCheckRequest |
( |
u_int8_t |
ai, |
|
|
bool |
pf | |
|
) |
| | [protected] |
Process TEI Check Request message and send to the NET a message with the TEI and the asociated reference number
- Parameters:
-
| ai | Contains the TEI value to check or 127 to check all TEI values |
| pf | The Poll/Final bit in the incoming frame |
void processTeiCheckResponse |
( |
u_int16_t |
ri, |
|
|
u_int8_t |
ai | |
|
) |
| | [protected] |
Process TEI Check Response message and set the check flag to true to know that we have a response for that TEI
- Parameters:
-
| ri | The associated reference number to the ai |
| ai | The TEI value as received in the answer |
void processTeiDenied |
( |
u_int16_t |
ri |
) |
[protected] |
Process TEI Denied message
- Parameters:
-
| ri | The reference number of the denied request |
bool processTeiManagement |
( |
ISDNFrame * |
frame |
) |
[protected] |
Process UI frames carrying TEI management messages
- Parameters:
-
- Returns:
- False if the frame is not a TEI management one, true otherwise
void processTeiRemove |
( |
u_int8_t |
ai |
) |
[protected] |
Process Tei remove message removing the tei(s) contained by ai
- Parameters:
-
| ai | Contains the TEI value to remove or 127 to remove all TEI values |
void processTeiRequest |
( |
u_int16_t |
ri, |
|
|
u_int8_t |
ai, |
|
|
bool |
pf | |
|
) |
| | [protected] |
Process TEI request message and send back to TE: TEI Assigned message if the request succeeded; TEI Denied message with the received reference number if the reference number is already in use; TEI Denied message with the reference number set to 127 if there is no TEI value available.
- Parameters:
-
| ri | The reference number |
| ai | Action indicator |
| pf | The Poll/Final bit in the incoming frame |
void processTeiVerify |
( |
u_int8_t |
ai, |
|
|
bool |
pf | |
|
) |
| | [protected] |
Process TEI verify
- Parameters:
-
| ai | The TEI value of the message initiator |
| pf | The Poll/Final bit in the incoming frame |
virtual void receiveData |
( |
const DataBlock & |
data, |
|
|
u_int8_t |
tei, |
|
|
ISDNLayer2 * |
layer2 | |
|
) |
| | [virtual] |
Implements Q.921 DL-DATA and DL-UNIT DATA indication primitives Receive data from an encapsulated Layer 2 and send it to the attached Layer 3
- Parameters:
-
| data | Received data |
| tei | The TEI as received in the packet |
| layer2 | Pointer to the sender |
Implements ISDNLayer3.
virtual bool receivedPacket |
( |
const DataBlock & |
packet |
) |
[protected, virtual] |
Process a Signalling Packet received by the interface. Parse the data and send all non-UI frames to the appropriate Layer 2. Process UI frames
- Returns:
- True if message was successfully processed
Implements SignallingReceiver.
virtual bool sendData |
( |
const DataBlock & |
data, |
|
|
u_int8_t |
tei, |
|
|
bool |
ack | |
|
) |
| | [virtual] |
Implements Q.921 DL-DATA and DL-UNIT DATA request primitives
- Parameters:
-
| data | Data to send |
| tei | This layer TEI (-1 for broadcast) |
| ack | True to send an acknowledged frame, false to send an unacknowledged one |
- Returns:
- True if the request was accepted
Reimplemented from ISDNLayer2.
Implements Q.921 send frame to the interface
- Parameters:
-
| frame | The frame to be sent |
| q921 | Pointer to the Q.921 that sends the frame, if any |
- Returns:
- True if the frame was sent
bool sendTeiManagement |
( |
ISDNFrame::TeiManagement |
type, |
|
|
u_int16_t |
ri, |
|
|
u_int8_t |
ai, |
|
|
u_int8_t |
tei = 127 , |
|
|
bool |
pf = false | |
|
) |
| | [protected] |
Send a TEI management frame
- Parameters:
-
| type | Type of the frame to send |
| ri | Reference number to send in frame |
| ai | Action indicator to send in frame |
| tei | The TEI to send the frame to, default use broadcast |
| pf | The Poll/Final bit to set in the frame |
- Returns:
- True if frame was sent successfully
void sendTeiRemove |
( |
|
) |
[protected] |
void sendTeiReq |
( |
u_int8_t |
tei |
) |
[protected] |
Send TEI request message
- Parameters:
-
virtual void timerTick |
( |
const Time & |
when |
) |
[protected, virtual] |
Method called periodically to check timeouts This method is thread safe
- Parameters:
-
| when | Time to use as computing base for events and timeouts |
Reimplemented from SignallingComponent.
The documentation for this class was generated from the following file: