Monitors one EPICS PV and copies its value into the L1Accept whose timestamp equals the timestamp of the PV update.
More...
|
| | PvMonitor (const PvParameters ¶, const std::string &alias, const std::string &pvName, const std::string &provider, const std::string &request, const std::string &field, unsigned id, size_t nBuffers, size_t bufferSize, unsigned type, size_t nelem, size_t rank, uint32_t firstDim, const std::atomic< bool > &running, PvDetector &pvDetector) |
| | Set up the PV monitor (pvName via provider with request and field) and the queues of nBuffers entries, keep the expected type, element count, rank and first-dimension override (-1 values mean take them from the PV), and connect the error PUSH socket to the collection server.
|
| |
| void | onConnect () override |
| | On the first connection, take the type, element count and rank from the PV for any that were not given and mark the monitor ready; aborts if given and PV values differ.
|
| |
| void | onDisconnect () override |
| | Mark the monitor not ready and send a warning that the PV disconnected.
|
| |
| void | updated () override |
| | When ready and running, compare the update timestamp with queued L1Accepts: on equal timestamps copy the value into that event and pass it on; older L1Accepts are damaged with MissingData and passed on; a younger L1Accept stays queued for the next update.
|
| |
| void | timeout (Pds::EbDgram *) |
| | Remove dgram from l1Queue if it is the oldest entry.
|
| |
| void | startup () |
| | Start both queues.
|
| |
| void | shutdown () |
| | Shut down both queues and reset the counters.
|
| |
| int | getParams (std::string &fieldName, XtcData::Name::DataType &xtcType, int &rank) |
| | Wait up to 3 s for the PV to connect, then return its field name, XTC type and rank (rank 2 when a first-dimension override is set).
|
| |
| unsigned | id () const |
| | Return the index of this PV within the detector.
|
| |
| const std::string & | alias () const |
| | Return the alias under which the PV is recorded.
|
| |
| uint64_t | nUpdates () const |
| | Return the number of PV updates received.
|
| |
| uint64_t | nMatch () const |
| | Return the number of L1Accepts that got PV data.
|
| |
| uint64_t | nEmpty () const |
| | Return the number of L1Accepts passed on without PV data (older than the update).
|
| |
| uint64_t | nTooOld () const |
| | Return the number of updates older than the oldest queued L1Accept.
|
| |
| int64_t | timeDiff () const |
| | Return the last L1Accept minus PV timestamp difference in nanoseconds.
|
| |
| int64_t | latency () const |
| | Return the latency of the last PV update in microseconds.
|
| |
| | 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.
|
| |
| | 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.
|
| |
| virtual | ~Worker () |
| | Does nothing; empty virtual destructor.
|
| |
| virtual | ~PVMonitorCb () |
| | Does nothing; empty virtual destructor.
|
| |
Monitors one EPICS PV and copies its value into the L1Accept whose timestamp equals the timestamp of the PV update.
L1Accepts wait in l1Queue; matched (or MissingData-damaged) ones are passed on through pvQueue.