TOBI SignalServer
0.1
|
A base class providing basic functionallity for artificial signal creation. More...
#include <artificial_signal_source.h>
Public Member Functions | |
virtual | ~ArtificialSignalSource () |
Destructor. | |
virtual SampleBlock< double > | getSyncData () |
Method to achieve synchronous data acquisition (method is blocking). | |
virtual SampleBlock< double > | getAsyncData () |
Method to achieve asynchronous data acquisition (method is non-blocking). | |
Protected Member Functions | |
ArtificialSignalSource (boost::asio::io_service &io, ticpp::Iterator< ticpp::Element > hw) | |
Constructor for initialization with an XML object. | |
virtual void | run () |
Method to start data acquisition. | |
virtual void | stop () |
Method to stop data acquisition. | |
void | init () |
Method initializing the artificial signal source object. | |
virtual void | setHardware (ticpp::Iterator< ticpp::Element >const &hw)=0 |
Set the configuration of the SineGenerator with a XML object. | |
virtual void | generateSignal ()=0 |
Abstract method generating the artificial signal. | |
virtual void | setDeviceSettings (ticpp::Iterator< ticpp::Element >const &father)=0 |
Set configuration listed in the <device_settings> section in the XML file. | |
virtual void | setChannelSettings (ticpp::Iterator< ticpp::Element >const &father)=0 |
Set configuration listed in the <channel_settings> section in the XML file. | |
Protected Attributes | |
bool | acquiring_ |
to check, if data acquisition has started (needed if used as master) | |
boost::asio::io_service & | io_ |
boost::asio::deadline_timer * | t_ |
timer object for accurate timing | |
double | step_ |
needed for sine generation | |
double | cycle_dur_ |
needed for sine generation | |
boost::uint16_t | current_block_ |
counter variable -- only used if blocks >1 | |
boost::posix_time::microseconds | td_ |
time period for the timer | |
boost::mutex | sync_mut_ |
mutex neede for synchronisation | |
boost::condition_variable_any | cond_ |
condition variable to wake up getSyncData() | |
std::vector< double > | samples_ |
temporary vector holding recent samples of the sine (1 element per channel) | |
SampleBlock< double > | buffer_ |
Buffer object used if blockwise data generation is set. |
A base class providing basic functionallity for artificial signal creation.
Definition at line 62 of file artificial_signal_source.h.