Index: vtcross/trunk/src/include/vtcross/components.h
===================================================================
--- vtcross/trunk/src/include/vtcross/components.h	(revision 278)
+++ vtcross/trunk/src/include/vtcross/components.h	(revision 281)
@@ -367,4 +367,6 @@
         void RegisterSML(int32_t socketFD);
         void DeregisterSML(int32_t socketFD);
+        
+	void SetActiveMission(int32_t socketFD);
 
         /* Handle a message that is received from a component.
Index: vtcross/trunk/src/shell/CognitiveRadioShell.cpp
===================================================================
--- vtcross/trunk/src/shell/CognitiveRadioShell.cpp	(revision 279)
+++ vtcross/trunk/src/shell/CognitiveRadioShell.cpp	(revision 281)
@@ -277,4 +277,26 @@
 }
 
+void 
+CognitiveRadioShell::SetActiveMission(int32_t socketFD)
+{
+    char buffer[256];
+
+    LOG("Cognitive Radio Shell:: Received Set Active Mission command from host.\n");
+   
+    // Read the name of the active mission to be set from the host. 
+    memset(buffer, 0, 256);
+    ReadMessage(commandSocketFD, buffer);
+
+    // Send command to SML
+    SendMessage(ceSocketFD, "set_active_mission");
+    SendMessage(ceSocketFD, buffer);
+
+    // Get ack from SML saying the mission was set properly
+    memset(buffer, 0, 256);
+    ReadMessage(ceSocketFD, buffer);
+
+    // Forward ack to host
+    SendMessage(commandSocketFD, buffer);
+}
 
 int32_t 
@@ -497,26 +519,24 @@
      * to send this information
      */
-    if(!SML_present) { 
-        LOG("Cognitive Radio Shell:: Passing on observables to Cognitive Engine\n");
-        SendMessage(ceSocketFD,"request_optimization");
-        sprintf(counter,"%i",numObservables);
-        SendMessage(ceSocketFD,counter);
-        for(size_t i = 0; i < numObservables; i++) {
-            SendMessage(ceSocketFD,o[i].name.c_str());
-            sprintf(var,"%f",o[i].value);
-            SendMessage(ceSocketFD,var);
-        }
+    LOG("Cognitive Radio Shell:: Passing on observables.\n");
+    SendMessage(ceSocketFD,"request_optimization");
+    sprintf(counter,"%i",numObservables);
+    SendMessage(ceSocketFD,counter);
+    for(size_t i = 0; i < numObservables; i++) {
+        SendMessage(ceSocketFD,o[i].name.c_str());
+        sprintf(var,"%f",o[i].value);
+        SendMessage(ceSocketFD,var);
+    }
         
-        LOG("Cognitive Radio Shell:: Passing on current parameters to Cognitive Engine\n");
-        sprintf(counter,"%i",numCurrentParameters);
-        SendMessage(ceSocketFD,counter);
-        for(size_t i = 0; i < numCurrentParameters; i++) {
-            SendMessage(ceSocketFD,cp[i].name.c_str());
-            sprintf(var,"%f",cp[i].value);
-            SendMessage(ceSocketFD,var);
-        }
-    }
-
-    LOG("Cognitive Radio Shell:: Receiving optimized parameters from Cognitive Engine.\n");
+    LOG("Cognitive Radio Shell:: Passing on current parameters.\n");
+    sprintf(counter,"%i",numCurrentParameters);
+    SendMessage(ceSocketFD,counter);
+    for(size_t i = 0; i < numCurrentParameters; i++) {
+        SendMessage(ceSocketFD,cp[i].name.c_str());
+        sprintf(var,"%f",cp[i].value);
+        SendMessage(ceSocketFD,var);
+    }
+
+    LOG("Cognitive Radio Shell:: Receiving optimized parameters.\n");
     /* Receive Set of Parameters */
     memset(buffer, 0, 256);
@@ -659,4 +679,6 @@
         /* Receive optimization request and current environment */
         GetOptimalParameters(socketFD);  
+    } else if(strcmp(buffer, "set_active_mission") == 0) {
+        SetActiveMission(socketFD);  
     } else if(strcmp(buffer, "request_optimization_service") == 0) {
         /* Receive optimization request and current environment */
Index: vtcross/trunk/src/service_management_layer/Makefile.am
===================================================================
--- vtcross/trunk/src/service_management_layer/Makefile.am	(revision 279)
+++ vtcross/trunk/src/service_management_layer/Makefile.am	(revision 281)
@@ -3,9 +3,6 @@
 AM_CXXFLAGS = -Wall -g
 
-bin_PROGRAMS = sml_demo ce_test_demo
+bin_PROGRAMS = sml_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/libvtcross/Makefile.am
===================================================================
--- vtcross/trunk/src/libvtcross/Makefile.am	(revision 222)
+++ vtcross/trunk/src/libvtcross/Makefile.am	(revision 281)
@@ -2,5 +2,5 @@
 
 lib_LTLIBRARIES = libvtcross.la
-bin_PROGRAMS = libvtcross_demo
+bin_PROGRAMS = libvtcross_demo libvtcross_demo_sml
 
 libvtcross_la_SOURCES = libvtcross.cpp
@@ -10,2 +10,5 @@
 libvtcross_demo_SOURCES = libvtcross_demo.cpp
 libvtcross_demo_LDADD = libvtcross.la
+
+libvtcross_demo_sml_SOURCES = libvtcross_demo_sml.cpp
+libvtcross_demo_sml_LDADD = libvtcross.la
