TOBI SignalServer  0.1
tobiss::gBSamp Class Reference

This class is used to gain access to PCMCIA-cards. More...

#include <gBSamp_unix.h>

+ Inheritance diagram for tobiss::gBSamp:
+ Collaboration diagram for tobiss::gBSamp:

Public Member Functions

 gBSamp (ticpp::Iterator< ticpp::Element > hw)
 Constructor for initialization with an XML object.
virtual ~gBSamp ()
 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).
virtual void run ()
 Method to start data acquisition.
virtual void stop ()
 Method to stop data acquisition.
 gBSamp (ticpp::Iterator< ticpp::Element > hw)
 Constructor for initialization with an XML object.
virtual ~gBSamp ()
 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).
virtual void run ()
 Method to start data acquisition.
virtual void stop ()
 Method to stop data acquisition.

Private Member Functions

int initCard ()
 Initialize device.
void initCard ()
 Initialize device.
void stopDAQ ()
 Stops the device if an error occurs.
void readFromDAQCard ()
 Starts reading from device.
void checkNIDAQmxError (nidaqmx::int32 error_code, bool throw_on_failure=true)
 Check error codes.
nidaqmx::int32 getDAQmxModeID (daq_mode_type val)
 Get the appropriate NIDAQmx value for the daq mode.

Private Attributes

boost::uint32_t expected_values_
std::vector< double > samples_
 temporary vector holding recent samples of the sine (1 element per channel)
boost::int32_t error_
boost::int32_t first_run_
comedi_t * device_
comedi_cmd comedi_cmd_
comedi_range * range_info_
int maxdata_
unsigned int * channel_list_
boost::uint16_t current_block_
 counter variable -- only used if blocks >1
std::vector< nidaqmx::float64 > samples_
 temporary vector holding recent samples of the sine (1 element per channel)
nidaqmx::TaskHandle task_handle_
nidaqmx::int32 read_samples_
nidaqmx::int32 received_samples_
double max_timeout_
nidaqmx::NIDaqmxWrapper nidaqmx_
std::map< daq_mode_type,
nidaqmx::int32 > 
nidaqmx_modes_map_

Static Private Attributes

static const
HWThreadBuilderTemplateRegistratorWithoutIOService
< gBSamp
factory_registrator_

Detailed Description

This class is used to gain access to PCMCIA-cards.

This class is used to gain access to National Instruments cards.

This file is for Linux and uses the comedi-lib

This file is for Windows and uses the National Instruments library

Definition at line 59 of file gBSamp_unix.h.


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables