BucketingValueIteratorI Class
A ValueIterator that performs bucketing data reduction.For any set of values within a certain deltaT (the bucket) at most 4 values are returned (first, min, max and last).
When next()/prev() is called this specialization of a ValueIteratorI will move to the next/previous Value as defined by the bucketing algorithm.
Data reduction is not possible between Info values line Archive Off or Disabled. When such an info value is hit, the iterator will return the info value.
Up to now, the BucketingValueIteratorI is not capable of going backwards! For now it will throw an exception if prev() is called.
The BucketingValueIteratorI only works properly for scalar numeric datatypes.
Interface
- Create a BucketingValueIterator based on a basic AbstractValueIterator, preferably a ExpandingValueIterator.
deltaT: Bucket width.BucketingValueIteratorI (ValueIteratorI *base, double deltaT);- Up to now, prev() will raise an Illegal-Exception.
bool next (); bool prev ();- This method will return deltaT, not the original scan period of the underlying base iterator
double getPeriod () const;- In the current bucket, these four values, the ControlInfo and the appropriate status and severity are the ones we're interested in.
double _first; double _min; double _max; double _last; dbr_short_t _status, _sevr; const CtrlInfoI *_ctrlinfo;- The bucketing algorithm is based on 2 nested state machines.
enum { S_INIT, S_VALUES, S_OUT } _state; enum { V_FIRST, V_MIN, V_MAX, V_LAST, V_NONE } _oval;
IndexCreated from sources with MakeDoc Perl script.