47 #include <visp3/sensor/vpComedi.h> 48 #include <visp3/gui/vpPlot.h> 52 #ifdef VISP_HAVE_COMEDI 58 #ifdef VISP_HAVE_DISPLAY 59 vpPlot scope(1, 700, 700, 100, 200, std::string(
"ATI physical sensor data (") + comedi.
getPhyDataUnits() + std::string(
")"));
62 scope.setLegend(0, i,
"G" + dynamic_cast< std::ostringstream & >((std::ostringstream() << i)).str());
65 std::string file(
"recorded-physical-data-sync.txt");
66 std::ofstream f(file.c_str());
69 #ifdef VISP_HAVE_DISPLAY 72 std::cout <<
"Data recording during 20 seconds in progress..." << std::endl;
78 double timestamp = loop_time - start_time;
80 f << timestamp <<
" " << phydata.
t() << std::endl;
82 #ifdef VISP_HAVE_DISPLAY 83 scope.plot(0, timestamp, phydata);
91 std::cout <<
"You should install comedi to enable this test..." << std::endl;
VISP_EXPORT int wait(double t0, double t)
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
void setChannelNumbers(const unsigned int &nchannel)
vpColVector getPhyData() const
VISP_EXPORT double measureTimeMs()
void setDevice(const std::string &device)
Set comedi device name. Default value is /dev/comedi0.
unsigned int getNChannel() const
Get number of channels.
void initGraph(unsigned int graphNum, unsigned int curveNbr)
std::string getPhyDataUnits() const
Get units (V or mA) of the physical data acquired by getPhyData() or getPhyDataAsync().
Implementation of column vector and the associated operations.
This class enables real time drawing of 2D or 3D graphics. An instance of the class open a window whi...