DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Protected Member Functions | Protected Attributes
ezca::EpicsInput Class Reference

The epics easy channel access data input implementation. More...

#include <ezca/EpicsInput.h>

Inheritance diagram for ezca::EpicsInput:
dabc::DataInput

Public Member Functions

 EpicsInput (const std::string &name="")
 
virtual unsigned Read_Complete (dabc::Buffer &buf)
 Complete reading of the buffer from source,. More...
 
virtual bool Read_Init (const dabc::WorkerRef &wrk, const dabc::Command &cmd)
 Initialize data input, using port and command. More...
 
virtual unsigned Read_Size ()
 Defines required buffer size for next operation. More...
 
virtual double Read_Timeout ()
 Provide timeout value. More...
 
virtual ~EpicsInput ()
 
- Public Member Functions inherited from dabc::DataInput
virtual unsigned Read_Start (Buffer &buf)
 Prepare buffer for reading (if required) More...
 
virtual bool Read_Stat (dabc::Command cmd)
 Provide timeout value. More...
 
Buffer ReadBuffer ()
 Reads complete buffer. More...
 
virtual ~DataInput ()
 

Protected Member Functions

std::string CA_ErrorString ()
 Return error string with error description. More...
 
int CA_GetDouble (const std::string &name, double &val)
 
int CA_GetLong (const std::string &name, long &val)
 
const char * CA_RetCode (int ret)
 
bool Close ()
 
const std::string & GetDoubleRecord (unsigned i) const
 
const std::string & GetLongRecord (unsigned i) const
 
unsigned NumDoubleRecords () const
 
unsigned NumLongRecords () const
 
void ResetDescriptors ()
 
- Protected Member Functions inherited from dabc::DataInput
virtual WorkerAddonRead_GetAddon ()
 Returns addon, provided by data input If specified, supposed that I/O object is double-deriver from DataInput and Addon. More...
 

Protected Attributes

long fCounter
 Counter of events, used as mbs event id when event number is not provided. More...
 
std::vector< std::string > fDoubleRecords
 
std::vector< bool > fDoubleRes
 
std::vector< double > fDoubleValues
 
long fEventNumber
 Event number, read from EPICS record. More...
 
bool fEzcaAutoError
 Automatic error printing. More...
 
bool fEzcaDebug
 Switch on/off epics debug messages. More...
 
int fEzcaRetryCnt
 Number of retry in ezca readout. More...
 
double fEzcaTimeout
 Timeout for ezca readout. More...
 
std::string fIDNumberRecord
 
long fLastFlagValue
 Remember previous flag value which should be change to start readout. More...
 
std::vector< std::string > fLongRecords
 
std::vector< bool > fLongRes
 
std::vector< long > fLongValues
 
std::string fName
 
unsigned fSubeventId
 
double fTimeout
 
std::string fUpdateCommandReceiver
 
std::string fUpdateFlagRecord
 

Detailed Description

The epics easy channel access data input implementation.

It was first implementation for access EPICS data in DABC, now is preferable to use ezca::Monitor class

Definition at line 37 of file EpicsInput.h.

Constructor & Destructor Documentation

◆ EpicsInput()

ezca::EpicsInput::EpicsInput ( const std::string &  name = "")

Definition at line 36 of file EpicsInput.cxx.

◆ ~EpicsInput()

ezca::EpicsInput::~EpicsInput ( )
virtual

Definition at line 52 of file EpicsInput.cxx.

Member Function Documentation

◆ ResetDescriptors()

void ezca::EpicsInput::ResetDescriptors ( )
inlineprotected

Definition at line 91 of file EpicsInput.h.

◆ NumLongRecords()

unsigned ezca::EpicsInput::NumLongRecords ( ) const
inlineprotected

Definition at line 104 of file EpicsInput.h.

◆ GetLongRecord()

const std::string& ezca::EpicsInput::GetLongRecord ( unsigned  i) const
inlineprotected

Definition at line 106 of file EpicsInput.h.

◆ NumDoubleRecords()

unsigned ezca::EpicsInput::NumDoubleRecords ( ) const
inlineprotected

Definition at line 108 of file EpicsInput.h.

◆ GetDoubleRecord()

const std::string& ezca::EpicsInput::GetDoubleRecord ( unsigned  i) const
inlineprotected

Definition at line 110 of file EpicsInput.h.

◆ CA_GetLong()

int ezca::EpicsInput::CA_GetLong ( const std::string &  name,
long &  val 
)
protected

Definition at line 248 of file EpicsInput.cxx.

◆ CA_GetDouble()

int ezca::EpicsInput::CA_GetDouble ( const std::string &  name,
double &  val 
)
protected

Definition at line 258 of file EpicsInput.cxx.

◆ CA_ErrorString()

std::string ezca::EpicsInput::CA_ErrorString ( )
protected

Return error string with error description.

Definition at line 268 of file EpicsInput.cxx.

◆ CA_RetCode()

const char * ezca::EpicsInput::CA_RetCode ( int  ret)
protected

Definition at line 280 of file EpicsInput.cxx.

◆ Close()

bool ezca::EpicsInput::Close ( )
protected

Definition at line 89 of file EpicsInput.cxx.

◆ Read_Init()

bool ezca::EpicsInput::Read_Init ( const dabc::WorkerRef wrk,
const dabc::Command cmd 
)
virtual

Initialize data input, using port and command.

This is generic virtual method to initialize input, using configurations from Port and (or) from the Command

Parameters
[in]wrkreference on input port
[in]cmdreference on command object
Returns
false when method fails

Reimplemented from dabc::DataInput.

Definition at line 57 of file EpicsInput.cxx.

◆ Read_Size()

unsigned ezca::EpicsInput::Read_Size ( )
virtual

Defines required buffer size for next operation.

Returns
  • 0..di_ValidSize - size of buffer for next read operation (di_ValidSize = 0xFFFFFFF0)
  • di_EndOfStream - this is end of stream, normal close of the input
  • di_DfltBufSize - any non-zero buffer can be provided
  • di_Repeat - nothing to read now, try again as soon as possible
  • di_RepeatTimeOut - nothing to read now, try again after timeout
  • di_CallBack - input will activate transport via callback
  • di_Error - error, close input

Reimplemented from dabc::DataInput.

Definition at line 97 of file EpicsInput.cxx.

◆ Read_Complete()

unsigned ezca::EpicsInput::Read_Complete ( dabc::Buffer buf)
virtual

Complete reading of the buffer from source,.

Returns
  • di_Ok - buffer filled and ready
  • di_EndOfStream - this is end of stream, normal close of the input
  • di_SkipBuffer - skip buffer
  • di_Error - error, skip buffer and close input
  • di_Repeat - not ready, call again as soon as possible
  • di_RepeatTimeOut - not ready, call again after timeout

Reimplemented from dabc::DataInput.

Definition at line 164 of file EpicsInput.cxx.

◆ Read_Timeout()

virtual double ezca::EpicsInput::Read_Timeout ( )
inlinevirtual

Provide timeout value.

Returns
timeout in seconds

When Read_Size or Read_Complete operations returns di_RepeatTimeout argument, specified timeout will be used before next operation will be done

Reimplemented from dabc::DataInput.

Definition at line 136 of file EpicsInput.h.

Field Documentation

◆ fName

std::string ezca::EpicsInput::fName
protected

Definition at line 39 of file EpicsInput.h.

◆ fTimeout

double ezca::EpicsInput::fTimeout
protected

Definition at line 42 of file EpicsInput.h.

◆ fSubeventId

unsigned ezca::EpicsInput::fSubeventId
protected

Definition at line 45 of file EpicsInput.h.

◆ fLastFlagValue

long ezca::EpicsInput::fLastFlagValue
protected

Remember previous flag value which should be change to start readout.

Definition at line 48 of file EpicsInput.h.

◆ fEventNumber

long ezca::EpicsInput::fEventNumber
protected

Event number, read from EPICS record.

Definition at line 51 of file EpicsInput.h.

◆ fCounter

long ezca::EpicsInput::fCounter
protected

Counter of events, used as mbs event id when event number is not provided.

Definition at line 54 of file EpicsInput.h.

◆ fEzcaTimeout

double ezca::EpicsInput::fEzcaTimeout
protected

Timeout for ezca readout.

Definition at line 57 of file EpicsInput.h.

◆ fEzcaRetryCnt

int ezca::EpicsInput::fEzcaRetryCnt
protected

Number of retry in ezca readout.

Definition at line 60 of file EpicsInput.h.

◆ fEzcaDebug

bool ezca::EpicsInput::fEzcaDebug
protected

Switch on/off epics debug messages.

Definition at line 63 of file EpicsInput.h.

◆ fEzcaAutoError

bool ezca::EpicsInput::fEzcaAutoError
protected

Automatic error printing.

Definition at line 66 of file EpicsInput.h.

◆ fUpdateFlagRecord

std::string ezca::EpicsInput::fUpdateFlagRecord
protected

Definition at line 72 of file EpicsInput.h.

◆ fIDNumberRecord

std::string ezca::EpicsInput::fIDNumberRecord
protected

Definition at line 75 of file EpicsInput.h.

◆ fUpdateCommandReceiver

std::string ezca::EpicsInput::fUpdateCommandReceiver
protected

Definition at line 79 of file EpicsInput.h.

◆ fLongRecords

std::vector<std::string> ezca::EpicsInput::fLongRecords
protected

Definition at line 82 of file EpicsInput.h.

◆ fLongValues

std::vector<long> ezca::EpicsInput::fLongValues
protected

Definition at line 83 of file EpicsInput.h.

◆ fLongRes

std::vector<bool> ezca::EpicsInput::fLongRes
protected

Definition at line 84 of file EpicsInput.h.

◆ fDoubleRecords

std::vector<std::string> ezca::EpicsInput::fDoubleRecords
protected

Definition at line 87 of file EpicsInput.h.

◆ fDoubleValues

std::vector<double> ezca::EpicsInput::fDoubleValues
protected

Definition at line 88 of file EpicsInput.h.

◆ fDoubleRes

std::vector<bool> ezca::EpicsInput::fDoubleRes
protected

Definition at line 89 of file EpicsInput.h.


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