lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Drp::EpicsMonitorPv Class Reference

#include <EpicsMonitorPv.hh>

Inherits Pds_Epics::PvMonitorBase.

Public Member Functions

 EpicsMonitorPv (const std::string &sPvName, const std::string &sPvDescription, const std::string &sProvider, const std::string &sRequest, bool bDebug)
 
 ~EpicsMonitorPv ()
 
int release ()
 
int printPv () const
 
int addVarDef (EpicsArchDef &varDef, size_t &size)
 
int addToXtc (XtcData::Damage &damage, bool &stale, char *pcXtcMem, size_t &iSizeXtc, uint32_t sShape[XtcData::MaxRank])
 
const std::string getPvName () const
 
const std::string & getPvDescription () const
 
bool isConnected () const
 
void disable ()
 
bool isDisabled () const
 
size_t rank () const
 
- Public Member Functions inherited from Pds_Epics::PvMonitorBase
 PvMonitorBase (const std::string &pvName, const std::string &provider="pva", const std::string &request="field()", const std::string &fieldName="value")
 Monitor pvName through provider (pva by default) with request; fieldName names the payload field.
 
virtual ~PvMonitorBase ()
 Does nothing; empty virtual destructor.
 
int printStructure () const
 Log the name, offset and type of each top-level field of the latest structure.
 
int getParams (pvd::ScalarType &type, size_t &size, size_t &rank)
 From the latest structure, return the element type, element count and rank of the payload field and set getData for it.
 
bool isPva ()
 Return true if the provider is pva.
 
bool isCa ()
 Return true if the provider is not pva.
 
void getTimestamp (int64_t &seconds, int32_t &nanoseconds)
 Return the seconds and nanoseconds of the timeStamp field of the latest structure.
 
void getTimestampPosix (int64_t &seconds, int32_t &nanoseconds)
 Same as getTimestamp(): the secondsPastEpoch value is returned unchanged.
 
void getTimestampEpics (int64_t &seconds, int32_t &nanoseconds)
 Like getTimestampPosix(), with POSIX_TIME_AT_EPICS_EPOCH subtracted from the seconds.
 
- Public Member Functions inherited from Pds_Epics::MonTracker
 POINTER_DEFINITIONS (MonTracker)
 Expands the pvData POINTER_DEFINITIONS macro for this class; doxygen lists it as a function.
 
 MonTracker (const std::string &name, const std::string &request="field()")
 Connect to name through pva and start a monitor with request (default field()).
 
 MonTracker (const std::string &provider, const std::string &name, const std::string &request="field()")
 Connect to name through ca if provider is ca, otherwise pva, and start a monitor with request.
 
virtual ~MonTracker ()
 Cancel the monitor.
 
const std::string name () const
 Return the channel name.
 
bool connected () const
 Return true from the first data update until a disconnect.
 
virtual void monitorEvent (const pvac::MonitorEvent &evt) OVERRIDE FINAL
 Monitor callback on a pvAccess thread: queue the event on the WorkQueue for process().
 
virtual void process (const pvac::MonitorEvent &evt) OVERRIDE FINAL
 Handle a monitor event on the WorkQueue thread.
 
- Public Member Functions inherited from Pds_Epics::Worker
virtual ~Worker ()
 Does nothing; empty virtual destructor.
 
- Public Member Functions inherited from Pds_Epics::PVMonitorCb
virtual ~PVMonitorCb ()
 Does nothing; empty virtual destructor.
 

Additional Inherited Members

- Public Types inherited from Pds_Epics::PvMonitorBase
enum  { MaxRank = XtcData::MaxRank }
 Rank limit for the getData shape. More...
 
- Static Public Member Functions inherited from Pds_Epics::MonTracker
static void close ()
 Close the shared WorkQueue.
 
- Public Attributes inherited from Pds_Epics::PvMonitorBase
std::function< size_t(void *data, size_t size, uint32_t shape[MaxRank])> getData
 Copy the payload field into data (size bytes available) and fill shape; returns the bytes used, or the bytes that would have been used if more than size (truncation), per the code comment.
 
- Protected Member Functions inherited from Pds_Epics::MonTracker
void disconnect ()
 
void reconnect ()
 
- Protected Attributes inherited from Pds_Epics::PvMonitorBase
const bool m_pvaProvider
 
const std::string m_fieldName
 
- Protected Attributes inherited from Pds_Epics::MonTracker
pvd::PVStructure::const_shared_pointer _strct
 
pvd::PVStructure::shared_pointer _request
 
pvac::ClientChannel _channel
 
pvac::Monitor _mon
 
bool _connected
 

Constructor & Destructor Documentation

◆ EpicsMonitorPv()

Drp::EpicsMonitorPv::EpicsMonitorPv ( const std::string &  sPvName,
const std::string &  sPvDescription,
const std::string &  sProvider,
const std::string &  sRequest,
bool  bDebug 
)

◆ ~EpicsMonitorPv()

Drp::EpicsMonitorPv::~EpicsMonitorPv ( )

Member Function Documentation

◆ addToXtc()

int Drp::EpicsMonitorPv::addToXtc ( XtcData::Damage &  damage,
bool &  stale,
char *  pcXtcMem,
size_t &  iSizeXtc,
uint32_t  sShape[XtcData::MaxRank] 
)

◆ addVarDef()

int Drp::EpicsMonitorPv::addVarDef ( EpicsArchDef &  varDef,
size_t &  size 
)

◆ disable()

void Drp::EpicsMonitorPv::disable ( )
inline

◆ getPvDescription()

const std::string & Drp::EpicsMonitorPv::getPvDescription ( ) const
inline

◆ getPvName()

const std::string Drp::EpicsMonitorPv::getPvName ( ) const
inline

◆ isConnected()

bool Drp::EpicsMonitorPv::isConnected ( ) const
inline

◆ isDisabled()

bool Drp::EpicsMonitorPv::isDisabled ( ) const
inline

◆ printPv()

int Drp::EpicsMonitorPv::printPv ( ) const

◆ rank()

size_t Drp::EpicsMonitorPv::rank ( ) const
inline

◆ release()

int Drp::EpicsMonitorPv::release ( )

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