Changeset 188
- Timestamp:
- 03/23/09 10:51:58 (15 years ago)
- Location:
- vtcross/trunk/src
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/include/vtcross/components.h
r187 r188 35 35 * string. 36 36 */ 37 virtual void GetRemoteComponentType( int32_t socketFD) = 0;37 virtual void GetRemoteComponentType() = 0; 38 38 39 39 40 40 /* Wait for a command signal containing task instructions. 41 41 */ 42 virtual void WaitForSignal( int32_t socketFD) = 0;42 virtual void WaitForSignal() = 0; 43 43 44 44 … … 57 57 /* Register or deregister a component with the primary radio shell. 58 58 */ 59 virtual void RegisterComponent( int32_t socketFD) = 0;60 virtual void DeregisterComponent( int32_t socketFD) = 0;59 virtual void RegisterComponent() = 0; 60 virtual void DeregisterComponent() = 0; 61 61 }; 62 62 … … 76 76 * service management layer. 77 77 */ 78 virtual void RegisterServices( int32_t socketFD) = 0;79 virtual void DeregisterServices( int32_t socketFD) = 0;78 virtual void RegisterServices() = 0; 79 virtual void DeregisterServices() = 0; 80 80 }; 81 81 … … 91 91 ~ServiceManagementLayer(); 92 92 93 void GetRemoteComponentType( int32_t socketFD);94 void WaitForSignal( int32_t socketFD);93 void GetRemoteComponentType(); 94 void WaitForSignal(); 95 95 void Shutdown(); 96 96 void Reset(); 97 void RegisterComponent( int32_t socketFD);98 void DeregisterComponent( int32_t socketFD);97 void RegisterComponent(); 98 void DeregisterComponent(); 99 99 100 100 private: … … 131 131 void ReloadConfiguration(); 132 132 void LoadConfiguration(); 133 134 135 /* The socket file descriptor information for the shell which this SML 136 * is connected to. 137 */ 138 int32_t socketFD; 133 139 }; 134 140 … … 150 156 const bool SML); 151 157 152 void GetRemoteComponentType( int32_t socketFD);153 void WaitForSignal( int32_t socketFD);158 void GetRemoteComponentType(); 159 void WaitForSignal(); 154 160 void Shutdown(); 155 161 void Reset(); 156 void RegisterComponent( int32_t socketFD);157 void DeregisterComponent( int32_t socketFD);158 159 void RegisterServices( int32_t socketFD);160 void DeregisterServices( int32_t socketFD);162 void RegisterComponent(); 163 void DeregisterComponent(); 164 165 void RegisterServices(); 166 void DeregisterServices(); 161 167 162 168 private: … … 170 176 * of transmission parameters. 171 177 */ 172 void SendPEDecision( int32_t socketFD, struct Parameter pList[], \173 struct CE_Info *ce_info,int32_t decision_array[]);178 void SendPEDecision(struct Parameter pList[], struct CE_Info *ce_info, \ 179 int32_t decision_array[]); 174 180 175 181 … … 199 205 ~CognitiveEngine(); 200 206 201 void GetRemoteComponentType( int32_t socketFD);202 void WaitForSignal( int32_t socketFD);207 void GetRemoteComponentType(); 208 void WaitForSignal(); 203 209 void Shutdown(); 204 210 void Reset(); 205 void RegisterComponent( int32_t socketFD);206 void DeregisterComponent( int32_t socketFD);207 208 void RegisterServices( int32_t socketFD);209 void DeregisterServices( int32_t socketFD);211 void RegisterComponent(); 212 void DeregisterComponent(); 213 214 void RegisterServices(); 215 void DeregisterServices(); 210 216 211 217 private: … … 213 219 * (the CE will not always be local to the radio). 214 220 */ 215 void ReceiveRadioConfiguration( int32_t socketFD);221 void ReceiveRadioConfiguration(); 216 222 217 223 218 224 /* Receive an 'experience' report from the radio. 219 225 */ 220 void ReceiveExperience( int32_t socketFD);226 void ReceiveExperience(); 221 227 222 228 -
vtcross/trunk/src/policy_engines/PolicyEngine.cpp
r187 r188 44 44 45 45 if(SML_present) { 46 RegisterServices( socketFD);46 RegisterServices(); 47 47 LOG("Policy Engine connected to SML at %s.\n", serverName); 48 48 } 49 49 else { 50 RegisterComponent( socketFD);50 RegisterComponent(); 51 51 LOG("Policy Engine connected to shell at %s.\n", serverName); 52 52 } … … 57 57 58 58 void 59 PolicyEngine::GetRemoteComponentType( int32_t socketFD)59 PolicyEngine::GetRemoteComponentType() 60 60 { 61 61 } … … 63 63 64 64 void 65 PolicyEngine::WaitForSignal( int32_t socketFD)65 PolicyEngine::WaitForSignal() 66 66 { 67 67 LOG("Policy Engine:: Waiting for Policy Check Request.\n"); … … 77 77 78 78 LOG("Policy Engine:: Sending Policy decision to Server.\n"); 79 SendPEDecision( socketFD,pList, &ce_info, decision_array);79 SendPEDecision(pList, &ce_info, decision_array); 80 80 } 81 81 } … … 86 86 { 87 87 if(SML_present) 88 DeregisterServices( socketFD);88 DeregisterServices(); 89 89 else 90 DeregisterComponent( socketFD);90 DeregisterComponent(); 91 91 } 92 92 … … 103 103 104 104 void 105 PolicyEngine::RegisterComponent( int32_t socketFD)105 PolicyEngine::RegisterComponent() 106 106 { 107 107 SendMessage(socketFD, "register_engine_policy"); … … 112 112 113 113 void 114 PolicyEngine::DeregisterComponent( int32_t socketFD)114 PolicyEngine::DeregisterComponent() 115 115 { 116 116 SendMessage(socketFD, "deregister_engine_policy"); … … 120 120 121 121 void 122 PolicyEngine::RegisterServices( int32_t socketFD)122 PolicyEngine::RegisterServices() 123 123 { 124 124 LOG("Policy Engine:: Registering services.\n"); … … 131 131 132 132 void 133 PolicyEngine::DeregisterServices( int32_t socketFD)133 PolicyEngine::DeregisterServices() 134 134 { 135 135 LOG("Policy Engine:: Deregistering services.\n"); … … 156 156 157 157 void 158 PolicyEngine::SendPEDecision( int32_t socketFD,struct Parameter pList[], \158 PolicyEngine::SendPEDecision(struct Parameter pList[], \ 159 159 struct CE_Info *ce_info, int32_t decision_array[]) 160 160 {