Yate
SignallingDumpable Class Reference

A data dumping capable component. More...

#include <yatesig.h>

Inheritance diagram for SignallingDumpable:
ISDNQ921 ISDNQ921Management ISDNQ921Passive ISDNQ931 SS7MTP2 SS7MTP3

Public Member Functions

 ~SignallingDumpable ()
 

Protected Member Functions

 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)
 

Detailed Description

A data dumping capable component.

A generic base class for components capable of creating data dumps

Constructor & Destructor Documentation

◆ ~SignallingDumpable()

~SignallingDumpable ( )
inline

Destructor - destroys the data dumper

References setDumper().

◆ SignallingDumpable()

SignallingDumpable ( SignallingDumper::Type type,
bool network = false )
inlineprotected

Constructor

Parameters
typeDefault type of the data dumper
networkTrue if we are the network side of the link

Member Function Documentation

◆ control()

bool control ( NamedList & params,
SignallingComponent * owner = 0 )
protected

Handle dumper related control on behalf of the owning component

Parameters
paramsControl parameters to handle
ownerOptional owning component
Returns
True if control operation was applied

◆ dump() [1/2]

bool dump ( const DataBlock & data,
bool sent = false,
int link = 0 )
inlineprotected

Dump data if the dumper is valid

Parameters
dataBuffer to dump
sentTrue if data is being sent, false if is being received
linkLink number (relevant to MTP2 only)
Returns
True if the data was dumped successfully

References DataBlock::data(), dump(), and DataBlock::length().

◆ dump() [2/2]

bool dump ( void * buf,
unsigned int len,
bool sent = false,
int link = 0 )
inlineprotected

Dump the provided data if the dumper is valid

Parameters
bufPointer to buffer to dump
lenLength of the data
sentTrue if data is being sent, false if is being received
linkLink number (relevant to MTP2 only)
Returns
True if the data was dumped successfully

Referenced by dump().

◆ setDumper() [1/2]

bool setDumper ( const String & name,
bool create = true,
bool append = false )
protected

Set or remove a file data dumper

Parameters
nameName of the file to dump to, empty to remove dumper
createTrue to create the file if doesn't exist
appendAppend to an existing file. If false and the file already exists, it will be truncated
Returns
True if the file dumper was created or removed

◆ setDumper() [2/2]

void setDumper ( SignallingDumper * dumper = 0)
protected

Set or remove the data dumper

Parameters
dumperPointer to the data dumper object, 0 to remove

Referenced by ~SignallingDumpable().

◆ setDumpNetwork()

void setDumpNetwork ( bool network)
inlineprotected

Set the dump network side flag

Parameters
networkTrue to dump as network side, false othervise

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