Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 29, 2009, 4:05:35 PM (16 years ago)
Author:
scheusso
Message:

commit for testing reasons

  • added possibility to transfer function calls over network
  • made MultiType serialisable
  • put serialise functions from synchronisable to util
  • … (can't remember )
Location:
code/branches/netp2/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp2/src/orxonox/OrxonoxPrereqs.h

    r2826 r2937  
    159159    class SpawnPoint;
    160160    class TeamSpawnPoint;
     161    class Test;
    161162
    162163    class Spectator;
  • code/branches/netp2/src/orxonox/objects/Test.cc

    r2662 r2937  
    3131#include "core/ConfigValueIncludes.h"
    3232#include "core/ConsoleCommand.h"
     33#include "network/NetworkFunction.h"
    3334#include "Test.h"
    3435
     
    4142  SetConsoleCommand(Test, printV3, true).accessLevel(AccessLevel::User);
    4243  SetConsoleCommand(Test, printV4, true).accessLevel(AccessLevel::User);
     44  SetConsoleCommand(Test, call, true).accessLevel(AccessLevel::User);
     45 
     46 
     47  //void=* aaaaa = copyPtr<sizeof(&Test::printV1)>( &NETWORK_FUNCTION_POINTER, &Test::printV1 );
     48  //void* NETWORK_FUNCTION_TEST_B = memcpy(&NETWORK_FUNCTION_POINTER, &a, sizeof(a));
     49//   NetworkFunctionBase* NETWORK_FUNCTION_TEST_C = new NetworkFunctionStatic( createFunctor(&Test::printV1), "bla", NETWORK_FUNCTION_POINTER );
     50 
     51  registerStaticNetworkFunction( &Test::printV1, "printV1" );
    4352 
    4453  Test* Test::instance_ = 0;
     
    8594    registerVariable ( s4, variableDirection::clientMaster, new NetworkCallback<Test> ( this, &Test::checkS4 ), true );
    8695        }
    87 
     96 
     97  void Test::call(unsigned int clientID)
     98  {
     99    callStaticNetworkFunction( &Test::printV1, clientID );
     100  }
     101 
    88102  void Test::checkU1(){ COUT(1) << "U1 changed: " << u1 << std::endl; }
    89103  void Test::checkU2(){ COUT(1) << "U2 changed: " << u2 << std::endl; }
  • code/branches/netp2/src/orxonox/objects/Test.h

    r2662 r2937  
    4949      void setConfigValues();
    5050      void registerVariables();
     51     
     52      void call(unsigned int clientID);
    5153
    5254
Note: See TracChangeset for help on using the changeset viewer.