DABC (Data Acquisition Backbone Core)
2.9.9
|
Interface for implementing any kind of data output. More...
#include <dabc/DataIO.h>
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 WorkerAddon * | Write_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 |
|
protected |
Definition at line 50 of file DataIO.cxx.
|
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.
|
protected |
Definition at line 61 of file DataIO.cxx.
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.
|
inlinevirtual |
Method can be used to get debug info about output.
Reimplemented in dabc::FileOutput.
|
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.
|
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.
|
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.
|
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.
|
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.
|
inlinevirtual |
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.
|
inlinevirtual |
Fill different statistic parameters into provided command.
Reimplemented in hadaq::HldOutput, and dabc::FileOutput.
|
inlinevirtual |
Returns true if output object can be reinitialized for recover error.
Reimplemented in hadaq::HldOutput.
|
inlinevirtual |
Method used to restart output - like recreate new output file.
Reimplemented in hadaq::HldOutput.
|
friend |