44 #include <visp3/gui/vpPlot.h>
45 #include <visp3/sensor/vpComedi.h>
49 #ifdef ENABLE_VISP_NAMESPACE
52 #ifdef VISP_HAVE_COMEDI
58 #ifdef VISP_HAVE_DISPLAY
59 vpPlot scope(1, 700, 700, 100, 200,
60 std::string(
"ATI physical sensor data (") + comedi.
getPhyDataUnits() + std::string(
")"));
62 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
63 for (
unsigned int i = 0; i < comedi.
getNChannel(); i++) {
64 scope.setLegend(0, i,
"G" + ((std::ostringstream() << i)).str());
69 std::string file(
"recorded-physical-data-sync.txt");
70 std::ofstream f(file.c_str());
73 #ifdef VISP_HAVE_DISPLAY
76 std::cout <<
"Data recording during 20 seconds in progress..." << std::endl;
82 double timestamp = loop_time - start_time;
84 f << timestamp <<
" " << phydata.
t() << std::endl;
86 #ifdef VISP_HAVE_DISPLAY
87 scope.plot(0, timestamp, phydata);
95 std::cout <<
"You should install comedi to enable this test..." << std::endl;
Implementation of column vector and the associated operations.
void setChannelNumbers(const unsigned int &nchannel)
void setDevice(const std::string &device)
Set comedi device name. Default value is /dev/comedi0.
unsigned int getNChannel() const
Get number of channels.
vpColVector getPhyData() const
std::string getPhyDataUnits() const
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
This class enables real time drawing of 2D or 3D graphics. An instance of the class open a window whi...
VISP_EXPORT int wait(double t0, double t)
VISP_EXPORT double measureTimeMs()