Yate
SignallingComponent Class Reference

Abstract signalling component that can be managed by the engine. More...

#include <yatesig.h>

Inheritance diagram for SignallingComponent:
RefObject DebugEnabler GenObject GTT ISDNLayer2 ISDNLayer3 SCCP SCCPManagement SCCPUser SIGAdaptation SIGTransport SS7L2User SS7L3User SS7Layer2 SS7Layer3 SignallingCircuitGroup SignallingCircuitSpan SignallingInterface SignallingReceiver TCAPUser

Public Member Functions

virtual ~SignallingComponent ()
 
virtual const StringtoString () const
 
virtual bool initialize (const NamedList *config)
 
virtual bool control (NamedList &params)
 
virtual NamedListcontrolCreate (const char *oper=0)
 
virtual bool controlExecute (NamedList *params)
 
virtual void engine (SignallingEngine *eng)
 
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)
 

Static Public Member Functions

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 ()
 

Protected Member Functions

 SignallingComponent (const char *name=0, const NamedList *params=0, const char *type="unknown")
 
virtual void destroyed ()
 
void insert (SignallingComponent *component)
 
virtual void detach ()
 
virtual void timerTick (const Time &when)
 
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)
 

Friends

class SignallingEngine
 

Detailed Description

Abstract signalling component that can be managed by the engine.

Interface to an abstract signalling component that is managed by an engine. The engine will periodically poll each component to keep them alive.

Constructor & Destructor Documentation

◆ ~SignallingComponent()

virtual ~SignallingComponent ( )
virtual

Destructor, detaches the engine and other components

◆ SignallingComponent()

SignallingComponent ( const char * name = 0,
const NamedList * params = 0,
const char * type = "unknown" )
protected

Constructor with a default empty component name

Parameters
nameName of this component
paramsOptional pointer to creation parameters
typeDefault component type string

Referenced by insert(), ISDNLayer3::ISDNLayer3(), and SIGTransport::SIGTransport().

Member Function Documentation

◆ componentType()

const String & componentType ( ) const
inline

Return the type of this component

Returns
A string version of the component type

◆ control()

virtual bool control ( NamedList & params)
virtual

Query or modify component's settings or operational parameters

Parameters
paramsThe list of parameters to query or change
Returns
True if the control operation was executed

Reimplemented in SS7ISUP, SS7Layer2, SS7M2PA, SS7Management, SS7MTP3, SS7Router, SS7SCCP, and SS7Testing.

◆ controlCreate()

virtual NamedList * controlCreate ( const char * oper = 0)
virtual

Create a parameter list adequate to control this component

Parameters
operOptional name of the operation to execute
Returns
A new parameter list or descendant object, NULL if not supported

◆ controlExecute()

virtual bool controlExecute ( NamedList * params)
virtual

Execute or postpone a control command

Parameters
paramsParameter list describing the command, will be destroyed
Returns
True if the command was accepted (but not necessarily executed)

◆ debugLevel()

int debugLevel ( int level)
inline

Conditionally set the debug level of the component

Parameters
levelDesired debug level, negative for no change
Returns
Current debug level

References DebugEnabler::debugLevel().

◆ destroyed()

virtual void destroyed ( )
protectedvirtual

This method is called to clean up and destroy the object after the reference counter becomes zero

Reimplemented from RefObject.

Reimplemented in AnalogLineGroup, GTT, ISDNQ921, ISDNQ921Passive, ISDNQ931, ISDNQ931Monitor, SCCPUser, SignallingCircuitGroup, SS7ISUP, SS7Layer4, SS7M2PA, SS7MTP2, SS7MTP3, SS7Router, SS7SCCP, and TCAPUser.

Referenced by ISDNQ921::destroyed(), ISDNQ921Passive::destroyed(), SignallingCircuitGroup::destroyed(), and SS7MTP2::destroyed().

◆ detach()

virtual void detach ( )
protectedvirtual

Detach this component from all its links - components and engine. Reimplement this method in all components that keep pointers to other components. The default implementation detaches from the engine.

◆ engine() [1/2]

SignallingEngine * engine ( ) const
inline

Get the TelEngine::SignallingEngine that manages this component

Returns
Pointer to engine or NULL if not managed by an engine

◆ engine() [2/2]

virtual void engine ( SignallingEngine * eng)
virtual

Set the TelEngine::SignallingEngine that manages this component and any subcomponent of it

Parameters
engPointer to the engine that will manage this component

Reimplemented in ISDNQ921Management.

◆ initialize()

virtual bool initialize ( const NamedList * config)
virtual

Configure and initialize the component and any subcomponents it may have

Parameters
configOptional configuration parameters override
Returns
True if the component was initialized properly

Reimplemented in GTT, ISDNIUA, ISDNQ921, ISDNQ921Management, ISDNQ921Passive, ISDNQ931, ISDNQ931Monitor, SCCPManagement, SCCPUser, SIGAdaptation, SIGTransport, SS7ISUP, SS7Layer3, SS7Layer4, SS7M2PA, SS7M2UA, SS7MTP2, SS7MTP3, SS7Router, SS7SCCP, SS7TCAP, and SS7Testing.

◆ insert()

void insert ( SignallingComponent * component)
protected

Insert another component in the same engine as this one. This method should be called for every component we attach.

Parameters
componentPointer to component to insert in engine

References SignallingComponent().

◆ resolveConfig()

static bool resolveConfig ( const String & cmpName,
NamedList & params,
const NamedList * config )
static

Choose parameters that should be used for object initialization

Parameters
cmpNameThe name of the parameter holding the component name
paramsThe list of parameters used to initialize the component
configThe received list of parameters
Returns
True if the config was resolved

◆ setCompType()

void setCompType ( const char * type)
inlineprotected

Change the type of the component after it was constructed

Parameters
typeType of this component

◆ setName()

void setName ( const char * name)
protected

Change the name of the component after it was constructed

Parameters
nameName of this component

◆ tickSleep()

unsigned long tickSleep ( unsigned long usec = 1000000) const
protected

Adjust (decrease only) the desired maximum time until next tick. Can be called only from within timerTick()

Parameters
usecDesired time until next engine's timerTick() call in usec
Returns
Timer sleep in usec after applying the current change

◆ timerTick()

virtual void timerTick ( const Time & when)
protectedvirtual

Method called periodically by the engine to keep everything alive

Parameters
whenTime to use as computing base for events and timeouts

Reimplemented in ISDNQ921, ISDNQ921Management, ISDNQ921Passive, ISDNQ931, ISDNQ931Monitor, SCCPManagement, SIGAdaptation, SS7ISUP, SS7Layer2, SS7M2PA, SS7M2UA, SS7Management, SS7MTP2, SS7MTP3, SS7Router, SS7SCCP, SS7TCAP, and SS7Testing.

◆ toString()

virtual const String & toString ( ) const
virtual

Get the component's name so it can be used for list searches

Returns
A reference to the name by which the component is known to engine

Reimplemented from GenObject.


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