Index: vtcross/trunk/src/shell/CognitiveRadioShell.cpp
===================================================================
--- vtcross/trunk/src/shell/CognitiveRadioShell.cpp	(revision 239)
+++ vtcross/trunk/src/shell/CognitiveRadioShell.cpp	(revision 279)
@@ -208,4 +208,5 @@
     LOG("Cognitive Radio Shell:: Received registration message from Cognitive Engine.\n");
    
+    SendMessage(socketFD, "register_ack");
     SendRadioConfiguration(socketFD);
     SendRadioExperience(socketFD);
Index: vtcross/trunk/src/service_management_layer/sml_demo.cpp
===================================================================
--- vtcross/trunk/src/service_management_layer/sml_demo.cpp	(revision 278)
+++ vtcross/trunk/src/service_management_layer/sml_demo.cpp	(revision 279)
@@ -17,6 +17,4 @@
 
 #include "sqlite3.h"
-
-
 
 //#include "tinyxml.h"
@@ -50,94 +48,10 @@
 
 int main(int argc, char *argv[])
-{   
-    int shell = CreateTCPServerSocket(1979);
-    //sleep(2);
-    int temp = AcceptTCPConnection(shell); 
-   // SendMessage(temp, "list_services");
-    sleep(1);
-    int FD = ClientSocket("127.0.0.1", "2036"); 
-    SendMessage(FD, "register_engine_cognitive");   
-    SendMessage(FD, "register_service");
-    SendMessage(FD, "test_srv"); 
-    SendMessage(FD, "list_services");
-    int FD2 = ClientSocket("127.0.0.1", "2036"); 
-    SendMessage(FD2, "register_engine_cognitive");   
-    SendMessage(FD2, "register_service");
-    SendMessage(FD2, "test_srv1"); 
-    SendMessage(FD2, "register_service");
-    SendMessage(FD2, "test_srv2");
-    SendMessage(FD2, "list_services");
-    sleep(1);
-    printf("preread1\n");
+{  
 
-    char buffer[256];
-    memset(buffer, 0, 256);
-
-    SendMessage(temp, "set_active_mission");
-    SendMessage(temp, "0"); 
-    SendMessage(temp, "request_optimization");
-    SendMessage(temp, "params");
-    ReadMessage(FD, buffer);
-    printf("preread2\n");
-    printf("-----buffer1= %s-------\n", buffer);
-    ReadMessage(FD, buffer);
-    printf("-----buffer2= %s-------\n", buffer);
-    memset(buffer, 0, 256);
-    ReadMessage(FD, buffer);
-    printf("-----buffer3= %s-------\n", buffer);
-    SendMessage(FD, "ACK");
-    SendMessage(FD, "temp");
-    SendMessage(FD, "raw_data");
-    ReadMessage(FD2, buffer);
-    printf("-----buffer4= %s-------\n", buffer);
-    ReadMessage(FD2, buffer);
-    printf("-----buffer5= %s-------\n", buffer);
-    ReadMessage(FD2, buffer);
-    printf("-----buffer6= %s-------\n", buffer);
-    SendMessage(FD2, "ACK");
-    ReadMessage(FD2, buffer);
-    printf("-----buffer7= %s-------\n", buffer);
-    ReadMessage(FD2, buffer);
-    printf("-----buffer8= %s-------\n", buffer);
-    ReadMessage(FD2, buffer);
-    printf("-----buffer9= %s-------\n", buffer);
-    SendMessage(FD2, "ACK");
-    SendMessage(FD2, "trans");
-    ReadMessage(temp, buffer);
-    printf("-----buffer10= %s-------\n", buffer);
-    SendMessage(temp, "ACK");
-    /*ReadMessage(FD, buffer);
-    printf("-----buffer1= %s-------\n", buffer);
-    ReadMessage(FD, buffer);
-    printf("-----buffer2= %s-------\n", buffer);
-    memset(buffer, 0, 256);
-    ReadMessage(FD, buffer);
-    printf("-----buffer3= %s-------\n", buffer);
-    SendMessage(FD, "ACK");
-    SendMessage(FD, "true");
-    SendMessage(FD, "data");
-    ReadMessage(FD2, buffer);
-    printf("-----buffer4= %s-------\n", buffer);
-    ReadMessage(FD2, buffer);
-    printf("-----buffer5= %s-------\n", buffer);
-    memset(buffer, 0, 256);
-    ReadMessage(FD2, buffer);
-    printf("-----buffer6= %s-------\n", buffer);
-    SendMessage(FD2, "ACK");
-    SendMessage(FD2, "trans");
-    ReadMessage(temp, buffer);
-    printf("-----buffer7= %s-------\n", buffer);
-    SendMessage(temp, "ACK");*/
-   
-    
-
-    //SendMessage(temp, "list_services");  
-    while(true){   
-    char buffer[256];
-    memset(buffer, 0, 256);
-    ReadMessage(temp, buffer);
-    printf("------%s------\n", buffer);}
-   /*memset(buffer, 0, 256);
-    ReadMessage(temp, buffer);
-    printf("------%s------\n", buffer);*/
+    if(argc < 3)
+       ERROR(1, "Usage: %s config hostname port\n", argv[0]);
+ 
+    ServiceManagementLayer SML(argv[1], argv[2], argv[3]);
+    SML.StartSMLServer();     
 }
Index: vtcross/trunk/src/service_management_layer/Makefile.am
===================================================================
--- vtcross/trunk/src/service_management_layer/Makefile.am	(revision 278)
+++ vtcross/trunk/src/service_management_layer/Makefile.am	(revision 279)
@@ -3,8 +3,9 @@
 AM_CXXFLAGS = -Wall -g
 
-bin_PROGRAMS = sml_demo
+bin_PROGRAMS = sml_demo ce_test_demo
 
 sml_demo_SOURCES = ServiceManagementLayer.cpp sml_demo.cpp
 sml_demo_LDADD = -ldl -lpthread -lsqlite3  ../lib/tinyxml/libtinyxml.a ../lib/socketcomm/libsocketcomm.a
 
-
+ce_test_demo_SOURCES = ce_test_demo.cpp
+ce_test_demo_LDADD = -ldl -lpthread ../lib/socketcomm/libsocketcomm.a
Index: vtcross/trunk/src/service_management_layer/ServiceManagementLayer.cpp
===================================================================
--- vtcross/trunk/src/service_management_layer/ServiceManagementLayer.cpp	(revision 278)
+++ vtcross/trunk/src/service_management_layer/ServiceManagementLayer.cpp	(revision 279)
@@ -449,4 +449,5 @@
 ServiceManagementLayer::TransferRadioConfiguration(int32_t ID)
 {
+    printf("transRadConfig\n");
     struct timeval selTimeout;
     fd_set sockSet;
@@ -1152,10 +1153,8 @@
     SendMessage(CE_List[ID].FD, buffer);
 
-    //TODO UNCOMMENT!!!
-    //TODO UNCOMMENT!!!
-    /*TransferRadioConfiguration(ID);
+    TransferRadioConfiguration(ID);
     memset(buffer, 0, 256);
     TransferExperience(ID);
-    memset(buffer, 0, 256);*/
+    memset(buffer, 0, 256);
     numberOfCognitiveEngines++;
     CE_Present = true;
@@ -1246,4 +1245,5 @@
 ServiceManagementLayer::StartSMLServer()
 {
+    printf("Ready for CE Signal! (registration done)\n");
     struct timeval selTimeout;
     int32_t running = 1;
