Yate
ISDNQ921Management Class Reference

ISDN Layer 2 BRI TEI management or PRI with D-channel(s) backup. More...

#include <yatesig.h>

Inheritance diagram for ISDNQ921Management:
ISDNLayer2 ISDNLayer3 SignallingReceiver SignallingDumpable SignallingComponent SignallingComponent SignallingComponent RefObject DebugEnabler RefObject DebugEnabler RefObject DebugEnabler GenObject GenObject GenObject

Public Member Functions

 ISDNQ921Management (const NamedList &params, 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)
 
- Public Member Functions inherited from ISDNLayer2
virtual ~ISDNLayer2 ()
 
ISDNLayer3layer3 () const
 
State state () const
 
bool network () const
 
bool detectType () const
 
u_int8_t localSapi () const
 
u_int8_t localTei () const
 
u_int32_t maxUserData () const
 
bool teiAssigned () const
 
bool autoRestart () const
 
unsigned int upTime () const
 
virtual void attach (ISDNLayer3 *layer3)
 
- Public Member Functions inherited from SignallingComponent
virtual ~SignallingComponent ()
 
virtual const StringtoString () const
 
virtual bool control (NamedList &params)
 
virtual NamedListcontrolCreate (const char *oper=0)
 
virtual bool controlExecute (NamedList *params)
 
SignallingEngineengine () const
 
int debugLevel (int level)
 
const StringcomponentType () const
 
- Public Member Functions inherited from RefObject
 RefObject ()
 
virtual ~RefObject ()
 
virtual void * getObject (const String &name) const
 
virtual bool alive () const
 
bool ref ()
 
bool deref ()
 
int refcount () const
 
virtual void destruct ()
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from DebugEnabler
 DebugEnabler (int level=TelEngine::debugLevel(), bool enabled=true)
 
int debugLevel () const
 
int debugLevel (int level)
 
bool debugEnabled () const
 
void debugEnabled (bool enable)
 
const char * debugName () const
 
bool debugAt (int level) const
 
bool debugChained () const
 
void debugChain (const DebugEnabler *chain=0)
 
void debugCopy (const DebugEnabler *original=0)
 
- Public Member Functions inherited from ISDNLayer3
virtual void idleTimeout (ISDNLayer2 *layer2)
 
virtual ISDNLayer2attach (ISDNLayer2 *layer2)
 
- Public Member Functions inherited from SignallingReceiver
 SignallingReceiver (const char *name=0)
 
virtual ~SignallingReceiver ()
 
virtual SignallingInterfaceattach (SignallingInterface *iface)
 
SignallingInterfaceiface () const
 
bool control (SignallingInterface::Operation oper, NamedList *params=0)
 
- Public Member Functions inherited from SignallingDumpable
 ~SignallingDumpable ()
 

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 ()
 
- Protected Member Functions inherited from ISDNLayer2
 ISDNLayer2 (const NamedList &params, const char *name=0, u_int8_t tei=0)
 
Mutexl2Mutex ()
 
void multipleFrameEstablished (u_int8_t tei, bool confirm, bool timeout)
 
void multipleFrameReleased (u_int8_t tei, bool confirm, bool timeout)
 
void dataLinkState (u_int8_t tei, bool cmd, bool value)
 
void idleTimeout ()
 
void receiveData (const DataBlock &data, u_int8_t tei)
 
void teiAssigned (bool status)
 
void changeState (State newState, const char *reason=0)
 
bool changeType ()
 
void autoRestart (bool restart)
 
void setRi (u_int16_t ri)
 
ISDNFrameparsePacket (const DataBlock &packet)
 
- Protected Member Functions inherited from SignallingComponent
 SignallingComponent (const char *name=0, const NamedList *params=0, const char *type="unknown")
 
virtual void destroyed ()
 
void insert (SignallingComponent *component)
 
virtual void detach ()
 
void setName (const char *name)
 
void setCompType (const char *type)
 
unsigned long tickSleep (unsigned long usec=1000000) const
 
- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 
- Protected Member Functions inherited from DebugEnabler
void debugName (const char *name)
 
- Protected Member Functions inherited from ISDNLayer3
 ISDNLayer3 (const char *name=0)
 
Mutexl3Mutex ()
 
- Protected Member Functions inherited from SignallingReceiver
bool transmitPacket (const DataBlock &packet, bool repeat, SignallingInterface::PacketType type=SignallingInterface::Unknown)
 
- Protected Member Functions inherited from SignallingDumpable
 SignallingDumpable (SignallingDumper::Type type, bool network=false)
 
bool dump (void *buf, unsigned int len, bool sent=false, int link=0)
 
bool dump (const DataBlock &data, bool sent=false, int link=0)
 
void setDumpNetwork (bool network)
 
void setDumper (SignallingDumper *dumper=0)
 
bool setDumper (const String &name, bool create=true, bool append=false)
 
bool control (NamedList &params, SignallingComponent *owner=0)
 

Additional Inherited Members

- Public Types inherited from ISDNLayer2
enum  State { Released , WaitEstablish , Established , WaitRelease }
 
- Static Public Member Functions inherited from ISDNLayer2
static const char * stateName (State s)
 
- Static Public Member Functions inherited from SignallingComponent
static bool resolveConfig (const String &cmpName, NamedList &params, const NamedList *config)
 
- Static Public Member Functions inherited from RefObject
static bool alive (const RefObject *obj)
 
static bool efficientIncDec ()
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

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

◆ ISDNQ921Management()

ISDNQ921Management ( const NamedList & params,
const char * name = 0,
bool net = true )

Constructor - initialize this Layer 2 and the component

Parameters
paramsLayer's parameters
nameOptional name of the component
netTrue if managing the network side of Q.921

◆ ~ISDNQ921Management()

virtual ~ISDNQ921Management ( )
virtual

Destructor

Member Function Documentation

◆ cleanup()

virtual void cleanup ( )
virtual

Emergency release. Cleanup all Layer 2 objects attached to this Management

Implements ISDNLayer2.

◆ dataLinkState()

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
teiThis layer TEI
cmdTrue if received a command, false if received a response
valueThe 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
layer2Pointer to the notifier

Reimplemented from ISDNLayer3.

References ISDNLayer2::ISDNLayer2().

◆ engine()

virtual void engine ( SignallingEngine * eng)
virtual

Set the engine for this management and all Layer 2 children

Parameters
engPointer to the engine that will manage this mangement

Reimplemented from SignallingComponent.

◆ initialize()

virtual bool initialize ( const NamedList * config)
virtual

Configure and initialize Q.921 Management and its children

Parameters
configOptional configuration parameters override
Returns
True if Q.921 management was initialized properly

Reimplemented from SignallingComponent.

◆ multipleFrame()

virtual bool multipleFrame ( u_int8_t tei,
bool establish,
bool force )
virtual

Implements Q.921 DL-ESTABLISH and DL-RELEASE request primitives

Parameters
teiThis layer TEI (-1 to apply it to all targets this object may have attached)
establishTrue to establish. False to release
forceTrue to establish even if we already are established.
Returns
True if the request was accepted

Reimplemented from ISDNLayer2.

◆ multipleFrameEstablished()

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
teiThis layer TEI
confirmTrue if this is a confirmation of a previous request, false if it is an indication of state change on remote request
timeoutTrue if the reason is a timeout
layer2Pointer to the notifier

Reimplemented from ISDNLayer3.

References ISDNLayer2::ISDNLayer2().

◆ multipleFrameReleased()

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
teiThis layer TEI
confirmTrue if this is a confirmation of a previous request, false if it is an indication of state change on remote request
timeoutTrue if the reason is a timeout.
layer2Pointer to the notifier

Reimplemented from ISDNLayer3.

References ISDNLayer2::ISDNLayer2().

◆ notify()

virtual bool notify ( SignallingInterface::Notification event)
protectedvirtual

Process a notification generated by the attached interface

Parameters
eventNotification event reported by the interface
Returns
True if notification was processed

Reimplemented from SignallingReceiver.

◆ processTeiAssigned()

void processTeiAssigned ( u_int16_t ri,
u_int8_t ai )
protected

Process TEI Assigned message

Parameters
riThe reference number assigned to the ai
aiThe TEI value assigned

◆ processTeiCheckRequest()

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
aiContains the TEI value to check or 127 to check all TEI values
pfThe Poll/Final bit in the incoming frame

◆ processTeiCheckResponse()

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
riThe associated reference number to the ai
aiThe TEI value as received in the answer

◆ processTeiDenied()

void processTeiDenied ( u_int16_t ri)
protected

Process TEI Denied message

Parameters
riThe reference number of the denied request

◆ processTeiManagement()

bool processTeiManagement ( ISDNFrame * frame)
protected

Process UI frames carrying TEI management messages

Parameters
frameThe parsed frame
Returns
False if the frame is not a TEI management one, true otherwise

◆ processTeiRemove()

void processTeiRemove ( u_int8_t ai)
protected

Process Tei remove message removing the tei(s) contained by ai

Parameters
aiContains the TEI value to remove or 127 to remove all TEI values

◆ processTeiRequest()

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
riThe reference number
aiAction indicator
pfThe Poll/Final bit in the incoming frame

◆ processTeiVerify()

void processTeiVerify ( u_int8_t ai,
bool pf )
protected

Process TEI verify

Parameters
aiThe TEI value of the message initiator
pfThe Poll/Final bit in the incoming frame

◆ receiveData()

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
dataReceived data
teiThe TEI as received in the packet
layer2Pointer to the sender

Implements ISDNLayer3.

References ISDNLayer2::ISDNLayer2().

◆ receivedPacket()

virtual bool receivedPacket ( const DataBlock & packet)
protectedvirtual

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.

◆ sendData()

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
dataData to send
teiThis layer TEI (-1 for broadcast)
ackTrue to send an acknowledged frame, false to send an unacknowledged one
Returns
True if the request was accepted

Reimplemented from ISDNLayer2.

◆ sendFrame()

bool sendFrame ( const ISDNFrame * frame,
const ISDNQ921 * q921 = 0 )

Implements Q.921 send frame to the interface

Parameters
frameThe frame to be sent
q921Pointer to the Q.921 that sends the frame, if any
Returns
True if the frame was sent

◆ sendTeiManagement()

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
typeType of the frame to send
riReference number to send in frame
aiAction indicator to send in frame
teiThe TEI to send the frame to, default use broadcast
pfThe Poll/Final bit to set in the frame
Returns
True if frame was sent successfully

◆ sendTeiRemove()

void sendTeiRemove ( )
protected

Send a TEI remove frame

◆ sendTeiReq()

void sendTeiReq ( u_int8_t tei)
protected

Send TEI request message

Parameters
teiTEI value to assign

◆ timerTick()

virtual void timerTick ( const Time & when)
protectedvirtual

Method called periodically to check timeouts This method is thread safe

Parameters
whenTime to use as computing base for events and timeouts

Reimplemented from SignallingComponent.


The documentation for this class was generated from the following file: