|
template<class ANY_NEXT > |
class |
RDM::DB::transaction
|
|
template<class ANY_NEXT_1 , class ANY_NEXT_2 > |
class |
split
|
|
template<uint32_t ANY_N, class ANY_RANGE_T , class ANY_NEXT > |
class |
collect
|
|
template<uint32_t ANY_N, class ANY_RANGE_T , class ANY_INDATA_T , class ANY_NEXT > |
class |
fft
|
|
template<uint32_t ANY_N, class ANY_AGGREGATE_T , class ANY_AGG_ELEMENT_T , class ANY_NEXT > |
class |
mean
|
|
template<class ANY_RATIO , class ANY_NEXT > |
class |
scale
|
|
template<uint32_t ANY_N, class ANY_STATS_T , class ANY_NEXT > |
class |
stats
|
|
template<uint32_t ANY_N, class ANY_NEXT > |
class |
downsample
|
|
template<class ANY_NEXT > |
class |
custom
|
|
template<uint32_t N, class NEXT>
class RDM::TIME_SERIES::downsample< N, NEXT >
Template Class for downsampling.
Template class for downsampling data values. It is an error for this class to receive ranges or statistics. What is received will be downsampled by only forwarding every Nth data value to the next class in the chain.
Upon destruction of this class, there might be incomplete aggregations that have not yet been passed to the next class in the chain. flush() cannot be used to force those incomplete aggregations to be sent to the next class as this class need to have exactly N values before passing it on to the next class in the chain. The proper approach may be to restore the state of this class the next time this class is instantiated. See restore_aggregate for details.
- Template Parameters
-
N |
The factor to downsample by. |
NEXT |
The class in the chain to receive downsampled data values. |
- Examples
- time_series_fft.cpp.
template<uint32_t N, class NEXT >
Flush this object.
Calling this method to flush what has been collected so far. A threshold can also be provided. All the data collected for those values will be kept as is. The same is the case where the threshold has not been reached.
This operation can be specified as being transactional. However, if the caller always rolls back the transaction in the case of a failure, there is no need to specify single operations to be transactional.
- Return values
-
sOKAY |
Normal, successful return. |
eNOSTARTUPDATE |
An update operation was attempted when no rdm_dbStartUpdate() is active. |
eNOTLOCKED |
Attempt to access a table for reading or update without proper locks. |
eCURSORDB |
Cursor is associated with a different database. |
eDBNOTOPEN |
Database not open. |
ePRECOMMITTED |
A precommitted transaction must be committed or rolled back before further operations on this database are allowed. |
eDUPLICATE |
Attempt to insert a duplicate value as a unique/primary key. |
eREADONLY |
Database is read-only and cannot be updated. |
eREFINTEGRITY |
Integrity constraint violation. |
eROWLIMIT |
Table row limit reached. |
eINVARG |
Invalid argument. |
- Parameters
-
threshold |
[IN] Only flush objects where at least this many elements have been collected |
transactional |
[IN] Is the flush required to be transactional |
225RDM_RETCODE rc = next.flush_value (threshold, transactional);
template<uint32_t N, class NEXT >
template<class SOURCE_VALUE_T >
Template method for receiving a data value.
Receive one data value and process it accordingly.
The type for the value provided is required to have columns for 'time_stamp_current' and 'value_current' with appropriate types. Such a type can be generated using rdm-compile with a schema including a table similar to this:
CREATE TABLE measurement
(
time_stamp_current UINT64 PRIMARY KEY,
value_current DOUBLE NOT NULL
);
- Template Parameters
-
SOURCE_VALUE_T |
The actual type of the source values received |
This operation can be specified as being transactional. However, if the caller always rolls back the transaction in the case of a failure, there is no need to specify single operations to be transactional.
- Return values
-
sOKAY |
Normal, successful return. |
eNOSTARTUPDATE |
An update operation was attempted when no rdm_dbStartUpdate() is active. |
eNOTLOCKED |
Attempt to access a table for reading or update without proper locks. |
eCURSORDB |
Cursor is associated with a different database. |
eDBNOTOPEN |
Database not open. |
ePRECOMMITTED |
A precommitted transaction must be committed or rolled back before further operations on this database are allowed. |
eDUPLICATE |
Attempt to insert a duplicate value as a unique/primary key. |
eREADONLY |
Database is read-only and cannot be updated. |
eREFINTEGRITY |
Integrity constraint violation. |
eROWLIMIT |
Table row limit reached. |
eINVARG |
Invalid argument. |
- Parameters
-
[in] |
source_value |
The source value sent to this class |
|
transactional |
[IN] Is the put required to be transactional |
277 rc = next.put_value (source_value, transactional);
References sOKAY.