#include <datatypes.h>
Public Member Functions | |
AcqisitionDataSet (int channels=0, int samples=0) | |
Create a new dataset with the given number of channels and the given number of samples per channel in the first data-generation. | |
AcqisitionDataSet (const AcqisitionDataSet &) | |
Copy-constructor. | |
~AcqisitionDataSet () | |
destructor | |
int | currentGenerationNumber () const |
Return the current data generation. | |
int | parentGeneration (int generation=-1) const |
Return the generations parent generation. | |
void | newGeneration (QString prefix, int channels, int samples) |
create a new named generation of data | |
QString | getPrefix (int generation=-1) const |
Return the prefix for a specific generation. | |
void | addResult (QString name, QVariant value) |
Add a result / parameter to the results tree. | |
NamedQVariantTreeItem * | result (QString name) |
Get a result. | |
NamedQVariantTreeItem * | resulttree () |
Access the whole result-tree. | |
double * | getRawChannel (int channel, int generation=-1) |
Access the raw double-array for one channel. | |
double * | getRawData (int generation=-1) |
Access the raw double-array for all channels. | |
void | updateMinMax (int generation=-1) |
Update min/max after setting data via the getRaw*-functions. | |
void | resetMinMaxCache (int generation=-1) |
Reset the min/max-cache for the given generation. | |
int | channels (int generation=-1) const |
Return the number of channels in the given generation. | |
int | samples (int generation=-1) const |
Return the number of samples in the given generation. | |
void | debugPrint () const |
Just for debug. | |
void | pushPrefix (QString) |
Add and remove a prefix from the tree of results/generations. | |
void | popPrefix (QString) |
Add and remove a prefix from the tree of results/generations. | |
double | sample (int channel, int sample, int generation=-1) const __attribute__((deprecated)) |
access and manipulate the data sample-by-sample | |
void | setSample (int channel, int sample, double value, int generation=-1) __attribute__((deprecated)) |
access and manipulate the data sample-by-sample | |
Private Attributes | |
AcqisitionDataSet_Private * | d |
Should be more flexible than AcqisitionDataSet/ChannelDataSet
This has
NSCore::AcqisitionDataSet::AcqisitionDataSet | ( | int | channels = 0 , |
|
int | samples = 0 | |||
) |
Create a new dataset with the given number of channels and the given number of samples per channel in the first data-generation.
NSCore::AcqisitionDataSet::AcqisitionDataSet | ( | const AcqisitionDataSet & | ) |
Copy-constructor.
NSCore::AcqisitionDataSet::~AcqisitionDataSet | ( | ) |
destructor
void NSCore::AcqisitionDataSet::pushPrefix | ( | QString | ) |
Add and remove a prefix from the tree of results/generations.
pushPrefix() does not create a new generation of data! You have to use newGeneration() for that.
But nevertheless it makes sense to have these functions for example to add the fact that the data was filtered or that it was changed without creation of a new generation...
Referenced by NSEvaluation::ModifierItem::process().
void NSCore::AcqisitionDataSet::popPrefix | ( | QString | ) |
Add and remove a prefix from the tree of results/generations.
pushPrefix() does not create a new generation of data! You have to use newGeneration() for that.
But nevertheless it makes sense to have these functions for example to add the fact that the data was filtered or that it was changed without creation of a new generation...
Referenced by NSEvaluation::ModifierItem::process().
int NSCore::AcqisitionDataSet::currentGenerationNumber | ( | ) | const |
int NSCore::AcqisitionDataSet::parentGeneration | ( | int | generation = -1 |
) | const |
Return the generations parent generation.
-1 means the current generation
void NSCore::AcqisitionDataSet::newGeneration | ( | QString | prefix, | |
int | channels, | |||
int | samples | |||
) |
create a new named generation of data
Create a new generation of raw-data (with the given number of channels and samples) and create a new prefix that has the new generation attached.
Referenced by NSEvaluation::ModifierItem::process().
QString NSCore::AcqisitionDataSet::getPrefix | ( | int | generation = -1 |
) | const |
Return the prefix for a specific generation.
void NSCore::AcqisitionDataSet::addResult | ( | QString | name, | |
QVariant | value | |||
) |
NamedQVariantTreeItem* NSCore::AcqisitionDataSet::result | ( | QString | name | ) |
Get a result.
NamedQVariantTreeItem* NSCore::AcqisitionDataSet::resulttree | ( | ) |
Access the whole result-tree.
double NSCore::AcqisitionDataSet::sample | ( | int | channel, | |
int | sample, | |||
int | generation = -1 | |||
) | const |
access and manipulate the data sample-by-sample
A generation of -1 ( the default-argument ) means to use the current generation.
void NSCore::AcqisitionDataSet::setSample | ( | int | channel, | |
int | sample, | |||
double | value, | |||
int | generation = -1 | |||
) |
access and manipulate the data sample-by-sample
A generation of -1 ( the default-argument ) means to use the current generation.
double* NSCore::AcqisitionDataSet::getRawChannel | ( | int | channel, | |
int | generation = -1 | |||
) |
Access the raw double-array for one channel.
A generation of -1 ( the default-argument ) means to use the current generation.
Referenced by NSAcqiris::ConverterThread::run().
double* NSCore::AcqisitionDataSet::getRawData | ( | int | generation = -1 |
) |
Access the raw double-array for all channels.
A generation of -1 ( the default-argument ) means to use the current generation.
void NSCore::AcqisitionDataSet::updateMinMax | ( | int | generation = -1 |
) |
Update min/max after setting data via the getRaw*-functions.
A generation of -1 ( the default-argument ) means to use the current generation.
Referenced by NSAcqiris::ConverterThread::run().
void NSCore::AcqisitionDataSet::resetMinMaxCache | ( | int | generation = -1 |
) |
Reset the min/max-cache for the given generation.
A generation of -1 ( the default-argument ) means to use the current generation.
Referenced by NSEvaluation::ModifierItem::process().
int NSCore::AcqisitionDataSet::channels | ( | int | generation = -1 |
) | const |
Return the number of channels in the given generation.
A generation of -1 ( the default-argument ) means to use the current generation.
Referenced by NSEvaluation::Modifier::prepare(), and NSEvaluation::ModifierItem::process().
int NSCore::AcqisitionDataSet::samples | ( | int | generation = -1 |
) | const |
Return the number of samples in the given generation.
A generation of -1 ( the default-argument ) means to use the current generation.
Referenced by NSEvaluation::Modifier::prepare(), NSEvaluation::ModifierItem::process(), and NSAcqiris::ConverterThread::run().
void NSCore::AcqisitionDataSet::debugPrint | ( | ) | const |
Just for debug.
AcqisitionDataSet_Private* NSCore::AcqisitionDataSet::d [private] |