Scope
|
#include <DaqChunk.h>
Inherited by scope::DaqChunkResonance.
Public Types | |
typedef std::vector< uint16_t >::iterator | iterator |
Public Member Functions | |
DaqChunk (const uint32_t &_perchannel, const uint32_t &_nchannels, const uint32_t &_area) | |
virtual | ~DaqChunk () |
virtual void | Downsample (const uint32_t &_factor) |
virtual void | Scale (const double &_factor) |
Several accessor methods | |
uint32_t | Area () const |
uint32_t | NChannels () const |
uint32_t | PerChannel () const |
iterator | GetLastMapped (const uint32_t &_channel) const |
Mutator methods | |
void | SetLastMapped (const uint32_t &_channel, const iterator &_last) |
Public Attributes | |
std::vector< uint16_t > | data |
std::vector< iterator > | lastmapped |
Protected Attributes | |
const uint32_t | area |
const uint32_t | nchannels |
uint32_t | perchannel |
A DaqChunk contains data from all channels sequentially.
First perchannel samples of channel 0, then perchannel samples of channel 1 etc etc...
Definition at line 9 of file DaqChunk.h.
typedef std::vector<uint16_t>::iterator scope::DaqChunk::iterator |
Iterator over the data vector.
Definition at line 23 of file DaqChunk.h.
scope::DaqChunk::DaqChunk | ( | const uint32_t & | _perchannel, |
const uint32_t & | _nchannels, | ||
const uint32_t & | _area | ||
) |
[in] | _perchannel | number of samples the chunk should contain per channel |
[in] | _nchannels | number of channels in the chunk (total number of samples is thus _perchannel*_nchannels) |
[in] | _area | sets the area value for the channel |
Definition at line 7 of file DaqChunk.cpp.
|
inlinevirtual |
Virtual destructor here, to be prepared for derived classes.
Definition at line 37 of file DaqChunk.h.
|
virtual |
Downsamples by averaging _factor samples.
Replaces every _factor samples by their average. The chunk does shrink that way and perchannel is adjusted.
[in] | _factor | downsampling factor |
Definition at line 19 of file DaqChunk.cpp.
|
virtual |
Multiplies every sample by _factor.
Definition at line 46 of file DaqChunk.cpp.
|
protected |
Area of the DaqChunk.
Definition at line 13 of file DaqChunk.h.
|
protected |
Number of channels in that area/DaqChunk.
Definition at line 16 of file DaqChunk.h.
|
protected |
Number of samples per channel.
Definition at line 19 of file DaqChunk.h.
std::vector<uint16_t> scope::DaqChunk::data |
The data vector.
Definition at line 26 of file DaqChunk.h.
std::vector<iterator> scope::DaqChunk::lastmapped |
Iterators to positions that was last mapped.
One for every channel.
Definition at line 29 of file DaqChunk.h.