Changeset 212
- Timestamp:
- 03/26/09 13:17:33 (15 years ago)
- Location:
- vtcross/trunk/src
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/include/vtcross/components.h
r211 r212 291 291 int16_t policyPort, int16_t commandPort); 292 292 293 /* Ask for the component type of a remote component via sockets, or 294 * respond to such a query sent to the shell itself. 295 */ 296 std::string GetRemoteComponentType(int32_t socketFD); 293 297 void SendComponentType(int32_t socketFD); 298 294 299 void Shutdown(); 295 300 void Reset(); -
vtcross/trunk/src/shell/CognitiveRadioShell.cpp
r210 r212 12 12 #include <cstring> 13 13 #include <stdint.h> 14 #include <string> 14 15 15 16 #include <arpa/inet.h> … … 75 76 SendMessage(socketFD, "response_shell"); 76 77 LOG("Cognitive Radio Shell responded to GetRemoteComponentType query.\n"); 78 } 79 80 81 std::string 82 CognitiveRadioShell::GetRemoteComponentType(int32_t socketFD) 83 { 84 SendMessage(socketFD, "request_component_type"); 85 86 char buffer[256]; 87 memset(buffer, 0, 256); 88 ReadMessage(socketFD, buffer); 89 90 return std::string(buffer); 77 91 } 78 92