- Timestamp:
- May 25, 2015, 2:04:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/network/FunctionCall.cc
r10472 r10473 52 52 { 53 53 case 0: 54 return !fct->call(this->objectID_);54 return fct->call(this->objectID_); 55 55 case 1: 56 return !fct->call(this->objectID_, this->arguments_[0]);56 return fct->call(this->objectID_, this->arguments_[0]); 57 57 case 2: 58 return !fct->call(this->objectID_, this->arguments_[0], this->arguments_[1]);58 return fct->call(this->objectID_, this->arguments_[0], this->arguments_[1]); 59 59 case 3: 60 return !fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2]);60 return fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2]); 61 61 case 4: 62 return !fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3]);62 return fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3]); 63 63 case 5: 64 return !fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3], this->arguments_[4]);64 return fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3], this->arguments_[4]); 65 65 default: 66 66 assert(0); … … 69 69 } 70 70 71 void FunctionCall::setCall Static( uint32_t networkID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5){71 void FunctionCall::setCall( uint32_t networkID, uint32_t objectID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5){ 72 72 73 73 // first determine the size that has to be reserved for this call 74 uint32_t callsize = 2*sizeof(uint32_t)+sizeof(uint8_t); //size for network-function-id and nrOfArguments and for bool isStatic 75 uint32_t nrOfArguments = 0; 76 if(mt1) 77 { 78 nrOfArguments++; 79 callsize += mt1->getNetworkSize(); 80 this->arguments_.push_back(*mt1); 81 if(mt2) 82 { 83 nrOfArguments++; 84 callsize += mt2->getNetworkSize(); 85 this->arguments_.push_back(*mt2); 86 if(mt3) 87 { 88 nrOfArguments++; 89 callsize += mt3->getNetworkSize(); 90 this->arguments_.push_back(*mt3); 91 if(mt4) 92 { 93 nrOfArguments++; 94 callsize += mt4->getNetworkSize(); 95 this->arguments_.push_back(*mt4); 96 if(mt5) 97 { 98 nrOfArguments++; 99 callsize += mt5->getNetworkSize(); 100 this->arguments_.push_back(*mt5); 101 } 102 } 103 } 104 } 105 } 106 this->nrOfArguments_ = nrOfArguments; 107 this->size_ = callsize; 108 this->functionID_ = networkID; 109 } 110 111 void FunctionCall::setCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5){ 112 113 // first determine the size that has to be reserved for this call 114 uint32_t callsize = 3*sizeof(uint32_t)+sizeof(uint8_t); //size for network-function-id and nrOfArguments and the objectID and bIsStatic 74 uint32_t callsize = 3*sizeof(uint32_t); //size for network-function-id and nrOfArguments and the objectID 115 75 uint32_t nrOfArguments = 0; 116 76 if(mt1) … … 146 106 this->nrOfArguments_ = nrOfArguments; 147 107 this->functionID_ = networkID; 108 this->objectID_ = objectID; 148 109 this->size_ = callsize; 149 this->objectID_ = objectID;150 110 } 151 111
Note: See TracChangeset
for help on using the changeset viewer.