You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(140) |
Feb
(98) |
Mar
(152) |
Apr
(104) |
May
(71) |
Jun
(94) |
Jul
(169) |
Aug
(83) |
Sep
(47) |
Oct
(134) |
Nov
(7) |
Dec
(20) |
2004 |
Jan
(41) |
Feb
(14) |
Mar
(42) |
Apr
(47) |
May
(68) |
Jun
(143) |
Jul
(65) |
Aug
(29) |
Sep
(40) |
Oct
(34) |
Nov
(33) |
Dec
(97) |
2005 |
Jan
(29) |
Feb
(30) |
Mar
(9) |
Apr
(37) |
May
(13) |
Jun
(31) |
Jul
(22) |
Aug
(23) |
Sep
|
Oct
(37) |
Nov
(34) |
Dec
(117) |
2006 |
Jan
(48) |
Feb
(6) |
Mar
(2) |
Apr
(71) |
May
(10) |
Jun
(16) |
Jul
(7) |
Aug
(1) |
Sep
(14) |
Oct
(17) |
Nov
(25) |
Dec
(26) |
2007 |
Jan
(8) |
Feb
(2) |
Mar
(7) |
Apr
(26) |
May
|
Jun
(12) |
Jul
(30) |
Aug
(14) |
Sep
(9) |
Oct
(4) |
Nov
(7) |
Dec
(6) |
2008 |
Jan
(10) |
Feb
(10) |
Mar
(6) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(18) |
Aug
(15) |
Sep
(16) |
Oct
(5) |
Nov
(3) |
Dec
(10) |
2009 |
Jan
(11) |
Feb
(2) |
Mar
|
Apr
(15) |
May
(31) |
Jun
(18) |
Jul
(11) |
Aug
(26) |
Sep
(52) |
Oct
(17) |
Nov
(4) |
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ww...> - 2004-11-21 20:14:39
|
Author: mkrose Date: 2004-11-21 12:13:14 -0800 (Sun, 21 Nov 2004) New Revision: 1328 Added: trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py Removed: trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py Modified: trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_lex.py Log: Oops, missed trc.py. Also a small fix for line endings on win. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1328 Diff omitted (11758 bytes). |
From: <sv...@ww...> - 2004-11-21 19:51:02
|
Author: mkrose Date: 2004-11-21 11:49:35 -0800 (Sun, 21 Nov 2004) New Revision: 1327 Added: trunk/CSP/IndexServer/ trunk/CSP/IndexServer/Config.cpp trunk/CSP/IndexServer/Config.h trunk/CSP/IndexServer/IndexServer.cpp trunk/CSP/IndexServer/IndexServer.h trunk/CSP/IndexServer/IndexServer.ini trunk/CSP/IndexServer/SConscript Log: Initial index server implementation (thin wrapper around GlobalBattlefield). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1327 Added: trunk/CSP/IndexServer/Config.cpp =================================================================== --- trunk/CSP/IndexServer/Config.cpp 2004-11-21 19:28:59 UTC (rev 1326) +++ trunk/CSP/IndexServer/Config.cpp 2004-11-21 19:49:35 UTC (rev 1327) @@ -0,0 +1,42 @@ +// Combat Simulator Project +// Copyright (C) 2004 The Combat Simulator Project +// http://csp.sourceforge.net +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +/** + * @file Config.cpp + * + **/ + + +#include "Config.h" +#include <SimData/FileUtility.h> + + +SimpleConfig g_Config; + + +bool openConfig(std::string path) { + path = simdata::ospath::filter(path); + bool success = false; + try { + success = g_Config.open(path); + } catch (ConfigError &) { + return false; + } + return success; +} Added: trunk/CSP/IndexServer/Config.h =================================================================== --- trunk/CSP/IndexServer/Config.h 2004-11-21 19:28:59 UTC (rev 1326) +++ trunk/CSP/IndexServer/Config.h 2004-11-21 19:49:35 UTC (rev 1327) @@ -0,0 +1,36 @@ +// Combat Simulator Project +// Copyright (C) 2004 The Combat Simulator Project +// http://csp.sourceforge.net +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +/** + * @file Config.h + * + **/ + +#ifndef __INDEXSERVER_CONFIG_H__ +#define __INDEXSERVER_CONFIG_H__ + +#include <string> +#include <SimCore/Util/SimpleConfig.h> + + +extern SimpleConfig g_Config; +extern bool openConfig(std::string path); + + +#endif // __INDEXSERVER_CONFIG_H__ Added: trunk/CSP/IndexServer/IndexServer.cpp =================================================================== --- trunk/CSP/IndexServer/IndexServer.cpp 2004-11-21 19:28:59 UTC (rev 1326) +++ trunk/CSP/IndexServer/IndexServer.cpp 2004-11-21 19:49:35 UTC (rev 1327) @@ -0,0 +1,96 @@ +// Combat Simulator Project - FlightSim Demo +// Copyright (C) 2004 The Combat Simulator Project +// http://csp.sourceforge.net +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +/** + * @file IndexServer.cpp + * + **/ + +#include "IndexServer.h" +#include "Config.h" + +#include <SimCore/Util/Log.h> +#include <SimCore/Util/SimpleConfig.h> +#include <SimCore/Battlefield/GlobalBattlefield.h> +#include <SimData/Thread.h> +#include <SimData/Trace.h> +#include <SimNet/ClientServer.h> + + +IndexServer::IndexServer() { + CSP_LOG(APP, INFO, "IndexServer()"); +} + +IndexServer::~IndexServer() { +} + +void IndexServer::initPrimaryInterface() { + assert(m_NetworkServer.isNull()); + const std::string interface = g_Config.getString("Network", "Bind", "127.0.0.1:4999", true); + const std::string::size_type colon = interface.find(':'); + std::string address; + simnet::Port port = 0; + if (colon != std::string::npos) { + port = atoi(interface.substr(colon + 1).c_str()); + address = interface.substr(0, colon); + } + if (address.size() == 0 || port == 0) { + std::cerr << "Invalid value for Network.Bind in .ini file: " << interface << "\n"; + std::cerr << "Should be of the form www.xxx.yyy.zzz:port\n"; + ::exit(1); + } + CSP_LOG(APP, INFO, "binding to interface " << address << ":" << port); + simnet::NetworkNode local(address, port); + m_NetworkServer = new simnet::Server(local, 100000, 100000); // TODO real bw? +} + +void IndexServer::initialize() { + initPrimaryInterface(); + m_Battlefield = new GlobalBattlefield(); + m_Battlefield->setNetworkServer(m_NetworkServer); +} + +void IndexServer::run() { + initialize(); + CSP_LOG(APP, INFO, "starting network loop"); + simdata::Timer timer; + timer.start(); + while (1) { + m_NetworkServer->processAndWait(0.01, 0.01, 0.10); + m_Battlefield->update(timer.incremental()); + } +} + + +int main() { + simdata::Trace::install(); + + if (!openConfig("IndexServer.ini")) { + std::cerr << "Unable to open config file 'IndexServer.ini'\n"; + return 1; + } + + simnet::netlog().setLogPriority(simdata::LOG_INFO); + csplog().setOutput("IndexServer.log"); + csplog().setLogPriority(simdata::LOG_INFO); + csplog().setLogCategory(simdata::LOG_ALL); + + IndexServer server; + server.run(); +} Added: trunk/CSP/IndexServer/IndexServer.h =================================================================== --- trunk/CSP/IndexServer/IndexServer.h 2004-11-21 19:28:59 UTC (rev 1326) +++ trunk/CSP/IndexServer/IndexServer.h 2004-11-21 19:49:35 UTC (rev 1327) @@ -0,0 +1,52 @@ +// Combat Simulator Project +// Copyright (C) 2004 The Combat Simulator Project +// http://csp.sourceforge.net +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +/** + * @file IndexServer.h + * + **/ + +#ifndef __INDEXSERVER_H__ +#define __INDEXSERVER_H__ + +#include <SimData/Ref.h> + +namespace simnet { + class Server; +} + +class GlobalBattlefield; + + +class IndexServer { +public: + IndexServer(); + ~IndexServer(); + void run(); + +private: + void initialize(); + void initPrimaryInterface(); + + simdata::Ref<simnet::Server> m_NetworkServer; + simdata::Ref<GlobalBattlefield> m_Battlefield; +}; + + +#endif // __INDEXSERVER_H__ Added: trunk/CSP/IndexServer/IndexServer.ini =================================================================== --- trunk/CSP/IndexServer/IndexServer.ini 2004-11-21 19:28:59 UTC (rev 1326) +++ trunk/CSP/IndexServer/IndexServer.ini 2004-11-21 19:49:35 UTC (rev 1327) @@ -0,0 +1,2 @@ +[Network] +Bind = 127.0.0.1:3160 Added: trunk/CSP/IndexServer/SConscript =================================================================== --- trunk/CSP/IndexServer/SConscript 2004-11-21 19:28:59 UTC (rev 1326) +++ trunk/CSP/IndexServer/SConscript 2004-11-21 19:49:35 UTC (rev 1327) @@ -0,0 +1,44 @@ +# -*- python -*- +# +# Copyright 2004 Mark Rose <mk...@us...> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Import('env build') + + +env = env.Copy() +env.Append(CPPPATH='#/IndexServer/.bin') + +env.Append(LIBS=['simcore'], LIBPATH=['#/SimCore/.bin']) +env.Append(LIBS=['simnet'], LIBPATH=['#/SimNet/.bin']) +env.Append(LIBS=['SimData'], LIBPATH=['#/SimData/SimData']) +env.Append(LIBS=['spatialindex'], LIBPATH=['#/SpatialIndex/.bin']) +env.Append(LIBS=['pthread']) +env.ParseConfig('ccgnu2-config --flags --libs') + +#env.Documentation('#/IndexServer/.dox', '#/IndexServer/Doxyfile', '#/IndexServer/*.{h,cpp}') + + +SOURCES = [ + 'Config.cpp', + 'IndexServer.cpp', +] + +server = env.Program('IndexServer', SOURCES) +server = env.CopyFile('#/IndexServer/IndexServer', server) +Alias(['all', 'indexserver'], [server]) + + |
Author: mkrose Date: 2004-11-21 11:28:59 -0800 (Sun, 21 Nov 2004) New Revision: 1326 Added: trunk/CSP/SimData/Tools/TaggedRecordCompiler/COPYING-ply trunk/CSP/SimData/Tools/TaggedRecordCompiler/README trunk/CSP/SimData/Tools/TaggedRecordCompiler/README-ply trunk/CSP/SimData/Tools/TaggedRecordCompiler/lex.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/old/ trunk/CSP/SimData/Tools/TaggedRecordCompiler/old/BaseTypes.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/old/CodeFormat.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/old/trc.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/parsetab.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_gen.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_grammar.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_lex.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_util.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/yacc.py Removed: trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/CodeFormat.py Modified: trunk/CSP/SimCore/Battlefield/Battlefield.cpp trunk/CSP/SimCore/Battlefield/BattlefieldMessages.net trunk/CSP/SimCore/Battlefield/GlobalBattlefield.h trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/TaggedRecord.h trunk/CSP/SimNet/ClientServerMessages.net Log: New version of trc using ply (lex/yacc), corresponding updates to message descriptions. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1326 Diff omitted (244535 bytes). |
From: <sv...@ww...> - 2004-11-19 12:39:37
|
Author: delta Date: 2004-11-19 04:39:28 -0800 (Fri, 19 Nov 2004) New Revision: 1325 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/BaseType.h trunk/CSP/SimData/Include/SimData/Properties.h trunk/CSP/SimData/Include/SimData/Quat.h trunk/CSP/SimData/Include/SimData/ThreadBase.h trunk/CSP/SimData/Include/SimData/ThreadUtil.h trunk/CSP/SimData/Include/SimData/Timing.h trunk/CSP/SimData/VisualStudio2003/SimData.sln trunk/CSP/SimData/VisualStudio2003/SimData.vcproj Log: * Added a few more SIMDATA_EXPORT to export symbols. * Updated vcproj. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1325 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-11-18 19:37:55 UTC (rev 1324) +++ trunk/CSP/SimData/CHANGES.current 2004-11-19 12:39:28 UTC (rev 1325) @@ -1,6 +1,21 @@ Version 0.4.0 (in progress) =========================== +2004-11-19: delta +* Added a few more SIMDATA_EXPORT to export symbols. + +* Updated vcproj. + +2004-11-15: delta +* Replaced every WIN32 by _WIN32 (windows native). Removed WIN32 + definition in the preprocessor (vcproj). + +* Added a function object nohash64 (hashing function) for the + vc7.x compilers' STL std/stdext::hash_map non standard container (must + inheritate from std/stdext::hash_compare). + +* Updated vcproj. + 2004-11-14: onsight * Added a method to Timer to both return and reset the elapsed time. Modified: trunk/CSP/SimData/Include/SimData/BaseType.h =================================================================== --- trunk/CSP/SimData/Include/SimData/BaseType.h 2004-11-18 19:37:55 UTC (rev 1324) +++ trunk/CSP/SimData/Include/SimData/BaseType.h 2004-11-19 12:39:28 UTC (rev 1325) @@ -93,7 +93,7 @@ /** Convenience function for printing BaseTypes to ostreams. */ -std::ostream &operator <<(std::ostream &o, BaseType const &t); +SIMDATA_EXPORT std::ostream &operator <<(std::ostream &o, BaseType const &t); NAMESPACE_SIMDATA_END Modified: trunk/CSP/SimData/Include/SimData/Properties.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Properties.h 2004-11-18 19:37:55 UTC (rev 1324) +++ trunk/CSP/SimData/Include/SimData/Properties.h 2004-11-19 12:39:28 UTC (rev 1325) @@ -40,7 +40,7 @@ * * @author Mark Rose <mk...@us...> */ -class NonCopyable { +class SIMDATA_EXPORT NonCopyable { protected: NonCopyable() { } private: Modified: trunk/CSP/SimData/Include/SimData/Quat.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Quat.h 2004-11-18 19:37:55 UTC (rev 1324) +++ trunk/CSP/SimData/Include/SimData/Quat.h 2004-11-19 12:39:28 UTC (rev 1325) @@ -404,7 +404,7 @@ #ifndef SWIG /** Format to an output stream. */ - friend std::ostream& operator << (std::ostream& output, const Quat& q); + SIMDATA_EXPORT friend std::ostream& operator << (std::ostream& output, const Quat& q); /** Multiply a Quat by a scalar value on the left. */ friend inline Quat operator * (double lhs, const Quat& rhs) { return rhs*lhs; } @@ -462,7 +462,6 @@ }; // end of class prototype - NAMESPACE_SIMDATA_END #endif // __SIMDATA_QUAT_H__ Modified: trunk/CSP/SimData/Include/SimData/ThreadBase.h =================================================================== --- trunk/CSP/SimData/Include/SimData/ThreadBase.h 2004-11-18 19:37:55 UTC (rev 1324) +++ trunk/CSP/SimData/Include/SimData/ThreadBase.h 2004-11-19 12:39:28 UTC (rev 1325) @@ -245,7 +245,7 @@ * signals the condition variable, one (or all) of the threads waiting * on that variable will be activated. */ -class ThreadCondition: public NonCopyable { +class SIMDATA_EXPORT ThreadCondition: public NonCopyable { public: /** Construct a condition variable, using an internal mutex. @@ -454,7 +454,6 @@ bool m_flag; }; - NAMESPACE_SIMDATA_END #endif // __SIMDATA_THREADBASE_H__ Modified: trunk/CSP/SimData/Include/SimData/ThreadUtil.h =================================================================== --- trunk/CSP/SimData/Include/SimData/ThreadUtil.h 2004-11-18 19:37:55 UTC (rev 1324) +++ trunk/CSP/SimData/Include/SimData/ThreadUtil.h 2004-11-19 12:39:28 UTC (rev 1325) @@ -39,7 +39,7 @@ /** Exception class for thread-related errors. Wraps a small subset * of cerrno constants. */ -class ThreadException: public Exception { +class SIMDATA_EXPORT ThreadException: public Exception { public: ThreadException(const int error); Modified: trunk/CSP/SimData/Include/SimData/Timing.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Timing.h 2004-11-18 19:37:55 UTC (rev 1324) +++ trunk/CSP/SimData/Include/SimData/Timing.h 2004-11-19 12:39:28 UTC (rev 1325) @@ -61,7 +61,7 @@ * The offset is platform dependent, so do not use this value for * absolute time. */ -timing_t get_realtime(); +SIMDATA_EXPORT timing_t get_realtime(); /** A simple timing class with standard stopwatch functions. The Modified: trunk/CSP/SimData/VisualStudio2003/SimData.sln =================================================================== --- trunk/CSP/SimData/VisualStudio2003/SimData.sln 2004-11-18 19:37:55 UTC (rev 1324) +++ trunk/CSP/SimData/VisualStudio2003/SimData.sln 2004-11-19 12:39:28 UTC (rev 1325) @@ -1,21 +1,21 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimData", "SimData.vcproj", "{F9948756-70B5-4328-8A6A-F4BE5A521A27}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.ActiveCfg = Release|Win32 - {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.Build.0 = Release|Win32 - {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.ActiveCfg = Release|Win32 - {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimData", "SimData.vcproj", "{F9948756-70B5-4328-8A6A-F4BE5A521A27}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.ActiveCfg = Debug|Win32 + {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.Build.0 = Debug|Win32 + {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.ActiveCfg = Release|Win32 + {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Modified: trunk/CSP/SimData/VisualStudio2003/SimData.vcproj =================================================================== --- trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-11-18 19:37:55 UTC (rev 1324) +++ trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-11-19 12:39:28 UTC (rev 1325) @@ -433,6 +433,9 @@ RelativePath="..\Include\SimData\ThreadQueue.h"> </File> <File + RelativePath="..\Include\SimData\ThreadUtil.h"> + </File> + <File RelativePath="..\Include\SimData\Timing.h"> </File> <File |
From: <sv...@ww...> - 2004-11-18 19:38:05
|
Author: delta Date: 2004-11-18 11:37:55 -0800 (Thu, 18 Nov 2004) New Revision: 1324 Modified: trunk/CSP/CSPSim/Source/VirtualScene.cpp Log: * Added GL_ALL_CLIENT_ATTRIB_BITS value in case GL.h doesn't define it. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1324 Modified: trunk/CSP/CSPSim/Source/VirtualScene.cpp =================================================================== --- trunk/CSP/CSPSim/Source/VirtualScene.cpp 2004-11-17 10:15:15 UTC (rev 1323) +++ trunk/CSP/CSPSim/Source/VirtualScene.cpp 2004-11-18 19:37:55 UTC (rev 1324) @@ -22,6 +22,9 @@ * **/ +#ifndef GL_ALL_CLIENT_ATTRIB_BITS +#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF +#endif #include "VirtualScene.h" #include "TerrainObject.h" @@ -403,7 +406,7 @@ //FIXME: why ALL_OPTIMIZATIONS don t work as expected? osgUtil::Optimizer opt; opt.optimize(m_RootNode.get(), osgUtil::Optimizer::COMBINE_ADJACENT_LODS); - opt.optimize(m_RootNode.get(), osgUtil::Optimizer::SHARE_DUPLICATE_STATE); + opt.optimize(m_RootNode.get(), osgUtil::Optimizer::SHARE_DUPLICATE_STATE); return 1; } @@ -439,7 +442,6 @@ m_SkyLights->addChild(pMoonLightSource); } - int VirtualScene::drawScene() { CSP_LOG(APP, DEBUG, "VirtualScene::drawScene()..."); |
From: <sv...@ww...> - 2004-11-17 10:15:22
|
Author: delta Date: 2004-11-17 02:15:15 -0800 (Wed, 17 Nov 2004) New Revision: 1323 Modified: trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj Log: * Corrected the clean step of the custom build. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1323 Modified: trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj =================================================================== --- trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj 2004-11-16 21:19:57 UTC (rev 1322) +++ trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj 2004-11-17 10:15:15 UTC (rev 1323) @@ -229,7 +229,8 @@ Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" - CommandLine="..\..\SimData\Tools\TaggedRecordCompiler\trc.py --header=..\$(InputName).h --source=..\$(InputName).cpp ..\$(InputName).net" + CommandLine="..\..\SimData\Tools\TaggedRecordCompiler\trc.py --header=..\$(InputName).h --source=..\$(InputName).cpp ..\$(InputName).net +" Outputs="$(InputName).h $(InputName).cpp"/> </FileConfiguration> <FileConfiguration @@ -238,7 +239,7 @@ Name="VCCustomBuildTool" CommandLine="..\..\SimData\Tools\TaggedRecordCompiler\trc.py --source=..\$(InputName).cpp --header=..\$(InputName).h ..\$(InputName).net " - Outputs="$(InputName).h $(InputName).cpp"/> + Outputs="../$(InputName).h;../$(InputName).cpp"/> </FileConfiguration> </File> </Files> |
From: <sv...@ww...> - 2004-11-16 21:20:05
|
Author: delta Date: 2004-11-16 13:19:57 -0800 (Tue, 16 Nov 2004) New Revision: 1322 Modified: trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj Log: * Added ClientServerMessages.net to vcproj. * Added a custom build step on ClientServerMessages. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1322 Modified: trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj =================================================================== --- trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj 2004-11-15 21:34:31 UTC (rev 1321) +++ trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj 2004-11-16 21:19:57 UTC (rev 1322) @@ -4,6 +4,7 @@ Version="7.10" Name="SimNet" ProjectGUID="{BAEB17DE-B639-4182-B1F6-9448CA73F916}" + RootNamespace="SimNet" Keyword="MakeFileProj"> <Platforms> <Platform @@ -24,7 +25,7 @@ RuntimeTypeInfo="TRUE" WarningLevel="4" DebugInformationFormat="3" - DisableSpecificWarnings="4275;4100;4512"/> + DisableSpecificWarnings="4275;4100;4512;4511"/> <Tool Name="VCCustomBuildTool"/> <Tool @@ -101,6 +102,21 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> <File + RelativePath="..\ClientServer.cpp"> + </File> + <File + RelativePath="..\ClientServerMessages.cpp"> + </File> + <File + RelativePath="..\DispatchHandler.cpp"> + </File> + <File + RelativePath="..\DispatchManager.cpp"> + </File> + <File + RelativePath="..\DispatchTarget.cpp"> + </File> + <File RelativePath="..\NetRandom.cpp"> </File> <File @@ -115,12 +131,33 @@ <File RelativePath="..\RecordCodec.cpp"> </File> + <File + RelativePath="..\RoutingHandler.cpp"> + </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> <File + RelativePath="..\Callbacks.h"> + </File> + <File + RelativePath="..\ClientServer.h"> + </File> + <File + RelativePath="..\DispatchCache.h"> + </File> + <File + RelativePath="..\DispatchHandler.h"> + </File> + <File + RelativePath="..\DispatchManager.h"> + </File> + <File + RelativePath="..\DispatchTarget.h"> + </File> + <File RelativePath="..\HandlerSet.h"> </File> <File @@ -169,6 +206,12 @@ RelativePath="..\ReliablePacket.h"> </File> <File + RelativePath="..\RoutingHandler.h"> + </File> + <File + RelativePath="..\SimNet.h"> + </File> + <File RelativePath="..\Sockets.h"> </File> <File @@ -181,7 +224,22 @@ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> </Filter> <File - RelativePath=".\readme.txt"> + RelativePath="..\ClientServerMessages.net"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCustomBuildTool" + CommandLine="..\..\SimData\Tools\TaggedRecordCompiler\trc.py --header=..\$(InputName).h --source=..\$(InputName).cpp ..\$(InputName).net" + Outputs="$(InputName).h $(InputName).cpp"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCustomBuildTool" + CommandLine="..\..\SimData\Tools\TaggedRecordCompiler\trc.py --source=..\$(InputName).cpp --header=..\$(InputName).h ..\$(InputName).net +" + Outputs="$(InputName).h $(InputName).cpp"/> + </FileConfiguration> </File> </Files> <Globals> |
From: <sv...@ww...> - 2004-11-15 21:34:39
|
Author: delta Date: 2004-11-15 13:34:31 -0800 (Mon, 15 Nov 2004) New Revision: 1321 Modified: trunk/CSP/SimData/Include/SimData/AtomicCounter.h trunk/CSP/SimData/Include/SimData/HashUtility.h trunk/CSP/SimData/Include/SimData/Math.h trunk/CSP/SimData/VisualStudio2003/SimData.vcproj Log: * Replaced every WIN32 by _WIN32 (windows native). Removed WIN32 definition in the preprocessor (vcproj). * Added a function object nohash64 (hashing function) for the vc7.x compilers' STL std/stdext::hash_map non standard container (must inheritate from std/stdext::hash_compare). * Updated vcproj. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1321 Modified: trunk/CSP/SimData/Include/SimData/AtomicCounter.h =================================================================== --- trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-11-14 23:12:59 UTC (rev 1320) +++ trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-11-15 21:34:31 UTC (rev 1321) @@ -36,7 +36,7 @@ #include <SimData/Properties.h> -#if defined(WIN32) +#if defined(_WIN32) # define WIN_ATOMIC # define _WINSOCKAPI_ # define NOMINMAX Modified: trunk/CSP/SimData/Include/SimData/HashUtility.h =================================================================== --- trunk/CSP/SimData/Include/SimData/HashUtility.h 2004-11-14 23:12:59 UTC (rev 1320) +++ trunk/CSP/SimData/Include/SimData/HashUtility.h 2004-11-15 21:34:31 UTC (rev 1321) @@ -167,10 +167,22 @@ /** Pass through (nop) hash function for 64-bit hash keys. */ -struct nohash64 { +#if defined(_MSC_VER) && (_MSC_VER >= 1300) + struct nohash64: public HASH<const uint64> { + size_t operator ()(const uint64& x) const { + return static_cast<size_t>(x); + } + bool operator()(const uint64& x1, const uint64& x2) const { + return (x1 < x2); + } + }; +#else + struct nohash64 { inline size_t operator()(uint64 x) const { return static_cast<size_t>(x); } }; +#endif + /** Pass through (nop) hash function for 32-bit hash keys. */ struct nohash32 { Modified: trunk/CSP/SimData/Include/SimData/Math.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Math.h 2004-11-14 23:12:59 UTC (rev 1320) +++ trunk/CSP/SimData/Include/SimData/Math.h 2004-11-15 21:34:31 UTC (rev 1321) @@ -107,13 +107,13 @@ inline void swap(T &a, T &b) { T t = a; a = b; b = t; } -#if (defined(WIN32) && !(defined(_MSC_VER) && (_MSC_VER >= 1300)) && !defined(__MINGW32__) ) || defined (sun) +#if (defined(_WIN32) && !(defined(_MSC_VER) && (_MSC_VER >= 1300)) && !defined(__MINGW32__) ) || defined (sun) #ifndef isnanf #define isnanf (float)isnan #endif #endif -#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MWERKS__) +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MWERKS__) inline bool isNaN(float v) { return _isnan(v)!=0; } inline bool isNaN(double v) { return _isnan(v)!=0; } #else Modified: trunk/CSP/SimData/VisualStudio2003/SimData.vcproj =================================================================== --- trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-11-14 23:12:59 UTC (rev 1320) +++ trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-11-15 21:34:31 UTC (rev 1321) @@ -30,7 +30,7 @@ OptimizeForProcessor="0" OptimizeForWindowsApplication="TRUE" AdditionalIncludeDirectories="../Include,$(PYTHON_PATH)/include" - PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;SIMDATA_EXPORTS" + PreprocessorDefinitions="NDEBUG;_USRDLL;SIMDATA_EXPORTS" StringPooling="TRUE" RuntimeLibrary="2" BufferSecurityCheck="FALSE" @@ -109,7 +109,7 @@ Optimization="0" EnableIntrinsicFunctions="TRUE" AdditionalIncludeDirectories="../Include,$(PYTHON_PATH)/include" - PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;SIMDATA_EXPORTS" + PreprocessorDefinitions="_DEBUG;_USRDLL;SIMDATA_EXPORTS" BasicRuntimeChecks="3" RuntimeLibrary="3" RuntimeTypeInfo="TRUE" |
Author: mkrose Date: 2004-11-14 15:12:59 -0800 (Sun, 14 Nov 2004) New Revision: 1320 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/CSPSim.h trunk/CSP/CSPSim/Include/ClientNode.h trunk/CSP/CSPSim/Include/SimNet/DispatchMessageHandler.h trunk/CSP/CSPSim/Source/CSPSim.cpp trunk/CSP/CSPSim/Source/ClientNode.cpp trunk/CSP/CSPSim/Source/SimNet/DispatchMessageHandler.cpp trunk/CSP/SimCore/Battlefield/SConscript trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/DataManager.h Log: Minor fix now that DataManager is a referenced type. Also undid some of the SimCore/Battlefield/SConscript changes that shouldn't have been checked in yet. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1320 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/CSPSim/CHANGES.current 2004-11-14 23:12:59 UTC (rev 1320) @@ -5,6 +5,10 @@ * Explicitly save and restore gl state when rendering the scene views. Fixes some rendering anomalies. + * Minor fix now that DataManager is a referenced type. Also undid + some of the SimCore/Battlefield/SConscript changes that shouldn't + have been checked in yet. + 2004-11-14: onsight * Moved SimObject.* to OldSimObject.*, to be replaced when the network-enabled battlefield is checked in (soon). Modified: trunk/CSP/CSPSim/Include/CSPSim.h =================================================================== --- trunk/CSP/CSPSim/Include/CSPSim.h 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/CSPSim/Include/CSPSim.h 2004-11-14 23:12:59 UTC (rev 1320) @@ -185,7 +185,7 @@ // TODO the terrain will eventually be encapsulated in a Theater class simdata::Ref<Theater> m_Theater; simdata::Ref<TerrainObject> m_Terrain; - simdata::ScopedPointer<simdata::DataManager> m_DataManager; + simdata::Ref<simdata::DataManager> m_DataManager; simdata::ScopedPointer<Atmosphere> m_Atmosphere; //PyObject* m_Console; Modified: trunk/CSP/CSPSim/Include/ClientNode.h =================================================================== --- trunk/CSP/CSPSim/Include/ClientNode.h 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/CSPSim/Include/ClientNode.h 2004-11-14 23:12:59 UTC (rev 1320) @@ -16,7 +16,7 @@ void initNetworking(); Battlefield * m_battlefield; - simdata::DataManager m_DataManager; + simdata::Ref<simdata::DataManager> m_DataManager; NetworkMessenger * m_networkMessenger; NetworkNode * m_remoteNode; NetworkNode * m_localNode; Modified: trunk/CSP/CSPSim/Include/SimNet/DispatchMessageHandler.h =================================================================== --- trunk/CSP/CSPSim/Include/SimNet/DispatchMessageHandler.h 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/CSPSim/Include/SimNet/DispatchMessageHandler.h 2004-11-14 23:12:59 UTC (rev 1320) @@ -21,8 +21,8 @@ void setBattlefield(Battlefield * battlefield) { _battlefield = battlefield; } Battlefield * getBattlefield() { return _battlefield; } - void setDataManager(simdata::DataManager & dataManager) { _dataManager = dataManager; } - simdata::DataManager getDataManager() { return _dataManager; } + void setDataManager(simdata::DataManager * dataManager) { _dataManager = dataManager; } + simdata::DataManager& getDataManager() { return *_dataManager; } protected: bool isLocal(unsigned int addr, unsigned short port); @@ -34,7 +34,7 @@ unsigned int _addr; unsigned short _port; Battlefield * _battlefield; - simdata::DataManager _dataManager; + simdata::Ref<simdata::DataManager> _dataManager; }; Modified: trunk/CSP/CSPSim/Source/CSPSim.cpp =================================================================== --- trunk/CSP/CSPSim/Source/CSPSim.cpp 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/CSPSim/Source/CSPSim.cpp 2004-11-14 23:12:59 UTC (rev 1320) @@ -461,7 +461,7 @@ DispatchMessageHandler * dispatchMessageHandler = new DispatchMessageHandler(); dispatchMessageHandler->setLocalAddress( m_localNode->getAddress().getAddress().s_addr ); dispatchMessageHandler->setLocalPort( localMessagePort ); - dispatchMessageHandler->setDataManager(*m_DataManager); + dispatchMessageHandler->setDataManager(m_DataManager.get()); dispatchMessageHandler->setBattlefield(getBattlefield()); m_NetworkMessenger->registerMessageHandler(dispatchMessageHandler); Modified: trunk/CSP/CSPSim/Source/ClientNode.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ClientNode.cpp 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/CSPSim/Source/ClientNode.cpp 2004-11-14 23:12:59 UTC (rev 1320) @@ -69,7 +69,7 @@ #include "ObjectModel.h" -ClientNode::ClientNode() { +ClientNode::ClientNode(): m_DataManager(new simdata::DataManager()) { CSP_LOG(NETWORK, INFO, "ClientNode::ClientNode()"); m_battlefield = NULL; m_networkMessenger = NULL; @@ -188,7 +188,7 @@ try { simdata::DataArchive *sim = new simdata::DataArchive(archive_file.c_str(), 1); assert(sim); - m_DataManager.addArchive(sim); + m_DataManager->addArchive(sim); } catch (simdata::Exception &e) { CSP_LOG(APP, ERROR, "Error opening data archive " << archive_file); @@ -258,7 +258,7 @@ dispatchMessageHandler->setLocalAddress( m_localNode->getAddress().getAddress().s_addr ); dispatchMessageHandler->setLocalPort(m_localPort); dispatchMessageHandler->setBattlefield(m_battlefield); - dispatchMessageHandler->setDataManager(m_DataManager); + dispatchMessageHandler->setDataManager(m_DataManager.get()); m_networkMessenger->registerMessageHandler(dispatchMessageHandler); Modified: trunk/CSP/CSPSim/Source/SimNet/DispatchMessageHandler.cpp =================================================================== --- trunk/CSP/CSPSim/Source/SimNet/DispatchMessageHandler.cpp 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/CSPSim/Source/SimNet/DispatchMessageHandler.cpp 2004-11-14 23:12:59 UTC (rev 1320) @@ -93,7 +93,7 @@ CSP_LOG(NETWORK, DEBUG, "DispatchMessageHandler::addRemoteObject() - calling dataManager using path: " << vehicle.c_str()); - simdata::Ref<DynamicObject> ao = _dataManager.getObject(vehicle.c_str()); + simdata::Ref<DynamicObject> ao = _dataManager->getObject(vehicle.c_str()); CSP_LOG(NETWORK, DEBUG, "DispatchMessageHandler::addRemoteObject() - asserting validity of new object"); assert(ao.valid()); Modified: trunk/CSP/SimCore/Battlefield/SConscript =================================================================== --- trunk/CSP/SimCore/Battlefield/SConscript 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/SimCore/Battlefield/SConscript 2004-11-14 23:12:59 UTC (rev 1320) @@ -24,11 +24,11 @@ LIBPATH= env.get('LIBPATH', []) + ['#/SpatialIndex/.bin'] SOURCES = [ - 'Battlefield.cpp', - 'LocalBattlefield.cpp', + 'OldBattlefield.cpp', +# 'LocalBattlefield.cpp', 'SceneManager.cpp', 'OldSimObject.cpp', - 'BattlefieldMessages.net', +# 'BattlefieldMessages.net', ] OBJECTS = build.Apply(env.StaticObject, SOURCES, LIBS=LIBS, LIBPATH=LIBPATH) Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/SimData/CHANGES.current 2004-11-14 23:12:59 UTC (rev 1320) @@ -14,6 +14,8 @@ * Minor tweaks to trc generation to silence vc warnings. +* Make DataManager a referenced type. + 2004-11-11: delta * Added SWIG_STD_BACKWARD_COMP to the swig command line in SimData.vcproj for swig 1.3.22. Modified: trunk/CSP/SimData/Include/SimData/DataManager.h =================================================================== --- trunk/CSP/SimData/Include/SimData/DataManager.h 2004-11-14 22:50:53 UTC (rev 1319) +++ trunk/CSP/SimData/Include/SimData/DataManager.h 2004-11-14 23:12:59 UTC (rev 1320) @@ -52,7 +52,7 @@ * * @author Mark Rose <mr...@st...> */ -class SIMDATA_EXPORT DataManager { +class SIMDATA_EXPORT DataManager: public Referenced { friend class DataArchive; public: |
From: <sv...@ww...> - 2004-11-14 22:51:01
|
Author: mkrose Date: 2004-11-14 14:50:53 -0800 (Sun, 14 Nov 2004) New Revision: 1319 Removed: trunk/CSP/SimData/Tools/TaggedRecordCompiler/bootstrap.py Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py Log: Removed spurious 'import bootstrap' from trc. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1319 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-11-14 21:58:46 UTC (rev 1318) +++ trunk/CSP/SimData/CHANGES.current 2004-11-14 22:50:53 UTC (rev 1319) @@ -4,6 +4,8 @@ 2004-11-14: onsight * Added a method to Timer to both return and reset the elapsed time. +* Removed spurious 'import bootstrap' from trc. + * Set the SWIG_STD_BACKWARD_COMP flag to the Scons script to fix the build under Swig 1.3.22. Deleted: trunk/CSP/SimData/Tools/TaggedRecordCompiler/bootstrap.py =================================================================== --- trunk/CSP/SimData/Tools/TaggedRecordCompiler/bootstrap.py 2004-11-14 21:58:46 UTC (rev 1318) +++ trunk/CSP/SimData/Tools/TaggedRecordCompiler/bootstrap.py 2004-11-14 22:50:53 UTC (rev 1319) @@ -1,33 +0,0 @@ -# SimData: Data Infrastructure for Simulations -# Copyright 2004 Mark Rose <mk...@us...> -# -# This file is part of SimData. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -try: - import CSP -except: - import sys - import os.path - dn = os.path.dirname - csp_root = dn(dn(dn(dn(dn(__file__))))) - sys.path.insert(0, csp_root) - try: - import CSP - except: - print 'Unable to import the main CSP module. Check that you have' - print 'a complete working copy.' - sys.exit(1) Modified: trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py =================================================================== --- trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py 2004-11-14 21:58:46 UTC (rev 1318) +++ trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py 2004-11-14 22:50:53 UTC (rev 1319) @@ -31,7 +31,6 @@ import os.path import re -import bootstrap from CSP.base import app import BaseTypes |
From: <sv...@ww...> - 2004-11-14 21:58:55
|
Author: mkrose Date: 2004-11-14 13:58:46 -0800 (Sun, 14 Nov 2004) New Revision: 1318 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/VirtualScene.cpp Log: Explicitly save and restore gl state when rendering the scene views. Fixes some rendering anomalies. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1318 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-11-14 21:48:06 UTC (rev 1317) +++ trunk/CSP/CSPSim/CHANGES.current 2004-11-14 21:58:46 UTC (rev 1318) @@ -2,6 +2,10 @@ =========================== 2004-11-14: onsight + * Explicitly save and restore gl state when rendering the scene + views. Fixes some rendering anomalies. + +2004-11-14: onsight * Moved SimObject.* to OldSimObject.*, to be replaced when the network-enabled battlefield is checked in (soon). Modified: trunk/CSP/CSPSim/Source/VirtualScene.cpp =================================================================== --- trunk/CSP/CSPSim/Source/VirtualScene.cpp 2004-11-14 21:48:06 UTC (rev 1317) +++ trunk/CSP/CSPSim/Source/VirtualScene.cpp 2004-11-14 21:58:46 UTC (rev 1318) @@ -33,6 +33,7 @@ #include "Sky.h" #include "Animation.h" #include "ObjectModel.h" +#include "glDiagnostics.h" #include <SimCore/Util/Log.h> #include <SimData/Types.h> @@ -57,6 +58,7 @@ #include <osg/StateSet> #include <cmath> +#include <cassert> // SHADOW is an *extremely* experimental feature. It is based on the // osgShadow demo, and does (did) work to some extent, but only for a @@ -115,6 +117,7 @@ 0.0, 0.0, 0.0, 1.0); } + /////////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////// @@ -455,9 +458,20 @@ m_FarView->setCullVisitor(CullVisitor); m_FarView->cull(); + // FIXME pushing and popping state around the SceneView.draw call should + // _not_ be necessary, yet all three of the SceneViews currently used by + // CSP leak state. It's not clear where the state leaks occur, and the + // whole problem may go away when we upgrade to the next version of OSG. + glPushAttrib(GL_ALL_ATTRIB_BITS); // FIXME + glPushClientAttrib(GL_ALL_CLIENT_ATTRIB_BITS); // FIXME + //GlStateSnapshot snapshot; // <-- uncomment this to log the state leak m_FarView->draw(); + //snapshot.logDiff("far view"); // <-- uncomment this to log the state leak + glPopClientAttrib(); // FIXME + glPopAttrib(); // FIXME if (m_NearObjectGroup->getNumChildren() > 0) { + assert(m_NearObjectGroup->getNumChildren() == 1); m_NearView->setProjectionMatrixAsPerspective(m_ViewAngle, m_Aspect, 0.01f, 100.0); osg::NodeVisitor* UpdateVisitor = m_NearView->getUpdateVisitor(); @@ -465,14 +479,24 @@ m_NearView->setUpdateVisitor(UpdateVisitor); m_NearView->update(); - CullVisitor = m_NearView->getCullVisitor(); + osgUtil::CullVisitor* CullVisitor = m_NearView->getCullVisitor(); CullVisitor->setComputeNearFarMode(osgUtil::CullVisitor::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES); CullVisitor->setCullingMode(osgUtil::CullVisitor::ENABLE_ALL_CULLING); m_NearView->setCullMask(0x2); m_NearView->setCullVisitor(CullVisitor); m_NearView->cull(); + // FIXME pushing and popping state around the SceneView.draw call should + // _not_ be necessary, yet all three of the SceneViews currently used by + // CSP leak state. It's not clear where the state leaks occur, and the + // whole problem may go away when we upgrade to the next version of OSG. + glPushClientAttrib(GL_ALL_CLIENT_ATTRIB_BITS); // FIXME + glPushAttrib(GL_ALL_ATTRIB_BITS); // FIXME + //GlStateSnapshot snapshot; // <-- uncomment this to log the state leak m_NearView->draw(); + //snapshot.logDiff("near view"); // <-- uncomment this to log the state leak + glPopClientAttrib(); // FIXME + glPopAttrib(); // FIXME } if (m_Terrain.valid()) m_Terrain->endDraw(); @@ -633,9 +657,13 @@ assert(node != 0); object->enterScene(); if (object->isNearField()) { - m_NearObjectGroup->addChild(node); + bool ok = m_NearObjectGroup->addChild(node); + assert(ok); + CSP_LOG(SCENE, INFO, "adding object to near field " << *object); } else { - m_FreeObjectGroup->addChild(node); + bool ok = m_FreeObjectGroup->addChild(node); + assert(ok); + CSP_LOG(SCENE, INFO, "adding object to far field " << *object); } m_DynamicObjects.push_back(object); } @@ -647,8 +675,10 @@ assert(node != 0); if (object->isNearField()) { m_NearObjectGroup->removeChild(node); + CSP_LOG(SCENE, INFO, "removing object from near field " << *object); } else { m_FreeObjectGroup->removeChild(node); + CSP_LOG(SCENE, INFO, "removing object from far field " << *object); } object->leaveScene(); // not very efficient, but object removal is rare compared to @@ -666,14 +696,20 @@ assert(object.valid()); if (object->isNearField() == isNear) return; object->setNearFlag(isNear); + CSP_LOG(SCENE, INFO, "setting near flag for " << *object << " to " << isNear); if (object->isInScene()) { osg::Node *node = object->getOrCreateModelNode(); if (isNear) { m_FreeObjectGroup->removeChild(node); m_NearObjectGroup->addChild(node); + CSP_LOG(SCENE, INFO, "moving object from far to near field " << *object); } else { - m_NearObjectGroup->removeChild(node); - m_FreeObjectGroup->addChild(node); + bool ok; + ok = m_NearObjectGroup->removeChild(node); + assert(ok); + ok = m_FreeObjectGroup->addChild(node); + assert(ok); + CSP_LOG(SCENE, INFO, "moving object from near to far field " << *object); } } } |
From: <sv...@ww...> - 2004-11-14 21:48:16
|
Author: mkrose Date: 2004-11-14 13:48:06 -0800 (Sun, 14 Nov 2004) New Revision: 1317 Modified: trunk/CSP/SimCore/Battlefield/SConscript Log: Another partial revert to keep CSPSim building correctly with the old battlefield code (for now). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1317 Modified: trunk/CSP/SimCore/Battlefield/SConscript =================================================================== --- trunk/CSP/SimCore/Battlefield/SConscript 2004-11-14 21:39:38 UTC (rev 1316) +++ trunk/CSP/SimCore/Battlefield/SConscript 2004-11-14 21:48:06 UTC (rev 1317) @@ -27,17 +27,17 @@ 'Battlefield.cpp', 'LocalBattlefield.cpp', 'SceneManager.cpp', - 'SimObject.cpp', + 'OldSimObject.cpp', 'BattlefieldMessages.net', ] OBJECTS = build.Apply(env.StaticObject, SOURCES, LIBS=LIBS, LIBPATH=LIBPATH) Return('OBJECTS') -BFC = env.Program('test-client.cpp', - LIBS=LIBS + ['simcore', 'SimData', 'pthread', 'spatialindex', 'simnet'], - LIBPATH=LIBPATH + ['#/SimCore/.bin', '#/SimData/SimData', '#/SimNet/.bin']) +#BFC = env.Program('test-client.cpp', +# LIBS=LIBS + ['simcore', 'SimData', 'pthread', 'spatialindex', 'simnet'], +# LIBPATH=LIBPATH + ['#/SimCore/.bin', '#/SimData/SimData', '#/SimNet/.bin']) #BFS = env.Program('test-server.cpp', # LIBS=LIBS + ['simcore', 'SimData', 'pthread', 'spatialindex', 'simnet'], # LIBPATH=LIBPATH + ['#/SimCore/.bin', '#/SimData/SimData', '#/SimNet/.bin']) -Alias('bftest', [BFC]) #, BFS]) +#Alias('bftest', [BFC, BFS]) |
From: <sv...@ww...> - 2004-11-14 21:39:49
|
Author: mkrose Date: 2004-11-14 13:39:38 -0800 (Sun, 14 Nov 2004) New Revision: 1316 Modified: trunk/CSP/SimCore/Battlefield/SceneManager.cpp Log: Oops, want to keep SceneManager using OldSimObject for now so we don't break CSPSim. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1316 Modified: trunk/CSP/SimCore/Battlefield/SceneManager.cpp =================================================================== --- trunk/CSP/SimCore/Battlefield/SceneManager.cpp 2004-11-14 21:38:23 UTC (rev 1315) +++ trunk/CSP/SimCore/Battlefield/SceneManager.cpp 2004-11-14 21:39:38 UTC (rev 1316) @@ -24,7 +24,7 @@ #include <SimCore/Battlefield/SceneManager.h> -#include <SimCore/Battlefield/SimObject.h> +#include <SimCore/Battlefield/OldSimObject.h> void SceneManager::setVisible(ObjectRef const& object, bool visible) { |
From: <sv...@ww...> - 2004-11-14 21:38:32
|
Author: mkrose Date: 2004-11-14 13:38:23 -0800 (Sun, 14 Nov 2004) New Revision: 1315 Added: trunk/CSP/SimCore/Battlefield/Battlefield.cpp trunk/CSP/SimCore/Battlefield/Battlefield.h trunk/CSP/SimCore/Battlefield/BattlefieldMessages.net trunk/CSP/SimCore/Battlefield/GlobalBattlefield.h trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp trunk/CSP/SimCore/Battlefield/LocalBattlefield.h trunk/CSP/SimCore/Battlefield/SimObject.cpp trunk/CSP/SimCore/Battlefield/SimObject.h trunk/CSP/SimCore/Battlefield/test-client.cpp trunk/CSP/SimCore/Util/TimeStamp.h Modified: trunk/CSP/SimCore/Battlefield/SConscript trunk/CSP/SimCore/Battlefield/SceneManager.cpp trunk/CSP/SimCore/Battlefield/SceneManager.h trunk/CSP/SimCore/SConscript Log: Add networked-enabled battlefield code. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1315 Diff omitted (110053 bytes). |
From: <sv...@ww...> - 2004-11-14 21:33:48
|
Author: mkrose Date: 2004-11-14 13:33:39 -0800 (Sun, 14 Nov 2004) New Revision: 1314 Modified: trunk/CSP/tools/CSP_bootstrap Log: Make the python bootstrap loader less picky about the case of directory paths under windows. Run CSP/setup.py --force to install the new loader. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1314 Modified: trunk/CSP/tools/CSP_bootstrap =================================================================== --- trunk/CSP/tools/CSP_bootstrap 2004-11-14 21:31:57 UTC (rev 1313) +++ trunk/CSP/tools/CSP_bootstrap 2004-11-14 21:33:39 UTC (rev 1314) @@ -28,6 +28,7 @@ import os import os.path import sys +import string # save the path old_path = sys.path[:] @@ -36,13 +37,20 @@ self = sys.modules['CSP'] del sys.modules['CSP'] +case_insensitive = os.name.startswith('win') or os.name.startswith('nt') +if case_insensitive: + tr_case = string.upper +else: + tr_case = lambda x: x + # look for the root of the current workspace cwd = os.getcwd() parts = cwd.split(os.sep) -if not 'CSP' in parts: +if not 'CSP' in map(tr_case, parts): print 'Error: trying to import CSP from outside of a workspace.' + print 'Current working directory is %s' % cwd sys.exit(1) -while parts[-1] != 'CSP': +while tr_case(parts[-1]) != 'CSP': parts = parts[:-1] CSP_PATH = os.path.sep.join(parts[:-1]) |
From: <sv...@ww...> - 2004-11-14 21:32:04
|
Author: mkrose Date: 2004-11-14 13:31:57 -0800 (Sun, 14 Nov 2004) New Revision: 1313 Modified: trunk/CSP/SimNet/RecordCodec.cpp Log: Fix a type conversion warning. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1313 Modified: trunk/CSP/SimNet/RecordCodec.cpp =================================================================== --- trunk/CSP/SimNet/RecordCodec.cpp 2004-11-14 21:18:43 UTC (rev 1312) +++ trunk/CSP/SimNet/RecordCodec.cpp 2004-11-14 21:31:57 UTC (rev 1313) @@ -85,7 +85,7 @@ simdata::TaggedRecordRegistry const ®istry = simdata::TaggedRecordRegistry::getInstance(); simdata::TaggedRecordFactoryBase const *factory = registry.getFactory(id); if (!factory) return false; - simdata::uint16 current_id = factory->getCustomId(); + simdata::uint16 current_id = static_cast<simdata::uint16>(factory->getCustomId()); if (current_id == local_id) { SIMDATA_VERIFY(m_Factories[current_id] == factory); return true; |
From: <sv...@ww...> - 2004-11-14 21:18:51
|
Author: mkrose Date: 2004-11-14 13:18:43 -0800 (Sun, 14 Nov 2004) New Revision: 1312 Added: trunk/CSP/SimCore/Battlefield/OldSimObject.cpp trunk/CSP/SimCore/Battlefield/OldSimObject.h Removed: trunk/CSP/SimCore/Battlefield/SimObject.cpp trunk/CSP/SimCore/Battlefield/SimObject.h Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/DynamicObject.h trunk/CSP/CSPSim/Include/Theater/FeatureGroup.h trunk/CSP/CSPSim/Source/CSPSim.cpp trunk/CSP/SimCore/Battlefield/OldBattlefield.h trunk/CSP/SimCore/Battlefield/SConscript trunk/CSP/SimCore/Battlefield/SceneManager.cpp trunk/CSP/SimCore/VisualStudio2003/SimCore.vcproj Log: Moved SimObject.* to OldSimObject.*, to be replaced when the network-enabled battlefield is checked in (soon). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1312 Diff omitted (24930 bytes). |
From: <sv...@ww...> - 2004-11-14 20:16:50
|
Author: mkrose Date: 2004-11-14 12:16:43 -0800 (Sun, 14 Nov 2004) New Revision: 1311 Modified: trunk/CSP/base/app.py Log: Display default options in help text. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1311 Modified: trunk/CSP/base/app.py =================================================================== --- trunk/CSP/base/app.py 2004-11-14 19:56:33 UTC (rev 1310) +++ trunk/CSP/base/app.py 2004-11-14 20:16:43 UTC (rev 1311) @@ -55,6 +55,11 @@ class CustomUsageFormatter(optparse.IndentedHelpFormatter): def format_usage(self, usage): return usage % {'prog' : programName(), 'progpath' : programPath()} + def format_option(self, option): + text = optparse.IndentedHelpFormatter.format_option(self, option).rstrip() + if not option.default is optparse.NO_DEFAULT and option.default: + text += ' [default: %s]' % str(option.default) + return text + '\n' log = logging.getLogger('app') |
From: <sv...@ww...> - 2004-11-14 19:56:44
|
Author: mkrose Date: 2004-11-14 11:56:33 -0800 (Sun, 14 Nov 2004) New Revision: 1310 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py Log: Minor tweaks to trc generation to silence vc warnings. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1310 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-11-14 18:08:51 UTC (rev 1309) +++ trunk/CSP/SimData/CHANGES.current 2004-11-14 19:56:33 UTC (rev 1310) @@ -10,6 +10,8 @@ * Added message id generation to the tagged record compiler. Also inlined several of the generated methods. +* Minor tweaks to trc generation to silence vc warnings. + 2004-11-11: delta * Added SWIG_STD_BACKWARD_COMP to the swig command line in SimData.vcproj for swig 1.3.22. Modified: trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py =================================================================== --- trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py 2004-11-14 18:08:51 UTC (rev 1309) +++ trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py 2004-11-14 19:56:33 UTC (rev 1310) @@ -170,7 +170,7 @@ format.write('}') format.write() for element in self.elements: - format.write('inline bool has_%s() const { return m_has_%s; }' % (element.id, element.id)) + format.write('inline bool has_%s() const { return m_has_%s != 0; }' % (element.id, element.id)) element.dump_clear(format) format.write() for element in self.elements: @@ -214,20 +214,21 @@ format.write('void serialize(simdata::TagReader &reader) {') format.indent() format.write('reader.beginCompound();') - format.write('while (1) {') + format.write('while (true) {') format.indent() format.write('int tag = reader.nextTag();') format.write('if (!tag) break;') - format.write('switch (tag) {') - for element in self.elements: - format.write('case TAG_%s: {' % element.id) - format.indent() - format.write('m_has_%s = 1;' % element.id) - element.dump_load(format) - format.write('break; }') - format.dedent() - format.write('default: break;') - format.write('}') + if self.elements: + format.write('switch (tag) {') + for element in self.elements: + format.write('case TAG_%s: {' % element.id) + format.indent() + format.write('m_has_%s = 1;' % element.id) + element.dump_load(format) + format.write('break; }') + format.dedent() + format.write('default: break;') + format.write('}') format.dedent() format.write('}') format.write('reader.endCompound();') |
From: <sv...@ww...> - 2004-11-14 18:08:58
|
Author: mkrose Date: 2004-11-14 10:08:51 -0800 (Sun, 14 Nov 2004) New Revision: 1309 Modified: trunk/CSP/Demeter/CHANGES.current trunk/CSP/Demeter/DemeterDrawable.cpp trunk/CSP/Demeter/Terrain.cpp Log: Save and restore gl state when rendering the terrain. Cures some texture anomalies. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1309 Modified: trunk/CSP/Demeter/CHANGES.current =================================================================== --- trunk/CSP/Demeter/CHANGES.current 2004-11-14 18:04:43 UTC (rev 1308) +++ trunk/CSP/Demeter/CHANGES.current 2004-11-14 18:08:51 UTC (rev 1309) @@ -1,18 +1,21 @@ Version 0.3.2 (in progress) =========================== +2004-11-14: onsight + Save and restore gl state when rendering the terrain. + 2004-10-18: delta - Changed GL_CLAMP mode to GL_CLAMP_TO_EDGE_EXT in CreateTexture - to avoid edge clamping problem on windows. Need to be tested on - GNU/Linux. - + Changed GL_CLAMP mode to GL_CLAMP_TO_EDGE_EXT in CreateTexture + to avoid edge clamping problem on windows. Need to be tested on + GNU/Linux. + 2004-09-29: delta - Added #NOMINMAX before including windows.h to avoid - conflict with std::max/min. - + Added #NOMINMAX before including windows.h to avoid + conflict with std::max/min. + 2004-04-25: delta Adjusted paths. - + 2003-12-06: delta Minor changes to shut up .net 7.1 warnings. Demeter debug version links onto release SDL_image.lib. Modified: trunk/CSP/Demeter/DemeterDrawable.cpp =================================================================== --- trunk/CSP/Demeter/DemeterDrawable.cpp 2004-11-14 18:04:43 UTC (rev 1308) +++ trunk/CSP/Demeter/DemeterDrawable.cpp 2004-11-14 18:08:51 UTC (rev 1309) @@ -216,14 +216,13 @@ if (m_RefTerrainLattice.valid()) { m_RefTerrainLattice->Tessellate(); - m_RefTerrainLattice->Render(); + m_RefTerrainLattice->Render(); } } void DemeterLatticeDrawable::SetCameraPosition(float x, float y, float z) { m_RefTerrainLattice->SetCameraPosition(x, y, z); - } Modified: trunk/CSP/Demeter/Terrain.cpp =================================================================== --- trunk/CSP/Demeter/Terrain.cpp 2004-11-14 18:04:43 UTC (rev 1308) +++ trunk/CSP/Demeter/Terrain.cpp 2004-11-14 18:08:51 UTC (rev 1309) @@ -3497,8 +3497,12 @@ void TerrainLattice::Render() { m_LatticePolygonsRendered = 0; - for (int i = 0; i < 9; i++) - { + int old_mode = -1; + glGetIntegerv(GL_MATRIX_MODE, &old_mode); + glPushAttrib(GL_ALL_ATTRIB_BITS); + glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS); + for (int i = 0; i < 9; i++) + { if (m_CurrentTerrainIndex[i] != -1) { if (m_pTextureFactory) @@ -3519,6 +3523,9 @@ m_LatticePolygonsRendered += m_TerrainPolygonsRendered; } } + glPopClientAttrib(); + glPopAttrib(); + glMatrixMode(old_mode); } void TerrainLattice::AddTerrainLoadListener(TerrainLoadListener& listener) |
From: <sv...@ww...> - 2004-11-14 18:04:50
|
Author: mkrose Date: 2004-11-14 10:04:43 -0800 (Sun, 14 Nov 2004) New Revision: 1308 Modified: trunk/CSP/SimCore/Util/SynchronousUpdate.h Log: Fix a typo. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1308 Modified: trunk/CSP/SimCore/Util/SynchronousUpdate.h =================================================================== --- trunk/CSP/SimCore/Util/SynchronousUpdate.h 2004-11-14 17:21:46 UTC (rev 1307) +++ trunk/CSP/SimCore/Util/SynchronousUpdate.h 2004-11-14 18:04:43 UTC (rev 1308) @@ -180,7 +180,7 @@ * UpdateTarget instances. Attachments are made via UpdateProxy instances * which automatically disconnect the callbacks if the target is destroyed. * The UpdateMaster maintains a separate list for callbacks that require - * "immidiate" updates (i.e. as soon as possible), and a priority queue for + * "immediate" updates (i.e. as soon as possible), and a priority queue for * callbacks that only require delayed updates. The minimum time until the * next update callback is determined by the return value of onUpdate(), * where <= 0 means immediate. Of course callbacks can only occur as |
From: <sv...@ww...> - 2004-11-14 17:21:54
|
Author: mkrose Date: 2004-11-14 09:21:46 -0800 (Sun, 14 Nov 2004) New Revision: 1307 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Timing.h trunk/CSP/SimData/SConscript trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py Log: Added a method to Timer to both return and reset the elapsed time. Set the SWIG_STD_BACKWARD_COMP flag to the Scons script to fix the build under Swig 1.3.22. Added message id generation to the tagged record compiler. Also inlined several of the generated methods. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1307 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-11-14 10:20:16 UTC (rev 1306) +++ trunk/CSP/SimData/CHANGES.current 2004-11-14 17:21:46 UTC (rev 1307) @@ -1,12 +1,21 @@ Version 0.4.0 (in progress) =========================== +2004-11-14: onsight +* Added a method to Timer to both return and reset the elapsed time. + +* Set the SWIG_STD_BACKWARD_COMP flag to the Scons script to fix the + build under Swig 1.3.22. + +* Added message id generation to the tagged record compiler. Also + inlined several of the generated methods. + 2004-11-11: delta * Added SWIG_STD_BACKWARD_COMP to the swig command line in SimData.vcproj for swig 1.3.22. - + * Added a few pragmas for insignificant warnings. - + 2004-11-10: onsight * Another bug fix in Parse.py, this time for TableN types. Prevents spurious complaints about missing required fields. Modified: trunk/CSP/SimData/Include/SimData/Timing.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Timing.h 2004-11-14 10:20:16 UTC (rev 1306) +++ trunk/CSP/SimData/Include/SimData/Timing.h 2004-11-14 17:21:46 UTC (rev 1307) @@ -107,13 +107,29 @@ return (_running ? get_realtime() - _start + _elapsed : _elapsed); } - /// Reset the elapsed time to zero (does not stop the timer). + /** Reset the elapsed time to zero (does not stop the timer). + */ inline void reset() { if (_running) { _start = get_realtime(); } _elapsed = 0; } + + /** Return the elapsed time and reset the timer to zero (does not + * stop the timer). + */ + inline timing_t incremental() { + timing_t elapsed = _elapsed; + _elapsed = 0; + if (_running) { + timing_t start = _start; + _start = get_realtime(); + elapsed += (_start - start); + } + return elapsed; + } + }; Modified: trunk/CSP/SimData/SConscript =================================================================== --- trunk/CSP/SimData/SConscript 2004-11-14 10:20:16 UTC (rev 1306) +++ trunk/CSP/SimData/SConscript 2004-11-14 17:21:46 UTC (rev 1307) @@ -18,7 +18,7 @@ Import('env build') -SWIGFLAGS = '-runtime -noexcept -python -c++' +SWIGFLAGS = '-runtime -noexcept -python -c++ -DSWIG_STD_BACKWARD_COMP' SHLIBS = ['dl', 'pthread'] MODULES = ['Source', 'SimData/Tests'] Modified: trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py =================================================================== --- trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py 2004-11-14 10:20:16 UTC (rev 1306) +++ trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py 2004-11-14 17:21:46 UTC (rev 1307) @@ -71,7 +71,7 @@ format.write(text) def dump_clear(self, format): - format.write('void clear_%s() { m_has_%s = 0; }' % (self.id, self.id)) + format.write('inline void clear_%s() { m_has_%s = 0; }' % (self.id, self.id)) def init(self): pass def dump_private(self, format): assert 0 @@ -170,7 +170,7 @@ format.write('}') format.write() for element in self.elements: - format.write('bool has_%s() const { return m_has_%s; }' % (element.id, element.id)) + format.write('inline bool has_%s() const { return m_has_%s; }' % (element.id, element.id)) element.dump_clear(format) format.write() for element in self.elements: @@ -304,7 +304,7 @@ def dump_get(self, format): type = self.typename() id = self.id - format.write('%s const & %s() const { return m_%s; }' % (type, id, id)) + format.write('inline %s const & %s() const { return m_%s; }' % (type, id, id)) def dump_set(self, format): if self.isDeprecated(): return @@ -366,7 +366,7 @@ type = self.child.fulltype() id = self.id name = self.varname() - format.write('std::vector< %s > const & %s() const { return %s; }' % (type, id, name)) + format.write('inline std::vector< %s > const & %s() const { return %s; }' % (type, id, name)) def dump_set(self, format): if self.isDeprecated(): return @@ -631,6 +631,10 @@ class t_int32(TrfType): TYPENAME = 'int32' class t_int16(TrfType): TYPENAME = 'int16' class t_int8(TrfType): TYPENAME = 'int8' +class t_uint64(TrfType): TYPENAME = 'uint64' +class t_uint32(TrfType): TYPENAME = 'uint32' +class t_uint16(TrfType): TYPENAME = 'uint16' +class t_uint8(TrfType): TYPENAME = 'uint8' class t_string(SimpleType): TYPENAME = 'std::string' @@ -658,6 +662,10 @@ t_int32, t_int16, t_int8, + t_uint64, + t_uint32, + t_uint16, + t_uint8, t_bool, t_string, ]) Modified: trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py =================================================================== --- trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py 2004-11-14 10:20:16 UTC (rev 1306) +++ trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py 2004-11-14 17:21:46 UTC (rev 1307) @@ -92,25 +92,34 @@ includes = [] namespace = '' include_as = '"%s"' % os.path.basename(self._header) + id_base = None + default_base = None header = 1 for line in file: line_number = line_number + 1 trim = line.strip() if not trim: continue - if header and trim.startswith('#include'): - includes.append(trim) - continue - if header and trim.startswith('#header'): - include_as = trim[7:].strip() - continue - if header and trim.startswith('namespace'): - m = DataPackCompiler.re_ns.match(trim) - if m: - if namespace: self.error('multiple namespace declarations') - namespace = m.groups(1) + if header: + if trim.startswith('#include'): + includes.append(trim) continue - else: - self.error('syntax error') + if trim.startswith('#header'): + include_as = trim[7:].strip() + continue + if trim.startswith('#message '): + default_base = trim[8:].strip() + continue + if trim.startswith('#idbase '): + id_base = int(trim[7:]) + continue + if trim.startswith('namespace'): + m = DataPackCompiler.re_ns.match(trim) + if m: + if namespace: self.error('multiple namespace declarations') + namespace = m.groups(1) + continue + else: + self.error('syntax error') if trim.startswith('//'): continue idx = trim.rfind('//') @@ -161,6 +170,15 @@ for option_pair in option_list: option, value = option_pair.split('=') options[option] = value + else: + options = {} + if type_class.TOPLEVEL: + if default_base: + options.setdefault('BASE', default_base) + if id_base is not None and type_class.TOPLEVEL: + if not options.has_key('ID'): + options['ID'] = str(id_base) + id_base += 1 if array: object = BaseTypes.ArrayType(id, type_class, opts=options) else: |
From: <sv...@ww...> - 2004-11-14 10:20:23
|
Author: mkrose Date: 2004-11-14 02:20:16 -0800 (Sun, 14 Nov 2004) New Revision: 1306 Modified: trunk/CSP/SimNet/ClientServer.cpp trunk/CSP/SimNet/ClientServer.h trunk/CSP/SimNet/DispatchTarget.h trunk/CSP/SimNet/Doxyfile trunk/CSP/SimNet/Makefile trunk/CSP/SimNet/MessageQueue.h trunk/CSP/SimNet/NetworkInterface.cpp trunk/CSP/SimNet/NetworkInterface.h trunk/CSP/SimNet/PeerInfo.cpp trunk/CSP/SimNet/PeerInfo.h trunk/CSP/SimNet/SConscript Log: Track disconnected peers in NetworkInterface. Provides access to a simple list of disconnected peers (rather than using callbacks). Change client id assignment so that old ids are not reused immediately. Add message payload caching for messages sent to multiple peers. Minor fixes. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1306 Diff omitted (15577 bytes). |
From: <sv...@ww...> - 2004-11-11 17:28:16
|
Author: delta Date: 2004-11-11 09:27:46 -0800 (Thu, 11 Nov 2004) New Revision: 1305 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/VisualStudio2003/SimData.vcproj Log: * Added a few pragmas for insignificant warnings. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1305 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-11-11 15:20:21 UTC (rev 1304) +++ trunk/CSP/SimData/CHANGES.current 2004-11-11 17:27:46 UTC (rev 1305) @@ -2,8 +2,11 @@ =========================== 2004-11-11: delta - * Added SWIG_STD_BACKWARD_COMP to the swig command line in SimData.vcproj. + * Added SWIG_STD_BACKWARD_COMP to the swig command line in SimData.vcproj + for swig 1.3.22. + * Added a few pragmas for insignificant warnings. + 2004-11-10: onsight * Another bug fix in Parse.py, this time for TableN types. Prevents spurious complaints about missing required fields. Modified: trunk/CSP/SimData/VisualStudio2003/SimData.vcproj =================================================================== --- trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-11-11 15:20:21 UTC (rev 1304) +++ trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-11-11 17:27:46 UTC (rev 1305) @@ -46,7 +46,8 @@ WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="0" - CompileAs="2"/> + CompileAs="2" + DisableSpecificWarnings="4511;4512;4100;4275"/> <Tool Name="VCCustomBuildTool"/> <Tool @@ -121,7 +122,7 @@ SuppressStartupBanner="TRUE" DebugInformationFormat="3" CompileAs="2" - DisableSpecificWarnings="4511;4512;4100"/> + DisableSpecificWarnings="4511;4512;4100;4275;4505"/> <Tool Name="VCCustomBuildTool"/> <Tool |
From: <sv...@ww...> - 2004-11-11 15:20:28
|
Author: delta Date: 2004-11-11 07:20:21 -0800 (Thu, 11 Nov 2004) New Revision: 1304 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/VisualStudio2003/SimData.vcproj Log: * Added SWIG_STD_BACKWARD_COMP to the swig command line in SimData.vcproj. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1304 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-11-11 07:36:46 UTC (rev 1303) +++ trunk/CSP/SimData/CHANGES.current 2004-11-11 15:20:21 UTC (rev 1304) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2004-11-11: delta + * Added SWIG_STD_BACKWARD_COMP to the swig command line in SimData.vcproj. + 2004-11-10: onsight * Another bug fix in Parse.py, this time for TableN types. Prevents spurious complaints about missing required fields. Modified: trunk/CSP/SimData/VisualStudio2003/SimData.vcproj =================================================================== --- trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-11-11 07:36:46 UTC (rev 1303) +++ trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-11-11 15:20:21 UTC (rev 1304) @@ -466,7 +466,7 @@ Name="Release|Win32"> <Tool Name="VCCustomBuildTool" - CommandLine="$(SWIG_PATH)\swig -runtime -c++ -python -noexcept -I..\Include -o ..\Source\$(InputName)_wrap.cpp ..\Source\$(InputName).i + CommandLine="$(SWIG_PATH)\swig -DSWIG_STD_BACKWARD_COMP -runtime -c++ -python -noexcept -I..\Include -o ..\Source\$(InputName)_wrap.cpp ..\Source\$(InputName).i " Outputs="..\Source\$(InputName)_wrap.cpp"/> </FileConfiguration> @@ -474,7 +474,7 @@ Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" - CommandLine="$(SWIG_PATH)\swig -runtime -c++ -python -noexcept -I..\Include -o ..\Source\$(InputName)_wrap.cpp ..\Source\$(InputName).i + CommandLine="$(SWIG_PATH)\swig -DSWIG_STD_BACKWARD_COMP -runtime -c++ -python -noexcept -I..\Include -o ..\Source\$(InputName)_wrap.cpp ..\Source\$(InputName).i " Outputs="..\Source\$(InputName)_wrap.cpp"/> </FileConfiguration> |