Yate
ISDNQ931Call Class Reference

A Q.931 ISDN call. More...

#include <yatesig.h>

Inheritance diagram for ISDNQ931Call:
ISDNQ931State SignallingCall RefObject Mutex GenObject Lockable

Public Member Functions

virtual ~ISDNQ931Call ()
 
u_int32_t callRef () const
 
u_int32_t callRefLen () const
 
u_int8_t callTei () const
 
SignallingCircuitcircuit ()
 
void setTerminate (bool destroy, const char *reason)
 
virtual bool sendEvent (SignallingEvent *event)
 
virtual SignallingEventgetEvent (const Time &when)
 
void dataLinkState (bool up)
 
virtual void * getObject (const String &name) const
 
- Public Member Functions inherited from ISDNQ931State
 ISDNQ931State ()
 
State state () const
 
- Public Member Functions inherited from SignallingCall
 SignallingCall (SignallingCallControl *controller, bool outgoing, bool signalOnly=false)
 
virtual ~SignallingCall ()
 
bool outgoing () const
 
SignallingCallControlcontroller () const
 
void userdata (void *data)
 
void * userdata () const
 
bool signalOnly () const
 
bool overlapDialing () const
 
virtual void eventTerminated (SignallingEvent *event)
 
- Public Member Functions inherited from RefObject
 RefObject ()
 
virtual ~RefObject ()
 
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 StringtoString () const
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from Mutex
 Mutex (bool recursive=false, const char *name=0)
 
 Mutex (const Mutex &original)
 
 ~Mutex ()
 
Mutexoperator= (const Mutex &original)
 
virtual bool lock (long maxwait=-1)
 
virtual bool unlock ()
 
virtual bool locked () const
 
const char * owner () const
 
bool recursive () const
 
- Public Member Functions inherited from Lockable
virtual ~Lockable ()
 
virtual bool check (long maxwait=-1)
 
virtual bool unlockAll ()
 

Protected Member Functions

 ISDNQ931Call (ISDNQ931 *controller, bool outgoing, u_int32_t callRef, u_int8_t callRefLen, u_int8_t tei=0)
 
SignallingEventreleaseComplete (const char *reason=0, const char *diag=0)
 
SignallingEventgetCircuitEvent (const Time &when)
 
- Protected Member Functions inherited from ISDNQ931State
bool checkStateRecv (int type, bool *retrans)
 
bool checkStateSend (int type)
 
- Protected Member Functions inherited from SignallingCall
void enqueue (SignallingMessage *msg)
 
SignallingMessagedequeue (bool remove=true)
 
void clearQueue ()
 
- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 
virtual void destroyed ()
 

Friends

class ISDNQ931
 

Additional Inherited Members

- Public Types inherited from ISDNQ931State
enum  State {
  Null = 0x00 , CallInitiated = 0x01 , OverlapSend = 0x02 , OutgoingProceeding = 0x03 ,
  CallDelivered = 0x04 , CallPresent = 0x06 , CallReceived = 0x07 , ConnectReq = 0x08 ,
  IncomingProceeding = 0x09 , Active = 0x0a , DisconnectReq = 0x0b , DisconnectIndication = 0x0c ,
  SuspendReq = 0x0f , ResumeReq = 0x11 , ReleaseReq = 0x13 , CallAbort = 0x16 ,
  OverlapRecv = 0x19 , RestartReq = 0x3d , Restart = 0x3e
}
 
- Static Public Member Functions inherited from ISDNQ931State
static const char * stateName (u_int8_t s)
 
- 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 ()
 
- Static Public Member Functions inherited from Mutex
static int count ()
 
static int locks ()
 
static bool efficientTimedLock ()
 
- Static Public Member Functions inherited from Lockable
static void wait (unsigned long maxwait)
 
static unsigned long wait ()
 
static void startUsingNow ()
 
static void enableSafety (bool safe=true)
 
static bool safety ()
 
- Static Public Attributes inherited from ISDNQ931State
static const TokenDict s_states []
 
- Protected Attributes inherited from ISDNQ931State
State m_state
 
- Protected Attributes inherited from SignallingCall
SignallingEventm_lastEvent
 
bool m_overlap
 

Detailed Description

A Q.931 ISDN call.

Q.931 ISDN call

Constructor & Destructor Documentation

◆ ~ISDNQ931Call()

virtual ~ISDNQ931Call ( )
virtual

Destructor

◆ ISDNQ931Call()

ISDNQ931Call ( ISDNQ931 * controller,
bool outgoing,
u_int32_t callRef,
u_int8_t callRefLen,
u_int8_t tei = 0 )
protected

Constructor

Parameters
controllerThe call controller
outgoingThe call direction
callRefThe call reference
callRefLenThe call reference length in bytes
teiThe Terminal Equipment Identifier used in this call

References callRef(), callRefLen(), SignallingCall::controller(), and SignallingCall::outgoing().

Member Function Documentation

◆ callRef()

u_int32_t callRef ( ) const
inline

Get the id of this call

Returns
The call reference

Referenced by ISDNQ931Call().

◆ callRefLen()

u_int32_t callRefLen ( ) const
inline

Get the length of the call reference

Returns
The length of the call reference

Referenced by ISDNQ931Call().

◆ callTei()

u_int8_t callTei ( ) const
inline

Get the Terminal Equipment Indicator for this call

Returns
Value of TEI used in this call

◆ circuit()

SignallingCircuit * circuit ( )
inline

Get the circuit this call had reserved

Returns
The circuit reserved by this call

◆ dataLinkState()

void dataLinkState ( bool up)

Data link (interface) state notification This method is thread safe

Parameters
upThe data link state

◆ getCircuitEvent()

SignallingEvent * getCircuitEvent ( const Time & when)
protected

Get an event from the circuit reserved for this call

Parameters
whenThe current time
Returns
SignallingEvent pointer or 0 if no events

◆ getEvent()

virtual SignallingEvent * getEvent ( const Time & when)
virtual

Get an event from this call This method is thread safe

Parameters
whenThe current time
Returns
SignallingEvent pointer or 0 if no events

Implements SignallingCall.

◆ getObject()

virtual void * getObject ( const String & name) const
virtual

Get a pointer to a data member or this call

Parameters
nameObject name
Returns
The requested pointer or 0 if not exists

Reimplemented from RefObject.

◆ releaseComplete()

SignallingEvent * releaseComplete ( const char * reason = 0,
const char * diag = 0 )
protected

Send RELEASE COMPLETE if not in Null state. Clear all call data. Remove from controller's queue. Decrease the object's refence count

Parameters
reasonOptional release reason. If missing, the last reason is used
diagOptional hexified string for the cause diagnostic
Returns
Pointer to an SignallingEvent of type Release, with no message

◆ sendEvent()

virtual bool sendEvent ( SignallingEvent * event)
virtual

Send an event to this call This method is thread safe

Parameters
eventThe sent event
Returns
True if the operation succedded

Reimplemented from SignallingCall.

◆ setTerminate()

void setTerminate ( bool destroy,
const char * reason )

Set termination (and destroy) flags This method is thread safe

Parameters
destroyThe destroy flag. If true, the call will be destroyed
reasonTerminate reason

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