Revision: 7437
http://playerstage.svn.sourceforge.net/playerstage/?rev=7437&view=rev
Author: rtv
Date: 2009-03-10 07:45:57 +0000 (Tue, 10 Mar 2009)
Log Message:
-----------
fixed warnings
Modified Paths:
--------------
code/websim/CMakeLists.txt
code/websim/src/confederate.cc
code/websim/src/parser.cc
code/websim/src/puppet.cc
code/websim/src/websim.cc
Modified: code/websim/CMakeLists.txt
===================================================================
--- code/websim/CMakeLists.txt 2009-03-10 07:30:23 UTC (rev 7436)
+++ code/websim/CMakeLists.txt 2009-03-10 07:45:57 UTC (rev 7437)
@@ -17,8 +17,8 @@
link_directories(${GLIB_LIBRARY_DIRS} )
include_directories(include)
-add_library(websim SHARED src/websim.cc src/parser.cc src/confederate.cc )
-add_library(websim-static STATIC src/websim.cc src/parser.cc
src/confederate.cc )
+add_library(websim SHARED src/websim.cc src/parser.cc src/confederate.cc
src/puppet.cc )
+add_library(websim-static STATIC src/websim.cc src/parser.cc
src/confederate.cc src/puppet.cc )
# Set output name to be the same as shared lib (may not work on Windows)
set_target_properties(websim-static PROPERTIES OUTPUT_NAME websim)
# Prevent deletion of existing lib of same name
Modified: code/websim/src/confederate.cc
===================================================================
--- code/websim/src/confederate.cc 2009-03-10 07:30:23 UTC (rev 7436)
+++ code/websim/src/confederate.cc 2009-03-10 07:45:57 UTC (rev 7437)
@@ -1,3 +1,30 @@
+/*
+ * 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: Confederate object mananges client connections with other WebSim
servers
+ * Author: Richard Vaughan
+ * Date: 9 March 2009
+ * SVN: $Id: gazebo.h 7398 2009-03-09 07:21:49Z natepak $
+ */
+
#include <stdio.h>
#include <assert.h>
@@ -5,8 +32,8 @@
using namespace websim;
WebSim::Confederate::Confederate( WebSim* ws, const char* host, unsigned short
port ) :
- puppet_list( NULL ),
- unacknowledged_pushes( 0 )
+ unacknowledged_pushes( 0 ),
+ puppet_list( NULL )
{
if(! (http_con = evhttp_connection_new( host, port )) )
printf( "Error: Confederate object failed to connect to server at
%s:%d\n",
@@ -139,6 +166,8 @@
while( unacknowledged_pushes )
event_loop( EVLOOP_NONBLOCK ); // loops until the request has completed
+
+ return 0;
}
int WebSim::Confederate::RunStep()
Modified: code/websim/src/parser.cc
===================================================================
--- code/websim/src/parser.cc 2009-03-10 07:30:23 UTC (rev 7436)
+++ code/websim/src/parser.cc 2009-03-10 07:45:57 UTC (rev 7437)
@@ -1,4 +1,30 @@
+/*
+ * 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: Federation file parser
+ * Author: Richard Vaughan
+ * Date: 9 March 2009
+ * SVN: $Id: gazebo.h 7398 2009-03-09 07:21:49Z natepak $
+ */
+
#include <stdio.h>
#include <assert.h>
#include <string>
@@ -64,7 +90,7 @@
char hostnoport[256];
// parse out port number from hostname
- sscanf( hostandport, "%s %u", &hostnoport, &port );
+ sscanf( hostandport, "%s %u", hostnoport, &port );
return GetConfederate( hostnoport, port );
}
Modified: code/websim/src/puppet.cc
===================================================================
--- code/websim/src/puppet.cc 2009-03-10 07:30:23 UTC (rev 7436)
+++ code/websim/src/puppet.cc 2009-03-10 07:45:57 UTC (rev 7437)
@@ -1,4 +1,30 @@
+/*
+ * 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: Puppets are proxies for remote slave models
+ * Author: Richard Vaughan
+ * Date: 9 March 2009
+ * SVN: $Id: gazebo.h 7398 2009-03-09 07:21:49Z natepak $
+ */
+
#include <string.h> //for strdup()
#include <stdio.h>
@@ -7,9 +33,9 @@
WebSim::Puppet::Puppet( WebSim* ws, const char* name ) :
+ ws( ws ),
name( strdup(name) ),
- created( false ),
- ws( ws )
+ created( false )
{
g_hash_table_insert( ws->puppets, (void*)this->name, this );
}
Modified: code/websim/src/websim.cc
===================================================================
--- code/websim/src/websim.cc 2009-03-10 07:30:23 UTC (rev 7436)
+++ code/websim/src/websim.cc 2009-03-10 07:45:57 UTC (rev 7437)
@@ -40,7 +40,10 @@
WebSim::WebSim(const std::string& _fedfile,
const std::string& _host,
unsigned short _port) :
- fedfile(_fedfile), host(_host), port(_port), tick_count_expected(0)
+ tick_count_expected(0),
+ fedfile(_fedfile),
+ host(_host),
+ port(_port)
{
// Set up the HTTP server
// Not sure whether it's safe to do this more that once in one process
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