1 #ifndef _SSMInterface_H_
2 #define _SSMInterface_H_
22 * @brief This class represents context model data package
31 * @brief Get affected DataId. ContextModel has plenty of data so \n
32 * returned data is matched from given condition
41 virtual int getDataId() = 0;
44 * @fn GetPropertyCount
45 * @brief ContextModel has at least one property that contains data \n
46 * property is described from its specification.
55 virtual int getPropertyCount() = 0;
59 * @brief Retrieve propertyName
61 * @param [in] int propertyIndex - index of property to read
68 virtual std::string getPropertyName(int propertyIndex) = 0;
71 * @fn getPropertyValue
72 * @brief Retrieve propertyValue
74 * @param [in] int propertyIndex - index of property to read
81 virtual std::string getPropertyValue(int propertyIndex) = 0;
84 * @fn getPropertyValueByName
85 * @brief Retrieve propertyValue using given name
87 * @param [in] std::string propertyName - property name looking for
94 virtual std::string getPropertyValueByName(std::string propertyName) = 0;
96 virtual ~IModelData() {};
101 * @brief This class represents context model data package's reader
109 * @fn getAffectedModels
110 * @brief Get affected ContextModels. The CQL can specify multiple ContextModels for retrieving data.
112 * @param [in, out] std::vector<std::string> *pAffectedModels - affected ContextModel list
119 virtual SSMRESULT getAffectedModels(std::vector<std::string> *pAffectedModels) = 0;
122 * @fn getModelDataCount
123 * @brief Get affected data count. There are multiple data can exist from given condition.
125 * @param [in] std::string modelName - affected ContextModel name
127 * @param [in, out] int *pDataCount - affected dataId count
134 virtual SSMRESULT getModelDataCount(std::string modelName, int *pDataCount) = 0;
138 * @brief Get actual Context Model data
140 * @param [in] std::string modelName - affected ContextModel name
143 * @param [in] int dataIndex - affected dataId index
146 * @param [out] IModelData **ppModelData - affected ContextModel data reader
153 virtual SSMRESULT getModelData(std::string modelName, int dataIndex, IModelData **ppModelData) = 0;
155 virtual ~IDataReader() {};
159 * @class IQueryEngineEvent
160 * @brief This class represents Query Engine's event that contains results
164 class IQueryEngineEvent
168 * @fn onQueryEngineEvent
169 * @brief Transmit result of SSMCore to Application layer
171 * @param [in] int cqid - entered ContextQuery ID
173 * @param [in] IDataReader *pResult - result of SSMCore
180 virtual SSMRESULT onQueryEngineEvent(int cqid, IDataReader *pResult) = 0;
182 virtual ~IQueryEngineEvent() {};
186 * @class SSMInterface
187 * @brief This class represents main class for querying Soft Sensors
199 * @brief Execute ContextQuery and return ContextQuery ID
201 * @param [in] std::string queryString - query for requesting data
203 * @param [in] IQueryEngineEvent listener - listener for receiving data related to query
205 * @param [in, out] int &cqid - ID of ContextQuery
212 SSMRESULT registerQuery(std::string queryString, IQueryEngineEvent *listener, int &cqid);
215 * @fn unregisterQuery
216 * @brief unregister registered ContextQuery according to cqid
218 * @param [in] int cqid - Context query corresponding to the cqid will be terminated
225 SSMRESULT unregisterQuery(int cqid);