From 0b4cf53b45e81b47da49803bc1c9b2f7660dfc09 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 25 Jun 2008 15:14:23 +0000 Subject: [PATCH] Added comedi::subdevice::reset wrapper for comedi_reset(). --- c++/include/comedilib.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/c++/include/comedilib.hpp b/c++/include/comedilib.hpp index 0b845da..497565b 100644 --- a/c++/include/comedilib.hpp +++ b/c++/include/comedilib.hpp @@ -509,6 +509,18 @@ namespace comedi } return cRange; } + void reset() const + { + int retval = comedi_reset(comedi_handle(), index()); + if(retval < 0) + { + std::ostringstream message; + message << __PRETTY_FUNCTION__ << ": comedi_reset() failed."; + std::cerr << message.str() << std::endl; + comedi_perror("comedi_reset"); + throw std::runtime_error(message.str()); + } + } void set_buffer_size(unsigned num_bytes) const { int retval = comedi_set_buffer_size(comedi_handle(), index(), num_bytes); -- 2.26.2