Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
AcquireWaveformLecroy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango devices
MeasureInstruments
Lecroy
AcquireWaveformLecroy
Commits
de9ddb2d
Commit
de9ddb2d
authored
7 years ago
by
ELATTAOUI
Browse files
Options
Downloads
Patches
Plain Diff
Release preparation : roll back to version 1.1.14
parent
36c8b129
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
pom.xml
+1
-1
1 addition, 1 deletion
pom.xml
src/AcquireWaveformLecroy.cpp
+13
-40
13 additions, 40 deletions
src/AcquireWaveformLecroy.cpp
src/AcquireWaveformLecroy.h
+2
-0
2 additions, 0 deletions
src/AcquireWaveformLecroy.h
src/AcquireWaveformLecroyClass.h
+2
-2
2 additions, 2 deletions
src/AcquireWaveformLecroyClass.h
with
18 additions
and
43 deletions
pom.xml
+
1
−
1
View file @
de9ddb2d
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
src/AcquireWaveformLecroy.cpp
+
13
−
40
View file @
de9ddb2d
...
...
@@ -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
This diff is collapsed.
Click to expand it.
src/AcquireWaveformLecroy.h
+
2
−
0
View file @
de9ddb2d
...
...
@@ -78,6 +78,8 @@
// Add your own constants definitions here.
//-----------------------------------------------
const
int
MAX_STRING_LENGTH
=
256
;
const
int
MAX_SIZE
=
150000
;
namespace
AcquireWaveformLecroy_ns
...
...
This diff is collapsed.
Click to expand it.
src/AcquireWaveformLecroyClass.h
+
2
−
2
View file @
de9ddb2d
...
...
@@ -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
,
1
5
00000
)
{};
~
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
,
1
5
00000
)
{};
~
verticalScaledDataAttrib
()
{};
virtual
void
read
(
Tango
::
DeviceImpl
*
dev
,
Tango
::
Attribute
&
att
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment