|
libGDF
|
Representation of a channel (signal in GDF) More...
#include <Channel.h>
Public Member Functions | |
| Channel (const SignalHeader *sig_hdr, const size_t length) | |
| Constructor. | |
| Channel (const SignalHeader *sig_hdr) | |
| Constructor. | |
| Channel (const Channel &other) | |
| Copy Constructor. | |
| virtual | ~Channel () |
| Destructor. | |
| void | clear () |
| Reset read and write positions. | |
| void | addSamplePhys (const double value) |
| Add a physical sample to the channel. | |
| template<typename T > | |
| void | addSampleRaw (const T rawval) |
| Add a raw sample to the channel. | |
| void | blitSamplesPhys (const double *values, size_t num) |
| Blit a number of physical samples into channel. | |
| template<typename T > | |
| void | blitSamplesRaw (const T *values, size_t num) |
| Blit a number of raw samples into channel. | |
| void | fillPhys (const double value, size_t num) |
| Fill a number of samples with the same physical value. | |
| template<typename T > | |
| void | fillRaw (const T value, size_t num) |
| Fill a number of samples with the same raw value. | |
| void | setSamplePhys (size_t pos, double value) |
| set sample value | |
| double | getSamplePhys (size_t pos) |
| get sample value | |
| void | deblitSamplesPhys (double *values, size_t start, size_t num) |
| Blit a number of physical samples from channel to buffer. | |
| template<typename T > | |
| void | deblitSamplesRaw (T *values, size_t start, size_t num) |
| Blit a number of raw samples from channel to buffer. | |
| size_t | getFree () |
| Get number of free samples. | |
| size_t | getWritten () |
| Get number of written samples. | |
| uint32 | getTypeID () |
| Get type of channel. | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const Channel &c) |
| Channel Serializer. | |
| std::istream & | operator>> (std::istream &in, Channel &c) |
| Channel Deserializer. | |
| gdf::Channel::Channel | ( | const SignalHeader * | sig_hdr | ) |
Constructor.
Channel length is initialized to channel's samples_per_record.
Definition at line 80 of file Channel.cpp.
| void gdf::Channel::addSamplePhys | ( | const double | value | ) |
Add a physical sample to the channel.
value is scaled from [phys_min..phys_max] to [dig_min..dig_max] and converted to the channel's data type
Definition at line 205 of file Channel.cpp.
Here is the caller graph for this function:| void gdf::Channel::addSampleRaw | ( | const T | rawval | ) |
| void gdf::Channel::blitSamplesPhys | ( | const double * | values, |
| size_t | num | ||
| ) |
Blit a number of physical samples into channel.
values are scaled from [phys_min..phys_max] to [dig_min..dig_max] and converted to the channel's data type
Definition at line 230 of file Channel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void gdf::Channel::blitSamplesRaw | ( | const T * | values, |
| size_t | num | ||
| ) |
| void gdf::Channel::deblitSamplesPhys | ( | double * | values, |
| size_t | start, | ||
| size_t | num | ||
| ) |
Blit a number of physical samples from channel to buffer.
values are scaled from [dig_min..dig_max] to [phys_min..phys_max] and converted to double
Definition at line 334 of file Channel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void gdf::Channel::fillPhys | ( | const double | value, |
| size_t | num | ||
| ) |
Fill a number of samples with the same physical value.
value is scaled from [phys_min..phys_max] to [dig_min..dig_max] and converted to the channel's data type
Definition at line 239 of file Channel.cpp.
| void gdf::Channel::fillRaw | ( | const T | value, |
| size_t | num | ||
| ) |
Fill a number of samples with the same raw value.
value is converted to the channel's data type but otherwise remains unmodified
Definition at line 263 of file Channel.cpp.