RDM::TIME_SERIES::fft_abs_positive< N, RANGE_T, INDATA_T, NEXT > Class Template Reference

Template Class for doing an FFT with absoulte value of the positive frequencies. More...

#include "rdm_time_series_fft.h"

Inheritance diagram for RDM::TIME_SERIES::fft_abs_positive< N, RANGE_T, INDATA_T, NEXT >:
Inheritance graph
Collaboration diagram for RDM::TIME_SERIES::fft_abs_positive< N, RANGE_T, INDATA_T, NEXT >:
Collaboration graph

Public Member Functions

RDM_RETCODE init (RDM_DB db)
Initialize this object. More...
- Public Member Functions inherited from RDM::TIME_SERIES::fft< N, RANGE_T, INDATA_T, NEXT >
void reset (void)
Reset this object. More...
RDM_RETCODE flush_value (uint32_t threshold=1, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Flush this object. More...
RDM_RETCODE flush_stats (uint32_t threshold=1, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Flush this object. More...
template<class SOURCE_VALUE_T >
RDM_RETCODE put_value (SOURCE_VALUE_T *source_value, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving a data value. More...
template<class SOURCE_STATS_T >
RDM_RETCODE put_stats (SOURCE_STATS_T *source_stats, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving statistics. More...

Additional Inherited Members

- Protected Member Functions inherited from RDM::TIME_SERIES::fft_rdm< N, RANGE_T, INDATA_T, NEXT >
RDM_RETCODE init (RDM_DB db)
Initialize this object. More...
fft_rdm ()
~fft_rdm ()
- Protected Member Functions inherited from RDM::TIME_SERIES::fft< N, RANGE_T, INDATA_T, NEXT >
uint32_t init_tables_to_write_lock (RDM_TABLE_ID *tables)
ID of the tables where rows are inserted. More...
uint32_t init_tables_to_read_lock (RDM_TABLE_ID *tables)
IDs of the tables where rows are read. More...
void unput (void)
Undo a previous put operation. More...
void unflush (void)
Undo a previous flush operation. More...
RDM_RETCODE init (RDM_DB db)
Initialize this object. More...
- Static Protected Member Functions inherited from RDM::TIME_SERIES::fft< N, RANGE_T, INDATA_T, NEXT >
constexpr static int number_of_tables_to_write_lock (void)
Number of tables where rows are inserted. More...
constexpr static int number_of_tables_to_read_lock (void)
Number of tables where rows are read. More...
- Protected Attributes inherited from RDM::TIME_SERIES::fft_rdm< N, RANGE_T, INDATA_T, NEXT >
RDM_FFT fft_engine
- Protected Attributes inherited from RDM::TIME_SERIES::fft< N, RANGE_T, INDATA_T, NEXT >
INDATA_T in_data [N]
RANGE_T aggregate_range
uint32_t n

Detailed Description

template<uint32_t N, class RANGE_T, class INDATA_T, class NEXT>
class RDM::TIME_SERIES::fft_abs_positive< N, RANGE_T, INDATA_T, NEXT >

Template Class for doing an FFT with absoulte value of the positive frequencies.

Template class for FFT of data values or statistics. What is received will be collected and used for doing FFT computations. The result of those computations will be forwarded to the next class in the chain.

Here the input is the real numbers for the signal to be analyzed and the output is real numbers that contain absolute values of the FFT computation. The 0th element has the DC value. The 1st element to the (N/2)th element has the values for the positive frequencies with the value for the lowest frequency at 1 and the Nyquist frequency at N/2.

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 needs 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 number of data points for each FFT computation. In the case ranges are received, then N must fit its size.
RANGE_T The aggregate FFT class for which objects will be passed to the next class. The size of this range should be N/2+1.
INDATA_T The type of the data that is passed to this class.
NEXT The class in the chain to receive the result of the FFT computations.
Examples
time_series_fft.cpp.

Member Function Documentation

init()

template<uint32_t N, class RANGE_T , class INDATA_T , class NEXT >
RDM_RETCODE RDM::TIME_SERIES::fft_abs_positive< N, RANGE_T, INDATA_T, NEXT >::init ( RDM_DB db )
inline

Initialize this object.

Call this method before sending it any data values, ranges, or statistics.

Return values
sOKAY Normal, successful return.
eINVARG Invalid argument.
eDBNOTOPEN Database not open.
eCURSORDB Cursor is associated with a different database.
ePRECOMMITTED A precommitted transaction must be committed or rolled back before further operations on this database are allowed.
Parameters
db [IN] Use this database for chained classes that need to insert rows
648 {
649RDM_RETCODE rc = sOKAY;
650
651if (RDM_LEN (this->aggregate_range.value_range) != N / 2 + 1)
652 {
653 rc = eINVARG;
654 }
655if (rc == sOKAY)
656 {
658 }
659
660return rc;
661 }

References RDM::TIME_SERIES::fft< N, RANGE_T, INDATA_T, NEXT >::aggregate_range, eINVARG, RDM_LEN, and sOKAY.


The documentation for this class was generated from the following file:
RANGE_T aggregate_range
Definition: rdm_time_series_fft.h:63
@ sOKAY
Definition: rdmretcodetypes.h:97
@ eINVARG
Definition: rdmretcodetypes.h:166
RDM_RETCODE init(RDM_DB db)
Initialize this object.
Definition: rdm_time_series_fft.h:459
#define RDM_LEN(x)
Definition: psptypes.h:78
RDM_RETCODE
RDM status and error return codes.
Definition: rdmretcodetypes.h:43