Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 24, 2008, 3:06:20 PM (17 years ago)
Author:
scheusso
Message:

changed synchronisable (size of data wont be sended anymore

Location:
code/branches/network3/src/network
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network3/src/network/CMakeFiles/CMakeDirectoryInformation.cmake

    r1168 r1170  
    1818  "src/."
    1919  "src/orxonox"
    20   "src/tolua"
     20  "src/util/tolua"
    2121  )
    2222SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})
  • code/branches/network3/src/network/CMakeFiles/network.dir/DependInfo.cmake

    r1168 r1170  
    88  "/home/scheusso/orxonox/network/src/network/ClientConnection.cc"
    99  "/home/scheusso/orxonox/network/src/network/CMakeFiles/network.dir/ClientConnection.o"
     10  "/home/scheusso/orxonox/network/src/network/ConnectionManager.cc"
     11  "/home/scheusso/orxonox/network/src/network/CMakeFiles/network.dir/ConnectionManager.o"
    1012  "/home/scheusso/orxonox/network/src/network/ClientInformation.cc"
    1113  "/home/scheusso/orxonox/network/src/network/CMakeFiles/network.dir/ClientInformation.o"
    12   "/home/scheusso/orxonox/network/src/network/ConnectionManager.cc"
    13   "/home/scheusso/orxonox/network/src/network/CMakeFiles/network.dir/ConnectionManager.o"
    1414  "/home/scheusso/orxonox/network/src/network/GameStateManager.cc"
    1515  "/home/scheusso/orxonox/network/src/network/CMakeFiles/network.dir/GameStateManager.o"
  • code/branches/network3/src/network/CMakeFiles/network.dir/build.make

    r1168 r1170  
    349349bin/lib/libnetwork.so: bin/lib/libcore.so
    350350bin/lib/libnetwork.so: bin/lib/libutil.so
    351 bin/lib/libnetwork.so: bin/lib/libtolualib.a
    352351bin/lib/libnetwork.so: /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib/liblua.so
    353352bin/lib/libnetwork.so: /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib/liblualib.so
  • code/branches/network3/src/network/CMakeFiles/network.dir/depend.internal

    r1168 r1170  
    280280 src/./util/Sleep.h
    281281 src/./util/UtilPrereqs.h
    282  src/orxonox/OrxonoxPlatform.h
    283 src/network/CMakeFiles/network.dir/ClientInformation.o
    284  /home/scheusso/orxonox/network/src/network/ClientInformation.cc
    285  /home/scheusso/orxonox/network/src/network/ClientInformation.h
    286  /home/scheusso/orxonox/network/src/network/NetworkPrereqs.h
    287  /usr/pack/enet-2007-sd/include/enet/callbacks.h
    288  /usr/pack/enet-2007-sd/include/enet/enet.h
    289  /usr/pack/enet-2007-sd/include/enet/list.h
    290  /usr/pack/enet-2007-sd/include/enet/protocol.h
    291  /usr/pack/enet-2007-sd/include/enet/types.h
    292  /usr/pack/enet-2007-sd/include/enet/unix.h
    293  /usr/pack/enet-2007-sd/include/enet/win32.h
    294282 src/orxonox/OrxonoxPlatform.h
    295283src/network/CMakeFiles/network.dir/ConnectionManager.o
     
    549537 src/./util/UtilPrereqs.h
    550538 src/orxonox/OrxonoxPlatform.h
     539src/network/CMakeFiles/network.dir/ClientInformation.o
     540 /home/scheusso/orxonox/network/src/network/ClientInformation.cc
     541 /home/scheusso/orxonox/network/src/network/ClientInformation.h
     542 /home/scheusso/orxonox/network/src/network/NetworkPrereqs.h
     543 /usr/pack/enet-2007-sd/include/enet/callbacks.h
     544 /usr/pack/enet-2007-sd/include/enet/enet.h
     545 /usr/pack/enet-2007-sd/include/enet/list.h
     546 /usr/pack/enet-2007-sd/include/enet/protocol.h
     547 /usr/pack/enet-2007-sd/include/enet/types.h
     548 /usr/pack/enet-2007-sd/include/enet/unix.h
     549 /usr/pack/enet-2007-sd/include/enet/win32.h
     550 src/orxonox/OrxonoxPlatform.h
    551551src/network/CMakeFiles/network.dir/GameStateManager.o
    552552 /home/scheusso/orxonox/network/src/network/ClientInformation.h
  • code/branches/network3/src/network/CMakeFiles/network.dir/depend.make

    r1168 r1170  
    280280src/network/CMakeFiles/network.dir/ClientConnection.o: src/./util/UtilPrereqs.h
    281281src/network/CMakeFiles/network.dir/ClientConnection.o: src/orxonox/OrxonoxPlatform.h
    282 
    283 src/network/CMakeFiles/network.dir/ClientInformation.o: src/network/ClientInformation.cc
    284 src/network/CMakeFiles/network.dir/ClientInformation.o: src/network/ClientInformation.h
    285 src/network/CMakeFiles/network.dir/ClientInformation.o: src/network/NetworkPrereqs.h
    286 src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/callbacks.h
    287 src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/enet.h
    288 src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/list.h
    289 src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/protocol.h
    290 src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/types.h
    291 src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/unix.h
    292 src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/win32.h
    293 src/network/CMakeFiles/network.dir/ClientInformation.o: src/orxonox/OrxonoxPlatform.h
    294282
    295283src/network/CMakeFiles/network.dir/ConnectionManager.o: src/network/ClientInformation.h
     
    549537src/network/CMakeFiles/network.dir/ConnectionManager.o: src/orxonox/OrxonoxPlatform.h
    550538
     539src/network/CMakeFiles/network.dir/ClientInformation.o: src/network/ClientInformation.cc
     540src/network/CMakeFiles/network.dir/ClientInformation.o: src/network/ClientInformation.h
     541src/network/CMakeFiles/network.dir/ClientInformation.o: src/network/NetworkPrereqs.h
     542src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/callbacks.h
     543src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/enet.h
     544src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/list.h
     545src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/protocol.h
     546src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/types.h
     547src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/unix.h
     548src/network/CMakeFiles/network.dir/ClientInformation.o: /usr/pack/enet-2007-sd/include/enet/win32.h
     549src/network/CMakeFiles/network.dir/ClientInformation.o: src/orxonox/OrxonoxPlatform.h
     550
    551551src/network/CMakeFiles/network.dir/GameStateManager.o: src/network/ClientInformation.h
    552552src/network/CMakeFiles/network.dir/GameStateManager.o: src/network/GameStateManager.cc
  • code/branches/network3/src/network/CMakeFiles/network.dir/flags.make

    r1168 r1170  
    22# Generated by "Unix Makefiles" Generator, CMake Version 2.4
    33
    4 CXX_FLAGS = -Dnetwork_EXPORTS  -O2 -Wall -g -ggdb -fPIC -I/usr/pack/ogre-1.4.5-sd/include -I/usr/pack/ogre-1.4.5-sd/include/OGRE -I/usr/pack/ois-1.0-sd/include/OIS -I/usr/pack/ois-1.0-sd/include -I/usr/pack/enet-2007-sd/include -I/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include -I/usr/pack/openal-0.0.8-cl/include -I/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/include -I/usr/pack/lua-5.0.3-sd/include -I/home/scheusso/orxonox/network/src/. -I/home/scheusso/orxonox/network/src/orxonox -I/home/scheusso/orxonox/network/src/tolua 
     4CXX_FLAGS = -Dnetwork_EXPORTS  -O2 -Wall -g -ggdb -fPIC -I/usr/pack/ogre-1.4.5-sd/include -I/usr/pack/ogre-1.4.5-sd/include/OGRE -I/usr/pack/ois-1.0-sd/include/OIS -I/usr/pack/ois-1.0-sd/include -I/usr/pack/enet-2007-sd/include -I/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include -I/usr/pack/openal-0.0.8-cl/include -I/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/include -I/usr/pack/lua-5.0.3-sd/include -I/home/scheusso/orxonox/network/src/. -I/home/scheusso/orxonox/network/src/orxonox -I/home/scheusso/orxonox/network/src/util/tolua 
    55
  • code/branches/network3/src/network/CMakeFiles/network.dir/link.txt

    r1168 r1170  
    1 g++-4.1.1  -fPIC  -O2 -Wall -g -ggdb  --no-undefined -shared -Wl,-soname,libnetwork.so -o ../../bin/lib/libnetwork.so "CMakeFiles/network.dir/Client.o" "CMakeFiles/network.dir/ClientConnection.o" "CMakeFiles/network.dir/ClientInformation.o" "CMakeFiles/network.dir/ConnectionManager.o" "CMakeFiles/network.dir/GameStateManager.o" "CMakeFiles/network.dir/GameStateClient.o" "CMakeFiles/network.dir/PacketBuffer.o" "CMakeFiles/network.dir/PacketDecoder.o" "CMakeFiles/network.dir/PacketGenerator.o" "CMakeFiles/network.dir/Server.o" "CMakeFiles/network.dir/Synchronisable.o" -L/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib -L/usr/pack/ois-1.0-sd/i686-debian-linux3.1/lib -L/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/libenet.a -L/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/lib -L/home/scheusso/orxonox/network/bin/lib -L/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib -L/usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib -lz -Wl,-Bstatic -lenet -Wl,-Bdynamic -lboost_thread-gcc41-mt -lcore -lutil -lOgreMain -Wl,-Bstatic -ltolualib -Wl,-Bdynamic -llua -llualib -lOIS -Wl,-rpath,/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib:/usr/pack/ois-1.0-sd/i686-debian-linux3.1/lib:/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/libenet.a:/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/lib:/home/scheusso/orxonox/network/bin/lib:/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib:/usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib
     1g++-4.1.1  -fPIC  -O2 -Wall -g -ggdb  --no-undefined -shared -Wl,-soname,libnetwork.so -o ../../bin/lib/libnetwork.so "CMakeFiles/network.dir/Client.o" "CMakeFiles/network.dir/ClientConnection.o" "CMakeFiles/network.dir/ClientInformation.o" "CMakeFiles/network.dir/ConnectionManager.o" "CMakeFiles/network.dir/GameStateManager.o" "CMakeFiles/network.dir/GameStateClient.o" "CMakeFiles/network.dir/PacketBuffer.o" "CMakeFiles/network.dir/PacketDecoder.o" "CMakeFiles/network.dir/PacketGenerator.o" "CMakeFiles/network.dir/Server.o" "CMakeFiles/network.dir/Synchronisable.o" -L/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib -L/usr/pack/ois-1.0-sd/i686-debian-linux3.1/lib -L/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/libenet.a -L/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/lib -L/home/scheusso/orxonox/network/bin/lib -L/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib -L/usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib -lz -Wl,-Bstatic -lenet -Wl,-Bdynamic -lboost_thread-gcc41-mt -lcore -lOIS -lutil -lOgreMain -llua -llualib -Wl,-rpath,/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib:/usr/pack/ois-1.0-sd/i686-debian-linux3.1/lib:/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/libenet.a:/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/lib:/home/scheusso/orxonox/network/bin/lib:/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib:/usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib
  • code/branches/network3/src/network/Synchronisable.cc

    r1168 r1170  
    151151    for(i=syncList->begin(); n<datasize && i!=syncList->end(); ++i){
    152152      //(std::memcpy(retVal.data+n, (const void*)(&(i->size)), sizeof(int));
    153       memcpy( (void *)(retVal.data+n), (const void *)&((*i)->size), sizeof(int) );
    154       n+=sizeof(int);
    155153      switch((*i)->type){
    156154      case DATA:
     
    159157        break;
    160158      case STRING:
     159        memcpy( (void *)(retVal.data+n), (const void *)&((*i)->size), sizeof(int) );
     160        n+=sizeof(int);
    161161        std::memcpy( retVal.data+n, (const void*)( ( (std::string *) (*i)->var)->c_str()), (*i)->size);
    162162        n+=(*i)->size;
     
    182182    for(i=syncList->begin(); i!=syncList->end(); i++){
    183183      COUT(5) << "Synchronisable: element size: " << (*i)->size << " type: " << (*i)->type << std::endl;
    184       if(*(int *)data==(*i)->size || (*i)->type==STRING){
    185         switch((*i)->type){
    186         case DATA:
    187           data+=sizeof(int);
    188           memcpy((void*)(*i)->var, data, (*i)->size);
    189           data+=(*i)->size;
    190           break;
    191         case STRING:
    192           (*i)->size = *(int *)data;
    193           data+=sizeof(int);
    194           *((std::string *)((*i)->var)) = std::string((const char*)data);
    195           data += (*i)->size;
    196           break;
    197         }
    198       } else
    199         return false; //there was some problem with registerVar
     184      switch((*i)->type){
     185      case DATA:
     186        memcpy((void*)(*i)->var, data, (*i)->size);
     187        data+=(*i)->size;
     188        break;
     189      case STRING:
     190        (*i)->size = *(int *)data;
     191        data+=sizeof(int);
     192        *((std::string *)((*i)->var)) = std::string((const char*)data);
     193        data += (*i)->size;
     194        break;
     195      }
    200196    }
    201197    return true;
     
    212208      switch((*i)->type){
    213209      case DATA:
    214         tsize+=sizeof(int);
    215210        tsize+=(*i)->size;
    216211        break;
Note: See TracChangeset for help on using the changeset viewer.