From 84c2e8c01681836dbc07b28a11d70b8be1a195a2 Mon Sep 17 00:00:00 2001
From: Xavier Elattaoui <xavier.elattaoui@synchrotron-soleil.fr>
Date: Wed, 5 Aug 2020 15:01:58 +0000
Subject: [PATCH] Minor changes (for test): write_read instead of write then
 read

---
 src/KeithleyDDCProtocol.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/KeithleyDDCProtocol.cpp b/src/KeithleyDDCProtocol.cpp
index 443bdbb..e41bb60 100644
--- a/src/KeithleyDDCProtocol.cpp
+++ b/src/KeithleyDDCProtocol.cpp
@@ -301,8 +301,8 @@ std::string argout("no data");
 
   //- get data value
   cmd_to_send << "X" << std::ends;
-  _communication_link->write(cmd_to_send.str());
-  argout = _communication_link->read();
+  argout = _communication_link->write_read(cmd_to_send.str());
+  //XE argout = _communication_link->read();
 
   //- check if device range is overloaded : First char of the prefix !
   if(argout[0] == 'O') //- O means overload !
@@ -410,9 +410,9 @@ std::string argout("no data");
 	cmd_to_send.str("");
 	//- get status word
 	cmd_to_send << "U1X" << std::endl;
-	_communication_link->write(cmd_to_send.str());
+	argout = _communication_link->write_read(cmd_to_send.str());
   //- DDC devices are to slow to give a response for a write_read cmd
-	argout = _communication_link->read();
+	//XE argout = _communication_link->read();
 
 	return argout;
 }
@@ -428,8 +428,8 @@ std::string argout("no data");
 	cmd_to_send.str("");
 	//- get status word
 	cmd_to_send << "U0X" << std::endl;
-	_communication_link->write(cmd_to_send.str());
-	argout = _communication_link->read();
+	argout = _communication_link->write_read(cmd_to_send.str());
+	//XE argout = _communication_link->read();
 
 	return argout;
 }
-- 
GitLab