[SSM] Add OIC namespace and cleanup description file
authorjk13 <jihyeok13.kim@samsung.com>
Fri, 19 Dec 2014 06:05:40 +0000 (15:05 +0900)
committerjk13 <jihyeok13.kim@samsung.com>
Fri, 19 Dec 2014 06:28:31 +0000 (15:28 +0900)
1. Add OIC namespace at SSM interface header for application developers
2. Add description for scons build and run

Change-Id: Id22df7b59fd30d67a05703ccbafc845e94f05ff3
Signed-off-by: jk13 <jihyeok13.kim@samsung.com>
service/soft-sensor-manager/Readme.txt
service/soft-sensor-manager/SDK/cpp/include/SSMInterface.h
service/soft-sensor-manager/SSMCore/include/SSMInterface.h
service/soft-sensor-manager/SSMCore/src/SSMInterface/SSMCore.h
service/soft-sensor-manager/SampleApp/linux/SSMTesterApp/include/SSMTestApp.h
service/soft-sensor-manager/SampleApp/tizen/SSMTesterApp/oic-sample/src/oicapp-test.cpp
service/soft-sensor-manager/SoftSensorPlugin/SoftSensorDescription.xml

index 32181da..1e295bf 100644 (file)
@@ -29,7 +29,7 @@ In this context, we assume that the code was downloaded into 'oic' folder.
 
 
 =======================================
-1. Download source code download 
+1. Download source code
 =======================================
 
 Once you download the codes, please make sure that the downloaded code structure is as follows; 
@@ -82,6 +82,7 @@ Please refer the files for specific setup.
 
 3.1.2 If you type "make" at ¡°soft-sensor-manager/build/linux¡±, all packages will be pushed to "/soft-sensor-manager/build/linux/release".  
    You can also found other packages in the folder
+
 +--------------------------------------------------------------+
 | ~/oic/service/soft-sensor-manager/build/linux$ make          |
 +--------------------------------------------------------------+
@@ -128,38 +129,40 @@ Please refer the files for specific setup.
    To build all sample  applications for arduino, just do as below.
 
 +------------------------------------------------------------------------------------------------+
-|~/oic/service/soft-sensor-manager/ build/Arduino$ make PLATFORM=arduinomega ARDUINOWIFI=1       |                           |
+|~/oic/service/soft-sensor-manager/ build/Arduino$ make PLATFORM=arduinomega ARDUINOWIFI=1       |                           
 +------------------------------------------------------------------------------------------------+ 
 
    If you want to build each sample application separately, go to build directory for sample application. 
    Belowing is example for THSensor App. 
+   
 +-------------------------------------------------------------------------------------------------------------------+
-|~/oic/service/soft-sensor-manager/SampleApp/arduino/THSensorApp/build$ make PLATFORM=arduinomega ARDUINOWIFI=1     |                           |
+|~/oic/service/soft-sensor-manager/SampleApp/arduino/THSensorApp/build$ make PLATFORM=arduinomega ARDUINOWIFI=1     |                           
 +-------------------------------------------------------------------------------------------------------------------+ 
 
 3.2.6. To build and deploy the binary into the target hardware board, Aruino in this case, you need 'install' option. 
-   Please refer to below example for THSensorApp ;
+   Please refer to below example for THSensorApp;
 
 +--------------------------------------------------------------------------------------------------------------------------+
-|~/oic/service/soft-sensor-manager/SampleApp/arduino/THSensorApp/build$ make install PLATFORM=arduinomega ARDUINOWIFI=1    |                           |
+|~/oic/service/soft-sensor-manager/SampleApp/arduino/THSensorApp/build$ make install PLATFORM=arduinomega ARDUINOWIFI=1    |                           
 +--------------------------------------------------------------------------------------------------------------------------+ 
    Before ¡®make install¡¯, you need to check the file located at "/oic/service/soft-sensor-manager/SampleApp/arduino/THSensorApp/build/Makefile". 
    Line 26, ARDUINO_PORT is the serial port path, which has to be aligned on your system.  
 
 
 =======================================
-5. Execute THSensorApp and SSMTesterApp
+4. Execute THSensorApp and SSMTesterApp
 =======================================
+
 If you want to check how soft-sensor-manager is working, you can run simple applications - THSensorApp and SSMTesterApp
 
-5.1 To initiate THSensorApp, please enter as following; 
+4.1 To initiate THSensorApp, please enter as following; 
 
 +------------------------------------------------------------------------+
-|~/oic/service/soft-sensor-manager/build/linux/release$ ./THSensorApp    |           |
+|~/oic/service/soft-sensor-manager/build/linux/release$ ./THSensorApp    |           
 |~/oic/service/soft-sensor-manager/build/linux/release$ ./THSensorApp1   |                 
 +------------------------------------------------------------------------+
  
-5.2 To initiate SSMTesterApp , please enter as following;
+4.2 To initiate SSMTesterApp, please enter as following;
 
 +--------------------------------------------------------------------------+
 |~/oic/service/soft-sensor-manager/build/linux/release$ ./SSMTesterApp     |
@@ -168,3 +171,42 @@ If you want to check how soft-sensor-manager is working, you can run simple appl
 Note that the sequence of process initiations should be followed due to the process dependencies.
 
 
+=======================================
+5. Build with SCons
+=======================================
+
+If you want to use Scons to build soft-sensor-manager, build the source code and execute sample applications as following steps.
+
+5.1 After downloading the source codes, type "scons" at project root directory "oic/"
+
++---------------------------------------+
+|~/oic$ scons                           |
++---------------------------------------+
+
+5.2 To execute Soft Sensor Manager and its applications, some shared libraries must be exported.
+
+5.2.1 Go to "oic/out/<target_os>/<target_arch>/release", and check if there are following .so files
+ liboc.so
+ liboctbstack.so
+ liboc_logger.so
+5.2.2 To export the shared libraries, please enter as following;
+
++---------------------------------------------------------------------------------------------------------------------------+
+|~/oic/out/<target_os>/<target_arch>/release$ export LD_LIBRARY_PATH=~/oic/out/<target_os>/<target_arch>/release            |
++---------------------------------------------------------------------------------------------------------------------------+
+
+5.3 Generated outputs from building soft-sensor-manager will be in "oic/out/<target_os>/<target_arch>/release/service/soft-sensor-manager".
+
+5.4 To initiate THSensorApp, please enter as following;
+
++------------------------------------------------------------------------------------------+
+|~/oic/out/<target_os>/<target_arch>/release/service/soft-sensor-manager$ ./THSensorApp    |           
+|~/oic/out/<target_os>/<target_arch>/release/service/soft-sensor-manager$ ./THSensorApp1   |                 
++------------------------------------------------------------------------------------------+
+
+5.5 To initiate SSMTesterApp, please enter as following;
+
++--------------------------------------------------------------------------------------------+
+|~/oic/out/<target_os>/<target_arch>/release/service/soft-sensor-manager$ ./SSMTesterApp     |
++--------------------------------------------------------------------------------------------+
\ No newline at end of file
index ef31c71..0085b3b 100644 (file)
 #include <string>
 #include <vector>
 
-enum SSMRESULT
+namespace OIC
 {
-    SSM_S_OK
-    , SSM_S_FALSE
-    , SSM_E_POINTER
-    , SSM_E_OUTOFMEMORY
-    , SSM_E_FAIL
-    , SSM_E_NOINTERFACE
-    , SSM_E_NOTIMPL
-};
+    enum SSMRESULT
+    {
+        SSM_S_OK
+        , SSM_S_FALSE
+        , SSM_E_POINTER
+        , SSM_E_OUTOFMEMORY
+        , SSM_E_FAIL
+        , SSM_E_NOINTERFACE
+        , SSM_E_NOTIMPL
+    };
 
-/**
-* @class    IModelData
-* @brief    IModelData Interface
-*            This class represents context model data package
-*
-* @see
-*/
-class IModelData
-{
-    public:
-        /**
-        * @fn     getDataId
-        * @brief Get affected DataId. ContextModel has plenty of data so \n
-        *         returned data is matched from given condition
-        *
-        * @param None
-        *
-        * @return int
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual int getDataId() = 0;
+    /**
+    * @class    IModelData
+    * @brief    This class represents context model data package
+    *
+    * @see
+    */
+    class IModelData
+    {
+        public:
+            /**
+            * @fn     getDataId
+            * @brief Get affected DataId. ContextModel has plenty of data so \n
+            *         returned data is matched from given condition
+            *
+            * @param None
+            *
+            * @return int
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual int getDataId() = 0;
 
-        /**
-        * @fn     GetPropertyCount
-        * @brief ContextModel has at least one property that contains data \n
-        *         property is described from its specification.
-        *
-        * @param None
-        *
-        * @return int
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual int getPropertyCount() = 0;
+            /**
+            * @fn     GetPropertyCount
+            * @brief ContextModel has at least one property that contains data \n
+            *         property is described from its specification.
+            *
+            * @param None
+            *
+            * @return int
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual int getPropertyCount() = 0;
 
-        /**
-        * @fn     getPropertyName
-        * @brief Retrieve propertyName
-        *
-        * @param [in] int propertyIndex - index of property to read
-        *
-        * @return std::string
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual std::string getPropertyName(int propertyIndex) = 0;
+            /**
+            * @fn     getPropertyName
+            * @brief Retrieve propertyName
+            *
+            * @param [in] int propertyIndex - index of property to read
+            *
+            * @return std::string
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual std::string getPropertyName(int propertyIndex) = 0;
 
-        /**
-        * @fn     getPropertyValue
-        * @brief Retrieve propertyValue
-        *
-        * @param [in] int propertyIndex - index of property to read
-        *
-        * @return std::string
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual std::string getPropertyValue(int propertyIndex) = 0;
+            /**
+            * @fn     getPropertyValue
+            * @brief Retrieve propertyValue
+            *
+            * @param [in] int propertyIndex - index of property to read
+            *
+            * @return std::string
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual std::string getPropertyValue(int propertyIndex) = 0;
 
-        /**
-        * @fn     getPropertyValueByName
-        * @brief Retrieve propertyValue using given name
-        *
-        * @param [in] std::string propertyName - property name looking for
-        *
-        * @return std::string
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual std::string getPropertyValueByName(std::string propertyName) = 0;
-    protected:
-        virtual ~IModelData() {};
-};
+            /**
+            * @fn     getPropertyValueByName
+            * @brief Retrieve propertyValue using given name
+            *
+            * @param [in] std::string propertyName - property name looking for
+            *
+            * @return std::string
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual std::string getPropertyValueByName(std::string propertyName) = 0;
+        protected:
+            virtual ~IModelData() {};
+    };
 
-/**
-* @class    IDataReader
-* @brief    IDataReader Interface
-*            This class represents context model data package's reader
-*
-* @see
-*/
-class IDataReader
-{
-    public:
-        /**
-        * @fn     getAffectedModels
-        * @brief Get affected ContextModels. The CQL can specify multiple ContextModels for retrieving data.
-        *
-        * @param [in, out] std::vector<std::string> *pAffectedModels - affected ContextModel list
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual SSMRESULT getAffectedModels(std::vector<std::string> *pAffectedModels) = 0;
+    /**
+    * @class    IDataReader
+    * @brief    This class represents context model data package's reader
+    *
+    * @see
+    */
+    class IDataReader
+    {
+        public:
+            /**
+            * @fn     getAffectedModels
+            * @brief Get affected ContextModels. The CQL can specify multiple ContextModels for retrieving data.
+            *
+            * @param [in, out] std::vector<std::string> *pAffectedModels - affected ContextModel list
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual SSMRESULT getAffectedModels(std::vector<std::string> *pAffectedModels) = 0;
 
-        /**
-        * @fn     getModelDataCount
-        * @brief Get affected data count. There are multiple data can exist from given condition.
-        *
-        * @param [in] std::string modelName - affected ContextModel name
-        *
-        * @param [in, out] int *pDataCount - affected dataId count
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual SSMRESULT getModelDataCount(std::string modelName, int *pDataCount) = 0;
+            /**
+            * @fn     getModelDataCount
+            * @brief Get affected data count. There are multiple data can exist from given condition.
+            *
+            * @param [in] std::string modelName - affected ContextModel name
+            *
+            * @param [in, out] int *pDataCount - affected dataId count
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual SSMRESULT getModelDataCount(std::string modelName, int *pDataCount) = 0;
 
-        /**
-        * @fn     getModelData
-        * @brief Get actual Context Model data
-        *
-        * @param [in] std::string modelName - affected ContextModel name
-        *
-        *
-        * @param [in] int dataIndex - affected dataId index
-        *
-        *
-        * @param [out] IModelData **ppModelData - affected ContextModel data reader
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual SSMRESULT getModelData(std::string modelName, int dataIndex, IModelData **ppModelData) = 0;
-    protected:
-        virtual ~IDataReader() {};
-};
+            /**
+            * @fn     getModelData
+            * @brief Get actual Context Model data
+            *
+            * @param [in] std::string modelName - affected ContextModel name
+            *
+            *
+            * @param [in] int dataIndex - affected dataId index
+            *
+            *
+            * @param [out] IModelData **ppModelData - affected ContextModel data reader
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual SSMRESULT getModelData(std::string modelName, int dataIndex, IModelData **ppModelData) = 0;
+        protected:
+            virtual ~IDataReader() {};
+    };
 
-/**
-* @class    IQueryEngineEvent
-* @brief    IQueryEngineEvent Interface
-*            This class represents Query Engine's event that contains results
-*
-* @see
-*/
-class IQueryEngineEvent
-{
-    public:
-        /**
-        * @fn     onQueryEngineEvent
-        * @brief Transmit result of SSMCore to Application layer
-        *
-        * @param [in] int cqid - entered ContextQuery ID
-        *
-        * @param [in] IDataReader *pResult - result of SSMCore
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual SSMRESULT onQueryEngineEvent(int cqid, IDataReader *pResult) = 0;
-    protected:
-        virtual ~IQueryEngineEvent() {};
-};
+    /**
+    * @class    IQueryEngineEvent
+    * @brief    This class represents Query Engine's event that contains results
+    *
+    * @see
+    */
+    class IQueryEngineEvent
+    {
+        public:
+            /**
+            * @fn     onQueryEngineEvent
+            * @brief Transmit result of SSMCore to Application layer
+            *
+            * @param [in] int cqid - entered ContextQuery ID
+            *
+            * @param [in] IDataReader *pResult - result of SSMCore
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual SSMRESULT onQueryEngineEvent(int cqid, IDataReader *pResult) = 0;
+        protected:
+            virtual ~IQueryEngineEvent() {};
+    };
 
-/**
-* @class    SSMInterface
-* @brief    SSMInterface class
-*            This class represents main class for querying Soft Sensors
-*
-* @see
-*/
-class SSMInterface
-{
-    public:
-        SSMInterface();
-        ~SSMInterface();
+    /**
+    * @class    SSMInterface
+    * @brief    This class represents main class for querying Soft Sensors
+    *
+    * @see
+    */
+    class SSMInterface
+    {
+        public:
+            SSMInterface();
+            ~SSMInterface();
+
+            /**
+            * @fn     registerQuery
+            * @brief Execute ContextQuery and return ContextQuery ID
+            *
+            * @param [in] std::string queryString - query for requesting data
+            *
+            * @param [in] IQueryEngineEvent listener - listener for receiving data related to query
+            *
+            * @param [in, out] int &cqid - ID of ContextQuery
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            SSMRESULT registerQuery(std::string queryString, IQueryEngineEvent *listener, int &cqid);
 
-        /**
-        * @fn     registerQuery
-        * @brief Execute ContextQuery and return ContextQuery ID
-        *
-        * @param [in] std::string queryString - query for requesting data
-        *
-        * @param [in] IQueryEngineEvent listener - listener for receiving data related to query
-        *
-        * @param [in, out] int &cqid - ID of ContextQuery
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        SSMRESULT registerQuery(std::string queryString, IQueryEngineEvent *listener, int &cqid);
+            /**
+            * @fn    unregisterQuery
+            * @brief unregister registered ContextQuery according to cqid
+            *
+            * @param [in] int cqid - Context query corresponding to the cqid will be terminated
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            SSMRESULT unregisterQuery(int cqid);
+    };
 
-        /**
-        * @fn    unregisterQuery
-        * @brief unregister registered ContextQuery according to cqid
-        *
-        * @param [in] int cqid - Context query corresponding to the cqid will be terminated
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        SSMRESULT unregisterQuery(int cqid);
-};
+}
 #endif
\ No newline at end of file
index ef31c71..0085b3b 100644 (file)
 #include <string>
 #include <vector>
 
-enum SSMRESULT
+namespace OIC
 {
-    SSM_S_OK
-    , SSM_S_FALSE
-    , SSM_E_POINTER
-    , SSM_E_OUTOFMEMORY
-    , SSM_E_FAIL
-    , SSM_E_NOINTERFACE
-    , SSM_E_NOTIMPL
-};
+    enum SSMRESULT
+    {
+        SSM_S_OK
+        , SSM_S_FALSE
+        , SSM_E_POINTER
+        , SSM_E_OUTOFMEMORY
+        , SSM_E_FAIL
+        , SSM_E_NOINTERFACE
+        , SSM_E_NOTIMPL
+    };
 
-/**
-* @class    IModelData
-* @brief    IModelData Interface
-*            This class represents context model data package
-*
-* @see
-*/
-class IModelData
-{
-    public:
-        /**
-        * @fn     getDataId
-        * @brief Get affected DataId. ContextModel has plenty of data so \n
-        *         returned data is matched from given condition
-        *
-        * @param None
-        *
-        * @return int
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual int getDataId() = 0;
+    /**
+    * @class    IModelData
+    * @brief    This class represents context model data package
+    *
+    * @see
+    */
+    class IModelData
+    {
+        public:
+            /**
+            * @fn     getDataId
+            * @brief Get affected DataId. ContextModel has plenty of data so \n
+            *         returned data is matched from given condition
+            *
+            * @param None
+            *
+            * @return int
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual int getDataId() = 0;
 
-        /**
-        * @fn     GetPropertyCount
-        * @brief ContextModel has at least one property that contains data \n
-        *         property is described from its specification.
-        *
-        * @param None
-        *
-        * @return int
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual int getPropertyCount() = 0;
+            /**
+            * @fn     GetPropertyCount
+            * @brief ContextModel has at least one property that contains data \n
+            *         property is described from its specification.
+            *
+            * @param None
+            *
+            * @return int
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual int getPropertyCount() = 0;
 
-        /**
-        * @fn     getPropertyName
-        * @brief Retrieve propertyName
-        *
-        * @param [in] int propertyIndex - index of property to read
-        *
-        * @return std::string
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual std::string getPropertyName(int propertyIndex) = 0;
+            /**
+            * @fn     getPropertyName
+            * @brief Retrieve propertyName
+            *
+            * @param [in] int propertyIndex - index of property to read
+            *
+            * @return std::string
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual std::string getPropertyName(int propertyIndex) = 0;
 
-        /**
-        * @fn     getPropertyValue
-        * @brief Retrieve propertyValue
-        *
-        * @param [in] int propertyIndex - index of property to read
-        *
-        * @return std::string
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual std::string getPropertyValue(int propertyIndex) = 0;
+            /**
+            * @fn     getPropertyValue
+            * @brief Retrieve propertyValue
+            *
+            * @param [in] int propertyIndex - index of property to read
+            *
+            * @return std::string
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual std::string getPropertyValue(int propertyIndex) = 0;
 
-        /**
-        * @fn     getPropertyValueByName
-        * @brief Retrieve propertyValue using given name
-        *
-        * @param [in] std::string propertyName - property name looking for
-        *
-        * @return std::string
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual std::string getPropertyValueByName(std::string propertyName) = 0;
-    protected:
-        virtual ~IModelData() {};
-};
+            /**
+            * @fn     getPropertyValueByName
+            * @brief Retrieve propertyValue using given name
+            *
+            * @param [in] std::string propertyName - property name looking for
+            *
+            * @return std::string
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual std::string getPropertyValueByName(std::string propertyName) = 0;
+        protected:
+            virtual ~IModelData() {};
+    };
 
-/**
-* @class    IDataReader
-* @brief    IDataReader Interface
-*            This class represents context model data package's reader
-*
-* @see
-*/
-class IDataReader
-{
-    public:
-        /**
-        * @fn     getAffectedModels
-        * @brief Get affected ContextModels. The CQL can specify multiple ContextModels for retrieving data.
-        *
-        * @param [in, out] std::vector<std::string> *pAffectedModels - affected ContextModel list
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual SSMRESULT getAffectedModels(std::vector<std::string> *pAffectedModels) = 0;
+    /**
+    * @class    IDataReader
+    * @brief    This class represents context model data package's reader
+    *
+    * @see
+    */
+    class IDataReader
+    {
+        public:
+            /**
+            * @fn     getAffectedModels
+            * @brief Get affected ContextModels. The CQL can specify multiple ContextModels for retrieving data.
+            *
+            * @param [in, out] std::vector<std::string> *pAffectedModels - affected ContextModel list
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual SSMRESULT getAffectedModels(std::vector<std::string> *pAffectedModels) = 0;
 
-        /**
-        * @fn     getModelDataCount
-        * @brief Get affected data count. There are multiple data can exist from given condition.
-        *
-        * @param [in] std::string modelName - affected ContextModel name
-        *
-        * @param [in, out] int *pDataCount - affected dataId count
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual SSMRESULT getModelDataCount(std::string modelName, int *pDataCount) = 0;
+            /**
+            * @fn     getModelDataCount
+            * @brief Get affected data count. There are multiple data can exist from given condition.
+            *
+            * @param [in] std::string modelName - affected ContextModel name
+            *
+            * @param [in, out] int *pDataCount - affected dataId count
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual SSMRESULT getModelDataCount(std::string modelName, int *pDataCount) = 0;
 
-        /**
-        * @fn     getModelData
-        * @brief Get actual Context Model data
-        *
-        * @param [in] std::string modelName - affected ContextModel name
-        *
-        *
-        * @param [in] int dataIndex - affected dataId index
-        *
-        *
-        * @param [out] IModelData **ppModelData - affected ContextModel data reader
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual SSMRESULT getModelData(std::string modelName, int dataIndex, IModelData **ppModelData) = 0;
-    protected:
-        virtual ~IDataReader() {};
-};
+            /**
+            * @fn     getModelData
+            * @brief Get actual Context Model data
+            *
+            * @param [in] std::string modelName - affected ContextModel name
+            *
+            *
+            * @param [in] int dataIndex - affected dataId index
+            *
+            *
+            * @param [out] IModelData **ppModelData - affected ContextModel data reader
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual SSMRESULT getModelData(std::string modelName, int dataIndex, IModelData **ppModelData) = 0;
+        protected:
+            virtual ~IDataReader() {};
+    };
 
-/**
-* @class    IQueryEngineEvent
-* @brief    IQueryEngineEvent Interface
-*            This class represents Query Engine's event that contains results
-*
-* @see
-*/
-class IQueryEngineEvent
-{
-    public:
-        /**
-        * @fn     onQueryEngineEvent
-        * @brief Transmit result of SSMCore to Application layer
-        *
-        * @param [in] int cqid - entered ContextQuery ID
-        *
-        * @param [in] IDataReader *pResult - result of SSMCore
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        virtual SSMRESULT onQueryEngineEvent(int cqid, IDataReader *pResult) = 0;
-    protected:
-        virtual ~IQueryEngineEvent() {};
-};
+    /**
+    * @class    IQueryEngineEvent
+    * @brief    This class represents Query Engine's event that contains results
+    *
+    * @see
+    */
+    class IQueryEngineEvent
+    {
+        public:
+            /**
+            * @fn     onQueryEngineEvent
+            * @brief Transmit result of SSMCore to Application layer
+            *
+            * @param [in] int cqid - entered ContextQuery ID
+            *
+            * @param [in] IDataReader *pResult - result of SSMCore
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            virtual SSMRESULT onQueryEngineEvent(int cqid, IDataReader *pResult) = 0;
+        protected:
+            virtual ~IQueryEngineEvent() {};
+    };
 
-/**
-* @class    SSMInterface
-* @brief    SSMInterface class
-*            This class represents main class for querying Soft Sensors
-*
-* @see
-*/
-class SSMInterface
-{
-    public:
-        SSMInterface();
-        ~SSMInterface();
+    /**
+    * @class    SSMInterface
+    * @brief    This class represents main class for querying Soft Sensors
+    *
+    * @see
+    */
+    class SSMInterface
+    {
+        public:
+            SSMInterface();
+            ~SSMInterface();
+
+            /**
+            * @fn     registerQuery
+            * @brief Execute ContextQuery and return ContextQuery ID
+            *
+            * @param [in] std::string queryString - query for requesting data
+            *
+            * @param [in] IQueryEngineEvent listener - listener for receiving data related to query
+            *
+            * @param [in, out] int &cqid - ID of ContextQuery
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            SSMRESULT registerQuery(std::string queryString, IQueryEngineEvent *listener, int &cqid);
 
-        /**
-        * @fn     registerQuery
-        * @brief Execute ContextQuery and return ContextQuery ID
-        *
-        * @param [in] std::string queryString - query for requesting data
-        *
-        * @param [in] IQueryEngineEvent listener - listener for receiving data related to query
-        *
-        * @param [in, out] int &cqid - ID of ContextQuery
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        SSMRESULT registerQuery(std::string queryString, IQueryEngineEvent *listener, int &cqid);
+            /**
+            * @fn    unregisterQuery
+            * @brief unregister registered ContextQuery according to cqid
+            *
+            * @param [in] int cqid - Context query corresponding to the cqid will be terminated
+            *
+            * @return SSMRESULT
+            * @warning
+            * @exception
+            * @see
+            */
+            SSMRESULT unregisterQuery(int cqid);
+    };
 
-        /**
-        * @fn    unregisterQuery
-        * @brief unregister registered ContextQuery according to cqid
-        *
-        * @param [in] int cqid - Context query corresponding to the cqid will be terminated
-        *
-        * @return SSMRESULT
-        * @warning
-        * @exception
-        * @see
-        */
-        SSMRESULT unregisterQuery(int cqid);
-};
+}
 #endif
\ No newline at end of file
index 1217284..4c690d4 100644 (file)
@@ -21,6 +21,9 @@
 #define _SSMCore_H_
 
 #include "SSMInterface.h"
+
+using namespace OIC;
+
 #include "SSMModelDefinition.h"
 
 #define IN
index 8686ff6..bdf8018 100644 (file)
     </inputs>
   </softsensor>
   
-  <softsensor>
-    <name>ReferenceSensor</name>
-    <attributes>
-      <attribute>
-        <name>version</name>
-        <type>string</type>
-        <value>1.0</value>
-      </attribute>
-      <attribute>
-        <name>lifetime</name>
-        <type>int</type>
-        <value>60</value>
-      </attribute>
-    </attributes>
-    <outputs>
-      <output>
-        <name>macaddress</name>
-        <type>string</type>
-      </output>
-      <output>
-        <name>servicetype</name>
-        <type>string</type>
-      </output>
-      <output>
-        <name>macaddress1</name>
-        <type>string</type>
-      </output>
-      <output>
-        <name>servicetype1</name>
-        <type>string</type>
-      </output>
-    </outputs>
-    <inputs>
-      <input>Reference_Thing</input>
-      <input>Reference_Thing1</input>
-    </inputs>
-  </softsensor>
-  
 </softsensors>