Changeset 204
- Timestamp:
- 03/24/09 18:03:08 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/service_management_layer/ServiceManagementLayer.cpp
r200 r204 24 24 { 25 25 LOG("Creating Service Management Layer.\n"); 26 shellSocketFD = -1; 26 27 LoadConfiguration(); 27 28 } … … 33 34 34 35 35 void 36 ServiceManagementLayer::SendComponentType()36 ServiceManagementLayer::ServiceManagementLayer(const char* serverName, \ 37 const char* serverPort) 37 38 { 39 LOG("Creating Service Management Layer.\n"); 40 41 ConnectToShell(serverName, serverPort); 42 43 LoadConfiguration(); 38 44 } 39 45 40 46 41 47 void 42 ServiceManagementLayer:: ConnectToRemoteComponent(const char* serverName, const char* serverPort)48 ServiceManagementLayer::SendComponentType() 43 49 { 50 SendMessage(shellSocketFD, "response_sml"); 51 LOG("SML responded to GetRemoteComponentType query.\n"); 52 } 53 54 55 void 56 ServiceManagementLayer::ConnectToShell(const char* serverName, \ 57 const char* serverPort) 58 { 59 shellSocketFD = ClientSocket(serverName, serverPort); 60 61 RegisterComponent(); 44 62 } 45 63 … … 48 66 ServiceManagementLayer::WaitForSignal() 49 67 { 50 // TODO This is the critical point of this class... we need to figure out51 // what the requests will look like before we can proceed.52 53 /*54 if(GetRequest(socketFD, pList, &ce_info)) {55 LOG("ServiceManagementLayer:: Received signal.\n");56 }57 */58 59 68 } 60 69 … … 63 72 ServiceManagementLayer::Shutdown() 64 73 { 74 DeregisterComponent(); 65 75 } 66 76 … … 69 79 ServiceManagementLayer::Reset() 70 80 { 81 DeregisterComponent(); 82 LoadConfiguration(); 71 83 } 72 84 … … 83 95 ServiceManagementLayer::DeregisterComponent() 84 96 { 97 SendMessage(shellSocketFD, "deregister_sml"); 98 LOG("ServiceManagementLayer:: Deregistration message sent.\n"); 99 100 shutdown(shellSocketFD, 2); 101 close(shellSocketFD); 102 shellSocketFD = -1; 103 LOG("ServiceManagementLayer:: Shell socket closed.\n"); 85 104 } 86 105 … … 119 138 ServiceManagementLayer::ReloadConfiguration() 120 139 { 140 LOG("ServiceManagementLayer:: Reloading Configuration.\n"); 121 141 } 122 142