EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | List of all members
SampleMechanismMonitoredGetEA3 Class Reference

Sample Mechanism that stores periodic samples using a 'monitor'. More...

#include <SampleMechanismMonitoredGetEA3.h>

Inheritance diagram for SampleMechanismMonitoredGetEA3:
Scannable SampleMechanismEA3 Named SampleMechanism ProcessVariableListener Guardable Named ProcessVariableStateListener ProcessVariableValueListener

Public Member Functions

 SampleMechanismMonitoredGetEA3 (EngineConfig &config, ProcessVariableContext &ctx, ScanList &scan_list, const char *name, double period)
 Construct mechanism for given sampling period. More...
 
virtual void scan (const epicsTime &now)
 Invoked whenever a scan is due. More...
 
virtual std::string getInfo (Guard &guard)
 
virtual void start (Guard &guard)
 Start the sample mechanism. More...
 
virtual void stop (Guard &guard)
 Stop sampling. More...
 
virtual void addToFUX (Guard &guard, FUX::Element *doc)
 Append this sample mechanism to a FUX document. More...
 
virtual void pvConnected (ProcessVariable &pv, const epicsTime &when)
 ProcessVariableStateListener. More...
 
- Public Member Functions inherited from SampleMechanismEA3
 SampleMechanismEA3 (const EngineConfig &config, ProcessVariableContext &ctx, const char *name, double period, ProcessVariableListener *disable_filt_listener)
 Constructor.
 
virtual ~SampleMechanismEA3 ()
 Destructor.
 
virtual unsigned long write (Guard &guard, Index &index)
 Write current buffer to index. More...
 
virtual void pvValue (ProcessVariable &pv, const RawValue::Data *data)
 ProcessVariableValueListener. More...
 
size_t getSampleCount (Guard &guard) const
 
- Public Member Functions inherited from SampleMechanism
 SampleMechanism (const EngineConfig &config, ProcessVariableContext &ctx, const char *name, double period, ProcessVariableListener *disable_filt_listener)
 Construct mechanism for given period. More...
 
void pvDisconnected (ProcessVariable &pv, const epicsTime &when)
 ProcessVariableStateListener. More...
 
virtual OrderedMutexgetMutex ()
 
virtual const std::string & getName () const
 Gets the ProcessVariable name. More...
 
bool isRunning (Guard &guard)
 
ProcessVariable::State getPVState ()
 
void disable (const epicsTime &when)
 Temporarily disable sampling. More...
 
void enable (const epicsTime &when)
 Re-enable sampling. More...
 
void addStateListener (ProcessVariableStateListener *listener)
 Add a listener to the underlying PV. More...
 
void removeStateListener (ProcessVariableStateListener *listener)
 Remove a listener from the underlying PV. More...
 
void addValueListener (ProcessVariableValueListener *listener)
 Add a listener to the underlying PV. More...
 
void removeValueListener (ProcessVariableValueListener *listener)
 Remove a listener from the underlying PV. More...
 
- Public Member Functions inherited from ProcessVariableStateListener
virtual ~ProcessVariableStateListener ()
 Constructor.
 

Detailed Description

Sample Mechanism that stores periodic samples using a 'monitor'.

For each sample period, the first sample is stored. Samples that don't change are stored via a 'repeat count', up to a maximum repeat count specified in the EngineConfig.

The data flows as follows:

  1. ProcessVariable (monitored)
  2. DisableFilter
  3. TimeSlotFilter (for requested period)
  4. RepeatFilter (also informed about periodic scan)
  5. TimeFilter
  6. SampleMechanismMonitoredGet
  7. base SampleMechanism

For PVs that acutally change, the monitors from the PV drive the value chain. But when the PV does not change, the lack of monitors would also never trigger the repeat filter to count repeated values. Therefore the scan list is used to periodically trigger the repeat filter, which can then add repeat counts if no new values have been received.

Constructor & Destructor Documentation

SampleMechanismMonitoredGetEA3::SampleMechanismMonitoredGetEA3 ( EngineConfig config,
ProcessVariableContext ctx,
ScanList scan_list,
const char *  name,
double  period 
)

Construct mechanism for given sampling period.

Member Function Documentation

virtual void SampleMechanismMonitoredGetEA3::addToFUX ( Guard guard,
FUX::Element doc 
)
virtual

Append this sample mechanism to a FUX document.

Reimplemented from SampleMechanism.

virtual std::string SampleMechanismMonitoredGetEA3::getInfo ( Guard guard)
virtual
Returns
Returns a description of mechanism and current state.

Reimplemented from SampleMechanism.

virtual void SampleMechanismMonitoredGetEA3::pvConnected ( ProcessVariable pv,
const epicsTime &  when 
)
virtual

ProcessVariableStateListener.

Base implementation allocates circular buffer

Reimplemented from SampleMechanismEA3.

virtual void SampleMechanismMonitoredGetEA3::scan ( const epicsTime &  now)
virtual

Invoked whenever a scan is due.

The passed 'now' is the deadline time that was used to decide if this item is due 'now', so it should be very close to the current time, and might be cheaper to use than asking for the exact current time.

Implements Scannable.

virtual void SampleMechanismMonitoredGetEA3::start ( Guard guard)
virtual

Start the sample mechanism.

Base implementation starts the PV.

Reimplemented from SampleMechanism.

virtual void SampleMechanismMonitoredGetEA3::stop ( Guard guard)
virtual

Stop sampling.

See Also
start()

Base implementation stops the PV and adds a 'STOPPED (OFF)' event.

Reimplemented from SampleMechanism.


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