Defines an interface to a sample reduction (SR) block.
More...
#include <isamplereduction.h>
|
virtual void | NofSamples (uint64_t nof_samples)=0 |
| Sets number of samples in the block.
|
|
virtual uint64_t | NofSamples () const =0 |
| Returns number of samples.
|
|
virtual void | Interval (double interval)=0 |
| Sets the interval value.
|
|
virtual double | Interval () const =0 |
| Returns the interval value.
|
|
virtual void | SyncType (SrSyncType type) |
| Synchronization type. Example Time or number of samples.
|
|
virtual SrSyncType | SyncType () const |
| return type of synchronization.
|
|
virtual void | Flags (uint8_t flags) |
| Sets SR flags.
|
|
virtual uint8_t | Flags () const |
| Returns the SR flags.
|
|
virtual const IChannelGroup * | ChannelGroup () const =0 |
| Returns its channel group.
|
|
template<typename T > |
void | GetChannelValue (const IChannel &channel, uint64_t sample, uint64_t array_index, SrValue< T > &value) const |
| Returns the channel value for a specific sample.
|
|
template<typename T > |
void | GetEngValue (const IChannel &channel, uint64_t sample, uint64_t array_index, SrValue< T > &value) const |
| Returns the scaled SR value.
|
|
virtual void | ClearData ()=0 |
| Resets the internal SR data bytes.
|
|
template<> |
void | GetChannelValue (const IChannel &channel, uint64_t sample, uint64_t array_index, SrValue< std::string > &value) const |
| Specialized function that return an unsigned value.
|
|
template<> |
void | GetEngValue (const IChannel &channel, uint64_t sample, uint64_t array_index, SrValue< std::string > &value) const |
| Specialized function that returns SR values as strings.
|
|
virtual | ~IBlock ()=default |
| Default destructor.
|
|
virtual int64_t | Index () const =0 |
| File position within the file.
|
|
virtual std::string | BlockType () const =0 |
| Returns the block type.
|
|
Sample reduction (SR) blocks stores min, max and average values for the all samples or for an interval of samples values.
◆ GetChannelValue()
template<typename T >
void mdf::ISampleReduction::GetChannelValue |
( |
const IChannel & | channel, |
|
|
uint64_t | sample, |
|
|
uint64_t | array_index, |
|
|
SrValue< T > & | value ) const |
- Template Parameters
-
- Parameters
-
channel | Reference to the channel. |
sample | Sample index. |
array_index | Array index. Only used for an array channel. |
value | Returns the SR value. |
◆ GetChannelValueDouble()
virtual void mdf::ISampleReduction::GetChannelValueDouble |
( |
const IChannel & | channel, |
|
|
uint64_t | sample, |
|
|
uint64_t | array_index, |
|
|
SrValue< double > & | value ) const |
|
protectedpure virtual |
Returns the value as a double value.
◆ GetChannelValueInt()
virtual void mdf::ISampleReduction::GetChannelValueInt |
( |
const IChannel & | channel, |
|
|
uint64_t | sample, |
|
|
uint64_t | array_index, |
|
|
SrValue< int64_t > & | value ) const |
|
protectedpure virtual |
brief Returns the value as an integer.
◆ GetChannelValueUint()
virtual void mdf::ISampleReduction::GetChannelValueUint |
( |
const IChannel & | channel, |
|
|
uint64_t | sample, |
|
|
uint64_t | array_index, |
|
|
SrValue< uint64_t > & | value ) const |
|
protectedpure virtual |
brief Returns the value as unsigned integer.
◆ GetEngValue()
template<typename T >
void mdf::ISampleReduction::GetEngValue |
( |
const IChannel & | channel, |
|
|
uint64_t | sample, |
|
|
uint64_t | array_index, |
|
|
SrValue< T > & | value ) const |
- Template Parameters
-
- Parameters
-
channel | Reference to the channel |
sample | Sample index. |
array_index | Array offset in case of array type. |
value | Returns the SR sample value. |
◆ Interval() [1/2]
virtual double mdf::ISampleReduction::Interval |
( |
| ) |
const |
|
nodiscardpure virtual |
- Returns
- The interval value.
◆ Interval() [2/2]
virtual void mdf::ISampleReduction::Interval |
( |
double | interval | ) |
|
|
pure virtual |
Sets the interval value. Note that the value is dependent on the synchronization type.
- Parameters
-
◆ NofSamples() [1/2]
virtual uint64_t mdf::ISampleReduction::NofSamples |
( |
| ) |
const |
|
nodiscardpure virtual |
- Returns
- Number of samples.
◆ NofSamples() [2/2]
virtual void mdf::ISampleReduction::NofSamples |
( |
uint64_t | nof_samples | ) |
|
|
pure virtual |
- Parameters
-
nof_samples | Number of sample values. |
◆ SyncType()
virtual void mdf::ISampleReduction::SyncType |
( |
SrSyncType | type | ) |
|
|
virtual |
- Parameters
-
type | Type of synchronization |
The documentation for this class was generated from the following file: