Changeset 2415 for code/branches/presentation/src/network
- Timestamp:
- Dec 12, 2008, 10:10:31 AM (16 years ago)
- Location:
- code/branches/presentation/src/network
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/network/NetworkPrereqs.h
r2371 r2415 73 73 static const unsigned int CLIENTID_UNKNOWN = (unsigned int)-2; 74 74 static const uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1); 75 static const unsigned int SCHED_PRIORITY_OFFSET = -5;76 75 77 76 -
code/branches/presentation/src/network/Server.cc
r2171 r2415 63 63 { 64 64 const unsigned int MAX_FAILURES = 20; 65 const unsigned int NETWORK_FREQUENCY = 25;66 const float NETWORK_PERIOD = (float)1/NETWORK_FREQUENCY;67 65 68 66 /** -
code/branches/presentation/src/network/Server.h
r2171 r2415 52 52 { 53 53 const int CLIENTID_SERVER = 0; 54 const unsigned int NETWORK_FREQUENCY = 25; 55 const float NETWORK_PERIOD = 1./NETWORK_FREQUENCY; 54 56 55 57 /** -
code/branches/presentation/src/network/TrafficControl.cc
r2413 r2415 36 36 37 37 namespace orxonox { 38 39 static const unsigned int SCHED_PRIORITY_OFFSET = -1; 38 40 39 41 objInfo::objInfo(uint32_t ID, uint32_t creatorID, int32_t curGsID, int32_t diffGsID, uint32_t size, unsigned int prioperm, unsigned int priosched) … … 256 258 { 257 259 assert( (*itvec).objSize < 1000); 258 // COUT(0) << "==targetsize== " << targetsize << endl;259 260 if ( ( size + (*itvec).objSize ) < targetsize ) 260 261 { 261 // COUT(0) << "no cut" << endl;262 262 size += (*itvec).objSize;//objSize is given in bytes 263 263 ++itvec; … … 265 265 else 266 266 { 267 COUT(0) << "cut" << endl;268 267 clientListPerm_[currentClientID][(*itvec).objID].objValueSched += SCHED_PRIORITY_OFFSET; // NOTE: SCHED_PRIORITY_OFFSET is negative 269 // ittemp = itvec;270 268 list->erase(itvec++); 271 // itvec = ittemp;272 269 } 273 270 // printList(list, currentClientID); -
code/branches/presentation/src/network/synchronisable/Synchronisable.cc
r2371 r2415 66 66 RegisterRootObject(Synchronisable); 67 67 static uint32_t idCounter=0; 68 objectFrequency_=1;69 68 objectMode_=0x1; // by default do not send data to server 70 69 if ( !Host::running() || ( Host::running() && Host::isServer() ) ) … … 78 77 classID = static_cast<uint32_t>(-1); 79 78 80 79 // set standard priority 80 this->setPriority( priority::normal ); 81 82 83 // get creator id 81 84 #ifndef NDEBUG 82 85 ObjectList<Synchronisable>::iterator it; -
code/branches/presentation/src/network/synchronisable/Synchronisable.h
r2371 r2415 61 61 }; 62 62 } 63 64 namespace priority{ 65 enum prio{ 66 very_high = -30, 67 high = -15, 68 normal = 0, 69 low = 15, 70 very_low = 30 71 }; 72 } 63 73 64 74 struct _NetworkExport synchronisableHeader{ … … 101 111 template <class T> void unregisterVariable(T& var); 102 112 void setObjectMode(uint8_t mode); 103 void set ObjectPriority(unsigned int freq){ objectFrequency_ = freq; }113 void setPriority(unsigned int freq){ objectFrequency_ = freq; } 104 114 105 115
Note: See TracChangeset
for help on using the changeset viewer.