From 3b34f5f08d93b6d9eb86f8448d8ba0702ac4945d Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Fri, 28 Mar 2008 21:10:56 +0000 Subject: [PATCH] Added wrapper for comedi_internal_trigger(). --- c++/include/comedilib.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/c++/include/comedilib.hpp b/c++/include/comedilib.hpp index b3fb775..95b5703 100644 --- a/c++/include/comedilib.hpp +++ b/c++/include/comedilib.hpp @@ -405,6 +405,18 @@ namespace comedi return result; } unsigned index() const {return _index;}; + void internal_trigger(unsigned trig_num) const + { + int retval = comedi_internal_trigger(comedi_handle(), index(), trig_num); + if(retval < 0) + { + std::ostringstream message; + message << __PRETTY_FUNCTION__ << ": comedi_internal_trigger() failed."; + std::cerr << message.str() << std::endl; + comedi_perror("comedi_internal_trigger"); + throw std::runtime_error(message.str()); + } + } unsigned max_buffer_size() const { int retval = comedi_get_max_buffer_size(comedi_handle(), index()); -- 2.26.2