Yate
SignallingInterface Class Referenceabstract

Abstract digital signalling interface (hardware access) More...

#include <yatesig.h>

Inheritance diagram for SignallingInterface:
SignallingComponent RefObject DebugEnabler GenObject

Public Types

enum  Operation {
  Specific = 0 , EnableTx = 0x01 , EnableRx = 0x02 , Enable = 0x03 ,
  DisableTx = 0x04 , DisableRx = 0x08 , Disable = 0x0c , FlushTx = 0x10 ,
  FlushRx = 0x20 , Flush = 0x30 , QueryTx = 0x40 , QueryRx = 0x80 ,
  Query = 0xc0
}
 
enum  Notification {
  LinkUp = 0 , LinkDown , HardwareError , TxClockError ,
  RxClockError , AlignError , CksumError , TxOversize ,
  RxOversize , TxOverflow , RxOverflow , TxUnderrun ,
  RxUnderrun
}
 
enum  PacketType {
  Unknown = 0 , SS7Fisu , SS7Lssu , SS7Msu ,
  Q921
}
 

Public Member Functions

 SignallingInterface ()
 
virtual ~SignallingInterface ()
 
virtual void attach (SignallingReceiver *receiver)
 
SignallingReceiverreceiver () const
 
virtual bool control (Operation oper, NamedList *params=0)
 
- Public Member Functions inherited from SignallingComponent
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 Attributes

static const TokenDict s_notifName []
 

Protected Member Functions

virtual bool transmitPacket (const DataBlock &packet, bool repeat, PacketType type)=0
 
bool receivedPacket (const DataBlock &packet)
 
bool notify (Notification event)
 
- 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 ()
 
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 SignallingReceiver
 

Additional Inherited Members

- 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

Abstract digital signalling interface (hardware access)

An interface to an abstraction of a Layer 1 (hardware HDLC) interface

Member Enumeration Documentation

◆ Notification

Interface generated notifications

◆ Operation

enum Operation

Interface control operations

◆ PacketType

enum PacketType

Packet types

Constructor & Destructor Documentation

◆ SignallingInterface()

SignallingInterface ( )
inline

Constructor

◆ ~SignallingInterface()

virtual ~SignallingInterface ( )
virtual

Destructor, stops and detaches the interface

Member Function Documentation

◆ attach()

virtual void attach ( SignallingReceiver * receiver)
virtual

Attach a receiver to the interface. Detach from the old one if valid

Parameters
receiverPointer to receiver to attach

References receiver().

◆ control()

virtual bool control ( Operation oper,
NamedList * params = 0 )
virtual

Execute a control operation. Operations can enable, disable or flush the transmitter, receiver or both. The status (enabled/disabled) can be queried and also interface-specific operations can be executed.

Parameters
operOperation to execute
paramsOptional parameters for the operation
Returns
True if the command completed successfully, for query operations also indicates the interface is enabled and operational

◆ notify()

bool notify ( Notification event)
protected

Generate a notification event to the attached receiver

Parameters
eventNotification event to be reported
Returns
True if notification was accepted by the receiver

◆ receivedPacket()

bool receivedPacket ( const DataBlock & packet)
protected

Push a valid received Signalling Packet up the protocol stack. The starting and ending flags and any CRC are not part of the data.

Returns
True if packet was successfully delivered to the receiver

◆ receiver()

SignallingReceiver * receiver ( ) const
inline

Retrieve the signalling receiver attached to this interface

Returns
Pointer to attached receiver, NULL if none

Referenced by attach().

◆ transmitPacket()

virtual bool transmitPacket ( const DataBlock & packet,
bool repeat,
PacketType type )
protectedpure virtual

Transmit a packet over the hardware interface

Parameters
packetPacket data to send
repeatContinuously send a copy of the packet while no other data is available for transmission
typeType of the packet to send
Returns
True if the interface accepted the packet

Member Data Documentation

◆ s_notifName

const TokenDict s_notifName[]
static

Keeps the names associated with the notifications


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