Index: vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_CE.h
===================================================================
--- vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_CE.h	(revision 545)
+++ vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_CE.h	(revision 545)
@@ -0,0 +1,150 @@
+/*
+ Copyright 2009 Virginia Polytechnic Institute and State University  
+
+ Licensed under the Apache License, Version 2.0 (the "License"); 
+ you may not use this file except in compliance with the License. 
+ You may obtain a copy of the License at 
+ 
+ http://www.apache.org/licenses/LICENSE-2.0 
+
+ Unless required by applicable law or agreed to in writing, software 
+ distributed under the License is distributed on an "AS IS" BASIS, 
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ See the License for the specific language governing permissions and 
+ limitations under the License. 
+*/
+
+/*! This CE was written to extend the functionality of a basic CBR-based CE for
+ * use with the OSSIE demonstration. It defines its own CBR backend, as well as
+ * its own CognitiveEngine, both of which inherit from the example classes.
+ */
+
+
+#ifndef OSSIE_CE_H
+#define OSSIE_CE_H
+
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
+#include <stdint.h>
+#include <string>
+
+#include "vtcross/cbr.h"
+#include "vtcross/cognitive_engine.h"
+#include "vtcross/common.h"
+#include "vtcross/containers.h"
+#include "vtcross/debug.h"
+#include "vtcross/error.h"
+#include "vtcross/socketcomm.h"
+
+
+#define TXPOWER 1
+#define BER_ENV 1
+#define BER_OBJ 1
+#define DECREMENTSCALE 5 
+#define INCREMENTSCALE 5 
+#define EVF 20
+
+
+/* ossieCBR Class 
+ *
+ * Derives from the default VTCROSS CBR class to add the following functionality
+ * necessary for the OSSIE demo:
+ *
+ * TODO
+ */
+class ossieCBR : public CBR
+{
+    public:
+        ossieCBR();
+
+        ossieCBR(std::string _filename, std::string _tablename, std::string _cols[], uint32_t _len);
+
+        ~ossieCBR(){};
+
+        int32_t Update(std::string _where[], std::string _set[], float *_wherevals, float *_setvals, \
+                unsigned int _wherelen, unsigned int _setlen);
+
+        int32_t Search(std::string _names[], int32_t *_ops, float *_vals, uint32_t _n, \
+                float *_retvals, int32_t evf);
+};
+
+
+class OSSIE_CE : public CognitiveEngine
+{
+    public:
+        /*! Default constructor. */
+        OSSIE_CE() : CognitiveEngine(){};
+
+        /*! Default destructor. */
+        ~OSSIE_CE();
+
+        /*! \brief Preferred constructor.
+         *
+         * Overloaded constructor that creates a cognitive engine object and
+         * connects it to either the shell or an SML, depening on the SML bool.
+         *
+         * The 'numFields' parameter sets how large the parameter, observable,
+         * and utility arrays should be upon instantiation.
+         */
+        OSSIE_CE(const char* serverName, const char* serverPort, \
+                const int32_t numFields, const bool SML);
+
+        void RegisterServices();
+        void DeregisterServices();
+
+        /*! \brief Request that the CE optimize a set of parameters. 
+         *
+         * Find the most optimal set of transmission parameters given certain
+         * observables and possibly a service if the SML component is present
+         * and active. */
+        Parameter *GetSolution(Observable *observables, \
+                Parameter *currentParameters);
+        Parameter *GetSolution(Observable *observables, \
+                Parameter *currentParameters, std::string service);
+
+        /*! \brief Receive feedback from the radio 
+         *
+         * Receive a feedback from the radio regarding the performance of a
+         * certain set of parameters, possibly associated with a service.
+         *
+         * Feedback is a single set of performance statistics that is achieved
+         * corresponding to a specific set of transmission parameters.  Feedback
+         * helps a Cognitive Engine make better future decisions based upon 
+         * more accurate performance statistics. 
+         */
+        void ReceiveFeedback(Observable *observables,Parameter *parameters);
+        void ReceiveFeedback(Observable *observables, Parameter *parameters, \
+                std::string service);
+
+
+        /*! \brief Initialize the CE and prepare it for operation. 
+         *
+         * BuildCognitiveEngine performs the CE implementation specific work
+         * that defines the internals of a CE.  For example, a CBR CE engine
+         * would build the case-base reasoner or create the database, a neural
+         * network based CE may perform the initial training, a GA based CE
+         * may build the chromosome structure.
+         */
+        void BuildCognitiveEngine();
+
+        /*! \brief Each of these functions responds to a specific command.
+         *
+         * These functions are left principally un-implemented. It is the duty
+         * of child classes to implement these functions, as they define the
+         * cognitive engine's functionality.
+         */
+        void PerformUpdatePerformance();
+        void PerformRequestOptimizationService();
+        void PerformRequestOptimization();
+        void PerformQueryComponentType();
+        void PerformConnectSML();
+        void PerformDisconnectSML();
+        void PerformResetEngineCognitive();
+        void PerformShutdownEngineCognitive();
+
+        ossieCBR *myCBR;
+};
+
+
+#endif
Index: vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_Demo.cpp
===================================================================
--- vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_Demo.cpp	(revision 534)
+++ vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_Demo.cpp	(revision 545)
@@ -17,10 +17,7 @@
 #include <stdint.h>
 
-#include "vtcross/cognitive_engine.h"
-#include "vtcross/common.h"
-#include "vtcross/containers.h"
+#include "OSSIE_CE.h"
 #include "vtcross/debug.h"
 #include "vtcross/error.h"
-#include "vtcross/socketcomm.h"
 
 
@@ -31,5 +28,5 @@
        ERROR(1, "Usage: %s hostname port\n", argv[0]);
     
-    CognitiveEngine cognitiveEngine(argv[1], argv[2], 10, false);
+    OSSIE_CE cognitiveEngine(argv[1], argv[2], 10, false);
 
     LOG("Waiting for signal...\n");
Index: vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/Makefile.am
===================================================================
--- vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/Makefile.am	(revision 534)
+++ vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/Makefile.am	(revision 545)
@@ -22,5 +22,5 @@
 
 OSSIE_Demo_SOURCES = OSSIE_CE.cpp OSSIE_Demo.cpp
-OSSIE_Demo_DEPENDENCIES = ../libce.a
-OSSIE_Demo_LDADD = -lsqlite3 ../libce.a $(CROSS_SOCKETCOMM_LA) 
+OSSIE_Demo_DEPENDENCIES = ../libce.a ../libcbr.a
+OSSIE_Demo_LDADD = -lsqlite3 ../libce.a ../libcbr.a $(CROSS_SOCKETCOMM_LA) 
 
Index: vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_CE.cpp
===================================================================
--- vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_CE.cpp	(revision 534)
+++ vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/OSSIE_CE.cpp	(revision 545)
@@ -1,60 +1,28 @@
-/* Virginia Tech Cognitive Radio Open Source Systems
- * Virginia Tech, 2009
- *
- * LICENSE INFORMATION GOES HERE
+/*
+ Copyright 2009 Virginia Polytechnic Institute and State University  
+
+ Licensed under the Apache License, Version 2.0 (the "License"); 
+ you may not use this file except in compliance with the License. 
+ You may obtain a copy of the License at 
+ 
+ http://www.apache.org/licenses/LICENSE-2.0 
+
+ Unless required by applicable law or agreed to in writing, software 
+ distributed under the License is distributed on an "AS IS" BASIS, 
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ See the License for the specific language governing permissions and 
+ limitations under the License. 
+*/
+
+/*! This CE was written to extend the functionality of a basic CBR-based CE for
+ * use with the OSSIE demonstration. This file contains the implementation for
+ * both the OSSIE CBR as well as the OSSIE Cognitive Engine.
  */
 
-/*! This CE was written to extend the functionality of a basic CBR-based CE for
- * use with the OSSIE demonstration.
- */
-
-
-#include <cmath>
-#include <cstdlib>
-#include <cstring>
-#include <stdint.h>
-#include <string>
-
-#include "vtcross/cbr.h"
-#include "vtcross/cognitive_engine.h"
-#include "vtcross/common.h"
-#include "vtcross/containers.h"
-#include "vtcross/debug.h"
-#include "vtcross/error.h"
-#include "vtcross/socketcomm.h"
-
-
-#define TXPOWER 1
-#define BER_ENV 1
-#define BER_OBJ 1
-
-#define DECREMENTSCALE 5 
-#define INCREMENTSCALE 5 
-
-#define EVF 20
-
-
-/* ossieCBR Class 
- *
- * Derives from the default VTCROSS CBR class to add the following functionality
- * necessary for the OSSIE demo:
- *
- * TODO
- */
-class ossieCBR : public CBR
-{
-    public:
-        ossieCBR();
-
-        ossieCBR(string _filename, string _tablename, string _cols[], uint32_t _len);
-
-        ~ossieCBR(){};
-
-        int32_t Update(string _where[], string _set[], float *_wherevals, float *_setvals, \
-                unsigned int _wherelen, unsigned int _setlen);
-
-        int32_t Search(string _names[], int32_t *_ops, float *_vals, uint32_t _n, \
-                float *_retvals, int32_t evf);
-};
+
+#include "OSSIE_CE.h"
+
+
+using namespace std;
 
 
@@ -166,81 +134,10 @@
 
 
-class OSSIE_CE : public CognitiveEngine
-{
-    public:
-        /*! Default constructor. */
-        OSSIE_CE() : CognitiveEngine(){};
-
-        /*! Default destructor. */
-        ~OSSIE_CE();
-
-        /*! \brief Preferred constructor.
-         *
-         * Overloaded constructor that creates a cognitive engine object and
-         * connects it to either the shell or an SML, depening on the SML bool.
-         *
-         * The 'numFields' parameter sets how large the parameter, observable,
-         * and utility arrays should be upon instantiation.
-         */
-        OSSIE_CE(const char* serverName, const char* serverPort, \
-                const int32_t numFields, const bool SML) \
-            : CognitiveEngine(serverName, serverPort, numFields, SML){}
-
-
-        void RegisterServices();
-        void DeregisterServices();
-
-        /*! \brief Request that the CE optimize a set of parameters. 
-         *
-         * Find the most optimal set of transmission parameters given certain
-         * observables and possibly a service if the SML component is present
-         * and active. */
-        Parameter *GetSolution(Observable *observables, \
-                Parameter *currentParameters);
-        Parameter *GetSolution(Observable *observables, \
-                Parameter *currentParameters, std::string service);
-
-        /*! \brief Receive feedback from the radio 
-         *
-         * Receive a feedback from the radio regarding the performance of a
-         * certain set of parameters, possibly associated with a service.
-         *
-         * Feedback is a single set of performance statistics that is achieved
-         * corresponding to a specific set of transmission parameters.  Feedback
-         * helps a Cognitive Engine make better future decisions based upon 
-         * more accurate performance statistics. 
-         */
-        void ReceiveFeedback(Observable *observables,Parameter *parameters);
-        void ReceiveFeedback(Observable *observables, Parameter *parameters, \
-                std::string service);
-
-
-        /*! \brief Initialize the CE and prepare it for operation. 
-         *
-         * BuildCognitiveEngine performs the CE implementation specific work
-         * that defines the internals of a CE.  For example, a CBR CE engine
-         * would build the case-base reasoner or create the database, a neural
-         * network based CE may perform the initial training, a GA based CE
-         * may build the chromosome structure.
-         */
-        void BuildCognitiveEngine();
-
-        /*! \brief Each of these functions responds to a specific command.
-         *
-         * These functions are left principally un-implemented. It is the duty
-         * of child classes to implement these functions, as they define the
-         * cognitive engine's functionality.
-         */
-        void PerformUpdatePerformance();
-        void PerformRequestOptimizationService();
-        void PerformRequestOptimization();
-        void PerformQueryComponentType();
-        void PerformConnectSML();
-        void PerformDisconnectSML();
-        void PerformResetEngineCognitive();
-        void PerformShutdownEngineCognitive();
-
-        ossieCBR *myCBR;
-};
+OSSIE_CE::OSSIE_CE(const char* serverName, const char* serverPort, \
+        const int32_t numFields, const bool SML) \
+    : CognitiveEngine(serverName, serverPort, numFields, SML)
+{
+    BuildCognitiveEngine();
+}
 
 
