From 2684c6896c17eebb9717e7846a111938a6836bed Mon Sep 17 00:00:00 2001
From: Xavier Elattaoui <xavier.elattaoui@synchrotron-soleil.fr>
Date: Thu, 12 Mar 2009 09:29:00 +0000
Subject: [PATCH] xavier: Keithley part : support for 6517.

---
 include/AbstractElectrometerClass.h | 15 ++++++++++-----
 include/Keithley_6517.h             |  7 +++++++
 src/KeithleySCPIProtocol.cpp        |  2 +-
 src/Keithley_6517.cpp               | 22 ++++++++++++++++++++++
 4 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/include/AbstractElectrometerClass.h b/include/AbstractElectrometerClass.h
index 18650bb..dea993a 100644
--- a/include/AbstractElectrometerClass.h
+++ b/include/AbstractElectrometerClass.h
@@ -9,9 +9,14 @@
 //
 // $Author: xavela $
 //
-// $Revision: 1.15 $
+// $Revision: 1.16 $
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.15  2009/03/10 10:29:14  xavela
+// xavier:
+// range values ordered
+// set_range added
+//
 // Revision 1.14  2009/01/19 12:00:25  xavela
 // xavier :
 // - MCCE2 (Novelec part) : methods to change the active channel to communicate with.
@@ -138,8 +143,8 @@ public:
 	void zero_check_off		(void);
 	void zero_correct_on	(void);
 	void zero_correct_off	(void);
-	void auto_zero_on		(void);
-	void auto_zero_off		(void);
+	virtual void auto_zero_on		(void);
+	virtual void auto_zero_off		(void);
 	virtual void autoRange_off		(void);
 	virtual void setAmperMeterMode  (void);
 	virtual void setVoltMeterMode	(void);
@@ -153,8 +158,8 @@ public:
 	void abort						(void); 
 	virtual void init_keithley		(void); 
 	void clear_registers			(void); 
-	void averageStateON				(void); 
-	void averageStateOFF			(void); 
+	virtual void averageStateON		(void); 
+	virtual void averageStateOFF	(void); 
 	virtual void set_knplc			(float nPLC);
 	virtual void set_triggercount	(short trigcounts);
 	void set_triggerdelay			(std::string trigdelay);
diff --git a/include/Keithley_6517.h b/include/Keithley_6517.h
index c2610cd..fcccd5a 100644
--- a/include/Keithley_6517.h
+++ b/include/Keithley_6517.h
@@ -81,6 +81,13 @@ public:
 	//-	TODO :
 	//	SCPI_Filters*	_ddcFilters;
 	//	SCPI_Triggers*	_ddcTriggers;
+
+	/**
+	*  \brief Not supported commands.
+	*/
+	void auto_zero_on	(void);
+	void auto_zero_off	(void);
+
 private:
 	//- method to obtain the range index
 	void update_range (void);
diff --git a/src/KeithleySCPIProtocol.cpp b/src/KeithleySCPIProtocol.cpp
index a661f49..58f8607 100644
--- a/src/KeithleySCPIProtocol.cpp
+++ b/src/KeithleySCPIProtocol.cpp
@@ -32,7 +32,7 @@
 KeithleySCPIProtocol::KeithleySCPIProtocol (std::string& gpib_device_name)
 :	ElectrometerProtocol(),
 	isDiffSuportedMode(false),
-  trigCountStr("")
+	trigCountStr("")
 {
 	std::cout << "KeithleySCPIProtocol::KeithleySCPIProtocol <-" << std::endl;
 
diff --git a/src/Keithley_6517.cpp b/src/Keithley_6517.cpp
index 502999b..b5ea7d4 100644
--- a/src/Keithley_6517.cpp
+++ b/src/Keithley_6517.cpp
@@ -502,4 +502,26 @@ void Keithley_6517::init_keithley (void)
   _electrometerProtocol->init_keithley();
 }
 
+// ============================================================================
+// Keithley_6517:: THIS MODEL DOES NOT SUPPORT THESE COMMANDS 
+// ============================================================================
+// ============================================================================
+// Keithley_6517::auto_zero_on
+// ============================================================================
+void Keithley_6517::auto_zero_on (void) 
+{
+	throw electrometer::ElectrometerException("COMMAND_NOT_SUPPORTED", 
+		"This Keithley 6517 does bot support this command.",
+		"Keithley_6517::auto_zero_on( ).");
+}
+// ============================================================================
+// Keithley_6517::auto_zero_off
+// ============================================================================
+void Keithley_6517::auto_zero_off (void) 
+{
+	throw electrometer::ElectrometerException("COMMAND_NOT_SUPPORTED", 
+		"This Keithley 6517 does bot support this command.",
+		"Keithley_6517::auto_zero_off( ).");
+}
+
 
-- 
GitLab