Diff of /src/gpib/gpib_read.cc [e63548] .. [3a7836]  Maximize  Restore

Switch to side-by-side view

--- a/src/gpib/gpib_read.cc
+++ b/src/gpib/gpib_read.cc
@@ -40,7 +40,7 @@
 
 DEFUN_DLD (gpib_read, args, nargout,
         "-*- texinfo -*-\n\
-@deftypefn {Loadable Function} {[@var{data}, @var{count}] = } gpib_read (@var{gpib}, @var{n})\n \
+@deftypefn {Loadable Function} {[@var{data}, @var{count}, @var{eoi}] = } gpib_read (@var{gpib}, @var{n})\n \
 \n\
 Read from gpib interface.\n \
 \n\
@@ -48,6 +48,7 @@
 @var{n} - number of bytes to attempt to read of type Integer.\n \
 \n\
 The gpib_read() shall return number of bytes successfully read in @var{count} as Integer and the bytes themselves in @var{data} as uint8 array.\n \
+@var{eoi} indicates read operation complete \n \
 @end deftypefn")
 {
 #ifndef BUILD_GPIB
@@ -95,7 +96,8 @@
     read_interrupt = false;
 
     // Read data
-    int bytes_read = gpib->read(buffer, buffer_len);
+    bool eoi;
+    int bytes_read = gpib->read(buffer, buffer_len, &eoi);
 
     // Restore default signal handling
     // TODO: a better way?
@@ -110,6 +112,7 @@
 
     return_list(0) = data;
     return_list(1) = bytes_read;
+    return_list(1) = eoi;
 
     delete[] buffer;
 

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks