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

get_waveform_data bug fixed !

parent b751f69a
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
</parent>
<groupId>fr.soleil.device</groupId>
<artifactId>AcquireWaveformLecroy-${aol}-${mode}</artifactId>
<version>1.1.12</version>
<version>1.1.13</version>
<packaging>nar</packaging>
<name>AcquireWaveformLecroy</name>
<description>AcquireWaveformLecroy device</description>
......
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/AcquireWaveformLecroy.cpp,v 1.14 2012-02-28 13:28:25 xavela Exp $";
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/AcquireWaveformLecroy/src/AcquireWaveformLecroy.cpp,v 1.15 2012-03-09 10:22:12 xavela Exp $";
//+=============================================================================
//
// file : AcquireWaveformLecroy.cpp
......@@ -13,9 +13,12 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio
//
// $Author: xavela $
//
// $Revision: 1.14 $
// $Revision: 1.15 $
//
// $Log: not supported by cvs2svn $
// Revision 1.14 2012/02/28 13:28:25 xavela
// WaveForm.cpp : ptr which receives data, allocated statically !
//
// Revision 1.13 2010/03/26 09:11:31 vince_soleil
// "Migration_Tango7_Part2"
//
......@@ -394,6 +397,21 @@ void AcquireWaveformLecroy::always_executed_hook()
}
}
std::cout << "always end!" << std::endl;
}
//+----------------------------------------------------------------------------
//
// method : AcquireWaveformLecroy::read_attr_hardware()
//
// description : Hardware acquisition for attributes.
//
//-----------------------------------------------------------------------------
void AcquireWaveformLecroy::read_attr_hardware(vector<long> &attr_list)
{
//- DEBUG_STREAM << "In read_attr_hardware for " << attr_list.size();
//- DEBUG_STREAM << " attribute(s)" << endl;
//- Get the waveform data and description( ADC resolution, horizontal and vertical infos, data length ...)
try
{
......@@ -416,21 +434,7 @@ void AcquireWaveformLecroy::always_executed_hook()
Tango::ERR
);
}
std::cout << "always end!" << std::endl;
}
//+----------------------------------------------------------------------------
//
// method : AcquireWaveformLecroy::read_attr_hardware()
//
// description : Hardware acquisition for attributes.
//
//-----------------------------------------------------------------------------
void AcquireWaveformLecroy::read_attr_hardware(vector<long> &attr_list)
{
//- DEBUG_STREAM << "In read_attr_hardware for " << attr_list.size();
//- DEBUG_STREAM << " attribute(s)" << endl;
//- get the waveform length
try
{
......
......@@ -64,7 +64,7 @@ void WaveForm_data::set_channel_name (std::string name)
//- Method to return the ptr on the WAVEDESC struct
WAVEDESC_BLOCK* WaveForm_data::get_wavedesc_descriptor( ) throw (lecroy::WaveformException)
{
if(waveBlockData)
if(!waveBlockData)
throw lecroy::WaveformException("DESCRIPTOR_MEMORY_ ",
"get_waveform_data( ) method must be called before.",
"WaveForm_data::get_wavedesc_descriptor( ).");
......@@ -81,6 +81,8 @@ char* cmdStr = 0;
int response_length=0;
unsigned short OFFSET_STRUCT = 0;
std::cout << "\t WaveForm_data::get_waveform_data( ) -> ENTERING ..." << std::endl;
//- init ptr WaveBlocData which point on WAVEDESC_BLOCS structure
waveBlockData = 0;
......@@ -188,6 +190,7 @@ unsigned short OFFSET_STRUCT = 0;
vertical_scaled_waveform_data[i] = (waveBlockData->vertical_gain * sh_raw_waveform_data[i]) - waveBlockData->vertical_offset;
}
std::cout << "\t WaveForm_data::get_waveform_data( ) -> DONE." << std::endl;
}
//- return the ptr on sh_raw_waveform_data ( = the waveform data acquired)
......
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