Revision: 7866
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7866&view=rev
Author:   robotos
Date:     2009-06-20 13:07:12 +0000 (Sat, 20 Jun 2009)

Log Message:
-----------
support for player commands for simulator

Modified Paths:
--------------
    code/gazebo/trunk/player/SimulationInterface.cc

Modified: code/gazebo/trunk/player/SimulationInterface.cc
===================================================================
--- code/gazebo/trunk/player/SimulationInterface.cc     2009-06-20 13:03:14 UTC 
(rev 7865)
+++ code/gazebo/trunk/player/SimulationInterface.cc     2009-06-20 13:07:12 UTC 
(rev 7866)
@@ -237,6 +237,35 @@
       req->value = NULL;
     }
   }
+/* This depends on Player SVN, wait to the release of Player 3.0 to uncomment? 
+  else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
+                                 PLAYER_SIMULATION_CMD_PAUSE, 
+                                 this->device_addr))
+  {
+    this->iface->Lock(1);
+    SimulationRequestData *gzReq = 
&&(this->iface->data->requests[this->iface->data->requestCount++]);
+    gzReq->type = SimulationRequestData::PAUSE;
+    this->iface->Unlock();
+  } 
+  else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
+                                 PLAYER_SIMULATION_CMD_RESET, 
+                                 this->device_addr))
+  {
+    this->iface->Lock(1);
+    SimulationRequestData *gzReq = 
&&(this->iface->data->requests[this->iface->data->requestCount++]);
+    gzReq->type = SimulationRequestData::RESET;
+    this->iface->Unlock();
+  } 
+  else if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
+                                 PLAYER_SIMULATION_CMD_SAVE, 
+                                 this->device_addr))
+  {
+    this->iface->Lock(1);
+    SimulationRequestData *gzReq = 
&&(this->iface->data->requests[this->iface->data->requestCount++]);
+    gzReq->type = SimulationRequestData::SAVE;
+    this->iface->Unlock();
+  }
+*/ 
   else
     printf("Unhandled Process message[%d][%d]\n",0,0);
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to