Added wrapper for comedi_internal_trigger().
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 28 Mar 2008 21:10:56 +0000 (21:10 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 28 Mar 2008 21:10:56 +0000 (21:10 +0000)
c++/include/comedilib.hpp

index b3fb775ee1d4dd1721d59c010e450ed457450605..95b57033e79237db713aa35cf2cbd2b07c6ed3cb 100644 (file)
@@ -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());