Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
XPSGroup
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
Motion
XPSGroup
Commits
2e52ff79
Commit
2e52ff79
authored
Jun 24, 2011
by
Jean Coquet
Browse files
Options
Downloads
Patches
Plain Diff
mise au point de DefinePosition
parent
21465079
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/XPSGroup.cpp
+15
-7
15 additions, 7 deletions
src/XPSGroup.cpp
src/task/HWProxy.cpp
+40
-14
40 additions, 14 deletions
src/task/HWProxy.cpp
src/task/HWProxy.h
+1
-1
1 addition, 1 deletion
src/task/HWProxy.h
with
56 additions
and
22 deletions
src/XPSGroup.cpp
+
15
−
7
View file @
2e52ff79
static
const
char
*
RcsId
=
"$Id: XPSGroup.cpp,v 1.
7
2011-06-2
0
0
7:17:34
jean_coquet Exp $"
;
static
const
char
*
RcsId
=
"$Id: XPSGroup.cpp,v 1.
8
2011-06-2
4
0
9:42:05
jean_coquet Exp $"
;
//+=============================================================================
//
// file : XPSGroup.cpp
...
...
@@ -13,10 +13,10 @@ static const char *RcsId = "$Id: XPSGroup.cpp,v 1.7 2011-06-20 07:17:34 jean_coq
//
// $Author: jean_coquet $
//
// $Revision: 1.
7
$
// $Revision: 1.
8
$
//
// $Revision: 1.
7
$
// $Date: 2011-06-2
0
0
7:17:34
$
// $Revision: 1.
8
$
// $Date: 2011-06-2
4
0
9:42:05
$
//
// SVN only:
// $HeadURL: $
...
...
@@ -24,6 +24,10 @@ static const char *RcsId = "$Id: XPSGroup.cpp,v 1.7 2011-06-20 07:17:34 jean_coq
// CVS only:
// $Source: /users/chaize/newsvn/cvsroot/Motion/Axis/XPSGroup/src/XPSGroup.cpp,v $
// $Log: not supported by cvs2svn $
// Revision 1.7 2011/06/20 07:17:34 jean_coquet
// minor change (ajout DefinePosition)
// To be tested
//
// Revision 1.6 2011/06/17 14:51:05 jean_coquet
// added DefinePosition support
//
...
...
@@ -692,7 +696,7 @@ void XPSGroup::write_trajectory(Tango::WAttribute &attr)
Tango
::
Except
::
throw_exception
(
(
const
char
*
)
"DATA_OUT_OF_RANGE"
,
(
const
char
*
)
"must give the all positions of the group in 1 shot"
,
(
const
char
*
)
"XPSGroup
4Axes
::go_to_position"
);
(
const
char
*
)
"XPSGroup::go_to_position"
);
}
xpsg
::
positions_t
pos
;
...
...
@@ -764,11 +768,15 @@ void XPSGroup::write_trajectory(Tango::WAttribute &attr)
size_t
len
=
argin
->
length
();
if
(
len
!=
attr_names
.
size
())
{
ERROR_STREAM
<<
"DATA_OUT_OF_RANGE must give all positions of the group in 1 shot"
<<
endl
;
ERROR_STREAM
<<
"DATA_OUT_OF_RANGE must give all positions of the group in 1 shot argin|nb_axes ["
<<
len
<<
"|"
<<
attr_names
.
size
()
<<
endl
;
Tango
::
Except
::
throw_exception
(
(
const
char
*
)
"DATA_OUT_OF_RANGE"
,
(
const
char
*
)
"must give the all positions of the group in 1 shot"
,
(
const
char
*
)
"XPSGroup
4Axes
::define_position"
);
(
const
char
*
)
"XPSGroup::define_position"
);
}
xpsg
::
positions_t
pos
;
...
...
This diff is collapsed.
Click to expand it.
src/task/HWProxy.cpp
+
40
−
14
View file @
2e52ff79
...
...
@@ -285,14 +285,18 @@ namespace xpsg
{
DEBUG_STREAM
<<
"HWProxy::handle_message handling GROUP_INITIALIZE msg"
<<
std
::
endl
;
std
::
string
cmd
=
"GroupInitialize("
+
conf
.
group_name
+
")"
;
this
->
write
(
cmd
);
std
::
string
resp
;
this
->
write_read
(
cmd
,
resp
);
INFO_STREAM
<<
"HWProxy::handle_message handling GROUP_INITIALIZE response = "
<<
resp
<<
std
::
endl
;
}
break
;
case
GROUP_KILL
:
{
DEBUG_STREAM
<<
"HWProxy::handle_message handling GROUP_KILL msg"
<<
std
::
endl
;
std
::
string
cmd
=
"GroupKill("
+
conf
.
group_name
+
")"
;
this
->
write
(
cmd
);
std
::
string
resp
;
this
->
write_read
(
cmd
,
resp
);
INFO_STREAM
<<
"HWProxy::handle_message handling GROUP_KILL response = "
<<
resp
<<
std
::
endl
;
}
break
;
case
GROUP_HOME_SEARCH
:
...
...
@@ -346,18 +350,16 @@ namespace xpsg
std
::
string
cmd
=
"GroupReferencingStart("
+
conf
.
group_name
+
")"
;
std
::
string
response
;
this
->
write_read
(
cmd
,
response
);
INFO_STREAM
<<
"HWProxy::handle_message handling GROUP_REFERENCING_START reponse = "
<<
response
<<
std
::
endl
;
}
break
;
case
GROUP_REFERENCING_
EXEC
:
case
GROUP_REFERENCING_
STOP
:
{
//- TODO : check if it it usefull, suppress it if not
DEBUG_STREAM
<<
"HWProxy::handle_message handling GROUP_REFERENCING_EXEC msg"
<<
std
::
endl
;
//- get msg data...
positions_t
*
pos
=
0
;
_msg
.
detach_data
(
pos
);
std
::
string
cmd
=
"GroupReferencingStart("
+
conf
.
group_name
+
")"
;
DEBUG_STREAM
<<
"HWProxy::handle_message handling GROUP_REFERENCING_STOP msg"
<<
std
::
endl
;
std
::
string
cmd
=
"GroupReferencingStop("
+
conf
.
group_name
+
")"
;
std
::
string
response
;
this
->
write_read
(
cmd
,
response
);
std
::
cout
<<
"HWProxy::handle_message handling GROUP_REFERENCING_STOP reponse = "
<<
response
<<
std
::
endl
;
}
break
;
case
GROUP_DEFINE_POSITION
:
...
...
@@ -366,12 +368,36 @@ namespace xpsg
//- get msg data...
positions_t
*
pos
=
0
;
_msg
.
detach_data
(
pos
);
std
::
string
cmd
;
std
::
string
resp
;
if
(
pos
)
{
post_msg
(
*
this
,
GROUP_KILL
,
1000
,
true
);
post_msg
(
*
this
,
GROUP_INITIALIZE
,
1000
,
true
);
post_msg
(
*
this
,
GROUP_REFERENCING_START
,
1000
,
true
);
post_msg
(
*
this
,
GROUP_REFERENCING_EXEC
,
1000
,
true
,
pos
);
cmd
=
"GroupKill("
+
conf
.
group_name
+
")"
;
this
->
write_read
(
cmd
,
resp
);
INFO_STREAM
<<
"HWProxy::handle_message::GROUP_DEFINE_POSITION cmd "
<<
cmd
<<
" returned "
<<
resp
<<
std
::
endl
;
cmd
=
"GroupInitialize("
+
conf
.
group_name
+
")"
;
this
->
write_read
(
cmd
,
resp
);
INFO_STREAM
<<
"HWProxy::handle_message::GROUP_DEFINE_POSITION cmd "
<<
cmd
<<
" returned "
<<
resp
<<
std
::
endl
;
cmd
=
"GroupReferencingStart("
+
conf
.
group_name
+
")"
;
this
->
write_read
(
cmd
,
resp
);
INFO_STREAM
<<
"HWProxy::handle_message::GROUP_DEFINE_POSITION cmd "
<<
cmd
<<
" returned "
<<
resp
<<
std
::
endl
;
std
::
stringstream
s
;
for
(
size_t
i
=
0
;
i
<
hw_data
.
size
();
i
++
)
{
s
.
str
(
""
);
s
<<
"GroupReferencingActionExecute("
<<
conf
.
group_name
<<
"."
<<
hw_data
[
i
].
posit_name
<<
",SetPosition,None,"
<<
pos
->
positions
[
i
]
<<
")"
<<
std
::
endl
;
this
->
write_read
(
s
.
str
(),
resp
);
INFO_STREAM
<<
"HWProxy::handle_message handling GROUP_DEFINE_POSITION cmd "
<<
s
.
str
()
<<
" returned "
<<
resp
<<
std
::
endl
;
}
post_msg
(
*
this
,
GROUP_REFERENCING_STOP
,
1000
,
false
);
INFO_STREAM
<<
"HWProxy::handle_message::GROUP_DEFINE_POSITION cmd "
<<
cmd
<<
" returned "
<<
resp
<<
std
::
endl
;
delete
pos
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/task/HWProxy.h
+
1
−
1
View file @
2e52ff79
...
...
@@ -103,7 +103,7 @@ namespace xpsg
const
size_t
GROUP_KILL
=
yat
::
FIRST_USER_MSG
+
1014
;
const
size_t
GROUP_DEFINE_POSITION
=
yat
::
FIRST_USER_MSG
+
1015
;
const
size_t
GROUP_REFERENCING_START
=
yat
::
FIRST_USER_MSG
+
1016
;
const
size_t
GROUP_REFERENCING_
EXEC
=
yat
::
FIRST_USER_MSG
+
101
7
;
const
size_t
GROUP_REFERENCING_
STOP
=
yat
::
FIRST_USER_MSG
+
101
8
;
//- trajectory messages
const
size_t
TRAJECTORY_LOAD
=
yat
::
FIRST_USER_MSG
+
1020
;
const
size_t
TRAJECTORY_GOTO_ORIGIN
=
yat
::
FIRST_USER_MSG
+
1021
;
...
...
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