DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Protected Member Functions | Protected Attributes | Friends

Interface for implementing any kind of data output. More...

#include <dabc/DataIO.h>

Inheritance diagram for dabc::DataOutput:
aqua::ClientOutput dabc::BlockingOutput dabc::FileOutput mbs::ServerOutputAddon dabc::BinaryFileOutput hadaq::HldOutput mbs::LmdOutput

Public Member Functions

virtual std::string ProvideInfo ()
 Method can be used to get debug info about output. More...
 
void SetInfoParName (const std::string &name)
 Methods set parameter name, which could be used for debug output. More...
 
virtual unsigned Write_Buffer (Buffer &buf)
 Start writing of buffer to output. More...
 
virtual unsigned Write_Check ()
 Check if output can be done. More...
 
virtual unsigned Write_Complete ()
 Complete writing of the buffer. More...
 
virtual void Write_Flush ()
 Flush output object, called when buffer with EOL type is appeared. More...
 
virtual bool Write_Init ()
 This is generic virtual method to initialize output before real work is started. More...
 
virtual bool Write_Restart (dabc::Command cmd)
 Method used to restart output - like recreate new output file. More...
 
virtual bool Write_Retry ()
 Returns true if output object can be reinitialized for recover error. More...
 
virtual bool Write_Stat (dabc::Command cmd)
 Fill different statistic parameters into provided command. More...
 
virtual double Write_Timeout ()
 Timeout in seconds for write operation. More...
 
bool WriteBuffer (Buffer &buf)
 Write buffer to the output. More...
 
virtual ~DataOutput ()
 

Protected Member Functions

 DataOutput (const dabc::Url &url)
 
void ShowInfo (int lvl, const std::string &info)
 
virtual WorkerAddonWrite_GetAddon ()
 Returns addon, provided by data output If specified, supposed that I/O object is double-derived from DataOutput and Addon. More...
 

Protected Attributes

std::string fInfoName
 

Friends

class OutputTransport
 

Detailed Description

Interface for implementing any kind of data output.

Definition at line 158 of file DataIO.h.

Constructor & Destructor Documentation

◆ DataOutput()

dabc::DataOutput::DataOutput ( const dabc::Url url)
protected

Definition at line 50 of file DataIO.cxx.

◆ ~DataOutput()

virtual dabc::DataOutput::~DataOutput ( )
inlinevirtual

Definition at line 175 of file DataIO.h.

Member Function Documentation

◆ Write_GetAddon()

virtual WorkerAddon* dabc::DataOutput::Write_GetAddon ( )
inlineprotectedvirtual

Returns addon, provided by data output If specified, supposed that I/O object is double-derived from DataOutput and Addon.

Reimplemented in mbs::ServerOutputAddon, and aqua::ClientOutput.

Definition at line 169 of file DataIO.h.

◆ ShowInfo()

void dabc::DataOutput::ShowInfo ( int  lvl,
const std::string &  info 
)
protected

Definition at line 61 of file DataIO.cxx.

◆ SetInfoParName()

void dabc::DataOutput::SetInfoParName ( const std::string &  name)

Methods set parameter name, which could be used for debug output.

Definition at line 55 of file DataIO.cxx.

◆ ProvideInfo()

virtual std::string dabc::DataOutput::ProvideInfo ( )
inlinevirtual

Method can be used to get debug info about output.

Reimplemented in dabc::FileOutput.

Definition at line 181 of file DataIO.h.

◆ Write_Init()

virtual bool dabc::DataOutput::Write_Init ( )
inlinevirtual

This is generic virtual method to initialize output before real work is started.

If returns false, object is immediately deleted

Reimplemented in mbs::LmdOutput, hadaq::HldOutput, aqua::ClientOutput, dabc::FileOutput, and dabc::BinaryFileOutput.

Definition at line 186 of file DataIO.h.

◆ Write_Check()

virtual unsigned dabc::DataOutput::Write_Check ( )
inlinevirtual

Check if output can be done.

Return values: do_Ok - object is ready to write next buffer do_Error - error do_Skip - skip current buffer do_Repeat - repeat operation as soon as possible do_RepeatTimeOut - repeat operation after timeout do_Close - output is closed and need to be destroyed

Reimplemented in mbs::ServerOutputAddon, and aqua::ClientOutput.

Definition at line 196 of file DataIO.h.

◆ Write_Buffer()

virtual unsigned dabc::DataOutput::Write_Buffer ( Buffer buf)
inlinevirtual

Start writing of buffer to output.

Return values: do_Ok - operation is started, Write_Complete() must be called do_Error - error do_Skip - buffer must be skipped do_Close - output is closed

Reimplemented in mbs::ServerOutputAddon, mbs::LmdOutput, hadaq::HldOutput, aqua::ClientOutput, dabc::BlockingOutput, and dabc::BinaryFileOutput.

Definition at line 204 of file DataIO.h.

◆ Write_Complete()

virtual unsigned dabc::DataOutput::Write_Complete ( )
inlinevirtual

Complete writing of the buffer.

Return values: do_Ok - writing is done do_Error - error do_Close - output is closed

Reimplemented in aqua::ClientOutput.

Definition at line 211 of file DataIO.h.

◆ Write_Timeout()

virtual double dabc::DataOutput::Write_Timeout ( )
inlinevirtual

Timeout in seconds for write operation.

Should be used when any of Write_ operation return do_RepeatTimeOut

Reimplemented in mbs::ServerOutputAddon, and aqua::ClientOutput.

Definition at line 215 of file DataIO.h.

◆ Write_Flush()

virtual void dabc::DataOutput::Write_Flush ( )
inlinevirtual

Flush output object, called when buffer with EOL type is appeared.

Definition at line 218 of file DataIO.h.

◆ WriteBuffer()

bool dabc::DataOutput::WriteBuffer ( Buffer buf)

Write buffer to the output.

If callback is required, will fail

Definition at line 79 of file DataIO.cxx.

◆ Write_Stat()

virtual bool dabc::DataOutput::Write_Stat ( dabc::Command  cmd)
inlinevirtual

Fill different statistic parameters into provided command.

Reimplemented in hadaq::HldOutput, and dabc::FileOutput.

Definition at line 224 of file DataIO.h.

◆ Write_Retry()

virtual bool dabc::DataOutput::Write_Retry ( )
inlinevirtual

Returns true if output object can be reinitialized for recover error.

Reimplemented in hadaq::HldOutput.

Definition at line 227 of file DataIO.h.

◆ Write_Restart()

virtual bool dabc::DataOutput::Write_Restart ( dabc::Command  cmd)
inlinevirtual

Method used to restart output - like recreate new output file.

Reimplemented in hadaq::HldOutput.

Definition at line 230 of file DataIO.h.

Friends And Related Function Documentation

◆ OutputTransport

friend class OutputTransport
friend

Definition at line 160 of file DataIO.h.

Field Documentation

◆ fInfoName

std::string dabc::DataOutput::fInfoName
protected

Definition at line 163 of file DataIO.h.


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