Update of /cvsroot/playerstage/code/player/server/drivers/actarray
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30199/server/drivers/actarray
Modified Files:
amtecM5.cc
Log Message:
overhaul of the player interface definitions
interfaces are now defined with a very light weight IDL allowing them to be
edited in a single file
some subtype names were also modified as a side effect, making them more
consistent globally
Index: amtecM5.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/actarray/amtecM5.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** amtecM5.cc 15 Dec 2006 21:31:57 -0000 1.2
--- amtecM5.cc 20 Aug 2007 06:37:26 -0000 1.3
***************
*** 518,522 ****
bool handled(false);
! if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ,
PLAYER_ACTARRAY_POWER_REQ, device_addr)) {
//Got a Power-Request
int value =
((reinterpret_cast<player_actarray_power_config_t*>(data))->value);
--- 518,522 ----
bool handled(false);
! if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ,
PLAYER_ACTARRAY_REQ_POWER, device_addr)) {
//Got a Power-Request
int value =
((reinterpret_cast<player_actarray_power_config_t*>(data))->value);
***************
*** 560,567 ****
//Respond with an acknowledgment
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_POWER_REQ);
handled=true;
! } else
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_REQ,PLAYER_ACTARRAY_GET_GEOM_REQ,device_addr))
{
//printf("Get-Geom Request.\n");
--- 560,567 ----
//Respond with an acknowledgment
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_REQ_POWER);
handled=true;
! } else
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_REQ,PLAYER_ACTARRAY_REQ_GET_GEOM,device_addr))
{
//printf("Get-Geom Request.\n");
***************
*** 626,633 ****
aaGeom.base_orientation.pyaw = 0;
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_GET_GEOM_REQ, &aaGeom, sizeof (aaGeom), NULL);
handled=true;
! } else
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_REQ,PLAYER_ACTARRAY_SPEED_REQ,device_addr))
{
//printf("Speed Request. (Configuration of the speed for the
next movements)\n");
--- 626,633 ----
aaGeom.base_orientation.pyaw = 0;
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_REQ_GET_GEOM, &aaGeom, sizeof (aaGeom), NULL);
handled=true;
! } else
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_REQ,PLAYER_ACTARRAY_REQ_SPEED,device_addr))
{
//printf("Speed Request. (Configuration of the speed for the
next movements)\n");
***************
*** 654,661 ****
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_SPEED_REQ);
handled=true;
! } else
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_REQ,PLAYER_ACTARRAY_ACCEL_REQ,device_addr))
{
//printf("Accel Request. (Configuration of the acceleration
for the next movements)\n");
--- 654,661 ----
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_REQ_SPEED);
handled=true;
! } else
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_REQ,PLAYER_ACTARRAY_REQ_ACCEL,device_addr))
{
//printf("Accel Request. (Configuration of the acceleration
for the next movements)\n");
***************
*** 683,690 ****
}
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_ACCEL_REQ);
handled=true;
! } else
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_REQ,PLAYER_ACTARRAY_BRAKES_REQ,device_addr))
{
if (debug_level) {
printf("Brakes Request!\n");
--- 683,690 ----
}
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_REQ_ACCEL);
handled=true;
! } else
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_REQ,PLAYER_ACTARRAY_REQ_BRAKES,device_addr))
{
if (debug_level) {
printf("Brakes Request!\n");
***************
*** 692,696 ****
}
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_BRAKES_REQ);
handled=true;
}
--- 692,696 ----
}
! Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK,
PLAYER_ACTARRAY_REQ_BRAKES);
handled=true;
}
***************
*** 713,717 ****
//If the command matches any of the following, an action is taken. If
not, -1 is returned
!
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_POS_CMD,device_addr))
{
//All we get is a void pointer. Cast it to the right structure
player_actarray_position_cmd_t * cmd =
reinterpret_cast<player_actarray_position_cmd_t*>(data);
--- 713,717 ----
//If the command matches any of the following, an action is taken. If
not, -1 is returned
!
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_CMD_POS,device_addr))
{
//All we get is a void pointer. Cast it to the right structure
player_actarray_position_cmd_t * cmd =
reinterpret_cast<player_actarray_position_cmd_t*>(data);
***************
*** 749,753 ****
handled=true;
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_SPEED_CMD,device_addr))
{
//We received a speed-cmd
--- 749,753 ----
handled=true;
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_CMD_SPEED,device_addr))
{
//We received a speed-cmd
***************
*** 774,778 ****
handled=true;
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_HOME_CMD,device_addr))
{
//We received a home-cmd
--- 774,778 ----
handled=true;
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_CMD_HOME,device_addr))
{
//We received a home-cmd
***************
*** 807,811 ****
handled=true;
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_CURRENT_CMD,device_addr))
{
//We received a current-cmd
--- 807,811 ----
handled=true;
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_CMD_CURRENT,device_addr))
{
//We received a current-cmd
***************
*** 832,836 ****
handled=true;
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_MULTI_CURRENT_CMD,device_addr))
{
//We received a current-cmd for several joints
--- 832,836 ----
handled=true;
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_CMD_MULTI_CURRENT,device_addr))
{
//We received a current-cmd for several joints
***************
*** 865,869 ****
}
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_MULTI_POS_CMD,device_addr))
{
//We received a position-cmd for several joints
--- 865,869 ----
}
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_CMD_MULTI_POS,device_addr))
{
//We received a position-cmd for several joints
***************
*** 915,919 ****
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_MULTI_SPEED_CMD,device_addr))
{
//We received a position-cmd for several joints
--- 915,919 ----
! } else if
(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_CMD_MULTI_SPEED,device_addr))
{
//We received a position-cmd for several joints
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit