Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
GpibPrologix
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango devices
Communication
GpibPrologix
Commits
c4ec11f4
Commit
c4ec11f4
authored
Apr 4, 2012
by
Jean Coquet
Browse files
Options
Downloads
Patches
Plain Diff
correctif plantage sur commande erronee
release_1_1_7
parent
1b3db24c
Branches
Branches containing commit
Tags
v1.6.9
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pom.xml
+1
-1
1 addition, 1 deletion
pom.xml
src/GpibPrologix.cpp
+54
-25
54 additions, 25 deletions
src/GpibPrologix.cpp
with
55 additions
and
26 deletions
pom.xml
+
1
−
1
View file @
c4ec11f4
...
...
@@ -8,7 +8,7 @@
</parent>
<groupId>
fr.soleil.device
</groupId>
<artifactId>
GpibPrologix-${aol}-${mode}
</artifactId>
<version>
1.1.
6
</version>
<version>
1.1.
7
</version>
<packaging>
nar
</packaging>
<name>
GpibPrologix
</name>
<description>
GpibPrologix device
</description>
...
...
This diff is collapsed.
Click to expand it.
src/GpibPrologix.cpp
+
54
−
25
View file @
c4ec11f4
static
const
char
*
RcsId
=
"$Id: GpibPrologix.cpp,v 1.1
7
2012-0
3-22 15:16:09
jean_coquet Exp $"
;
static
const
char
*
RcsId
=
"$Id: GpibPrologix.cpp,v 1.1
8
2012-0
4-04 13:50:50
jean_coquet Exp $"
;
//+=============================================================================
//
// file : GpibPrologix.cpp
...
...
@@ -13,10 +13,10 @@ static const char *RcsId = "$Id: GpibPrologix.cpp,v 1.17 2012-03-22 15:16:09 jea
//
// $Author: jean_coquet $
//
// $Revision: 1.1
7
$
// $Revision: 1.1
8
$
//
// $Revision: 1.1
7
$
// $Date: 2012-0
3-22 15:16:09
$
// $Revision: 1.1
8
$
// $Date: 2012-0
4-04 13:50:50
$
//
// SVN only:
// $HeadURL: $
...
...
@@ -24,6 +24,11 @@ static const char *RcsId = "$Id: GpibPrologix.cpp,v 1.17 2012-03-22 15:16:09 jea
// CVS only:
// $Source: /users/chaize/newsvn/cvsroot/Communication/GpibPrologix/src/GpibPrologix.cpp,v $
// $Log: not supported by cvs2svn $
// Revision 1.17 2012/03/22 15:16:09 jean_coquet
// bug correction (crash when trying to Init the device and GPIB client does not respond)
// some code cleaning
// State and Status enhanced
//
// Revision 1.16 2012/03/01 09:01:54 jean_coquet
// amelioration, avec reconnections
// A tester
...
...
@@ -718,7 +723,8 @@ namespace GpibPrologix_ns
static_cast
<
const
char
*>
(
"GpibPrologix::read"
));
}
std
::
string
answer
(
""
);
std
::
string
answer
;
answer
.
resize
(
64
);
try
{
//- ask Prologix to read
...
...
@@ -777,7 +783,8 @@ namespace GpibPrologix_ns
(
const
char
*
)
"Unknown (...) Exception caught"
,
(
const
char
*
)
"GpibPrologix::read"
);
}
Tango
::
DevString
argout
=
new
char
[
answer
.
size
()
+
1
];
DEBUG_STREAM
<<
"GpibPrologix::read : answer = <"
<<
answer
<<
">"
<<
std
::
endl
;
Tango
::
DevString
argout
=
new
char
[
answer
.
size
()
+
2
];
strcpy
(
argout
,
answer
.
c_str
());
return
argout
;
...
...
@@ -851,6 +858,7 @@ namespace GpibPrologix_ns
Tango
::
DevString
resp
;
try
{
this
->
write
(
argin
);
...
...
@@ -863,6 +871,7 @@ namespace GpibPrologix_ns
++
this
->
consecutive_com_error_counter
;
++
this
->
com_error_counter
;
this
->
com_state
=
Tango
::
FAULT
;
if
(
resp
)
this
->
com_last_error
=
"write_read : communication failed cmd sent : ["
+
std
::
string
(
argin
)
+
"] response : ["
...
...
@@ -870,6 +879,13 @@ namespace GpibPrologix_ns
+
"] + Tango::DevFailed caught : ["
+
std
::
string
(
exc
.
errors
[
0
].
desc
)
+
"]"
;
else
this
->
com_last_error
=
"write_read : communication failed cmd sent : ["
+
std
::
string
(
argin
)
+
"] empty response Tango::DevFailed caught : ["
+
std
::
string
(
exc
.
errors
[
0
].
desc
)
+
"]"
;
ERROR_STREAM
<<
"GpibPrologix::"
<<
this
->
com_last_error
<<
std
::
endl
;
Tango
::
Except
::
re_throw_exception
(
exc
,
static_cast
<
const
char
*>
(
"COMMUNICATION_FAILED"
),
...
...
@@ -881,6 +897,7 @@ namespace GpibPrologix_ns
++
this
->
consecutive_com_error_counter
;
++
this
->
com_error_counter
;
this
->
com_state
=
Tango
::
FAULT
;
if
(
resp
)
this
->
com_last_error
=
"write_read : communication failed cmd sent : ["
+
std
::
string
(
argin
)
+
"] response : ["
...
...
@@ -888,6 +905,13 @@ namespace GpibPrologix_ns
+
"] + yat::SocketException caught : ["
+
se
.
errors
[
0
].
desc
+
"]"
;
else
this
->
com_last_error
=
"write_read : communication failed cmd sent : ["
+
std
::
string
(
argin
)
+
"] empty response yat::SocketException caught : ["
+
se
.
errors
[
0
].
desc
+
"]"
;
ERROR_STREAM
<<
"GpibPrologix::"
<<
com_last_error
<<
std
::
endl
;
Tango
::
Except
::
throw_exception
((
const
char
*
)
"COMMUNICATION_FAILED"
,
se
.
errors
[
0
].
desc
.
c_str
(),
...
...
@@ -898,11 +922,16 @@ namespace GpibPrologix_ns
++
this
->
consecutive_com_error_counter
;
++
this
->
com_error_counter
;
this
->
com_state
=
Tango
::
FAULT
;
if
(
resp
)
this
->
com_last_error
=
"write_read : communication failed cmd sent : ["
+
std
::
string
(
argin
)
+
"] response : ["
+
resp
+
"] +(...) exception caught"
;
else
this
->
com_last_error
=
"write_read : communication failed cmd sent : ["
+
std
::
string
(
argin
)
+
"] empty response (...) exception caught"
;
ERROR_STREAM
<<
"GpibPrologix::"
<<
com_last_error
<<
std
::
endl
;
Tango
::
Except
::
throw_exception
((
const
char
*
)
"COMMUNICATION_FAILED"
,
(
const
char
*
)
"Unknown (...) Exception caught"
,
...
...
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