38 #include <visp3/core/vpConfig.h>
40 #ifdef VISP_HAVE_COMEDI
44 #include <visp3/core/vpException.h>
45 #include <visp3/sensor/vpComedi.h>
51 : m_device(
"/dev/comedi0"), m_handler(NULL), m_subdevice(0), m_range(0), m_aref(AREF_DIFF),
52 m_nchannel(6), m_range_info(6), m_maxdata(6), m_chanlist(6)
78 comedi_set_global_oor_behavior(COMEDI_OOR_NAN);
84 for(
unsigned int channel=0; channel <
m_nchannel; channel++) {
117 for(
unsigned int channel=0; channel <
m_nchannel; channel++) {
139 std::vector<lsampl_t> raw_data = this->
getRawData();
143 for(
unsigned int channel=0; channel <
m_nchannel; channel++) {
160 unsigned int channel = 0;
162 case UNIT_volt: units =
"V";
break;
163 case UNIT_mA: units =
"mA";
break;
164 case UNIT_none:
break;
169 #elif !defined(VISP_BUILD_SHARED_LIBS)
171 void dummy_vpComedi() {};
static bool isNaN(const double value)
error that can be emited by ViSP classes.
std::vector< lsampl_t > getRawData() const
std::vector< unsigned int > m_chanlist
Implementation of column vector and the associated operations.
std::vector< lsampl_t > m_maxdata
vpColVector getPhyData() const
std::string getPhyDataUnits() const
Get units (V or mA) of the physical data acquired by getPhyData() or getPhyDataAsync().
std::vector< comedi_range * > m_range_info