[TeamTalk 33]: [570] TeamTalk/Agents/boeingLib/boeing: Added sendAborted()

tk@edam.speech.cs.cmu.edu tk at edam.speech.cs.cmu.edu
Thu Apr 5 14:34:29 EDT 2007


An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/teamtalk-developers/attachments/20070405/aa2536e0/attachment.html
-------------- next part --------------
Modified: TeamTalk/Agents/boeingLib/boeing/boeing_robot_packet.h
===================================================================
--- TeamTalk/Agents/boeingLib/boeing/boeing_robot_packet.h	2007-04-05 16:56:50 UTC (rev 569)
+++ TeamTalk/Agents/boeingLib/boeing/boeing_robot_packet.h	2007-04-05 18:34:29 UTC (rev 570)
@@ -226,6 +226,7 @@
       status   - task status [Succeeded,Failed]
   */
   struct MsgRobDone : public MsgHeader {  
+    
     TaskID taskid; //task that has been completed
     int16_t status;
     static MsgRobDone factory(TaskID taskID, int16_t status) {

Modified: TeamTalk/Agents/boeingLib/boeing/boeing_robot_server.cc
===================================================================
--- TeamTalk/Agents/boeingLib/boeing/boeing_robot_server.cc	2007-04-05 16:56:50 UTC (rev 569)
+++ TeamTalk/Agents/boeingLib/boeing/boeing_robot_server.cc	2007-04-05 18:34:29 UTC (rev 570)
@@ -246,7 +246,6 @@
   {
     MsgRobDone msg;
 
-    //  msg.taskid = taskid;
     if (ok)
       msg.status = SUCCEEDED;
     else 
@@ -262,6 +261,16 @@
     return (doSend((MsgHeader *) &msg));
   }
 
+  bool RobotServer::sendAborted(int taskid)
+  {
+    MsgRobDone msg = MsgRobDone::factory(taskid, ABORTED);
+
+    if (server_debug)
+      printf("sending done %i\n", ABORTED);
+
+    return (doSend((MsgHeader *) &msg));
+  }
+
   bool RobotServer::sendLocation(float x, float y, float a, bool moving)
   {
     MsgRobLocation msg;
@@ -288,7 +297,7 @@
     return socket_s->getStatus() == UDPSocket::Server;
   }
 
-  bool RobotServer::sendJPEGImage(const unsigned char *image, int image_size,
+  bool RobotServer::sendJPEGImage(const void *image, int image_size,
                                   int width, int height, int invoice)
   {
     MsgMap *msg = (MsgMap *)malloc(sizeof(MsgMap)-sizeof(int)+image_size);

Modified: TeamTalk/Agents/boeingLib/boeing/boeing_robot_server.h
===================================================================
--- TeamTalk/Agents/boeingLib/boeing/boeing_robot_server.h	2007-04-05 16:56:50 UTC (rev 569)
+++ TeamTalk/Agents/boeingLib/boeing/boeing_robot_server.h	2007-04-05 18:34:29 UTC (rev 570)
@@ -58,6 +58,7 @@
 
     /// send a task done
     bool sendDone(int taskid,bool ok);
+    bool sendAborted(int taskid);
 
     /// send the updated robot pose
     bool sendLocation(float x, float y, float a, bool moving);
@@ -66,7 +67,7 @@
         the image is a pointer to a jpeg image file
         the image size is the size of the image file in bytes
     */
-    bool sendJPEGImage(const unsigned char *image, int image_size,
+    bool sendJPEGImage(const void *image, int image_size,
       int width, int height, int invoice);
 
     //=== Accessors ========================================


More information about the TeamTalk-developers mailing list