|
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<class RATIO, class NEXT>
class RDM::TIME_SERIES::scale< RATIO, NEXT >
Template Class for scaling.
Template class for scaling data values, ranges, or statistics. What is received by this class will be scaled by a ration. The scaled result will be forwarded 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() can be called to force those incomplete aggregations to be sent to the next class. This approach may not always be desirable. Another approach is to restore the state of this class the next time this class is instantiated. See restore_aggregate for details.
- Template Parameters
-
RATIO |
The ratio to scale by. |
NEXT |
The class in the chain to receive scaled data values, ranges, or statistics. |
- Examples
- time_series_fft.cpp.
template<class RATIO , class NEXT >
Flush this object.
Call this method to flush what has been collected so far. A threshold can also be provided. All the data collected for those ranges 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 |
322RDM_RETCODE rc = next.flush_range (threshold, transactional);
template<class RATIO , class NEXT >
Flush this object.
Call this method to flush what has been collected so far. A threshold can also be provided. All the data collected for those statistics 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 |
288RDM_RETCODE rc = next.flush_stats (threshold, transactional);
template<class RATIO , class NEXT >
Flush this object.
Call 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 |
254RDM_RETCODE rc = next.flush_value (threshold, transactional);
template<class RATIO , class NEXT >
template<class SOURCE_RANGE_T >
Template method for receiving ranges.
Receive one range and process it accordingly.
The type for the value provided is required to have columns for 'time_stamp_first', 'time_stamp_last', and 'value_range' with appropriate types. The column 'value_range' must be an array that is able to hold a static number of elements. Such a type can be generated using rdm-compile with a schema including a table similar to this:
CREATE TABLE range
(
value_range DOUBLE ARRAY [32] NOT NULL,
time_stamp_first UINT64 NOT NULL,
time_stamp_last UINT64 PRIMARY KEY
);
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.
- Template Parameters
-
SOURCE_RANGE_T |
The actual type of the range received. |
- 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_range |
The source range sent to this class |
|
transactional |
[IN] Is the put required to be transactional |
478 SOURCE_RANGE_T scaled_range;
480 scale_range (source_range, scaled_range);
481RDM_RETCODE rc = next.put_range (&scaled_range, transactional);
template<class RATIO , class NEXT >
template<class SOURCE_STATS_T >
Template method for receiving statistics.
Receive one statistic and process it accordingly.
The type for the value provided is required to have columns for 'time_stamp_first', 'time_stamp_last', 'n', 'value_sum', and 'value_sum2' with appropriate types. Such a type can be generated using rdm-compile with a schema including a table similar to this:
CREATE TABLE stats
(
time_stamp_first UINT64 NOT NULL,
time_stamp_last UINT64 PRIMARY KEY,
n UINT64 NOT NULL,
value_sum DOUBLE NOT NULL,
value_sum2 DOUBLE NOT NULL
);
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.
- Template Parameters
-
SOURCE_STATS_T |
The actual type of the statistic received. |
- 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_stats |
The source statistics sent to this class |
|
transactional |
[IN] Is the put required to be transactional |
424 SOURCE_STATS_T scaled_stats;
426 scale_stats (source_stats, scaled_stats);
427RDM_RETCODE rc = next.put_stats (&scaled_stats, transactional);
template<class RATIO , 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
);
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.
- Template Parameters
-
SOURCE_VALUE_T |
The actual type of the source values received |
- 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 |
370 SOURCE_VALUE_T scaled_value;
372 scale_value (source_value, scaled_value);
373RDM_RETCODE rc = next.put_value (&scaled_value, transactional);