#ifndef SAMPLEMECHANISMMONITOREDGET_H_ #define SAMPLEMECHANISMMONITOREDGET_H_ // Engine #include "SampleMechanism.h" #include "TimeSlotFilter.h" #include "RepeatFilter.h" #include "TimeFilter.h" /**\ingroup Engine * 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 *
  5. TimeFilter *
  6. SampleMechanismMonitoredGet *
  7. base SampleMechanism *
*/ class SampleMechanismMonitoredGet : public SampleMechanism { public: /** Construct mechanism for given sampling period. */ SampleMechanismMonitoredGet(EngineConfig &config, ProcessVariableContext &ctx, const char *name, double period); virtual ~SampleMechanismMonitoredGet(); // SampleMechanism stdString getInfo(Guard &guard); void stop(Guard &guard); // ProcessVariableListener void pvConnected(ProcessVariable &pv, const epicsTime &when); void addToFUX(Guard &guard, class FUX::Element *doc); private: TimeSlotFilter time_slot_filter; RepeatFilter repeat_filter; TimeFilter time_filter; }; #endif /*SAMPLEMECHANISMMONITOREDGET_H_*/