Changeset 2351 for code/branches/network/src/network/TrafficControl.h
- Timestamp:
- Dec 7, 2008, 10:57:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/TrafficControl.h
r2348 r2351 37 37 #include "NetworkPrereqs.h" 38 38 #include "Synchronisable.h" 39 #include "ClientInformation.h" 39 40 #include "util/Integers.h" 40 41 … … 48 49 uint32_t objID; 49 50 uint32_t objCreatorID; 50 int32_t objCurGS;//current GameState ID51 int32_t objDiffGS;//difference between current and latest GameState51 uint32_t objCurGS;//current GameState ID 52 uint32_t objDiffGS;//difference between current and latest GameState 52 53 uint32_t objSize; 53 54 unsigned int objValuePerm; … … 55 56 objInfo(uint32_t ID, uint32_t creatorID, int32_t curGsID, int32_t diffGsID, uint32_t size, unsigned int prioperm, unsigned int priosched) 56 57 { objID = ID; objCreatorID = creatorID; objCurGS = curGsID; objDiffGS = diffGsID; objSize = size; objValuePerm = prioperm; objValueSched = priosched; } 58 objInfo() 59 { objID = OBJECTID_UNKNOWN; objCreatorID = OBJECTID_UNKNOWN; objCurGS = GAMESTATEID_INITIAL; objDiffGS = objCurGS; objSize = 0; objValuePerm = 0; objValueSched = 0; } 57 60 }; 58 61 … … 62 65 struct obj 63 66 { 64 unsigned int objID; 65 unsigned int objCreatorID; 66 unsigned int objSize; 67 uint32_t objID; 68 uint32_t objCreatorID; 69 uint32_t objSize; 70 uint32_t objDataOffset; 71 obj() 72 { objID = OBJECTID_UNKNOWN; objCreatorID = OBJECTID_UNKNOWN; objSize = 0; objDataOffset = 0; } 73 obj( uint32_t ID, uint32_t creatorID, uint32_t size, uint32_t offset ) 74 { objID = ID; objCreatorID = creatorID; objSize = size; objDataOffset = offset; } 67 75 }; 68 76 77 78 const unsigned int SCHED_PRIORITY_OFFSET = -5; 69 79 70 80 … … 88 98 *creates list (typ map) that contains objids, struct with info concerning object(objid) 89 99 */ 90 std::map<unsigned int, objInfo> listToProcess_;//copy of argument, when traffic control tool is being called, the original of this must be returned later on, eg the vector given by GS100 // std::map<unsigned int, objInfo> listToProcess_;//copy of argument, when traffic control tool is being called, the original of this must be returned later on, eg the vector given by GS 91 101 /** 92 102 *permanent client list: contains client ids, object ids and objectInfos (in this order) … … 118 128 *copiedVector is a copy of the given Vector by the GSmanager, on this vector all manipulations are performed 119 129 */ 120 std::vector<obj> copiedVector;130 // std::vector<obj> copiedVector; 121 131 122 132 // void updateReferenceList(std::map<unsigned int, objInfo> *list);//done … … 132 142 *evaluates Data given (vector) and produces result(->Data to be updated) 133 143 */ 134 void evaluateList(unsigned int clientID, std::vector<obj> *list);//done 144 void evaluateList(unsigned int clientID, std::vector<obj> *list);//done 135 145 136 146 protected: … … 146 156 *Elements of struct i are therefore: *list[i].objID 147 157 */ 148 std::vector<obj>*processObjectList(unsigned int clientID, unsigned int gamestateID, std::vector<obj>* list); //gets a pointer to the vector (containing objectIDs) and sorts it158 void processObjectList(unsigned int clientID, unsigned int gamestateID, std::vector<obj>* list); //gets a pointer to the vector (containing objectIDs) and sorts it 149 159 //done 150 160 void processAck(unsigned int clientID, unsigned int gamestateID); // this function gets called when the server receives an ack from the client
Note: See TracChangeset
for help on using the changeset viewer.