From 51df1a7e8daeaf9af7207b3cec0a87f96880b65a Mon Sep 17 00:00:00 2001
From: Arafat Nourredine <arafat.nourredine@synchrotron-soleil.fr>
Date: Tue, 29 Sep 2009 07:56:13 +0000
Subject: [PATCH] - Add BufferDepth property and use it to memorize bufferDepth
 attribute in order to keep compatibility wilth previous version - call
 init_board() in stop() command

---
 src/RetrigAO.h | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/src/RetrigAO.h b/src/RetrigAO.h
index e6c5a28..93a26e6 100644
--- a/src/RetrigAO.h
+++ b/src/RetrigAO.h
@@ -8,9 +8,13 @@
 //
 // $Author: anoureddine $
 //
-// $Revision: 1.8 $
+// $Revision: 1.9 $
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.8  2009/09/16 08:10:54  anoureddine
+// - Transform bufferDepth property into attribute.
+// - Generate code with pogo 5.2.10
+//
 // Revision 1.7  2009/07/31 06:53:51  flanglois
 // - support external sampling (conversionSource)
 //
@@ -56,7 +60,7 @@
 //class ADLinkContinuousAO;
 /**
  * @author	$Author: anoureddine $
- * @version	$Revision: 1.8 $ $
+ * @version	$Revision: 1.9 $ $
  */
 
  //	Add your own constants definitions here.
@@ -204,6 +208,10 @@ public :
  *	If trigger mode is delay, configure the delay in seconds.
  */
 	Tango::DevUShort	delay;
+/**
+ *	The buffer depth for <b>one channel</b>
+ */
+	Tango::DevUShort	bufferDepth;
 /**
  *	The waveform for channel 0 (attribute persistency).
  */
@@ -506,7 +514,7 @@ public :
  
 protected :	
 	//	Add your own data members here
-	//-----------------------------------------
+	//-----------------------------------------	
    ADLinkContinuousAO* ao;
    void set_internal_state(void);
    void stop_with_zero_forcing();
@@ -520,12 +528,20 @@ protected :
    double* ch7;
    double err_ctr;
    short use_fifo;
-   unsigned short bufferDepth;   
+   //- Store the values into the property
+   //- Properties stuff
+   int				FindIndexFromPropertyName(Tango::DbData& dev_prop, string property_name);
+   template <class T>
+   void			create_property_if_empty(Tango::DbData& dev_prop,T value, string property_name);
+   template <class T>
+   void			store_value_as_property(T value, string property_name);
+   
    void save_waveform(double* waveform, string wfm_channel);
    void load_waveform(double* waveform, string wfm_channel);
+   
    void init_board(void);   
    asl::ContinuousAOConfig config;
-   asl::ContinuousAOConfig stop_config;
+   asl::ContinuousAOConfig stop_config; 
 };
 
 }	// namespace
-- 
GitLab