From 061063df52d031fb4613885c902cf19b853b4bf0 Mon Sep 17 00:00:00 2001
From: Xavier Elattaoui <xavier.elattaoui@synchrotron-soleil.fr>
Date: Tue, 26 Feb 2008 08:32:59 +0000
Subject: [PATCH] xavier : ajout de la commande WriteRead

---
 src/AcquireWaveformLecroy.cpp      |  75 +++--
 src/AcquireWaveformLecroy.dsp      | 125 ++++++++
 src/AcquireWaveformLecroy.h        |  10 +-
 src/AcquireWaveformLecroyClass.cpp | 400 +++++++++++++------------
 src/AcquireWaveformLecroyClass.h   | 464 ++++++++++++++++++++++++++++-
 src/Makefile.VC                    |   2 +-
 6 files changed, 859 insertions(+), 217 deletions(-)
 create mode 100644 src/AcquireWaveformLecroy.dsp

diff --git a/src/AcquireWaveformLecroy.cpp b/src/AcquireWaveformLecroy.cpp
index 989b847..da6986e 100644
--- a/src/AcquireWaveformLecroy.cpp
+++ b/src/AcquireWaveformLecroy.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/AcquireWaveformLecroy.cpp,v 1.7 2004-10-22 13:24:47 buteau Exp $";
+static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/AcquireWaveformLecroy.cpp,v 1.8 2008-02-26 08:32:59 xavela Exp $";
 //+=============================================================================
 //
 // file :	  AcquireWaveformLecroy.cpp
@@ -11,11 +11,14 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio
 //
 // project :	  TANGO Device Server
 //
-// $Author: buteau $
+// $Author: xavela $
 //
-// $Revision: 1.7 $
+// $Revision: 1.8 $
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.7  2004/10/22 13:24:47  buteau
+// Second code reread. Minor modifications
+//
 // Revision 1.6  2004/10/18 13:17:49  xavela
 // xavier : add an attr waveArray2.
 // Sorts attr in expert and operator view with Pogo.
@@ -157,7 +160,11 @@ void AcquireWaveformLecroy::delete_device()
 	SocketLecroy::delete_instance(ptr_com);
 
 	//- delete the Waveform_Data obj
-	delete waveform_ptr;
+	if(waveform_ptr)
+	{
+		delete waveform_ptr;
+		waveform_ptr = 0;
+	}
 }
 
 //+----------------------------------------------------------------------------
@@ -215,37 +222,27 @@ void AcquireWaveformLecroy::init_device()
 	data_value=0;
 	data_length = 0;
 	ptr_com = 0;
+	waveform_ptr = 0;
 
 	get_device_property();
 
 	//- create the com obj
 	ptr_com = SocketLecroy::get_instance();
+
+	_is_communication_opened = false;
 	
-	//- init communication
-	try
+	//- create the waveform obj
+	waveform_ptr = new WaveForm_data(channelName);
+	if ( !waveform_ptr )
 	{
-		ptr_com->TCP_Connect( (char*)iPaddress.c_str() );
-		set_state(Tango::OPEN);
-		set_status("The communication is OK.");
+		set_state(Tango::FAULT);
+		set_status("OUT OF MEMORY : objects cannot be created !");
 	}
-	catch(const lecroy::SocketException & se)
+	else
 	{
-		set_state(Tango::FAULT);
-		set_status("The communication is not well opened.");
-		Tango::DevFailed df = lecroy_to_tango_exception(se);
-		
-		Tango::Except::re_throw_exception(df,
-			(const char*) "TCP_CONNECTION_FAILED",
-			(const char*) "Cannot built a socket connection.",
-			(const char*) "AcquireWaveformLecroy::init_device()",
-			Tango::PANIC
-			);
+		set_state(Tango::ALARM);
+		set_status("Communication is not yet opened.");
 	}
-
-	//- create the waveform obj
-	waveform_ptr = new WaveForm_data(channelName);
-	set_state(Tango::ON);
-	set_status("Ready to acquire waveform.");
 }
 
 
@@ -293,7 +290,8 @@ void AcquireWaveformLecroy::get_device_property()
 		data_put.push_back(property);
 	}
 
-	get_db_device()->put_property(data_put);
+	if( !data_put.empty() )
+		get_db_device()->put_property(data_put);
 
 }
 //+----------------------------------------------------------------------------
@@ -306,6 +304,31 @@ void AcquireWaveformLecroy::get_device_property()
 void AcquireWaveformLecroy::always_executed_hook()
 {
 
+	//- init communication
+	if ( !_is_communication_opened )
+	{
+		try
+		{
+			ptr_com->TCP_Connect( (char*)iPaddress.c_str() );
+			_is_communication_opened = true;
+			set_state(Tango::OPEN);
+			set_status("The communication is OK.");
+		}
+		catch(const lecroy::SocketException & se)
+		{
+			_is_communication_opened = false;
+			set_state(Tango::FAULT);
+			set_status("The communication is not well opened.");
+			Tango::DevFailed df = lecroy_to_tango_exception(se);
+			
+			Tango::Except::re_throw_exception(df,
+				(const char*) "TCP_CONNECTION_FAILED",
+				(const char*) "Cannot built a socket connection.",
+				(const char*) "AcquireWaveformLecroy::init_device()",
+				Tango::PANIC
+				);
+		}
+	}
 	//- Get the waveform data and description( ADC resolution, horizontal and vertical infos, data length ...)
 	try
 	{
diff --git a/src/AcquireWaveformLecroy.dsp b/src/AcquireWaveformLecroy.dsp
new file mode 100644
index 0000000..9b55fe7
--- /dev/null
+++ b/src/AcquireWaveformLecroy.dsp
@@ -0,0 +1,125 @@
+# Microsoft Developer Studio Project File - Name="AcquireWaveformLecroy" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=AcquireWaveformLecroy - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "AcquireWaveformLecroy.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "AcquireWaveformLecroy.mak" CFG="AcquireWaveformLecroy - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "AcquireWaveformLecroy - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "AcquireWaveformLecroy - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "AcquireWaveformLecroy - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF  "$(CFG)" == "AcquireWaveformLecroy - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "debug"
+# PROP Intermediate_Dir "debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "$(TANGO_HOME)\include\win32" /I "." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINSTATIC" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 tangod.lib log4tangod.lib COS4d.lib omniDynamic4d.lib omniORB4d.lib omnithreadd.lib mswsock.lib ws2_32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(TANGO_HOME)\lib\win32\debug"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "AcquireWaveformLecroy - Win32 Release"
+# Name "AcquireWaveformLecroy - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=ClassFactory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=main.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=AcquireWaveformLecroy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=AcquireWaveformLecroyClass.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=AcquireWaveformLecroyStateMachine.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=AcquireWaveformLecroy.h
+# End Source File
+# Begin Source File
+
+SOURCE=AcquireWaveformLecroyClass.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/src/AcquireWaveformLecroy.h b/src/AcquireWaveformLecroy.h
index 0ed86f9..4c1ed08 100644
--- a/src/AcquireWaveformLecroy.h
+++ b/src/AcquireWaveformLecroy.h
@@ -8,9 +8,14 @@
 //
 // $Author: xavela $
 //
-// $Revision: 1.5 $
+// $Revision: 1.6 $
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.5  2004/10/18 13:17:49  xavela
+// xavier : add an attr waveArray2.
+// Sorts attr in expert and operator view with Pogo.
+// Inconsistencies removed.
+//
 // Revision 1.4  2004/10/07 09:21:18  xavela
 // xavier : no cout now.
 //
@@ -49,7 +54,7 @@
 
 /**
  * @author	$Author: xavela $
- * @version	$Revision: 1.5 $ $
+ * @version	$Revision: 1.6 $ $
  */
 
  //	Add your own constants definitions here.
@@ -222,6 +227,7 @@ protected :
 	short*	data_value;
 	double* data_scaled_value;
 	long data_length;
+	bool _is_communication_opened;
 
 	//- Method to convert all lecroy exceptions (type Waveform or Socket exceptions) on Tango exception
 	Tango::DevFailed lecroy_to_tango_exception(const lecroy::LecroyException& de);
diff --git a/src/AcquireWaveformLecroyClass.cpp b/src/AcquireWaveformLecroyClass.cpp
index 29aef1d..2524d16 100644
--- a/src/AcquireWaveformLecroyClass.cpp
+++ b/src/AcquireWaveformLecroyClass.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/AcquireWaveformLecroyClass.cpp,v 1.5 2004-10-18 13:17:49 xavela Exp $";
+static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/AcquireWaveformLecroyClass.cpp,v 1.6 2008-02-26 08:32:59 xavela Exp $";
 
 static const char *TagName = "$Name: not supported by cvs2svn $";
 
@@ -20,9 +20,14 @@ static const char *RCSfile = "$RCSfile: AcquireWaveformLecroyClass.cpp,v $";
 //
 // $Author: xavela $
 //
-// $Revision: 1.5 $
+// $Revision: 1.6 $
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.5  2004/10/18 13:17:49  xavela
+// xavier : add an attr waveArray2.
+// Sorts attr in expert and operator view with Pogo.
+// Inconsistencies removed.
+//
 // Revision 1.4  2004/10/07 09:21:18  xavela
 // xavier : no cout now.
 //
@@ -77,6 +82,8 @@ AcquireWaveformLecroyClass::AcquireWaveformLecroyClass(string &s):DeviceClass(s)
 {
 
 	cout2 << "Entering AcquireWaveformLecroyClass constructor" << endl;
+	set_default_property();
+	get_class_property();
 	write_class_property();
 	
 	cout2 << "Leaving AcquireWaveformLecroyClass constructor" << endl;
@@ -148,6 +155,54 @@ void AcquireWaveformLecroyClass::command_factory()
 	}
 }
 
+//+----------------------------------------------------------------------------
+//
+// method : 		AcquireWaveformLecroyClass::get_class_property
+// 
+// description : 	Get the class property for specified name.
+//
+// in :		string	name : The property name
+//
+//+----------------------------------------------------------------------------
+Tango::DbDatum AcquireWaveformLecroyClass::get_class_property(string &prop_name)
+{
+	for (unsigned int i=0 ; i<cl_prop.size() ; i++)
+		if (cl_prop[i].name == prop_name)
+			return cl_prop[i];
+	//	if not found, return  an empty DbDatum
+	return Tango::DbDatum(prop_name);
+}
+//+----------------------------------------------------------------------------
+//
+// method : 		AcquireWaveformLecroyClass::get_default_device_property()
+// 
+// description : 	Return the default value for device property.
+//
+//-----------------------------------------------------------------------------
+Tango::DbDatum AcquireWaveformLecroyClass::get_default_device_property(string &prop_name)
+{
+	for (unsigned int i=0 ; i<dev_def_prop.size() ; i++)
+		if (dev_def_prop[i].name == prop_name)
+			return dev_def_prop[i];
+	//	if not found, return  an empty DbDatum
+	return Tango::DbDatum(prop_name);
+}
+
+//+----------------------------------------------------------------------------
+//
+// method : 		AcquireWaveformLecroyClass::get_default_class_property()
+// 
+// description : 	Return the default value for class property.
+//
+//-----------------------------------------------------------------------------
+Tango::DbDatum AcquireWaveformLecroyClass::get_default_class_property(string &prop_name)
+{
+	for (unsigned int i=0 ; i<cl_def_prop.size() ; i++)
+		if (cl_def_prop[i].name == prop_name)
+			return cl_def_prop[i];
+	//	if not found, return  an empty DbDatum
+	return Tango::DbDatum(prop_name);
+}
 //+----------------------------------------------------------------------------
 //
 // method : 		AcquireWaveformLecroyClass::device_factory
@@ -160,150 +215,105 @@ void AcquireWaveformLecroyClass::command_factory()
 //-----------------------------------------------------------------------------
 void AcquireWaveformLecroyClass::device_factory(const Tango::DevVarStringArray *devlist_ptr)
 {
-	
-	for (long i=0 ; i < devlist_ptr->length() ; i++)
+
+	//	Create all devices.(Automatic code generation)
+	//-------------------------------------------------------------
+	for (unsigned long i=0 ; i < devlist_ptr->length() ; i++)
 	{
 		cout4 << "Device name : " << (*devlist_ptr)[i].in() << endl;
 						
-		// Create device and add it into the device list
+		// Create devices and add it into the device list
 		//----------------------------------------------------
 		device_list.push_back(new AcquireWaveformLecroy(this, (*devlist_ptr)[i]));							 
 
 		// Export device to the outside world
-		// Check before id database used.
+		// Check before if database used.
 		//---------------------------------------------
-		if (Tango::Util::_UseDb == true)
+		if ((Tango::Util::_UseDb == true) && (Tango::Util::_FileDb == false))
 			export_device(device_list.back());
 		else
 			export_device(device_list.back(), (*devlist_ptr)[i]);
 	}
+	//	End of Automatic code generation
+	//-------------------------------------------------------------
+
+}
+
+
+
+
+//+----------------------------------------------------------------------------
+//
+// method : 		AcquireWaveformLecroyClass::get_class_property()
+// 
+// description : 	Read the class properties from database.
+//
+//-----------------------------------------------------------------------------
+void AcquireWaveformLecroyClass::get_class_property()
+{
+	//	Initialize your default values here (if not done with  POGO).
+	//------------------------------------------------------------------
+
+	//	Read class properties from database.(Automatic code generation)
+	//------------------------------------------------------------------
+
+	//	Call database and extract values
+	//--------------------------------------------
+	if (Tango::Util::instance()->_UseDb==true)
+		get_db_class()->get_property(cl_prop);
+	Tango::DbDatum	def_prop;
+	int	i = -1;
+
+
+	//	End of Automatic code generation
+	//------------------------------------------------------------------
+
 }
+
 //+----------------------------------------------------------------------------
-//	Method: AcquireWaveformLecroyClass::attribute_factory(vector<Tango::Attr *> &att_list)
+//
+// method : 	AcquireWaveformLecroyClass::set_default_property
+// 
+// description: Set default property (class and device) for wizard.
+//              For each property, add to wizard property name and description
+//              If default value has been set, add it to wizard property and
+//              store it in a DbDatum.
+//
 //-----------------------------------------------------------------------------
-void AcquireWaveformLecroyClass::attribute_factory(vector<Tango::Attr *> &att_list)
+void AcquireWaveformLecroyClass::set_default_property()
 {
-	//	Attribute : rawWaveformData
-	Tango::SpectrumAttr	*raw_waveform_data = 
-		new Tango::SpectrumAttr("rawWaveformData", Tango::DEV_SHORT, 150000);
-	Tango::UserDefaultAttrProp	raw_waveform_data_prop;
-	raw_waveform_data_prop.set_label("Raw Waveform Data");
-	raw_waveform_data_prop.set_unit("data");
-	raw_waveform_data_prop.set_display_unit("data");
-	raw_waveform_data_prop.set_format("%d");
-	raw_waveform_data_prop.set_description("Gets the raw waveform data.\nMaximum size set to 150000 data by default.");
-	raw_waveform_data->set_default_properties(raw_waveform_data_prop);
-	att_list.push_back(raw_waveform_data);
-
-	//	Attribute : verticalScaledData
-	Tango::SpectrumAttr	*vertical_scaled_data = 
-		new Tango::SpectrumAttr("verticalScaledData", Tango::DEV_DOUBLE, 150000);
-	Tango::UserDefaultAttrProp	vertical_scaled_data_prop;
-	vertical_scaled_data_prop.set_label("Vertical Scaled Data");
-	vertical_scaled_data_prop.set_unit("data");
-	vertical_scaled_data_prop.set_display_unit("data");
-	vertical_scaled_data_prop.set_format("%d");
-	vertical_scaled_data_prop.set_description("Gets the scaled waveform data.\nMaximum size set to 150000 data by default.");
-	vertical_scaled_data->set_default_properties(vertical_scaled_data_prop);
-	att_list.push_back(vertical_scaled_data);
-
-	//	Attribute : waveArray1
-	Tango::Attr	*wave_array1 = 
-		new Tango::Attr("waveArray1", Tango::DEV_LONG, Tango::READ);
-	Tango::UserDefaultAttrProp	wave_array1_prop;
-	wave_array1_prop.set_label("Wave Array 1");
-	wave_array1_prop.set_unit("data");
-	wave_array1_prop.set_display_unit("data");
-	wave_array1_prop.set_format("%d");
-	wave_array1_prop.set_description("Length of the first array.\nThis second array contains data of simples\nwaveforms.");
-	wave_array1->set_default_properties(wave_array1_prop);
-	wave_array1->set_disp_level(Tango::EXPERT);
-	att_list.push_back(wave_array1);
-
-	//	Attribute : waveArray2
-	Tango::Attr	*wave_array2 = 
-		new Tango::Attr("waveArray2", Tango::DEV_LONG, Tango::READ);
-	Tango::UserDefaultAttrProp	wave_array2_prop;
-	wave_array2_prop.set_label("Wave Array 2");
-	wave_array2_prop.set_unit("data");
-	wave_array2_prop.set_display_unit("data");
-	wave_array2_prop.set_format("%d");
-	wave_array2_prop.set_description("Length of the second array.\nThis second array contains data of complex\nwaveforms (as FFT, Extrema ....).");
-	wave_array2->set_default_properties(wave_array2_prop);
-	wave_array2->set_disp_level(Tango::EXPERT);
-	att_list.push_back(wave_array2);
-
-	//	Attribute : waveArrayCount
-	Tango::Attr	*wave_array_count = 
-		new Tango::Attr("waveArrayCount", Tango::DEV_LONG, Tango::READ);
-	Tango::UserDefaultAttrProp	wave_array_count_prop;
-	wave_array_count_prop.set_label("Wave Array Count");
-	wave_array_count_prop.set_unit("data");
-	wave_array_count_prop.set_display_unit("data");
-	wave_array_count_prop.set_format("%d");
-	wave_array_count_prop.set_description("Length of the two arrays.\nIf the length of wavearray1 is different of this\nlength that's means data are present in the\narray wavearray2. Which is used for complex\ndata as math operations on a waveform.");
-	wave_array_count->set_default_properties(wave_array_count_prop);
-	att_list.push_back(wave_array_count);
-
-	//	Attribute : nominalBits
-	Tango::Attr	*nominal_bits = 
-		new Tango::Attr("nominalBits", Tango::DEV_SHORT, Tango::READ);
-	Tango::UserDefaultAttrProp	nominal_bits_prop;
-	nominal_bits_prop.set_label("Nominal Bits");
-	nominal_bits_prop.set_display_unit("bits");
-	nominal_bits_prop.set_format("%d");
-	nominal_bits_prop.set_description("ADC resolution.\nFor simple data this ADC is an 8 bits resolution\nelse it's can be 10 up to 12 bits");
-	nominal_bits->set_default_properties(nominal_bits_prop);
-	nominal_bits->set_disp_level(Tango::EXPERT);
-	att_list.push_back(nominal_bits);
-
-	//	Attribute : horizontalInterval
-	Tango::Attr	*horizontal_interval = 
-		new Tango::Attr("horizontalInterval", Tango::DEV_DOUBLE, Tango::READ);
-	Tango::UserDefaultAttrProp	horizontal_interval_prop;
-	horizontal_interval_prop.set_label("Horizontal Interval");
-	horizontal_interval_prop.set_description("Sampling interval for time domain waveforms\nNeeded to scale the waveform data stored\nin the rawWaveformData attribute.");
-	horizontal_interval->set_default_properties(horizontal_interval_prop);
-	horizontal_interval->set_disp_level(Tango::EXPERT);
-	att_list.push_back(horizontal_interval);
-
-	//	Attribute : horizontalOffset
-	Tango::Attr	*horizontal_offset = 
-		new Tango::Attr("horizontalOffset", Tango::DEV_DOUBLE, Tango::READ);
-	Tango::UserDefaultAttrProp	horizontal_offset_prop;
-	horizontal_offset_prop.set_label("Horizontal Offset");
-	horizontal_offset_prop.set_description("Trigger offset for the first sweep of the trigger,\nseconds between the trigger and the first \ndata point.\nNeeded to scale the waveform data stored\nin the rawWaveformData attribute.");
-	horizontal_offset->set_default_properties(horizontal_offset_prop);
-	horizontal_offset->set_disp_level(Tango::EXPERT);
-	att_list.push_back(horizontal_offset);
-
-	//	Attribute : verticalGain
-	Tango::Attr	*vertical_gain = 
-		new Tango::Attr("verticalGain", Tango::DEV_DOUBLE, Tango::READ);
-	Tango::UserDefaultAttrProp	vertical_gain_prop;
-	vertical_gain_prop.set_label("Vertical Gain");
-	vertical_gain_prop.set_description("The vertical gain.\nUsed to scale the waveform data stored in\n the rawWaveformData attribute.");
-	vertical_gain->set_default_properties(vertical_gain_prop);
-	vertical_gain->set_disp_level(Tango::EXPERT);
-	att_list.push_back(vertical_gain);
-
-	//	Attribute : verticalOffset
-	Tango::Attr	*vertical_offset = 
-		new Tango::Attr("verticalOffset", Tango::DEV_DOUBLE, Tango::READ);
-	Tango::UserDefaultAttrProp	vertical_offset_prop;
-	vertical_offset_prop.set_label("Vertical Offset");
-	vertical_offset_prop.set_description("Needed to scale the waveform data stored\nin the rawWaveformData attribute.");
-	vertical_offset->set_default_properties(vertical_offset_prop);
-	vertical_offset->set_disp_level(Tango::EXPERT);
-	att_list.push_back(vertical_offset);
-
-	//	Attribute : triggerTime
-	Tango::Attr	*trigger_time = 
-		new Tango::Attr("triggerTime", Tango::DEV_STRING, Tango::READ);
-	Tango::UserDefaultAttrProp	trigger_time_prop;
-	trigger_time_prop.set_label("Trigger Time");
-	trigger_time->set_default_properties(trigger_time_prop);
-	att_list.push_back(trigger_time);
+	string	prop_name;
+	string	prop_desc;
+	string	prop_def;
+
+	vector<string>	vect_data;
+	//	Set Default Class Properties
+	//	Set Default Device Properties
+	prop_name = "IPaddress";
+	prop_desc = "The IP address of the Lecroy scope to build a connection with.";
+	prop_def  = "";
+	if (prop_def.length()>0)
+	{
+		Tango::DbDatum	data(prop_name);
+		data << vect_data ;
+		dev_def_prop.push_back(data);
+		add_wiz_dev_prop(prop_name, prop_desc,  prop_def);
+	}
+	else
+		add_wiz_dev_prop(prop_name, prop_desc);
+
+	prop_name = "ChannelName";
+	prop_desc = "The name of channel on which the acquisition will be done.\nThis name must be composed with two caracters : (a letter followed by a number)\nC for a physical channel\nF for a calculated waveform\nM for a memorised waveform\n...\nExample : C2 (is the channel 2)\nDefault : C1 (channel 1";
+	prop_def  = "";
+	if (prop_def.length()>0)
+	{
+		Tango::DbDatum	data(prop_name);
+		data << vect_data ;
+		dev_def_prop.push_back(data);
+		add_wiz_dev_prop(prop_name, prop_desc,  prop_def);
+	}
+	else
+		add_wiz_dev_prop(prop_name, prop_desc);
 
 }
 //+----------------------------------------------------------------------------
@@ -320,72 +330,92 @@ void AcquireWaveformLecroyClass::write_class_property()
 	if (Tango::Util::_UseDb == false)
 		return;
 
-	//	Prepeare DbDatum
-	//--------------------------------------------
+	Tango::DbData	data;
+	string	classname = get_name();
+	string	header;
+	string::size_type	start, end;
+
+	//	Put title
 	Tango::DbDatum	title("ProjectTitle");
 	string	str_title("Acquire_Waveform_Lecroy_Prj");
 	title << str_title;
+	data.push_back(title);
 
+	//	Put Description
 	Tango::DbDatum	description("Description");
-	string	str_desc("This class allows the acquisition of a waveform (the description and the data),\n\
-from a specific channel and from any Lecroy scope series.\n\
-The description is a structure which contains in particular :\n\
-the length of the array 1 (the raw data)\n\
-th");
+	vector<string>	str_desc;
+	str_desc.push_back("This class allows the acquisition of a waveform (the description and the data),");
+	str_desc.push_back("from a specific channel and from any Lecroy scope series.");
+	str_desc.push_back("The description is a structure which contains in particular :");
+	str_desc.push_back("the length of the array 1 (the raw data)");
+	str_desc.push_back("the length of the array 2 (2nd part of the calculated waveform data, if any)");
+	str_desc.push_back("the timebase");
+	str_desc.push_back("the total length of the acquired data (lgth array1 + lgth array2)");
+	str_desc.push_back(".... its represents the context of the acquisition.");
+	str_desc.push_back("");
+	str_desc.push_back("NOTE :");
+	str_desc.push_back("for all Lecroy scope, the port number is the same : 1861");
 	description << str_desc;
-	
-		// Use the doc_url field to store all information 
-		// on the server version and CVS 
-		string::size_type pos, len; 
+	data.push_back(description);
 		
-		// 1) Manage module name  
-		//  get rid of the $RCSfile:  prefix and of Class.cpp suffix 
-		string classname = RCSfile;
-		
-		pos = classname.find("$RCSfile: ");
-		len = classname.length();
-		
-		if (pos != string::npos) 
-			classname= classname.substr(pos+10, len- pos-10); 
-
-		pos = classname.find ("Class.cpp",0);
-		if (pos != string::npos) 
-			classname=classname.substr(0,pos);
-		
-		// 2)  Manage version number with SOLEIL CVS rules 
-		// tag name is in the form : release_1_0 ==> transform it to 1.0
-		// 
-		string version ; 
-		string str_TagName=string(TagName); 
-		
-		pos = str_TagName.find_first_of("_",0); 
-		if (pos != string::npos) 
-			version= str_TagName.substr(pos+1, 3);
+	//	put cvs location
+	string	rcsId(RcsId);
+	string	filename(classname);
+	start = rcsId.find("/");
+	if (start!=string::npos)
+	{
+		filename += "Class.cpp";
+		end   = rcsId.find(filename);
+		if (end>start)
+		{
+			string	strloc = rcsId.substr(start, end-start);
+			//	Check if specific repository
+			start = strloc.find("/cvsroot/");
+			if (start!=string::npos && start>0)
+			{
+				string	repository = strloc.substr(0, start);
+				if (repository.find("/segfs/")!=string::npos)
+					strloc = "ESRF:" + strloc.substr(start, strloc.length()-start);
+			}
+			Tango::DbDatum	cvs_loc("cvs_location");
+			cvs_loc << strloc;
+			data.push_back(cvs_loc);
+		}
+	}
 
-		pos = version.find_first_of("_",0); 
-		if (pos != string::npos) 
-			version[pos] = '.';
+	//	Get CVS tag revision
+	string	tagname(TagName);
+	header = "$Name: ";
+	start = header.length();
+	string	endstr(" $");
+	end   = tagname.find(endstr);
+	if (end!=string::npos && end>start)
+	{
+		string	strtag = tagname.substr(start, end-start);
+		Tango::DbDatum	cvs_tag("cvs_tag");
+		cvs_tag << strtag;
+		data.push_back(cvs_tag);
+	}
 
-		
-	//  Store all info in the str_url property		
-		
-		string	str_url=  "Documentation URL = " + string(HttpServer) + classname +"-" + version + "/index.html" + "\n";
-		str_url= str_url + " Version CVS Tag = " + string(TagName)+ "\n"; 
-		str_url= str_url + " CVS location = " + string(FileName)+ "\n"; 
-		
-		Tango::DbDatum	doc_url("doc_url");
-		
-		doc_url << str_url;
+	//	Get URL location
+	string	httpServ(HttpServer);
+	if (httpServ.length()>0)
+	{
+		Tango::DbDatum	db_doc_url("doc_url");
+		db_doc_url << httpServ;
+		data.push_back(db_doc_url);
+	}
 
-		// Push everything in DataBase
+	//  Put inheritance
+	Tango::DbDatum	inher_datum("InheritedFrom");
+	vector<string> inheritance;
+	inheritance.push_back("Device_3Impl");
+	inher_datum << inheritance;
+	data.push_back(inher_datum);
 
-		Tango::DbData	data;
-		data.push_back(title);
-		data.push_back(description);
-		data.push_back(doc_url);
-		//	Call database and and values
-		//--------------------------------------------
-		get_db_class()->put_property(data);
+	//	Call database and and values
+	//--------------------------------------------
+	get_db_class()->put_property(data);
 }
 
 }	// namespace
diff --git a/src/AcquireWaveformLecroyClass.h b/src/AcquireWaveformLecroyClass.h
index 3ce358d..5d29fd4 100644
--- a/src/AcquireWaveformLecroyClass.h
+++ b/src/AcquireWaveformLecroyClass.h
@@ -12,9 +12,14 @@
 //
 // $Author: xavela $
 //
-// $Revision: 1.5 $
+// $Revision: 1.6 $
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.5  2004/10/18 13:17:49  xavela
+// xavier : add an attr waveArray2.
+// Sorts attr in expert and operator view with Pogo.
+// Inconsistencies removed.
+//
 // Revision 1.4  2004/10/07 09:21:18  xavela
 // xavier : no cout now.
 //
@@ -41,14 +46,326 @@
 #define _ACQUIREWAVEFORMLECROYCLASS_H
 
 #include <tango.h>
+#include <AcquireWaveformLecroy.h>
 
 
 namespace AcquireWaveformLecroy
 {
+//=====================================
+//	Define classes for attributes
+//=====================================
+class verticalScaledDataAttrib: public Tango::SpectrumAttr
+{
+public:
+	verticalScaledDataAttrib():SpectrumAttr("verticalScaledData", Tango::DEV_DOUBLE, Tango::READ, 150000) {};
+	~verticalScaledDataAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_verticalScaledData(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_verticalScaledData_allowed(ty);}
+};
+
+class rawWaveformDataAttrib: public Tango::SpectrumAttr
+{
+public:
+	rawWaveformDataAttrib():SpectrumAttr("rawWaveformData", Tango::DEV_SHORT, Tango::READ, 150000) {};
+	~rawWaveformDataAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_rawWaveformData(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_rawWaveformData_allowed(ty);}
+};
+
+class triggerTimeAttrib: public Tango::Attr
+{
+public:
+	triggerTimeAttrib():Attr("triggerTime", Tango::DEV_STRING, Tango::READ) {};
+	~triggerTimeAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_triggerTime(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_triggerTime_allowed(ty);}
+};
+
+class verticalOffsetAttrib: public Tango::Attr
+{
+public:
+	verticalOffsetAttrib():Attr("verticalOffset", Tango::DEV_DOUBLE, Tango::READ) {};
+	~verticalOffsetAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_verticalOffset(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_verticalOffset_allowed(ty);}
+};
+
+class verticalGainAttrib: public Tango::Attr
+{
+public:
+	verticalGainAttrib():Attr("verticalGain", Tango::DEV_DOUBLE, Tango::READ) {};
+	~verticalGainAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_verticalGain(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_verticalGain_allowed(ty);}
+};
+
+class horizontalOffsetAttrib: public Tango::Attr
+{
+public:
+	horizontalOffsetAttrib():Attr("horizontalOffset", Tango::DEV_DOUBLE, Tango::READ) {};
+	~horizontalOffsetAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_horizontalOffset(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_horizontalOffset_allowed(ty);}
+};
+
+class horizontalIntervalAttrib: public Tango::Attr
+{
+public:
+	horizontalIntervalAttrib():Attr("horizontalInterval", Tango::DEV_DOUBLE, Tango::READ) {};
+	~horizontalIntervalAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_horizontalInterval(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_horizontalInterval_allowed(ty);}
+};
+
+class nominalBitsAttrib: public Tango::Attr
+{
+public:
+	nominalBitsAttrib():Attr("nominalBits", Tango::DEV_SHORT, Tango::READ) {};
+	~nominalBitsAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_nominalBits(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_nominalBits_allowed(ty);}
+};
+
+class waveArrayCountAttrib: public Tango::Attr
+{
+public:
+	waveArrayCountAttrib():Attr("waveArrayCount", Tango::DEV_LONG, Tango::READ) {};
+	~waveArrayCountAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_waveArrayCount(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_waveArrayCount_allowed(ty);}
+};
+
+class waveArray2Attrib: public Tango::Attr
+{
+public:
+	waveArray2Attrib():Attr("waveArray2", Tango::DEV_LONG, Tango::READ) {};
+	~waveArray2Attrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_waveArray2(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_waveArray2_allowed(ty);}
+};
+
+class waveArray1Attrib: public Tango::Attr
+{
+public:
+	waveArray1Attrib():Attr("waveArray1", Tango::DEV_LONG, Tango::READ) {};
+	~waveArray1Attrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_waveArray1(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_waveArray1_allowed(ty);}
+};
+
+//=========================================
+//	Define classes for commands
+//=========================================
 //
-// Define classes for commands
+// The AcquireWaveformLecroyClass singleton definition
 //
 
+class AcquireWaveformLecroyClass : public Tango::DeviceClass
+{
+public:
+//	properties member data
+
+//	add your own data members here
+//------------------------------------
+
+public:
+	Tango::DbData	cl_prop;
+	Tango::DbData	cl_def_prop;
+	Tango::DbData	dev_def_prop;
+
+//	Method prototypes
+	static AcquireWaveformLecroyClass *init(const char *);
+	static AcquireWaveformLecroyClass *instance();
+	~AcquireWaveformLecroyClass();
+	Tango::DbDatum	get_class_property(string &);
+	Tango::DbDatum	get_default_device_property(string &);
+	Tango::DbDatum	get_default_class_property(string &);
+	
+protected:
+	AcquireWaveformLecroyClass(string &);
+	static AcquireWaveformLecroyClass *_instance;
+	void command_factory();
+	void get_class_property();
+	void attribute_factory(vector<Tango::Attr *> &);
+	void write_class_property();
+	void set_default_property();
+
+private:
+	void device_factory(const Tango::DevVarStringArray *);
+};
+
+
+}	//	//=====================================
+//	Define classes for attributes
+//=====================================
+class verticalScaledDataAttrib: public Tango::SpectrumAttr
+{
+public:
+	verticalScaledDataAttrib():SpectrumAttr("verticalScaledData", Tango::DEV_DOUBLE, Tango::READ, 150000) {};
+	~verticalScaledDataAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_verticalScaledData(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_verticalScaledData_allowed(ty);}
+};
+
+class rawWaveformDataAttrib: public Tango::SpectrumAttr
+{
+public:
+	rawWaveformDataAttrib():SpectrumAttr("rawWaveformData", Tango::DEV_SHORT, Tango::READ, 150000) {};
+	~rawWaveformDataAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_rawWaveformData(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_rawWaveformData_allowed(ty);}
+};
+
+class triggerTimeAttrib: public Tango::Attr
+{
+public:
+	triggerTimeAttrib():Attr("triggerTime", Tango::DEV_STRING, Tango::READ) {};
+	~triggerTimeAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_triggerTime(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_triggerTime_allowed(ty);}
+};
+
+class verticalOffsetAttrib: public Tango::Attr
+{
+public:
+	verticalOffsetAttrib():Attr("verticalOffset", Tango::DEV_DOUBLE, Tango::READ) {};
+	~verticalOffsetAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_verticalOffset(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_verticalOffset_allowed(ty);}
+};
+
+class verticalGainAttrib: public Tango::Attr
+{
+public:
+	verticalGainAttrib():Attr("verticalGain", Tango::DEV_DOUBLE, Tango::READ) {};
+	~verticalGainAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_verticalGain(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_verticalGain_allowed(ty);}
+};
+
+class horizontalOffsetAttrib: public Tango::Attr
+{
+public:
+	horizontalOffsetAttrib():Attr("horizontalOffset", Tango::DEV_DOUBLE, Tango::READ) {};
+	~horizontalOffsetAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_horizontalOffset(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_horizontalOffset_allowed(ty);}
+};
+
+class horizontalIntervalAttrib: public Tango::Attr
+{
+public:
+	horizontalIntervalAttrib():Attr("horizontalInterval", Tango::DEV_DOUBLE, Tango::READ) {};
+	~horizontalIntervalAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_horizontalInterval(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_horizontalInterval_allowed(ty);}
+};
+
+class nominalBitsAttrib: public Tango::Attr
+{
+public:
+	nominalBitsAttrib():Attr("nominalBits", Tango::DEV_SHORT, Tango::READ) {};
+	~nominalBitsAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_nominalBits(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_nominalBits_allowed(ty);}
+};
+
+class waveArrayCountAttrib: public Tango::Attr
+{
+public:
+	waveArrayCountAttrib():Attr("waveArrayCount", Tango::DEV_LONG, Tango::READ) {};
+	~waveArrayCountAttrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_waveArrayCount(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_waveArrayCount_allowed(ty);}
+};
+
+class waveArray2Attrib: public Tango::Attr
+{
+public:
+	waveArray2Attrib():Attr("waveArray2", Tango::DEV_LONG, Tango::READ) {};
+	~waveArray2Attrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_waveArray2(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_waveArray2_allowed(ty);}
+};
+
+class waveArray1Attrib: public Tango::Attr
+{
+public:
+	waveArray1Attrib():Attr("waveArray1", Tango::DEV_LONG, Tango::READ) {};
+	~waveArray1Attrib() {};
+	
+	virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
+	{(static_cast<AcquireWaveformLecroy *>(dev))->read_waveArray1(att);}
+	virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
+	{return (static_cast<AcquireWaveformLecroy *>(dev))->is_waveArray1_allowed(ty);}
+};
+
+//=========================================
+//	Define classes for commands
+//=========================================
 //
 // The AcquireWaveformLecroyClass singleton definition
 //
@@ -56,29 +373,170 @@ namespace AcquireWaveformLecroy
 class AcquireWaveformLecroyClass : public Tango::DeviceClass
 {
 public:
+//	properties member data
 
 //	add your own data members here
 //------------------------------------
 
 public:
+	Tango::DbData	cl_prop;
+	Tango::DbData	cl_def_prop;
+	Tango::DbData	dev_def_prop;
 
 //	Method prototypes
 	static AcquireWaveformLecroyClass *init(const char *);
 	static AcquireWaveformLecroyClass *instance();
 	~AcquireWaveformLecroyClass();
+	Tango::DbDatum	get_class_property(string &);
+	Tango::DbDatum	get_default_device_property(string &);
+	Tango::DbDatum	get_default_class_property(string &);
 	
 protected:
 	AcquireWaveformLecroyClass(string &);
 	static AcquireWaveformLecroyClass *_instance;
 	void command_factory();
+	void get_class_property();
 	void attribute_factory(vector<Tango::Attr *> &);
 	void write_class_property();
+	void set_default_property();
+
+private:
+	void device_factory(const Tango::DevVarStringArray *);
+};
+
+
+}	//	//=====================================
+//	Define classes for attributes
+//=====================================
+//=========================================
+//	Define classes for commands
+//=========================================
+//
+// The AcquireWaveformLecroyClass singleton definition
+//
+
+class AcquireWaveformLecroyClass : public Tango::DeviceClass
+{
+public:
+//	properties member data
+
+//	add your own data members here
+//------------------------------------
+
+public:
+	Tango::DbData	cl_prop;
+	Tango::DbData	cl_def_prop;
+	Tango::DbData	dev_def_prop;
+
+//	Method prototypes
+	static AcquireWaveformLecroyClass *init(const char *);
+	static AcquireWaveformLecroyClass *instance();
+	~AcquireWaveformLecroyClass();
+	Tango::DbDatum	get_class_property(string &);
+	Tango::DbDatum	get_default_device_property(string &);
+	Tango::DbDatum	get_default_class_property(string &);
+	
+protected:
+	AcquireWaveformLecroyClass(string &);
+	static AcquireWaveformLecroyClass *_instance;
+	void command_factory();
+	void get_class_property();
+	void write_class_property();
+	void set_default_property();
+
+private:
+	void device_factory(const Tango::DevVarStringArray *);
+};
+
+
+}	//	//=====================================
+//	Define classes for attributes
+//=====================================
+//=========================================
+//	Define classes for commands
+//=========================================
+//
+// The AcquireWaveformLecroyClass singleton definition
+//
+
+class AcquireWaveformLecroyClass : public Tango::DeviceClass
+{
+public:
+//	properties member data
+
+//	add your own data members here
+//------------------------------------
+
+public:
+	Tango::DbData	cl_prop;
+	Tango::DbData	cl_def_prop;
+	Tango::DbData	dev_def_prop;
+
+//	Method prototypes
+	static AcquireWaveformLecroyClass *init(const char *);
+	static AcquireWaveformLecroyClass *instance();
+	~AcquireWaveformLecroyClass();
+	Tango::DbDatum	get_class_property(string &);
+	Tango::DbDatum	get_default_device_property(string &);
+	Tango::DbDatum	get_default_class_property(string &);
+	
+protected:
+	AcquireWaveformLecroyClass(string &);
+	static AcquireWaveformLecroyClass *_instance;
+	void command_factory();
+	void get_class_property();
+	void write_class_property();
+	void set_default_property();
+
+private:
+	void device_factory(const Tango::DevVarStringArray *);
+};
+
+
+}	//	//=====================================
+//	Define classes for attributes
+//=====================================
+//=========================================
+//	Define classes for commands
+//=========================================
+//
+// The AcquireWaveformLecroyClass singleton definition
+//
+
+class AcquireWaveformLecroyClass : public Tango::DeviceClass
+{
+public:
+//	properties member data
+
+//	add your own data members here
+//------------------------------------
+
+public:
+	Tango::DbData	cl_prop;
+	Tango::DbData	cl_def_prop;
+	Tango::DbData	dev_def_prop;
+
+//	Method prototypes
+	static AcquireWaveformLecroyClass *init(const char *);
+	static AcquireWaveformLecroyClass *instance();
+	~AcquireWaveformLecroyClass();
+	Tango::DbDatum	get_class_property(string &);
+	Tango::DbDatum	get_default_device_property(string &);
+	Tango::DbDatum	get_default_class_property(string &);
+	
+protected:
+	AcquireWaveformLecroyClass(string &);
+	static AcquireWaveformLecroyClass *_instance;
+	void command_factory();
+	void get_class_property();
+	void write_class_property();
+	void set_default_property();
 
 private:
 	void device_factory(const Tango::DevVarStringArray *);
 };
 
 
-}	//	namespace AcquireWaveformLecroy
+}	//	namespace AcquireWaveformLecroy_ns
 
 #endif // _ACQUIREWAVEFORMLECROYCLASS_H
diff --git a/src/Makefile.VC b/src/Makefile.VC
index 5a9b0f9..38929f4 100644
--- a/src/Makefile.VC
+++ b/src/Makefile.VC
@@ -3,7 +3,7 @@ device_server= AcquireWaveformLecroy
 #
 #  Des includes particuliers
 #  Mettre /Ic:\monchemininclude /:\monautrechemininclude
-INCUSER= /I..include\SocketLecroy.h/I..include\Waveform.h/I..include\LecroyException.h/I..include\SocketException.h/I..include\WaveformException.h/I..include\Xstring.h
+#INCUSER= /I..include\SocketLecroy.h/I..include\Waveform.h/I..include\LecroyException.h/I..include\SocketException.h/I..include\WaveformException.h/I..include\Xstring.h
 #
 #  et vos Librairies
 # style
-- 
GitLab