Skip to content
Snippets Groups Projects
Commit de9ddb2d authored by ELATTAOUI's avatar ELATTAOUI
Browse files

Release preparation : roll back to version 1.1.14

parent 36c8b129
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@
<groupId>fr.soleil.device</groupId>
<artifactId>AcquireWaveformLecroy-${aol}-${mode}</artifactId>
<version>1.1.18-SNAPSHOT</version>
<version>1.1.18</version>
<packaging>nar</packaging>
<name>AcquireWaveformLecroy</name>
<description>AcquireWaveformLecroy device</description>
......
......@@ -146,14 +146,14 @@ AcquireWaveformLecroy::AcquireWaveformLecroy(Tango::DeviceClass *cl,const char *
void AcquireWaveformLecroy::delete_device()
{
//- Delete device's allocated object
if (attr_rawWaveformData_read) {
delete [] attr_rawWaveformData_read;
attr_rawWaveformData_read = 0;
}
if (attr_verticalScaledData_read) {
delete [] attr_verticalScaledData_read;
attr_verticalScaledData_read = 0;
}
//if (attr_rawWaveformData_read) {
// delete [] attr_rawWaveformData_read;
// attr_rawWaveformData_read = 0;
//}
//if (attr_verticalScaledData_read) {
// delete [] attr_verticalScaledData_read;
// attr_verticalScaledData_read = 0;
//}
if (attr_waveArray1_read) {
delete attr_waveArray1_read;
attr_waveArray1_read = 0;
......@@ -266,6 +266,7 @@ void AcquireWaveformLecroy::init_device()
*attr_triggerTime_read = new char[MAX_STRING_LENGTH];
::memset(*attr_triggerTime_read, 0, MAX_STRING_LENGTH * sizeof(char));
_deviceResponse = new char[MAX_RESPONSE_LENGTH];
//- Initialise variables to default values
//--------------------------------------------
......@@ -471,18 +472,14 @@ yat::Timer t;
//- get the waveform length
try
{
long previous_lgth = data_length;
//- TODO : retirer les copies dans les attr !!!!
data_length = waveform_ptr->get_wavedesc_descriptor()->wave_array_count;
//- check data does not exceed the MAX defined :
if ( data_length > MAX_WAVEFORM_DATA_LENGTH )
data_length = MAX_WAVEFORM_DATA_LENGTH;
if (previous_lgth <= data_length)
{
reallocate_spectrums(data_length);
}
//- get waveform data
attr_rawWaveformData_read = waveform_ptr->get_raw_waveform_data();
attr_verticalScaledData_read = waveform_ptr->get_vertical_scaled_waveform_data();
}
catch(const lecroy::WaveformException &we)
{
......@@ -765,6 +762,7 @@ Tango::DevString AcquireWaveformLecroy::write_read(Tango::DevString argin)
ptr_com->TCP_WriteDevice(argin, cmd_to_send.size(), true);
//- check if a response is expected (must found ? character)
strcpy(_deviceResponse, "No response");
if( cmd_to_send.find('?') != std::string::npos )
{
#ifdef WIN32
......@@ -774,34 +772,9 @@ Tango::DevString AcquireWaveformLecroy::write_read(Tango::DevString argin)
#endif
ptr_com->TCP_ReadDevice(_deviceResponse, MAX_RESPONSE_LENGTH, &bytes_received);
}
else
{
strcpy(_deviceResponse, "No response");
}
return _deviceResponse;
}
//- method to manage memory
void AcquireWaveformLecroy::reallocate_spectrums(long new_data_size)
{
if (new_data_size)
{
//- delete previous memory
if (attr_rawWaveformData_read)
{
delete[] attr_rawWaveformData_read;
attr_rawWaveformData_read = 0;
}
if (attr_verticalScaledData_read)
{
delete[] attr_verticalScaledData_read;
attr_verticalScaledData_read = 0;
}
//- allocate memory
attr_rawWaveformData_read = new Tango::DevShort[new_data_size];
attr_verticalScaledData_read= new Tango::DevDouble[new_data_size];
}
}
} // namespace
......@@ -78,6 +78,8 @@
// Add your own constants definitions here.
//-----------------------------------------------
const int MAX_STRING_LENGTH = 256;
const int MAX_SIZE = 150000;
namespace AcquireWaveformLecroy_ns
......
......@@ -68,7 +68,7 @@ namespace AcquireWaveformLecroy_ns
class rawWaveformDataAttrib: public Tango::SpectrumAttr
{
public:
rawWaveformDataAttrib():SpectrumAttr("rawWaveformData", Tango::DEV_SHORT, Tango::READ, 100000) {};
rawWaveformDataAttrib():SpectrumAttr("rawWaveformData", Tango::DEV_SHORT, Tango::READ, 1500000) {};
~rawWaveformDataAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
......@@ -80,7 +80,7 @@ public:
class verticalScaledDataAttrib: public Tango::SpectrumAttr
{
public:
verticalScaledDataAttrib():SpectrumAttr("verticalScaledData", Tango::DEV_DOUBLE, Tango::READ, 100000) {};
verticalScaledDataAttrib():SpectrumAttr("verticalScaledData", Tango::DEV_DOUBLE, Tango::READ, 1500000) {};
~verticalScaledDataAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment