Changeset 268
- Timestamp:
- 05/29/09 17:15:15 (15 years ago)
- Location:
- vtcross/trunk/src
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/cognitive_engines/CognitiveEngine.cpp
r255 r268 25 25 #include "cbr.c" 26 26 27 #include <sqlite3.h>28 #include <sqlite3ext.h>27 #include "sqlite3.h" 28 #include "sqlite3ext.h" 29 29 30 30 -
vtcross/trunk/src/include/vtcross/components.h
r255 r268 57 57 /* Wait for a command signal containing task instructions. 58 58 */ 59 virtual void WaitForSignal() = 0;59 //virtual void WaitForSignal() = 0; 60 60 61 61 /* Completely shutdown the radio and all operations. … … 97 97 */ 98 98 virtual void RegisterServices() = 0; 99 virtual void DeregisterServices() = 0;99 //virtual void DeregisterServices() = 0; 100 100 }; 101 101 … … 114 114 * shell with the passed hostname and port. 115 115 */ 116 ServiceManagementLayer(const char* serverName, const char* serverPort);116 ServiceManagementLayer(const char* SML_Config, const char* serverName, const char* serverPort); 117 117 118 118 /* Connect and register with the shell component at the passed hostname … … 122 122 const char* serverPort); 123 123 void SendComponentType(); 124 void ShellSignalHandler(); 125 void CESignalHandler(int32_t ID); 124 void MessageHandler(int32_t ID); 126 125 void Shutdown(); 127 126 void Reset(); … … 129 128 void DeregisterComponent(); 130 129 130 /* Starts the SML Server and watches it for incoming messages 131 */ 132 void StartSMLServer(); 133 131 134 private: 132 135 /* Receive the radio configuration settings from the shell and pass them … … 161 164 */ 162 165 void ReloadConfiguration(); 163 void LoadConfiguration( );166 void LoadConfiguration(const char *SML_Config, Mission* &mList); 164 167 165 168 /* Create and initialize the DB to hold the services … … 167 170 void CreateServicesDB(); 168 171 169 /* Starts the SML Server and watches it for incoming messages170 */171 void StartSMLServer(); 172 void PerformActiveMission(); 173 void TransactData(int32_t sourceID, int32_t destID); 174 172 175 173 176 /* The socket file descriptor information for the shell which this SML … … 180 183 uint16_t numberOfCognitiveEngines; 181 184 uint32_t Current_ID; 185 Mission *miss; 182 186 bool CE_Present; 187 int32_t activeMission; 183 188 }; 184 189 … … 262 267 263 268 void RegisterServices(); 264 void DeregisterServices();269 //void DeregisterServices(); 265 270 266 271 private: … … 343 348 344 349 /* Start all the socket servers */ 345 void StartShellServer(); 350 void StartShellServer(); 346 351 347 352 int32_t LoadRadioConfiguration(const char* radioConfig, Parameter* &pList, \ -
vtcross/trunk/src/include/vtcross/containers.h
r255 r268 83 83 struct Service { 84 84 std::string name; 85 uint16_t socketFD; 85 int32_t socketFD; 86 int32_t componentID; 87 uint16_t num_conds; 88 bool cond_flag; 89 std::string input[3]; 90 std::string output[3]; 86 91 }; 87 92 … … 95 100 uint32_t numServices; 96 101 Service *services; 102 std::string input[3]; 103 std::string output[3]; 97 104 }; 98 105 … … 101 108 struct CE_Reg { 102 109 int32_t ID_num; 103 sockaddr_in *sock_ptr; 104 socklen_t sock_len; 110 //sockaddr_in *sock_ptr; 111 //socklen_t sock_len; 112 int32_t FD; 105 113 }; 106 114