Revision: 7422
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7422&view=rev
Author:   gerkey
Date:     2009-03-10 03:15:15 +0000 (Tue, 10 Mar 2009)

Log Message:
-----------
rearranged

Added Paths:
-----------
    code/websim/include/
    code/websim/include/websim/
    code/websim/include/websim/websim.h

Removed Paths:
-------------
    code/websim/src/websim.h

Copied: code/websim/include/websim/websim.h (from rev 7421, 
code/websim/src/websim.h)
===================================================================
--- code/websim/include/websim/websim.h                         (rev 0)
+++ code/websim/include/websim/websim.h 2009-03-10 03:15:15 UTC (rev 7422)
@@ -0,0 +1,157 @@
+/*
+ *  WebSim - Library for web-enabling and federating simulators.
+ *  Copyright (C) 2009
+ *    Richard Vaughan, Brian Gerkey, and Nate Koenig
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */ 
+
+/* Desc: HTTP portal to libgazebo
+ * Author: Brian Gerkey
+ * Date: 9 March 2009
+ * SVN: $Id: gazebo.h 7398 2009-03-09 07:21:49Z natepak $
+ */
+
+#include <string>
+#include <vector>
+#include <map>
+
+// These headers must be included prior to the libevent headers
+#include <sys/types.h>
+#include <sys/queue.h>
+
+// libevent
+#include <event.h>
+#include <evhttp.h>
+
+namespace websim
+{
+
+class Pose;
+class Velocity;
+class Acceleration;
+
+class WebSim
+{
+  public:
+    WebSim(const std::string& _fedfile, 
+           const std::string& _host,
+           int _port);
+    ~WebSim();
+
+    void Update();
+
+    // Interface to be implemented by simulators
+    virtual bool CreateModel(const std::string& name, 
+                             const std::string& type,
+                             std::string& error) = 0;
+    virtual bool DeleteModel(const std::string& name,
+                             std::string& error) = 0;
+    virtual bool SetModelState(const std::string& name, 
+                               const Pose& p,
+                               const Velocity& v,
+                               const Acceleration& a,
+                               std::string& error) = 0;
+    virtual bool GetModelState(const std::string& name, 
+                               Pose& p,
+                               Velocity& v,
+                               Acceleration& a,
+                               std::string& error) = 0;
+
+  private:
+    std::string fedfile;
+    std::string host;
+    int port;
+
+    struct evhttp* eh;
+
+    // Static, so that it can be passed as a callback to libevent
+    static void EventCallback(evhttp_request* req, void* arg);
+
+    void StringSplit(const std::string &s, 
+                     std::vector<std::string> &t, 
+                     const std::string &d);
+    bool GetValue(std::string& value,
+                  struct evkeyvalq* query_args, 
+                  const std::string& key);
+    bool HandleURI(const std::string& model,
+                   const std::string& prop,
+                   const std::string& action,
+                   struct evkeyvalq* kv,
+                   std::string& response);
+    bool HandleSimRequest(const std::string& prop,
+                          const std::string& action,
+                          struct evkeyvalq* kv,
+                          std::string& response);
+    bool HandleModelRequest(const std::string& model,
+                            const std::string& prop,
+                            const std::string& action,
+                            struct evkeyvalq* kv,
+                            std::string& response);
+    bool ParseURI(std::string& model,
+                  std::string& prop,
+                  std::string& action,
+                  std::string uri,
+                  std::string& response);
+    void DeleteKeyVal(struct evkeyvalq* query_args);
+};
+
+class Pose
+{
+public:
+  double x,y,z,r,p,a;
+  
+  Pose() :
+        x(0), y(0), z(0), r(0), p(0), a(0)
+  {
+        // nothing to do
+  }
+  
+  Pose( double x, double y, double z,
+                 double r, double p, double a ) :
+        x(x), y(y), z(z), r(r), p(p), a(a)
+  {
+        // nothing to do
+  }
+  
+};
+
+class Velocity : public Pose
+{
+public:
+  Velocity() : Pose()
+  {}
+
+  Velocity( double x, double y, double z,
+                               double r, double p, double a ) :
+        Pose( x, y, z, r, p, a )
+  {}  
+};
+
+class Acceleration : public Pose
+{
+public:
+  Acceleration() : Pose()
+  {}
+        
+  Acceleration( double x, double y, double z,
+                                        double r, double p, double a ) :
+        Pose( x, y, z, r, p, a )
+  {}  
+};
+
+
+}


Property changes on: code/websim/include/websim/websim.h
___________________________________________________________________
Added: svn:mergeinfo
   + 

Deleted: code/websim/src/websim.h
===================================================================
--- code/websim/src/websim.h    2009-03-10 03:14:32 UTC (rev 7421)
+++ code/websim/src/websim.h    2009-03-10 03:15:15 UTC (rev 7422)
@@ -1,157 +0,0 @@
-/*
- *  WebSim - Library for web-enabling and federating simulators.
- *  Copyright (C) 2009
- *    Richard Vaughan, Brian Gerkey, and Nate Koenig
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- */ 
-
-/* Desc: HTTP portal to libgazebo
- * Author: Brian Gerkey
- * Date: 9 March 2009
- * SVN: $Id: gazebo.h 7398 2009-03-09 07:21:49Z natepak $
- */
-
-#include <string>
-#include <vector>
-#include <map>
-
-// These headers must be included prior to the libevent headers
-#include <sys/types.h>
-#include <sys/queue.h>
-
-// libevent
-#include <event.h>
-#include <evhttp.h>
-
-namespace websim
-{
-
-class Pose;
-class Velocity;
-class Acceleration;
-
-class WebSim
-{
-  public:
-    WebSim(const std::string& _fedfile, 
-           const std::string& _host,
-           int _port);
-    ~WebSim();
-
-    void Update();
-
-    // Interface to be implemented by simulators
-    virtual bool CreateModel(const std::string& name, 
-                             const std::string& type,
-                             std::string& error) = 0;
-    virtual bool DeleteModel(const std::string& name,
-                             std::string& error) = 0;
-    virtual bool SetModelState(const std::string& name, 
-                               const Pose& p,
-                               const Velocity& v,
-                               const Acceleration& a,
-                               std::string& error) = 0;
-    virtual bool GetModelState(const std::string& name, 
-                               Pose& p,
-                               Velocity& v,
-                               Acceleration& a,
-                               std::string& error) = 0;
-
-  private:
-    std::string fedfile;
-    std::string host;
-    int port;
-
-    struct evhttp* eh;
-
-    // Static, so that it can be passed as a callback to libevent
-    static void EventCallback(evhttp_request* req, void* arg);
-
-    void StringSplit(const std::string &s, 
-                     std::vector<std::string> &t, 
-                     const std::string &d);
-    bool GetValue(std::string& value,
-                  struct evkeyvalq* query_args, 
-                  const std::string& key);
-    bool HandleURI(const std::string& model,
-                   const std::string& prop,
-                   const std::string& action,
-                   struct evkeyvalq* kv,
-                   std::string& response);
-    bool HandleSimRequest(const std::string& prop,
-                          const std::string& action,
-                          struct evkeyvalq* kv,
-                          std::string& response);
-    bool HandleModelRequest(const std::string& model,
-                            const std::string& prop,
-                            const std::string& action,
-                            struct evkeyvalq* kv,
-                            std::string& response);
-    bool ParseURI(std::string& model,
-                  std::string& prop,
-                  std::string& action,
-                  std::string uri,
-                  std::string& response);
-    void DeleteKeyVal(struct evkeyvalq* query_args);
-};
-
-class Pose
-{
-public:
-  double x,y,z,r,p,a;
-  
-  Pose() :
-        x(0), y(0), z(0), r(0), p(0), a(0)
-  {
-        // nothing to do
-  }
-  
-  Pose( double x, double y, double z,
-                 double r, double p, double a ) :
-        x(x), y(y), z(z), r(r), p(p), a(a)
-  {
-        // nothing to do
-  }
-  
-};
-
-class Velocity : public Pose
-{
-public:
-  Velocity() : Pose()
-  {}
-
-  Velocity( double x, double y, double z,
-                               double r, double p, double a ) :
-        Pose( x, y, z, r, p, a )
-  {}  
-};
-
-class Acceleration : public Pose
-{
-public:
-  Acceleration() : Pose()
-  {}
-        
-  Acceleration( double x, double y, double z,
-                                        double r, double p, double a ) :
-        Pose( x, y, z, r, p, a )
-  {}  
-};
-
-
-}


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

------------------------------------------------------------------------------
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to