SignallingDumper Class Reference

A generic data dumper. More...

#include <yatesig.h>

List of all members.

Public Types

enum  Type { Hexa, Hdlc, Mtp2, Mtp3 }

Public Member Functions

 SignallingDumper (Type type=Hexa)
 ~SignallingDumper ()
Type type () const
bool active () const
void terminate ()
void setStream (Stream *stream=0)
bool dump (void *buf, unsigned int len, bool sent=false, int link=0)
bool dump (const DataBlock &data, bool sent=false, int link=0)

Static Public Member Functions

static SignallingDumpercreate (DebugEnabler *dbg, const char *filename, Type type, bool create=true, bool append=false)


Detailed Description

A generic data dumper.

This class is a generic data dumper with libpcap compatibility


Member Enumeration Documentation

enum Type

Type of dumper output


Constructor & Destructor Documentation

SignallingDumper ( Type  type = Hexa  ) 

Constructor

Parameters:
type Type of the output desired

~SignallingDumper (  ) 

Destructor, closes the output


Member Function Documentation

bool active (  )  const

Check if the dumper is active

Returns:
True if the object will actually send data to something

static SignallingDumper* create ( DebugEnabler dbg,
const char *  filename,
Type  type,
bool  create = true,
bool  append = false 
) [static]

Create a file to dump data in it. The file is opened/created in write only, binary mode

Parameters:
dbg DebugEnabler requesting the operation (used for debug message on failure)
filename The file name to use
type The dumper type
create True to create the file if doesn't exist
append Append to an existing file. If false and the file already exists, it will be truncated
Returns:
SignallingDumper pointer on success, 0 on failure

bool dump ( const DataBlock data,
bool  sent = false,
int  link = 0 
) [inline]

Dump the provided data

Parameters:
data Buffer to dump
sent True if data is being sent, false if is being received
link Link number (relevant to MTP2 only)
Returns:
True if the data was dumped successfully

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

Referenced by SignallingDumper::dump().

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

Dump the provided data

Parameters:
buf Pointer to buffer to dump
len Length of the data
sent True if data is being sent, false if is being received
link Link number (relevant to MTP2 only)
Returns:
True if the data was dumped successfully

void setStream ( Stream stream = 0  ) 

Set a new output stream

Parameters:
stream New stream for output, NULL to terminate

void terminate (  ) 

Terminate the dump session, close the output

Type type (  )  const [inline]

Get the type of the dumper

Returns:
Type of the dumper object


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

Generated on Sun Dec 7 21:36:13 2008 for Yate by  doxygen 1.5.7.1