diff --git a/doc/doc_html/Attributes.html b/doc/doc_html/Attributes.html index ea4699bbb7ebc065e33c21ebd90e7fbd56483f48..23413f21c4c74f460856f45b8fb6e5aaa79043db 100644 --- a/doc/doc_html/Attributes.html +++ b/doc/doc_html/Attributes.html @@ -28,7 +28,7 @@ Device Attributes Description </h1> <Br> <b> -Revision: 1.1.1.1 - Author: syldup +Revision: 1.4 - Author: xavela </b> </center> @@ -42,26 +42,29 @@ Revision: 1.1.1.1 - Author: syldup <Td><Center><b>Data Type</b></td></Center> <Td><Center><b>R/W Type</b></td></Center> <Td><Center><b>Expert</b></td></Center> -<Tr><Td><b><Center>waveArray1</b><Br>( Length of the first array. This first array contains data of simples waveforms. )</Center></Td> -<Td><Center>DEV_LONG</Center></Td><Td><Center>READ</Center></Td><Td><Center>No</Center></Td></Tr> +<Tr><Td><b><Center>waveArray1</b><Br>( Length of the first array. This second array contains data of simples waveforms. )</Center></Td> +<Td><Center>DEV_LONG</Center></Td><Td><Center>READ</Center></Td><Td><Center>Yes</Center></Td></Tr> + +<Tr><Td><b><Center>waveArray2</b><Br>( Length of the second array. This second array contains data of complex waveforms (as FFT, Extrema ....). )</Center></Td> +<Td><Center>DEV_LONG</Center></Td><Td><Center>READ</Center></Td><Td><Center>Yes</Center></Td></Tr> <Tr><Td><b><Center>waveArrayCount</b><Br>( Length of the two arrays. If the length of wavearray1 is different of this length that's means data are present in the array wavearray2. Which is used for complex data as math operations on a waveform. )</Center></Td> <Td><Center>DEV_LONG</Center></Td><Td><Center>READ</Center></Td><Td><Center>No</Center></Td></Tr> <Tr><Td><b><Center>nominalBits</b><Br>( ADC resolution. For simple data this ADC is an 8 bits resolution else it's can be 10 up to 12 bits )</Center></Td> -<Td><Center>DEV_SHORT</Center></Td><Td><Center>READ</Center></Td><Td><Center>No</Center></Td></Tr> +<Td><Center>DEV_SHORT</Center></Td><Td><Center>READ</Center></Td><Td><Center>Yes</Center></Td></Tr> <Tr><Td><b><Center>horizontalInterval</b><Br>( Sampling interval for time domain waveforms Needed to scale the waveform data stored in the rawWaveformData attribute. )</Center></Td> -<Td><Center>DEV_DOUBLE</Center></Td><Td><Center>READ</Center></Td><Td><Center>No</Center></Td></Tr> +<Td><Center>DEV_DOUBLE</Center></Td><Td><Center>READ</Center></Td><Td><Center>Yes</Center></Td></Tr> <Tr><Td><b><Center>horizontalOffset</b><Br>( Trigger offset for the first sweep of the trigger, seconds between the trigger and the first data point. Needed to scale the waveform data stored in the rawWaveformData attribute. )</Center></Td> -<Td><Center>DEV_DOUBLE</Center></Td><Td><Center>READ</Center></Td><Td><Center>No</Center></Td></Tr> +<Td><Center>DEV_DOUBLE</Center></Td><Td><Center>READ</Center></Td><Td><Center>Yes</Center></Td></Tr> <Tr><Td><b><Center>verticalGain</b><Br>( The vertical gain. Used to scale the waveform data stored in the rawWaveformData attribute. )</Center></Td> -<Td><Center>DEV_DOUBLE</Center></Td><Td><Center>READ</Center></Td><Td><Center>No</Center></Td></Tr> +<Td><Center>DEV_DOUBLE</Center></Td><Td><Center>READ</Center></Td><Td><Center>Yes</Center></Td></Tr> <Tr><Td><b><Center>verticalOffset</b><Br>( Needed to scale the waveform data stored in the rawWaveformData attribute. )</Center></Td> -<Td><Center>DEV_DOUBLE</Center></Td><Td><Center>READ</Center></Td><Td><Center>No</Center></Td></Tr> +<Td><Center>DEV_DOUBLE</Center></Td><Td><Center>READ</Center></Td><Td><Center>Yes</Center></Td></Tr> <Tr><Td><b><Center>triggerTime</b></Center></Td> <Td><Center>DEV_STRING</Center></Td><Td><Center>READ</Center></Td><Td><Center>No</Center></Td></Tr> diff --git a/doc/doc_html/Description b/doc/doc_html/Description index 54e878e64836b806ba8e09d0f62642af56a126d6..7fef4ed12578f5608c17e64ed609fe44c5d46ffd 100644 --- a/doc/doc_html/Description +++ b/doc/doc_html/Description @@ -28,7 +28,7 @@ Device Description </h1> <Br> <b> -Revision: 1.1.1.1 - Author: syldup +Revision: 1.4 - Author: xavela </b> </center> diff --git a/doc/doc_html/DevCommands.html b/doc/doc_html/DevCommands.html index 19c9392ef7480be32189f7863b51f616c336bee2..f8eb7ae1d30735bd776b405528d85025af55d381 100644 --- a/doc/doc_html/DevCommands.html +++ b/doc/doc_html/DevCommands.html @@ -28,7 +28,7 @@ Device Commands Description </h1> <Br> <b> -Revision: 1.1.1.1 - Author: syldup +Revision: 1.4 - Author: xavela </b> </center> diff --git a/doc/doc_html/DevCommandsTable.html b/doc/doc_html/DevCommandsTable.html index 27adff808fce53f148216c340f48d80ceb3adc6a..193a01cab94a1970103e73c1d91b66111f3750a9 100644 --- a/doc/doc_html/DevCommandsTable.html +++ b/doc/doc_html/DevCommandsTable.html @@ -28,7 +28,7 @@ Device Commands Description </h1> <Br> <b> -Revision: 1.1.1.1 - Author: syldup +Revision: 1.4 - Author: xavela </b> </center> diff --git a/doc/doc_html/Properties.html b/doc/doc_html/Properties.html index a50a86ea7a97e67d6001c7bf95928b6612405ba1..95f9dd6bb960775270889b47996fede5a4ae10f3 100644 --- a/doc/doc_html/Properties.html +++ b/doc/doc_html/Properties.html @@ -28,7 +28,7 @@ Properties Description </h1> <Br> <b> -Revision: 1.1.1.1 - Author: syldup +Revision: 1.4 - Author: xavela </b> </center> diff --git a/doc/doc_html/TangoDevStates.html b/doc/doc_html/TangoDevStates.html index 55ebb64b44fb6afbe24e1726b632dac2ca523acb..e3efdaf100818e5ab9950cb3a3be08e690877a71 100644 --- a/doc/doc_html/TangoDevStates.html +++ b/doc/doc_html/TangoDevStates.html @@ -28,7 +28,7 @@ Device States Description </h1> <Br> <b> -Revision: 1.1.1.1 - Author: syldup +Revision: 1.4 - Author: xavela </b> </center> diff --git a/doc/doc_html/index.html b/doc/doc_html/index.html index 66de472deb978d2730cd2aeacef5569e55243f01..b75e0634c8e3dd3e83c627e13f50a908bfad7fbe 100644 --- a/doc/doc_html/index.html +++ b/doc/doc_html/index.html @@ -28,7 +28,7 @@ Device Server User's Guide </h1> <Br> <b> -Revision: 1.1.1.1 - Author: syldup +Revision: 1.4 - Author: xavela </b> </center> <Br> diff --git a/include/Waveform.h b/include/Waveform.h index a6d3ad4ef6b5bedc2dbf6dae2090f6d7d0fe1650..115d9e8126c02c608caaf2760865aa2427e17f16 100644 --- a/include/Waveform.h +++ b/include/Waveform.h @@ -119,7 +119,7 @@ public: void get_waveform_data (void) throw (lecroy::LecroyException); //- acquire the waveform data from the scope short* get_raw_waveform_data (void) throw (lecroy::LecroyException); //- return the ptr on sh_raw_waveform_data double* get_vertical_scaled_waveform_data (void) throw (lecroy::LecroyException); - std::string get_trigger_time_value (void) throw (lecroy::LecroyException); + std::string get_trigger_time_value (void); diff --git a/src/AcquireWaveformLecroy.cpp b/src/AcquireWaveformLecroy.cpp index d55d749544bc69ecce046c8de1b036aebe44d998..ee08502290942fd0b75af24889c784ffb1207c70 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.5 2004-10-18 09:01:40 buteau Exp $"; +static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/AcquireWaveformLecroy.cpp,v 1.6 2004-10-18 13:17:49 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.5 $ +// $Revision: 1.6 $ // // $Log: not supported by cvs2svn $ +// Revision 1.5 2004/10/18 09:01:40 buteau +// First code reread +// // Revision 1.4 2004/10/07 09:21:18 xavela // xavier : no cout now. // @@ -109,6 +112,10 @@ void AcquireWaveformLecroy::delete_device() delete attr_waveArray1_read; attr_waveArray1_read = 0; } + if (attr_waveArray2_read) { + delete attr_waveArray2_read; + attr_waveArray2_read = 0; + } if (attr_waveArrayCount_read) { delete attr_waveArrayCount_read; attr_waveArrayCount_read = 0; @@ -173,6 +180,9 @@ void AcquireWaveformLecroy::init_device() attr_waveArray1_read = new Tango::DevLong; *attr_waveArray1_read = 0; + attr_waveArray2_read = new Tango::DevLong; + *attr_waveArray2_read = 0; + attr_waveArrayCount_read = new Tango::DevLong; *attr_waveArrayCount_read = 0; @@ -228,30 +238,9 @@ void AcquireWaveformLecroy::init_device() } //- create the waveform obj - try - { - waveform_ptr = new WaveForm_data(channelName); - set_state(Tango::ON); - set_status("Ready to acquire waveform."); - } - - /* AB le constructeur de WaveForm_data ne lance pas d'exception WaveformException - // ce catch est donc inutile - - catch(const lecroy::WaveformException &we) - { - set_state(Tango::ALARM); - set_status("Not ready to acquire waveform."); - Tango::DevFailed df = lecroy_to_tango_exception(we); - - Tango::Except::re_throw_exception(df, - (const char*) "OUT_OF_MEMORY", - (const char*) "Cannot built a waveform objet.", - (const char*) "AcquireWaveformLecroy::init_device()", - Tango::PANIC - ); - } - */ + waveform_ptr = new WaveForm_data(channelName); + set_state(Tango::ON); + set_status("Ready to acquire waveform."); } @@ -389,20 +378,16 @@ void AcquireWaveformLecroy::read_attr_hardware(vector<long> &attr_list) attr_rawWaveformData_read = new Tango::DevShort[data_length]; attr_verticalScaledData_read = new Tango::DevDouble[data_length]; } - //AB le new Tango::DevShort ne peut pas �chouer pour cause de DevFailed - // ==> on ne passera jamais dans ton catch - // Soit tu le supprimes, soit tu mets un catch (std::bad_alloc) - catch(Tango::DevFailed &te) + catch(std::bad_alloc) { set_state(Tango::ALARM); set_status("Memory not allocated to receive data."); - Tango::Except::re_throw_exception(te, + Tango::Except::throw_exception( (const char *) "OUT_OF_MEMORY", (const char *) "Cannot allocate memory to receive the data.", (const char *) "AcquireWaveformLecroy::read_attr_hardware()", Tango::ERR ); - } //- Add your own code here @@ -429,6 +414,10 @@ void AcquireWaveformLecroy::read_attr_hardware(vector<long> &attr_list) { *attr_waveArray1_read = waveform_ptr->get_wavedesc_descriptor()->wave_array_1; } + if (attr_name == "waveArray2") + { + *attr_waveArray2_read = waveform_ptr->get_wavedesc_descriptor()->wave_array_2; + } if (attr_name == "waveArrayCount") { *attr_waveArrayCount_read = data_length; @@ -490,6 +479,12 @@ void AcquireWaveformLecroy::read_attr(Tango::Attribute &attr) attr.set_value(attr_waveArray1_read); } else + if (attr_name == "waveArray2") + { + // Add your own code here + attr.set_value(attr_waveArray2_read); + } + else if (attr_name == "waveArrayCount") { //- Add your own code here diff --git a/src/AcquireWaveformLecroy.h b/src/AcquireWaveformLecroy.h index 7dac097b8ef0177bcd4a61c015c99b25e500843f..0ed86f9aa90aec6f5dc8d0e772efb3428b35b974 100644 --- a/src/AcquireWaveformLecroy.h +++ b/src/AcquireWaveformLecroy.h @@ -8,9 +8,12 @@ // // $Author: xavela $ // -// $Revision: 1.4 $ +// $Revision: 1.5 $ // // $Log: not supported by cvs2svn $ +// Revision 1.4 2004/10/07 09:21:18 xavela +// xavier : no cout now. +// // Revision 1.3 2004/10/05 13:11:11 xavela // Xavier : previous commit failed. // @@ -46,7 +49,7 @@ /** * @author $Author: xavela $ - * @version $Revision: 1.4 $ $ + * @version $Revision: 1.5 $ $ */ // Add your own constants definitions here. @@ -97,11 +100,12 @@ public : * Attributs member data. */ //@{ - Tango::DevShort *attr_rawWaveformData_read; + Tango::DevShort *attr_rawWaveformData_read; Tango::DevDouble *attr_verticalScaledData_read; - Tango::DevLong *attr_waveArray1_read; - Tango::DevLong *attr_waveArrayCount_read; - Tango::DevShort *attr_nominalBits_read; + Tango::DevLong *attr_waveArray1_read; + Tango::DevLong *attr_waveArray2_read; + Tango::DevLong *attr_waveArrayCount_read; + Tango::DevShort *attr_nominalBits_read; Tango::DevDouble *attr_horizontalInterval_read; Tango::DevDouble *attr_horizontalOffset_read; Tango::DevDouble *attr_verticalGain_read; diff --git a/src/AcquireWaveformLecroyClass.cpp b/src/AcquireWaveformLecroyClass.cpp index a770dce8d7adbdabfd455d30e975e45e2dbff258..29aef1d17388afab22a84e52b9d1691917a15ac5 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.4 2004-10-07 09:21:18 xavela Exp $"; +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 *TagName = "$Name: not supported by cvs2svn $"; @@ -20,9 +20,12 @@ static const char *RCSfile = "$RCSfile: AcquireWaveformLecroyClass.cpp,v $"; // // $Author: xavela $ // -// $Revision: 1.4 $ +// $Revision: 1.5 $ // // $Log: not supported by cvs2svn $ +// Revision 1.4 2004/10/07 09:21:18 xavela +// xavier : no cout now. +// // Revision 1.3 2004/10/05 13:11:11 xavela // Xavier : previous commit failed. // @@ -212,10 +215,24 @@ void AcquireWaveformLecroyClass::attribute_factory(vector<Tango::Attr *> &att_li 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 first array contains data of simples\nwaveforms."); + 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); @@ -237,6 +254,7 @@ void AcquireWaveformLecroyClass::attribute_factory(vector<Tango::Attr *> &att_li 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 @@ -246,6 +264,7 @@ void AcquireWaveformLecroyClass::attribute_factory(vector<Tango::Attr *> &att_li 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 @@ -255,6 +274,7 @@ void AcquireWaveformLecroyClass::attribute_factory(vector<Tango::Attr *> &att_li 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 @@ -264,6 +284,7 @@ void AcquireWaveformLecroyClass::attribute_factory(vector<Tango::Attr *> &att_li 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 @@ -273,6 +294,7 @@ void AcquireWaveformLecroyClass::attribute_factory(vector<Tango::Attr *> &att_li 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 diff --git a/src/AcquireWaveformLecroyClass.h b/src/AcquireWaveformLecroyClass.h index a174c87ffa49209572edee726153b50a1c3e82f0..3ce358d5e95bb87c2073277ed67710ad2eed4fe4 100644 --- a/src/AcquireWaveformLecroyClass.h +++ b/src/AcquireWaveformLecroyClass.h @@ -12,9 +12,12 @@ // // $Author: xavela $ // -// $Revision: 1.4 $ +// $Revision: 1.5 $ // // $Log: not supported by cvs2svn $ +// Revision 1.4 2004/10/07 09:21:18 xavela +// xavier : no cout now. +// // Revision 1.3 2004/10/05 13:11:11 xavela // Xavier : previous commit failed. // diff --git a/src/ClassFactory.cpp b/src/ClassFactory.cpp index 1dbdcb79d1f1fcdc3e5b3f061bcf06be10c29312..d1760e2127840d0fc46b11544761c394b270728d 100644 --- a/src/ClassFactory.cpp +++ b/src/ClassFactory.cpp @@ -1,4 +1,4 @@ -static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/ClassFactory.cpp,v 1.3 2004-10-07 09:21:18 xavela Exp $"; +static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/ClassFactory.cpp,v 1.4 2004-10-18 13:17:49 xavela Exp $"; //+============================================================================= // // file : ClassFactory.cpp @@ -12,9 +12,12 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio // // $Author: xavela $ // -// $Revision: 1.3 $ +// $Revision: 1.4 $ // // $Log: not supported by cvs2svn $ +// Revision 1.3 2004/10/07 09:21:18 xavela +// xavier : no cout now. +// // Revision 1.2 2004/10/05 13:11:11 xavela // Xavier : previous commit failed. // @@ -42,7 +45,7 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio * Create AcquireWaveformLecroyClass singleton and store it in DServer object. * * @author $Author: xavela $ - * @version $Revision: 1.3 $ $ + * @version $Revision: 1.4 $ $ */ void Tango::DServer::class_factory() diff --git a/src/Doxyfile b/src/Doxyfile index e6d158b2c5037c932093d4e140413b8b050ff923..0119fe9c75db825a1f684e7f8d4be541a63a8aef 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -30,7 +30,7 @@ PROJECT_NUMBER = # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = D:\Temp\AcquireWaveformLecroy\src/doc_html +OUTPUT_DIRECTORY = D:\MyDeviceServer\AcquireWaveformLecroy\src/doc_html # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this @@ -304,7 +304,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = D:\Temp\AcquireWaveformLecroy\src +INPUT = D:\MyDeviceServer\AcquireWaveformLecroy\src # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp diff --git a/src/Makefile b/src/Makefile index 65ed919dbaa982569d0566b7e1b7f08248742843..b979d2e089c470d4948feea672533f4d1e8cb2bf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -18,11 +18,14 @@ # -# $Revision: 1.3 $ +# $Revision: 1.4 $ # # $Log: not supported by cvs2svn $ +# Revision 1.3 2004/10/07 09:21:19 xavela +# xavier : no cout now. +# # Revision 1.2 2004/10/05 13:11:11 xavela # Xavier : previous commit failed. # diff --git a/src/Waveform.cpp b/src/Waveform.cpp index 0951cceb689f58211f66c875e7f0ded0055e8ae5..b3a43045050389fb7158370728c89ced320fbb2c 100644 --- a/src/Waveform.cpp +++ b/src/Waveform.cpp @@ -116,33 +116,15 @@ short OFFSET_STRUCT = 0; //- first desallocate previous data if (ptrRawData) { - try - { - delete [] ptrRawData; - ptrRawData = 0; - } - catch(const lecroy::WaveformException &) - { - throw lecroy::WaveformException("MEMORY_DESALLOCATION", - "The pointer (ptrRawData) for the receive data can't be desallocated before the read operation.", - "WaveForm_data::get_waveform_data( )."); - } + delete [] ptrRawData; + ptrRawData = 0; } //- delete previous raw data if(sh_raw_waveform_data) { - try - { - delete [] sh_raw_waveform_data; - sh_raw_waveform_data = 0; - } - catch(const lecroy::WaveformException &) - { - throw lecroy::WaveformException("MEMORY_DESALLOCATION", - "The pointer (sh_raw_waveform_data) for the receive data can't be desallocated before the read operation.", - "WaveForm_data::get_waveform_data( )."); - } + delete [] sh_raw_waveform_data; + sh_raw_waveform_data = 0; } //- delete previous scaled data @@ -173,12 +155,12 @@ short OFFSET_STRUCT = 0; { SocketLecroy::get_instance( )->TCP_ReadDevice(ptrRawData,length,&response_length); } - //AB A quoi sert le catch ici - // si tu ne traitespas l''exception , alors il ne sert � rien de faire un catch - - catch(const lecroy::SocketException &) + catch(const lecroy::WaveformException &) { - throw; + //- XE : + throw lecroy::WaveformException("OPERATION_FAILED", + "The TCP_ReadDevice() method failed.", + "WaveForm_data::get_waveform_data( )."); } //- calculation of the offset of the structure (it can be 15 or 21) @@ -257,7 +239,7 @@ double* WaveForm_data::get_vertical_scaled_waveform_data( ) throw (lecroy::Lecro //- Method to return the trigger time of the acquired waveform //AB cette methode ne fait pas de throw ==> la signature est fausse -std::string WaveForm_data::get_trigger_time_value ( ) throw (lecroy::LecroyException) +std::string WaveForm_data::get_trigger_time_value ( ) { //- The format is : "Date = month, day, year ; Time = hours:minutes:seconds" diff --git a/src/main.cpp b/src/main.cpp index 931317bed20f99f6665d80587821d59ed05a7981..7d99251cfc653d4fb430cf4ee89aa8f2e27aeca8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,4 @@ -static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/main.cpp,v 1.3 2004-10-07 09:21:19 xavela Exp $"; +static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/main.cpp,v 1.4 2004-10-18 13:17:49 xavela Exp $"; //+============================================================================= // // file : main.cpp @@ -12,9 +12,12 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio // // $Author: xavela $ // -// $Revision: 1.3 $ $ +// $Revision: 1.4 $ $ // // $Log: not supported by cvs2svn $ +// Revision 1.3 2004/10/07 09:21:19 xavela +// xavier : no cout now. +// // Revision 1.2 2004/10/05 13:11:11 xavela // Xavier : previous commit failed. //