summaryrefslogtreecommitdiffstats
path: root/nsframework/framework_unified/client/include
diff options
context:
space:
mode:
Diffstat (limited to 'nsframework/framework_unified/client/include')
-rw-r--r--nsframework/framework_unified/client/include/native_service/XMLParser.h289
-rw-r--r--nsframework/framework_unified/client/include/native_service/framework_unified.h130
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified__CWORD77__service_if.h554
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified__CWORD77__session_if.h495
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_application.h376
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_dispatcher.h803
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_framework_error.hpp77
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_framework_if.h6007
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_framework_sync.h370
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_framework_system_if.h110
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_framework_types.h173
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_multithreading.h745
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_service_if.h267
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_service_protocol.h116
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_action.h150
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_compositestate.h434
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_conditionconnector.h203
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_deephistorystate.h141
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_dispatcher.h338
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_eventdata.h83
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_eventfactory.h114
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_externaltransition.h268
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_dispatch.h1054
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_if.h486
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_types.h494
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_guard.h145
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_historystate.h253
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_hsm.h798
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_hsmframework.h873
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_internaltransition.h111
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_leafstate.h252
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_localtransition.h163
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_multithreading.h227
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_orthogonalstate.h513
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_reaction.h184
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_shallowhistorystate.h163
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_state.h872
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_sm_transition.h150
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_thread_priority.h235
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_timer.h143
-rw-r--r--nsframework/framework_unified/client/include/native_service/frameworkunified_types.h268
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns__CWORD77__common.h129
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_if.h183
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_key.h53
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_table.h1217
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns__CWORD77__notifications.h53
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns__CWORD77__types.h68
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_buildversioncheck.hpp227
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_config_parser_if.h1038
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_endianess.h192
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_eventlogger.h103
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_logger_if.h1646
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_mc_system_info.h103
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_message_center_if.h1536
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_msgs.h64
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_np_service.h271
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_np_service_if.h2482
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_np_service_nor_persistence.h151
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_np_service_nor_persistence_internal.h131
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_np_service_notification.h50
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_np_service_protocol.h116
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_np_types.h47
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_plogger_if.h288
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_rcs_data_handler.hpp1159
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_rcs_logger_types.h104
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_rcs_plugin.hpp328
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_reader.h207
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_resource_controler.h216
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_ringbuffer.h523
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_shared_mem.h100
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_shared_mem_if.h196
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_sharedmem.h486
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_sharedmem_reader.h340
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_sharedmem_writer.h283
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_system_mode.h67
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_timer_if.h317
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_timer_if.hpp393
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_transmit_log.h256
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_util_crc.h111
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_util_directory.h160
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_utility.hpp572
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_utility_if.h76
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_utility_sys.hpp321
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_version.h48
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_version_if.h510
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_writer.h229
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_xml_reader.h291
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_xml_writer.h336
-rw-r--r--nsframework/framework_unified/client/include/native_service/ns_xmlparser_if.h1150
-rw-r--r--nsframework/framework_unified/client/include/native_service/nsfw_message.h65
-rw-r--r--nsframework/framework_unified/client/include/native_service/nslogutil_cmd_if.h86
-rw-r--r--nsframework/framework_unified/client/include/native_service/wpf_legacy.h152
-rw-r--r--nsframework/framework_unified/client/include/ns__CWORD77__template.h60
-rw-r--r--nsframework/framework_unified/client/include/ns_logger_additional_if.h40
-rw-r--r--nsframework/framework_unified/client/include/nsverutil_cmd_if.h25
95 files changed, 38982 insertions, 0 deletions
diff --git a/nsframework/framework_unified/client/include/native_service/XMLParser.h b/nsframework/framework_unified/client/include/native_service/XMLParser.h
new file mode 100644
index 00000000..36467ba4
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/XMLParser.h
@@ -0,0 +1,289 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup MY 14 Platform Software Team
+/// \brief Xml parser used to extract and update data from Xml file
+///
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @file XMLParser.h
+ * @brief \~english Xml parser used to extract and update data from Xml file
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef XMLPARSER_H_ // NOLINT (build/header_guard)
+#define XMLPARSER_H_
+
+#include <libxml/tree.h>
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_logger_if.h>
+
+#include <vector>
+#include <list>
+#include <string>
+#include <map>
+#include <sstream>
+
+////////////////////////////////////////////////////////////////////////
+/// CTestCaseData : Class used to fill testcase data from XML
+////////////////////////////////////////////////////////////////////////
+
+
+class CTestCaseData {
+ public:
+ std::string key;
+
+ // Delay for testCase
+ SI_32 m_testDelaySec;
+ SI_32 m_testDelayMSec;
+ SI_32 m_testDelayUSec;
+ // TestLoop Count
+ SI_32 m_testLoop;
+
+ SI_32 m_testReset;
+ SI_32 m_testPrintResult;
+ std::string m_testCategory;
+ std::string m_testResultType;
+
+ std::vector<std::string> macroVector;
+ // Delay for TestMacros
+ std::string m_macroDelaySecVal;
+ std::string m_macroDelayMsecVal;
+ std::string m_macroDelayUsecVal;
+
+ std::list<std::string> expOut;
+
+
+ CTestCaseData(const xmlChar *name, std::string testDelaySec, std::string testDelayMSec, std::string testDelayUSec,
+ std::string testLoopVal, std::string testReset, std::string testPrintResult, std::string testCategory,
+ std::string testResultType, std::vector<std::string> paramMacroVector, std::string macroDelaySecVal,
+ std::string macroDelayMSecVal, std::string macroDelayUSecVal,
+ std::list<std::string> expOutputVector);
+
+ CTestCaseData(const CTestCaseData &value);
+
+ ~CTestCaseData();
+};
+
+class XMLParser {
+ private:
+ struct FindByName {
+ std::string l_sName;
+ FindByName(const std::string &name) : l_sName(name) {} // NOLINT (readability/nolint)
+ bool operator()(const xmlNodePtr &xmlNode) {
+ std::stringstream l_sStream;
+ l_sStream << xmlNode->name;
+ std::string l_sStr = l_sStream.str();
+ return l_sStr == l_sName;
+ }
+ };
+
+ public:
+ static std::string xmlCharToString(const xmlChar *value);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// XMLParser
+ /// Class Constructor
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ XMLParser();
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// XMLParser
+ /// Class Destructor
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ ~XMLParser();
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// readAllXml
+ /// read all XML files from xmlInputFile
+ ///
+ /// \param [in] xmlInputFile
+ /// string
+ /// xmlList
+ /// string
+ /// \return none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void readAllXml(const std::string &xmlInputFile, std::list<std::string> &xmlList); // NOLINT (readability/nolint)
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// getChildNodeList
+ ///
+ /// \param [in] node
+ /// xmlNodePtr
+ /// nodeVector
+ /// vector<xmlNodePtr>
+ /// \return none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void getChildNodeList(xmlNodePtr node, std::vector<xmlNodePtr> &nodeVector); // NOLINT (readability/nolint)
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// fillMacroVector
+ ///
+ /// \param [in] node
+ /// xmlFileHandle
+ /// xmlDocPtr
+ /// macroNodeVector
+ /// vector<xmlNodePtr>
+ /// expOutValue
+ /// string
+ /// expOutputVector
+ /// list<std::string>
+ /// macroDelayVal
+ /// string
+ /// paramMacroVector
+ /// vector<std::string>
+ /// \return none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void fillMacroVector(xmlDocPtr &xmlFileHandle, // NOLINT (readability/nolint)
+ std::vector<xmlNodePtr> &macroNodeVector, // NOLINT (readability/nolint)
+ std::string &expOutValue, // NOLINT (readability/nolint)
+ std::list<std::string> &expOutputVector, // NOLINT (readability/nolint)
+ std::string &macroSecDelayVal, // NOLINT (readability/nolint)
+ std::string &macroMSecDelayVal, // NOLINT (readability/nolint)
+ std::string &macroUSecDelayVal, // NOLINT (readability/nolint)
+ std::vector<std::string> &paramMacroVector); // NOLINT (readability/nolint)
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// StringToNumber
+ /// Convert the string to number
+ ///
+ /// \param [in]
+ /// Text
+ /// string
+ ///
+ /// \return number value
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ static int StringToNumber(const std::string &Text) { // NOLINT (readability/nolint)
+ std::istringstream ss(Text, std::istringstream::in);
+ int result;
+ return ss >> result ? result : 0;
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// createTestCaseVector
+ ///
+ /// \param [in]
+ /// testCaseNodeVector
+ /// vector<xmlNodePtr>
+ /// xmlFileHandle
+ /// xmlDocPtr
+ /// testCaseDataVector
+ /// vector<CTestCaseData>
+ ///
+ /// \return none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void createTestCaseVector(std::vector<xmlNodePtr> &testCaseNodeVector, xmlDocPtr &xmlFileHandle, // NOLINT (readability/nolint)
+ std::vector<CTestCaseData> &testCaseDataVector); // NOLINT (readability/nolint)
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetXmlNodeAttributeValueToString
+ ///
+ /// \param [in]
+ /// arg
+ /// void *
+ /// str
+ /// const char *
+ /// xmlFileHandle
+ /// xmlDocPtr
+ ///
+ /// \return none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ std::string GetXmlNodeAttributeValueToString(void *arg, const char *str, xmlDocPtr xmlFileHandle);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// populateTestCaseMap
+ ///
+ /// \param [in]
+ /// testCaseDataVector
+ /// vector<CTestCaseData>
+ /// xmlFileHandle
+ /// xmlDocPtr
+ ///
+ /// \return none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void populateTestCaseMap(std::vector<CTestCaseData> &testCaseDataVector, xmlDocPtr xmlFileHandle) ; // NOLINT (readability/nolint)
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// updateXmlActualOutput
+ ///
+ /// \param [in]
+ /// xmlName
+ /// string
+ /// testCaseName
+ /// string
+ ///
+ /// \return none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void updateXmlActualOutput(const std::string &xmlName, // NOLINT (readability/nolint)
+ std::string &testCaseName, // NOLINT (readability/nolint)
+ std::string &actualOutput); // NOLINT (readability/nolint)
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetXmlExpectedOutput
+ ///
+ /// \param [in]
+ /// pKey
+ /// string
+ /// pValue
+ /// string
+ ///
+ /// \return none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void GetXmlExpectedOutput(std::string pKey, std::string pValue);
+
+ private:
+ xmlDocPtr m_xmlFileHandle;
+ static const std::string EXPECTEDOUTPUT;
+ static const std::string VALUE;
+ static const std::string DELAYSEC;
+ static const std::string DELAYMSEC;
+ static const std::string DELAYUSEC;
+ static const std::string TESTLOOP;
+ static const std::string TESTRESET;
+ static const std::string TESTPRINTRESULT;
+ static const std::string TESTCATEGORY;
+ static const std::string TESTCASEDATA;
+ static const std::string MACRODELAYSEC;
+ static const std::string MACRODELAYMSEC;
+ static const std::string MACRODELAYUSEC;
+ static const std::string LOOPPVAL;
+ static const std::string ACTUALOUTOUT;
+ static const std::string OUTPUT_SEPARATOR;
+ static const std::string ACCESS_OPERATOR;
+ static const std::string TERMINATE_STR;
+ static const SI_32 LOOP_DEFAULT_VALUE;
+ static const std::string DEFAULT_VALUE;
+ static const std::string PARAMETER_SEPARATOR;
+ static const std::string TESTRESULTTYPE;
+ static const std::string RESULT_AUTOMATIC;
+ static const std::string RESULT_MANUAL;
+};
+
+#endif /* XMLPARSER_H_ */ // NOLINT (build/header_guard)
+
+// EOF
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/framework_unified.h b/nsframework/framework_unified/client/include/native_service/framework_unified.h
new file mode 100644
index 00000000..b3c2f295
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/framework_unified.h
@@ -0,0 +1,130 @@
+/*
+ * @copyright Copyright (c) 2017-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+/**
+ * @file framework_unified.h
+ * @brief \~english include all framework_unified head files
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef NATIVESERVICE_FRAMEWORKUNIFIED_H_ // NOLINT (build/header_guard)
+#define NATIVESERVICE_FRAMEWORKUNIFIED_H_
+
+#include <native_service/ns_config_parser_if.h>
+#include <native_service/ns_eventlogger.h>
+#include <native_service/ns_logger_if.h>
+#include <native_service/ns_message_center_if.h>
+#include <native_service/ns_np_service.h>
+#include <native_service/ns_np_service_if.h>
+#include <native_service/ns_np_service_nor_persistence.h>
+#include <native_service/ns_np_service_notification.h>
+#include <native_service/ns_np_service_protocol.h>
+#include <native_service/ns_plogger_if.h>
+#include <native_service/ns_shared_mem.h>
+#include <native_service/ns_shared_mem_if.h>
+#include <native_service/ns_sharedmem.h>
+#include <native_service/ns_sharedmem_reader.h>
+#include <native_service/ns_sharedmem_writer.h>
+#include <native_service/ns_ringbuffer.h>
+#include <native_service/ns_system_mode.h>
+#include <native_service/ns_timer_if.h>
+#include <native_service/ns_timer_if.hpp>
+#include <native_service/ns_transmit_log.h>
+#include <native_service/ns_utility.hpp>
+#include <native_service/ns_utility_if.h>
+#include <native_service/ns_utility_sys.hpp>
+#include <native_service/ns_util_directory.h>
+#include <native_service/ns_util_crc.h>
+#include <native_service/ns_version_if.h>
+#include <native_service/ns_resource_controler.h>
+#include <native_service/ns_version.h>
+#include <native_service/frameworkunified_service_protocol.h>
+#include <native_service/frameworkunified_types.h>
+#include <native_service/wpf_legacy.h>
+#include <native_service/ns_rcs_data_handler.hpp>
+#include <native_service/ns_rcs_logger_types.h>
+#include <native_service/ns_rcs_plugin.hpp>
+#include <native_service/ns__CWORD77__common.h>
+#include <native_service/ns__CWORD77__data_pool_if.h>
+#include <native_service/ns__CWORD77__data_pool_key.h>
+#include <native_service/ns__CWORD77__data_pool_table.h>
+#include <native_service/ns__CWORD77__notifications.h>
+#include <native_service/ns__CWORD77__types.h>
+#include <native_service/frameworkunified__CWORD77__service_if.h>
+#include <native_service/frameworkunified__CWORD77__session_if.h>
+#include <native_service/ns_buildversioncheck.hpp>
+#include <native_service/ns_endianess.h>
+#include <native_service/nslogutil_cmd_if.h>
+#include <native_service/nsfw_message.h>
+#include <native_service/frameworkunified_application.h>
+#include <native_service/frameworkunified_dispatcher.h>
+#include <native_service/frameworkunified_framework_if.h>
+#include <native_service/frameworkunified_framework_sync.h>
+#include <native_service/frameworkunified_framework_system_if.h>
+#include <native_service/frameworkunified_framework_types.h>
+#include <native_service/frameworkunified_multithreading.h>
+#include <native_service/frameworkunified_service_if.h>
+#include <native_service/frameworkunified_thread_priority.h>
+#include <native_service/frameworkunified_timer.h>
+#include <native_service/frameworkunified_sm_action.h>
+#include <native_service/frameworkunified_sm_compositestate.h>
+#include <native_service/frameworkunified_sm_conditionconnector.h>
+#include <native_service/frameworkunified_sm_deephistorystate.h>
+#include <native_service/frameworkunified_sm_dispatcher.h>
+#include <native_service/frameworkunified_sm_eventdata.h>
+#include <native_service/frameworkunified_sm_eventfactory.h>
+#include <native_service/frameworkunified_sm_externaltransition.h>
+#include <native_service/frameworkunified_sm_framework_dispatch.h>
+#include <native_service/frameworkunified_sm_framework_if.h>
+#include <native_service/frameworkunified_sm_framework_types.h>
+#include <native_service/frameworkunified_sm_guard.h>
+#include <native_service/frameworkunified_sm_historystate.h>
+#include <native_service/frameworkunified_sm_hsm.h>
+#include <native_service/frameworkunified_sm_hsmframework.h>
+#include <native_service/frameworkunified_sm_internaltransition.h>
+#include <native_service/frameworkunified_sm_leafstate.h>
+#include <native_service/frameworkunified_sm_localtransition.h>
+#include <native_service/frameworkunified_sm_multithreading.h>
+#include <native_service/frameworkunified_sm_orthogonalstate.h>
+#include <native_service/frameworkunified_sm_reaction.h>
+#include <native_service/frameworkunified_sm_shallowhistorystate.h>
+#include <native_service/frameworkunified_sm_state.h>
+#include <native_service/frameworkunified_sm_transition.h>
+#include <native_service/XMLParser.h>
+#include <native_service/ns_xml_reader.h>
+#include <native_service/ns_xml_wrter.h>
+#include <native_service/ns_xmlparser_if.h>
+#include <native_service/ns_reader.h>
+#include <native_service/ns_writer.h>
+
+#endif // NATIVESERVICE_FRAMEWORKUNIFIED_H_ NOLINT (build/header_guard)
+/**@}*/ // end of inc
+/**@}*/ // end of framework_unified
+/**@}*/ // end of native_service
+/**@}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified__CWORD77__service_if.h b/nsframework/framework_unified/client/include/native_service/frameworkunified__CWORD77__service_if.h
new file mode 100644
index 00000000..823257f6
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified__CWORD77__service_if.h
@@ -0,0 +1,554 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_HMI_CWORD77_Controller
+/// \brief
+///
+////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified__CWORD77__service_if.h
+ * @brief \~english This file contains a interface class for all services classes.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup _CWORD77_
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIED__CWORD77_SERVICE_H_ // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIED__CWORD77_SERVICE_H_
+
+#include <native_service/ns__CWORD77__common.h>
+#include <native_service/frameworkunified__CWORD77__session_if.h>
+#include <string>
+#include <map>
+#include <vector>
+
+///////////////////////////////////////////////////////////////////////////
+/// class: CFrameworkunified_CWORD77_Service
+/// Description: This is interface class for all services classes.
+///
+////////////////////////////////////////////////////////////////////////////
+
+class CFrameworkunified_CWORD77_Service {
+ protected:
+ std::map<UI_32, CFrameworkunified_CWORD77_Session *> m_SessTypeToSessObj; ///< Map of session type to session object
+ ResponseServiceTo_CWORD77_ m_cbResponse; ///< Call back function pointer
+ SessionAckTo_CWORD77_ m_cbSessionACK; // Call back function pointer for session ACK
+ std::vector<FrameworkunifiedNotificationCallbackHandler> m_vServiceNotifications; ///< vector of Frameworkunifiednotification callbacks
+ CFrameworkunified_CWORD77_Session *m_pSession; ///< Pointer to an instance of I_CWORD77_Session
+ std::string m_cServiceName;
+ BOOL m_bServiceAvailable;
+ UI_8 m_ui8SessionRetryCount;
+ HANDLE m_hApp; ///> application framework handle
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Function to send message to a session
+ /// \~english @param[in] f_uiSessionType
+ /// UI_32 - session type
+ /// \~english @param[in] f_uiSrvProtocol
+ /// UI_32 - Protocol ID
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// CFrameworkunified_CWORD77_Service::SetSession()
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Send specified sessionType message by FrameworkunifiedSendMsg().
+ /// \~english @par
+ /// If the session object corresponding to the session Public specified by the arguments is not registered,
+ /// the system terminates normally without sending the object.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see SetSession,FrameworkunifiedSendMsg
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SendMessageToSession(UI_32 f_uiSessionType, UI_32 f_uiSrvProtocol);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Function to open sessions with specified Service Name
+ /// \~english @param [in] f_hApp
+ /// f_hApp - Handle to the Framework
+ /// \~english @par
+ /// f_hApp HANDLE*
+ /// \~english @param [in] f_sServiceName
+ /// f_sServiceName - Service Name
+ /// \~english @par
+ /// f_sServiceName - const std::string&
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - Save service name into member variable.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Function to open sessions with specified Service Name
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void OpenSession(HANDLE f_hApp, const std::string &f_sServiceName);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Function to close sessions
+ /// \~english @param [in] f_hApp
+ /// f_hApp - Handle to the Framework
+ /// \~english @par
+ /// f_hApp HANDLE*
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Function to close sessions
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ void CloseSession(HANDLE f_hApp);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Function to add notification
+ /// \~english @param[in] f_pNotification
+ /// PCSTR - Notification name
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Session obeject is declared in CFrameworkunified_CWORD77_Service::SetSession()
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// -Bind Notification name declared in parameter with callbak function in OnServiceNtf()
+ /// \~english @par Detail
+ /// -subscribed notifications will transfor into subscribe instance in SubscribeNotifications()
+ /// \~english @par Detail
+ /// -Process will not commit when notification parameter name is null
+ /// \~english @par Classification
+ /// -public
+ /// \~english @par Type
+ /// -None
+ /// \~english @see SetSession,OnServiceNtf,SubscribeNotifications,UnSubscribeNotifications
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void AddNotification(PCSTR f_pNotification);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// AttachOpenSessionAckCallback
+ /// virtual function to attche open session ack callback
+ ///
+ /// \param [in] hApp
+ /// HANDLE - Handle to the Framework
+ /// \return status
+ /// EFrameworkunifiedStatus - Success or Error
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus AttachOpenSessionAckCallback(HANDLE hApp) = 0;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// OpenSessionRetry
+ /// This function sends open session request to the service m_cServiceName
+ ///
+ /// \param [in] f_ui32SessionType
+ /// UI_32 - Session type to open
+ /// \return none
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ void OpenSessionRetry(UI_32 f_ui32SessionType);
+
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Constructor for CFrameworkunified_CWORD77_Service
+ /// \~english @retval none
+ /// \~english @par Preconditions
+ /// -No preconditions
+ /// \~english @par Change of internal status
+ /// -The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// -Create CFrameworkunified_CWORD77_Service class instance
+ /// -Initialize class member variable(m_cbResponse, m_cbSessionACK, m_pSession, m_cServiceName,\n
+ /// m_bServiceAvailable, m_ui8SessionRetryCount, m_hApp, m_SessTypeToSessObj).\n
+ /// \~english @par Classification
+ /// -public
+ /// \~english @par type
+ /// -None
+ /// \~english @see ~CFrameworkunified_CWORD77_Service
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunified_CWORD77_Service();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunified_CWORD77_Service
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// -CFrameworkunified_CWORD77_Service instance is decleared in Constructor
+ /// \~english @par Change of internal status
+ /// -The internal status is not changed
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// -Release the CFrameworkunified_CWORD77_Service class instance
+ /// \~english @par Classification
+ /// -Pubulic
+ /// \~english @par Type
+ /// -None
+ /// \~english @see CFrameworkunified_CWORD77_Service
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunified_CWORD77_Service();
+
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// HandleMessage
+ /// virtual function to process message coming from _CWORD77_
+ /// \~english @param [in] cmdID
+ /// cmdID - Request ID
+ /// \~english @par
+ /// cmdID UI_32
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK or Error
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// - none
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus HandleServiceMessage(UI_32 cmdID) = 0;
+
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// function to open session with specified Service name when service available.
+ /// \~english @param [in] f_hApp
+ /// f_hApp - Handle to the Framework
+ /// \~english @par
+ /// f_hApp HANDLE*
+ /// \~english @param [in] f_sServiceName
+ /// f_sServiceName - service name
+ /// \~english @par
+ /// f_sServiceName - const std::string &
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK or Error
+ /// \~english @par Preconditions
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - save Framework handler into m_hApp.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// function to open session with specified Service name
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see AttachOpenSessionAckCallback, OpenSession
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus OpenServiceOnAvailability(HANDLE f_hApp, const std::string &f_sServiceName);
+
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// function to close session when service unavailable.
+ /// \~english @param [in] f_hApp
+ /// f_hApp - Handle to the Framework
+ /// \~english @par
+ /// f_hApp HANDLE*
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK or Error
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - set m_bServiceAvailable FALSE.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// function to close session when service unavailable.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CloseSession
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CloseServiceOnUnavailability(HANDLE hApp);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Set Call back function into Sessions.
+ /// \~english @param [in] fptr
+ /// fptr - Pointer to call back function
+ /// \~english @par
+ /// fptr ResponseServiceTo_CWORD77_*
+ /// \~english @retval
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - set m_cbResponse with fptr.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Set Call back function into Sessions.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SetResponseCallback(ResponseServiceTo_CWORD77_ fptr);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// API to set session objects in service.
+ /// \~english @param [in] f_pSessionObj
+ /// f_pSessionObj - Pointer to an instance of session object.
+ /// \~english @par
+ /// f_pSessionObj CFrameworkunified_CWORD77_Session*
+ /// \~english @retval
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - set sessionobj into m_SessTypeToSessObj.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Set session objects in service.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SetSession(CFrameworkunified_CWORD77_Session *f_pSessionObj);
+
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Subscribe notifications.
+ /// \~english @param [in] hApp
+ /// hApp - Handle to the Framework.
+ /// \~english @par
+ /// hApp HANDLE*
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK or eFrameworkunifiedStatusInvldParam
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - save pointer of notifications into framework handler.
+ /// \~english @par Conditions of processing failure
+ /// - FrameworkunifiedSubscribeNotificationWithCallback() failed [eFrameworkunifiedStatusInvldParam]
+ /// \~english @par Detail
+ /// Send subscribe message to NPPService for Subscribe notifications.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedSubscribeNotificationWithCallback
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SubscribeNotifications(HANDLE hApp);
+
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// unsubscribe notifications
+ /// \~english @param [in] hApp
+ /// hApp - Handle to the Framework.
+ /// \~english @par
+ /// hApp HANDLE*
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK or eFrameworkunifiedStatusInvldParam
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - delete notifications from framework handler.
+ /// \~english @par Conditions of processing failure
+ /// - FrameworkunifiedNPUnsubscribeFromNotifications() failed [eFrameworkunifiedStatusInvldParam]
+ /// \~english @par Detail
+ /// Send unsubscribe message to NPPService for delete subscribe notifications.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedSubscribeNotificationWithCallback
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus UnSubscribeNotifications(HANDLE hApp);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// virtual function to enable session in service
+ /// \~english @param [in] f_uiNum
+ /// f_uiNum - Number of arguments
+ /// \~english @par
+ /// f_uiNum UI_32
+ /// \~english @param [in] f_uiFirst
+ /// f_uiFirst - first argument
+ /// \~english @par
+ /// f_uiFirst UI_32
+ /// \~english @retval None
+ /// \~english @par Preconditons
+ /// -
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// None
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// None
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual void EnableSession(UI_32 f_uiNum, UI_32 f_uiFirst, ...) = 0;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// unsubscribe notifications
+ /// \~english @param [in] hApp
+ /// hApp - Handle to the Framework.
+ /// \~english @par
+ /// hApp HANDLE*
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK or eFrameworkunifiedStatusNullPointer
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - none.
+ /// \~english @par Conditions of processing failure
+ /// - FrameworkunifiedGetMsgDataOfSize() failed [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// Call register subscribe notification.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedGetMsgDataOfSize, SetRespNotfnDataIn_CWORD77_DataPool
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus OnServiceNtf(HANDLE hApp);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Acknowledgement process of open session
+ /// \~english @param[in] f_hApp
+ /// HANDLE - Handle to the Application
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Set Session object in CFrameworkunified_CWORD77_Service::SetSession()
+ /// - Set Callback function in CFrameworkunified_CWORD77_Service::Set_CWORD77_OpenSessionACK()
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Set the application handle as Parameter when receiving acknowledgement for open session process.
+ /// Call OpenSessionAcknowledge() in session object which has same session type.
+ /// Call the callback function for open session acknowledgement.
+ /// \~english @par
+ /// Message sending process will be stoped in reguler when the session type of open session process is not
+ /// declared.
+ /// \~english @par
+ /// Callback function will be stoped in reguler when callback function is not declared.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see SetSession,Set_CWORD77_OpenSessionACK
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void OpenSessionAcks(HANDLE f_hApp);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Service
+ /// \~english @par Brief
+ /// Attach open session ack callback function to service.
+ /// \~english @param [in] fptr
+ /// fptr - Callback Function pointer of notify open session ack.
+ /// \~english @par
+ /// fptr SessionAckTo_CWORD77_*
+ /// \~english @retval
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - set callback function into m_cbSessionACK..
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Attach open session ack callback function to service.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void Set_CWORD77_OpenSessionACK(SessionAckTo_CWORD77_ fptr);
+};
+
+#endif // _FRAMEWORKUNIFIED__CWORD77_SERVICE_H_ NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified__CWORD77__session_if.h b/nsframework/framework_unified/client/include/native_service/frameworkunified__CWORD77__session_if.h
new file mode 100644
index 00000000..2c189a70
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified__CWORD77__session_if.h
@@ -0,0 +1,495 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_HMI_CWORD77_Controller
+/// \brief
+///
+////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified__CWORD77__session_if.h
+ * @brief \~english This file provides API for operating session
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup _CWORD77_
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIED__CWORD77_SESSION_H_ // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIED__CWORD77_SESSION_H_
+
+#include <native_service/ns__CWORD77__common.h>
+#include <string>
+#include <vector>
+
+class CFrameworkunified_CWORD77_Session {
+ protected:
+ HANDLE m_hSession; ///< Handle to session
+ HANDLE m_hApp; ///< Handle to Framework
+ HANDLE m_hService; ///< Handle to Service
+ UI_32 m_uiSessionType; ///< Session Type
+ ResponseServiceTo_CWORD77_ m_ResponseTo_CWORD77_; ///< Call back function pointer
+ std::vector<FrameworkunifiedProtocolCallbackHandler> m_vSessionProtocolHanlder;
+ std::vector<UI_32> m_vEventVector;
+ std::vector<FrameworkunifiedProtocolCallbackHandler> m_vSessionEventHandler;
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// AddProtocol
+ /// Function to add notification
+ ///
+ /// \param[in] f_uiCmdId
+ /// UI_32 - Command id
+ /// \param[in] f_cbFuncPtr
+ /// CbFuncPtr - Callback function pointer
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void AddProtocolHandler(UI_32 f_uiCmdId, CbFuncPtr f_cbFuncPtr);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// AttachProtocolwithDispatcher
+ /// API to Register Session 1 of Service A protocols with Dispatcher
+ ///
+ /// \param [in] f_hApp
+ /// HANDLE - Handle to the Framework
+ /// \return status
+ /// EFrameworkunifiedStatus - Success or Error
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus AttachProtocolwithDispatcher(HANDLE f_hApp);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// DetachProtocolwithDispatcher
+ /// API to Un Register Session 1 of Service A protocols with Dispatcher
+ ///
+ /// \param [in] f_hApp
+ /// HANDLE - Handle to the Framework
+ /// \return status
+ /// EFrameworkunifiedStatus - Success or Error
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus DetachProtocolwithDispatcher(HANDLE f_hApp);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// AttachEventswithDispatcher
+ /// Function to register events with dispatcher
+ ///
+ /// \param [in] f_hApp
+ /// HANDLE - Handle to the Framework
+ /// \return status
+ /// EFrameworkunifiedStatus - Success or Error
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus AttachEventswithDispatcher(HANDLE f_hApp);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// RegisterEvents
+ /// Function to register events
+ ///
+ /// \param [in] f_hApp
+ /// HANDLE - Handle to the Framework
+ /// \return status
+ /// EFrameworkunifiedStatus - Success or Error
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus RegisterEvents(HANDLE f_hApp); // Function: added by Shyam to overcome
+ /// the naming conflict in registering the event
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// AttachEventHandlerswithDispatcher
+ /// API to Register Session 1 of Service A protocols with Dispatcher
+ ///
+ /// \param [in] f_hApp
+ /// HANDLE - Handle to the Framework
+ /// \return status
+ /// EFrameworkunifiedStatus - Success or Error
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus AttachEventHandlerswithDispatcher(HANDLE f_hApp);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// DetachEventHandlerswithDispatcher
+ /// API to Un Register Session 1 of Service A protocols with Dispatcher
+ ///
+ /// \param [in] f_hApp
+ /// HANDLE - Handle to the Framework
+ /// \return status
+ /// EFrameworkunifiedStatus - Success or Error
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus DetachEventHandlerswithDispatcher(HANDLE f_hApp);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// AddEventHandler
+ /// Function to add event handler
+ ///
+ /// \param[in] f_uiCmdId
+ /// UI_32 - Command id
+ /// \param[in] f_cbFuncPtr
+ /// CbFuncPtr - Callback function pointer
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void AddEventHandler(UI_32 f_uiCmdId, CbFuncPtr f_cbFuncPtr);
+
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// Constructor for CFrameworkunified_CWORD77_Session
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// no preconditions
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Create CFrameworkunified_CWORD77_Session instance and initialize the member parameter(m_hSession, m_hApp,m_hService,\n
+ /// m_uiSessionType)
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see ~CFrameworkunified_CWORD77_Session
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunified_CWORD77_Session();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunified_CWORD77_Session
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// CFrameworkunified_CWORD77_Session is decleared in constructor
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Release CFrameworkunified_CWORD77_Session class instance
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunified_CWORD77_Session
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunified_CWORD77_Session();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// send specific command by session
+ /// \~english @param [in] cmdID
+ /// cmdID - commond id
+ /// \~english @par
+ /// cmdID UI_32
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK or failed
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - GetReqDataFrom_CWORD77_DataPool() failed [eFrameworkunifiedStatusDbRecNotFound]
+ /// - FrameworkunifiedSendMsg() failed
+ /// - if m_hSession is NULL. [eFrameworkunifiedStatusSessionErr]
+ /// \~english @par Detail
+ /// send specified commond by session.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see GetReqDataFrom_CWORD77_DataPool
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ // virtual EFrameworkunifiedStatus HandleSessionMessage(UI_32 cmdID);
+ EFrameworkunifiedStatus HandleSessionMessage(UI_32 cmdID);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// Set Call back function in Session
+ /// \~english @param [in] fptr
+ /// fptr - Pointer to call back function
+ /// \~english @par
+ /// fptr ResponseServiceTo_CWORD77_*
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - set callback into m_ResponseTo_CWORD77_.
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Set Call back function in Session
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SetResponseCallback(ResponseServiceTo_CWORD77_ fptr);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// function to Open Session.(pure virtual function)
+ /// \~english @param [in] f_hApp
+ /// f_hApp - Handle of framework
+ /// \~english @par
+ /// f_hApp HANDLE*
+ /// \~english @param [in] f_sServiceName
+ /// f_sServiceName - Service Name
+ /// \~english @par
+ /// f_sServiceName std::string
+ /// \~english @retval EFrameworkunifiedStatus
+ /// Success or Error
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus OpenSession(HANDLE f_hApp, std::string f_sServiceName) = 0;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// function to close Session.(pure virtual function)
+ /// \~english @param [in] f_hApp
+ /// f_hApp - Handle of framework
+ /// \~english @par
+ /// f_hApp HANDLE*
+ /// \~english @retval EFrameworkunifiedStatus
+ /// Success or Error
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// - none
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus CloseSession(HANDLE f_hApp) = 0;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// Open Session acknowledge.(pure virtual function)
+ /// \~english @param [in] f_hApp
+ /// f_hApp - Handle of framework
+ /// \~english @par
+ /// f_hApp HANDLE*
+ /// \~english @retval EFrameworkunifiedStatus
+ /// Success or Error
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// -none
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus OpenSessionAcknowledge(HANDLE f_hApp) = 0;
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetSessionType
+ /// API to get session type
+ ///
+ /// \return UI_32 - Session type
+ /// EFrameworkunifiedStatus - Success or Error
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// API to get session type
+ /// \~english @param none
+ /// \~english @retval UI_32 - Session type
+ /// \~english @par Preconditons
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// API to get session type.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ UI_32 GetSessionType();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// API to set session type into class CFrameworkunified_CWORD77_Session object.
+ /// \~english @param[in] sessioType
+ /// const UI_32& - Session type
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// none
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// API to set session type into class CFrameworkunified_CWORD77_Session object.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ /// none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SetSessionType(const UI_32 &sessioType);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// declear callback funcion into Dispatcher
+ /// \~english @param[in] hApp
+ /// HANDLE - Handle to Application
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// no precondition
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// declear OnResponse() of callback function by calling FrameworkunifiedAttachCallbackToDispatcher()\n
+ /// get decleared protocol ID through GetResponseProtocolArray()\n
+ /// get decleared event ID through GetEventArray() and regist event-sending instance in FrameworkunifiedRegisterEvent
+ /// \~english @par
+ /// cautions in using this API:\n
+ /// -Registrition will fail without msg When Application handle is uncorrect set by parameter\n
+ /// -Registrition process in FrameworkunifiedAttachCallbackToDispatcher() will not commit when
+ /// GetResponseProtocolArray()\n
+ /// or GetEventArray() returns NULL or NULL list
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedRegisterEvent,
+ /// GetResponseProtocolArray, GetEventArray, OnResponse
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void AttachResponseCallbacks(HANDLE hApp);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// unscrible dispatcher callback function
+ /// \~english @param[in] hApp
+ /// HANDLE - Handle to Application
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// no preconditions
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// declear OnResponse() of callback function by calling FrameworkunifiedDetachCallbackFromDispatcher()\n
+ /// get unregistrition protocol ID through GetResponseProtocolArray()\n
+ /// get unregistrition event ID through GetEventArray() and unregist event-sending instance in \n
+ /// FrameworkunifiedUnRegisterEvent()
+ /// \~english @par Detail
+ /// cautions in using this API:\n
+ /// -Unregistrition will fail without msg When Application handle is uncorrect set by parameter\n
+ /// -Unregistrition process in FrameworkunifiedDetachCallbackFromDispatcher() will not commit when
+ /// GetResponseProtocolArray()\n
+ /// or GetEventArray() returns NULL or NULL list
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedUnRegisterEvent,
+ /// GetResponseProtocolArray, GetEventArray
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void DetachResponseCallbacks(HANDLE hApp);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// OnResponse
+ /// Callback function on receiving response protocol or event specified in the list, returned
+ /// by either \ref GetResponseProtocolArray or \ref GetEventArray
+ ///
+ /// \param [in] hApp
+ /// HANDLE - Handle to framework
+ /// \return None
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunified_CWORD77_Session
+ /// \~english @par Brief
+ /// Callback function on receiving response protocol or event specified in the list, returned
+ /// by either \ref GetResponseProtocolArray or \ref GetEventArray
+ /// \~english @param [in] f_hApp
+ /// HANDLE - Handle of framework
+
+ /// \~english @retval EFrameworkunifiedStatus
+ /// SuceFrameworkunifiedStatusOK or eFrameworkunifiedStatusNullPointer
+ /// \~english @par Preconditions
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - framework handler is invalid handler.[eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Callback function on receiving response protocol or event specified in the list, returned
+ /// by either \ref GetResponseProtocolArray or \ref GetEventArray
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedGetMsgDataOfSize
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus OnResponse(HANDLE hApp);
+
+ // FIXME: Following set of functions should be pure virtual functions.
+ // But, in order to avoid build errors for HMI__CWORD77_, it is defined as virtual functions only.
+ // Because nobody who is currently deriving off of frameworkunified__CWORD77__session_if.h has these functions implemented.
+ virtual UI_32 const *GetResponseProtocolArray() = 0;
+ virtual UI_32 const GetResponseProtocolArrayLength() = 0;
+ virtual UI_32 const *GetEventArray() = 0;
+ virtual UI_32 const GetEventArrayLength() = 0;
+};
+
+#endif // _FRAMEWORKUNIFIED__CWORD77_SESSION_H_ NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_application.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_application.h
new file mode 100644
index 00000000..9d967515
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_application.h
@@ -0,0 +1,376 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief System callbacks that applications should address.
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_application.h
+ * @brief \~english This file contains the base api of an application that must be provided.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_APPLICATION_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_APPLICATION_H__
+
+#include <native_service/frameworkunified_types.h>
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup IsNull
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of applicaiton initialize
+////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnInitialization(HANDLE hApp);
+
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of applicaiton WaleUp
+////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnWakeup(HANDLE hApp); /// << deprecated
+
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of applicaiton shutdown
+////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnShutdown(HANDLE hApp); /// << deprecated
+
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of applicaiton EShutdown
+////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnEShutdown(HANDLE hApp); /// << deprecated
+
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of applicaiton start
+////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnStart(HANDLE hApp);
+
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of applicaiton stop
+////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnStop(HANDLE hApp);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOnPreStart
+/// \~english @par Brief
+/// callback of Application Life cycle event
+/// \~english @param [in] hApp
+/// HANDLE - Application Handle
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// Depend on the implementation in the inheriting class
+/// \~english @par Change of internal state
+/// Depend on the implementation in the inheriting class
+/// \~english @par Conditions of processing failure
+/// None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// callback of Application Pre start
+/// \~english @par
+/// - include frameworkunified_application.h
+/// - Library libNS_FrameworkUnified.so
+/// - Set compile option for "-DIMPL_AGL_APPLICATION_CALLBACKS_PRE_BACKGROUND" when this API in the each application implements.
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnPreStart(HANDLE hApp);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOnPreStop
+/// \~english @par Brief
+/// callback of Application Life cycle event
+/// \~english @param [in] hApp
+/// HANDLE - Application Handle
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// Depend on the implementation in the inheriting class
+/// \~english @par Change of internal state
+/// Depend on the implementation in the inheriting class
+/// \~english @par Conditions of processing failure
+/// None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// callback of Application Pre stop
+/// \~english @par
+/// - include frameworkunified_application.h
+/// - Library libNS_FrameworkUnified.so
+/// - Set compile option for "-DIMPL_AGL_APPLICATION_CALLBACKS_PRE_BACKGROUND" when this API in the each application implements.
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnPreStop(HANDLE hApp);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOnBackgroundStart
+/// \~english @par Brief
+/// callback of Application Life cycle event
+/// \~english @param [in] hApp
+/// HANDLE - Application Handle
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// Depend on the implementation in the inheriting class
+/// \~english @par Change of internal state
+/// Depend on the implementation in the inheriting class
+/// \~english @par Conditions of processing failure
+/// None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// callback of Application Background start
+/// \~english @par
+/// - include frameworkunified_application.h
+/// - Library libNS_FrameworkUnified.so
+/// - Set compile option for "-DIMPL_AGL_APPLICATION_CALLBACKS_PRE_BACKGROUND" when this API in the each application implements.
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStart(HANDLE hApp);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOnBackgroundStop
+/// \~english @par Brief
+/// callback of Application Life cycle event
+/// \~english @param [in] hApp
+/// HANDLE - Application Handle
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// Depend on the implementation in the inheriting class
+/// \~english @par Change of internal state
+/// Depend on the implementation in the inheriting class
+/// \~english @par Conditions of processing failure
+/// None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// callback of Application Background stop
+/// \~english @par
+/// - include frameworkunified_application.h
+/// - Library libNS_FrameworkUnified.so
+/// - Set compile option for "-DIMPL_AGL_APPLICATION_CALLBACKS_PRE_BACKGROUND" when this API in the each application implements.
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStop(HANDLE hApp);
+
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of applicaiton reinit
+////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnReinit(HANDLE hApp);
+
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of applicaiton destroy
+////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnDestroy(HANDLE hApp);
+
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of applicaiton debugdump
+////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnDebugDump(HANDLE hApp); // << Used for CCR Debugging
+
+
+/// \~english @par Brief
+/// Base class of application
+/// \~english @param None
+/// \~english @retval PCSTR depends on the implement of derived class
+/// \~english @par Prerequisite
+/// - depends on the implement of derived class
+/// \~english @par Inside state change
+/// - depends on the implement of derived class
+/// \~english @par None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The callback of get applicaiton servcice avaible
+////////////////////////////////////////////////////////////////////////////////
+PCSTR FrameworkunifiedGetServiceAvailabilityNotification(HANDLE hApp);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOnDummy
+/// \~english @par Brief
+/// dummy callback of Application Life cycle event
+/// \~english @param [in] hApp
+/// HANDLE - Application Handle
+/// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK
+/// \~english @par Prerequisite
+/// Prerequisites are nothing.
+/// \~english @par Change of internal state
+/// Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// Registered dummy callback when not processing
+/// \~english @par
+/// - include frameworkunified_application.h
+/// - Library libNS_FrameworkUnified.so
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOnDummy(HANDLE hApp);
+
+#endif /* __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_APPLICATION_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_dispatcher.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_dispatcher.h
new file mode 100644
index 00000000..8aa45725
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_dispatcher.h
@@ -0,0 +1,803 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief Application dispatch interface functions
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_dispatcher.h
+ * @brief \~english This file contains the base class of application.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_DISPATCHER_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_DISPATCHER_H__
+
+#include <native_service/frameworkunified_framework_types.h>
+// #include <native_service/frameworkunified_sm_hsmframework.h>
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDispatcher
+/// \~english @par Brief
+/// This API creates, initializes the dispatcher and runs mainloop for event handling.
+/// \~english @param [in] cAppName
+/// PCSTR - Pointer to application thread name
+/// \~english @param [in] CbHandler
+/// const FrameworkunifiedDefaultCallbackHandler* - Pointer to default callback functions.
+/// \~english @par
+/// FrameworkunifiedDefaultCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedDefaultCallbackHandler
+/// {
+/// CbFuncPtr onInitilization; /* Function is called when a Dispatcher is created.
+/// */
+/// CbFuncPtr onDestroy; /* Function is called when the Dispatcher is
+/// released. */
+/// CbFuncPtr onStart; /* Function is called when the Dispatcher is started.
+/// */
+/// CbFuncPtr onStop; /* Function is called when the Dispatcher is stopped.
+/// */
+/// CbFuncPtr onPreStart; /* Function is called when the Dispatcher is pre started. */
+/// CbFuncPtr onPreStop; /* Function is called when the Dispatcher is pre stoped. */
+/// CbFuncPtr onBackgroundStart; /* Function is called when the Dispatcher is Background started. */
+/// CbFuncPtr onBackgroundStop; /* Function is called when the Dispatcher is Background stopped. */
+/// CbFuncPtr onDebugDump; /* Function is called when the Dispatcher detects
+/// abnormal state. */
+/// CbFuncPtr createStateMachine; /* Set dummy function that does nothing.
+/// */
+/// CbFuncPtr ssFrameworkInterface; /* Function to connect to SystemManager
+/// */
+/// } FrameworkunifiedDefaultCallbackHandler;
+/// @endcode
+/// \~english @par
+/// About setting of default callback functions(FrameworkunifiedDefaultCallbackHandler)
+/// - Use FRAMEWORKUNIFIED_MAKE_DEFAULT_CALLBACK when initialize of FrameworkunifiedDefaultCallbackHandler structure as argument CbHandler.
+/// - Application that run this API need to define functions below.(allow to dummy function that does nothing.)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnInitialization(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDebugDump(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDestroy(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedCreateStateMachine(HANDLE hApp)
+/// - If application is resident service, link library libSS_SystemIfUnified
+/// (This library provides the function FrameworkunifiedSSFrameworkInterface to connect to SystemManager.).
+/// - If application is nonresident service, define function that does nothing below.
+/// - EFrameworkunifiedStatus FrameworkunifiedSSFrameworkInterface(HANDLE hApp)
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusDuplicate Duplication error of entry
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @par Prerequisite
+/// - Prerequisites are nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Application thread name specified in the argument (cAppName) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - Pointer to default callback functions specified in the argument (CbHandler) is NULL.
+/// [eFrameworkunifiedStatusNullPointer]
+/// - One of members in default callback functions specified in the argument (CbHandler) is NULL.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Application thread name specified in the argument (cAppName) is not appropriate(The name is more than
+/// 15byte). [eFrameworkunifiedStatusNullPointer]
+/// - Failed to open message queue (mq_open). [eFrameworkunifiedStatusNullPointer]
+/// - Failed to get memory (malloc) of message queue info area. [eFrameworkunifiedStatusNullPointer]
+/// - Failed to initialize socket for monitoring abnormal state (socket, bind, listen). [eFrameworkunifiedStatusFail]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service.
+/// [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for
+/// the NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - Failed to create of epoll instance (epoll_create1). [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to register of a descriptor of the message queue to the epoll instance (epoll_ctl).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to create file descriptor for receive event (eventfd). [eFrameworkunifiedStatusFail]
+/// - Failed to register of a descriptor for receive event to the epoll instance (epoll_ctl). [eFrameworkunifiedStatusFail]
+/// - Failed to register of a socket for detect abnormal state to the epoll instance (epoll_ctl).
+/// [eFrameworkunifiedStatusFail]
+/// - The result of FrameworkunifiedOnInitialization is not eFrameworkunifiedStatusOK. [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Detail
+/// This API creates and initializes the dispatcher.\n
+/// It starts to mainloop that receives request or notification, and runs registered callback to dispatcher.
+/// When success starting mainloop, never return.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// FrameworkunifiedDispatcherWithArguments
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDispatcher(PCSTR cAppName, const FrameworkunifiedDefaultCallbackHandler *CbHandler);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDispatcherWithArguments
+/// \~english @par Brief
+/// This API creates, initializes the dispatcher and runs loop with command-line options.
+/// \~english @param [in] cAppName
+/// PCSTR - Pointer to application thread name
+/// \~english @param [in] argc
+/// int - Number of command-line options
+/// \~english @param [in] argv
+/// char *[] - Array of pointer to command-line options
+/// \~english @param [in] CbHandler
+/// const FrameworkunifiedDefaultCallbackHandler* - Pointer to default callback functions.
+/// \~english @param [in] cmdLineOptions
+/// CustomCommandLineOptions* - Parser setting of command-line options(Optional. When don't use, set NULL.)
+/// \~english @par
+/// FrameworkunifiedDefaultCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedDefaultCallbackHandler
+/// {
+/// CbFuncPtr onInitilization; /* Function is called when a Dispatcher is created.
+/// */
+/// CbFuncPtr onDestroy; /* Function is called when the Dispatcher is
+/// released. */
+/// CbFuncPtr onStart; /* Function is called when the Dispatcher is started.
+/// */
+/// CbFuncPtr onStop; /* Function is called when the Dispatcher is stopped.
+/// */
+/// CbFuncPtr onPreStart; /* Function is called when the Dispatcher is pre started. */
+/// CbFuncPtr onPreStop; /* Function is called when the Dispatcher is pre stoped. */
+/// CbFuncPtr onBackgroundStart; /* Function is called when the Dispatcher is Background started. */
+/// CbFuncPtr onBackgroundStop; /* Function is called when the Dispatcher is Background stopped. */
+/// CbFuncPtr onDebugDump; /* Function is called when the Dispatcher detects
+/// abnormal state. */
+/// CbFuncPtr createStateMachine; /* Set dummy function that does nothing.
+/// */
+/// CbFuncPtr ssFrameworkInterface; /* Function to connect to SystemManager
+/// */
+/// } FrameworkunifiedDefaultCallbackHandler;
+/// @endcode
+/// \~english @par
+/// CustomCommandLineOptions Structure
+/// \~english @code
+/// typedef struct _CustomCommandLineOptions
+/// {
+/// PCSTR cShortOptions; /* Short options list. */
+/// PCHAR cLongOptions; /* Reserved. Set to NULL. */
+/// CbArgumentParser callback; /* Pointer to callback function to parse command-line
+/// options. */
+/// } CustomCommandLineOptions;
+/// @endcode
+/// \~english @par
+/// About setting of default callback functions(FrameworkunifiedDefaultCallbackHandler)
+/// - Use FRAMEWORKUNIFIED_MAKE_DEFAULT_CALLBACK when initialize of FrameworkunifiedDefaultCallbackHandler structure as argument CbHandler.
+/// - Application that run this API need to define functions below.(allow to dummy function that does nothing.)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnInitialization(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDebugDump(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDestroy(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedCreateStateMachine(HANDLE hApp)
+/// - If application is resident service, link library libSS_SystemIfUnified
+/// (This library provides the function FrameworkunifiedSSFrameworkInterface to connect to SystemManager.).
+/// - If application is nonresident service, define function that does nothing below.
+/// - EFrameworkunifiedStatus FrameworkunifiedSSFrameworkInterface(HANDLE hApp)
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusDuplicate Duplication error of entry
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @par Prerequisite
+/// - Prerequisites are nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Application thread name specified in the argument (cAppName) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - Pointer to default callback functions specified in the argument (CbHandler) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - One of members in default callback functions specified in the argument (CbHandler) is NULL.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Application thread name specified in the argument (cAppName) is not appropriate(The name is more than
+/// 15byte). [eFrameworkunifiedStatusNullPointer]
+/// - Failed to open message queue (mq_open). [eFrameworkunifiedStatusNullPointer]
+/// - Failed to get memory (malloc) of message queue info area. [eFrameworkunifiedStatusNullPointer]
+/// - Failed to initialize socket for monitoring abnormal state (socket, bind, listen). [eFrameworkunifiedStatusFail]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - Failed to create of epoll instance (epoll_create1). [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to register of a descriptor of the message queue to the epoll instance (epoll_ctl).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to create file descriptor for receive event (eventfd). [eFrameworkunifiedStatusFail]
+/// - Failed to register of a descriptor for receive event to the epoll instance (epoll_ctl). [eFrameworkunifiedStatusFail]
+/// - Failed to register of a socket for detect abnormal state to the epoll instance (epoll_ctl). [eFrameworkunifiedStatusFail]
+/// - The result of FrameworkunifiedOnInitialization is not eFrameworkunifiedStatusOK. [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Detail
+/// This API creates and initializes the dispatcher with command-line options.\n
+/// It starts to mainloop that receives request or notification, and runs registered callback to dispatcher.
+/// When success starting mainloop, never return.
+/// Use this API to take over a command-line options to the dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// FrameworkunifiedDispatcher, FrameworkunifiedCreateDispatcher, FrameworkunifiedDispatchBlock,
+/// FrameworkunifiedDispatchProcess, FrameworkunifiedCloseDispatcher,
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDispatcherWithArguments(PCSTR cAppName, int argc, char *argv[],
+ const FrameworkunifiedDefaultCallbackHandler *CbHandler,
+ CustomCommandLineOptions *cmdLineOptions = NULL);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSimpleDispatcher
+/// \~english @par none
+/// Generatings/intializes a Dispatcher and executs main loops for handling events.
+/// \~english @param [in] cAppName
+/// PCSTR - Pointer to the application thread name
+/// \~english @param [in] CbHandler
+/// const FrameworkunifiedDefaultCallbackHandler* - Pointer to a default-defined callback function
+/// \~english @param [in] CbShutdown
+/// CbFuncPtr - Pointer to the callack function o be called when the main loop is exited
+/// \~english @param [in] isChildThread
+/// BOOL - Whether the child thread is a dispatcher (Default:TRUE)
+/// \~english @par
+/// FrameworkunifiedDefaultCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedDefaultCallbackHandler
+/// {
+/// CbFuncPtr onInitilization; /* Callback function to run when creating dispatcher instance */
+/// CbFuncPtr onDestroy; /* Callback function to run when releasing dispatcher instance */
+/// CbFuncPtr onStart; /* Callback function executed when dispatcher starts processing */
+/// CbFuncPtr onStop; /* Callback function to be executed when dispatcher termination is requested */
+/// CbFuncPtr onPreStart; /* Callback function executed when dispatcher requestes activation */
+/// CbFuncPtr onPreStop; /* Callback function to be executed when an-request is made to the dispatcher on board status */
+/// CbFuncPtr onBackgroundStart; /* Callback function executed when dispatcher parking is requested */
+/// CbFuncPtr onBackgroundStop; /* Callback function executed when requesting termination of a dispatcher's parking status */
+/// CbFuncPtr onDebugDump; /* Callback function to be executed when an error is detected */
+/// CbFuncPtr createStateMachine; /* Specify an empty function */
+/// CbFuncPtr ssFrameworkInterface; /* Callback function for connecting to the systemManager */
+/// } FrameworkunifiedDefaultCallbackHandler;
+/// @endcode
+/// \~english @par
+/// About setting the default definition callback function (FrameworkunifiedDefaultCallbackHandler)
+/// The FrameworkunifiedDefaultCallbackHandler structure passed as argument CbHandler must be initialized using the FRAMEWORKUNIFIED_MAKE_DEFAULT_CALLBACK macro.
+/// - The application that executes this API must define a function with the following name. (Can also be an functio)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnInitialization(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDebugDump(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDestroy(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedCreateStateMachine(HANDLE hApp)
+/// If the applicatio is a resident service, link the library libSS_SystemIfUnified
+/// (which provides the function FrameworkunifiedSSFrameworkInterface that performs connection processin with SystemManager).
+/// - If the applicatio is a nonresident service, define the following names with empy function.
+/// - EFrameworkunifiedStatus FrameworkunifiedSSFrameworkInterface(HANDLE hApp)
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifiying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusFail User-specific continuation.
+/// \~english @retval eFrameworkunifiedStatusDuplicate Duplicate entry error
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Category Type
+/// \~english @retval eFrameworkunifiedStatusErrOther Shared-memory accesses for sending message for NPP Service fail.
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF If the timers fail,...
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Service does not exist
+/// \~english @par Failed to acquire
+/// -
+/// \~english @par Log output string
+/// - The internal state is not changed.
+/// \~english @par You do not use.
+/// - When the pointer (CbHandler) to the default-definition callback function specified by the arguments is NULL [eFrameworkunifiedStatusNullPointer]
+/// - If any of the member of the default-defined callback-function sruct specified in he arguments is NULL [eFrameworkunifiedStatusInvldParam]
+/// - When the pointer (CbShutdown) to the callback fuction to be called when the main loop specified by the arguments exits is NULL [eFrameworkunifiedStatusFail]
+/// - When the pointer (cAppName) to the threade name of the application specified by the arguments is NULL [eFrameworkunifiedStatusNullPointer]
+/// - When the application name (cAppName) specified in the parameter exceeds 15 byte [eFrameworkunifiedStatusNullPointer]
+/// - Failed to open a message queue (mq_open) [eFrameworkunifiedStatusNullPointer]
+/// - When acquisition (malloc) of the message queue management information area fails, [eFrameworkunifiedStatusNullPointer]
+/// - If the creation (socket, bind, listen) of sockets for error monitoring fails,... [eFrameworkunifiedStatusFail]
+/// - Application handles and callback function cannot be added to Notification lists [eFrameworkunifiedStatusDuplicate]
+/// - When the Notification name specified in the arguments has already been registred i the Dispatcher [eFrameworkunifiedStatusDuplicate]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending session-specific messages for NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for the NPP Service.... [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// - Failed to access shared memory for sending messages for sessions for NPP Service [eFrameworkunifiedStatusErrOther]
+/// - Failed to create epoll instances (epoll_create1) [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to register Dispatcher message queue descriptor for epoll instances (epoll_ctl) [eFrameworkunifiedStatusFail]
+/// - Failed to create file descriptor for receiving events to Dispatcher (eventfd) [eFrameworkunifiedStatusFail]
+/// - Failed to register file descriptor for receiving Dispatcher events to epoll instances (epoll_ctl) [eFrameworkunifiedStatusFail]
+/// - Failed to register socket for monitoring Dispatcher error in epoll instances (epoll_ctl) [eFrameworkunifiedStatusFail]
+/// - If FrameworkunifiedOnInitialization of result is not eFrameworkunifiedStatusOK [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Type
+/// Creats or initializes a Dispatcher, receives requests and notifications to the Dispatcher, and starts a main loop that executes the registred callback functions.\n
+/// When the main loop is started normally, this API does not retur until the hread terminates.\n
+/// At thread termination, the callback function specified by the third argument is called, and the processing result is returned.\n
+/// \n
+/// This API can be used for both main and child threads.\n
+/// However, since this API is an API for chid threads created without going through the API of NS framework such as \ref FrameworkunifiedCreateChildThread,
+/// it is recommended to use \ref FrameworkunifiedDispatcherWithArguments or other API to create Dispatcher in the main thread.\n
+/// \~english @par Immediate
+/// Brief
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Not applicable
+/// \~english @see
+/// FrameworkunifiedDispatcherWithArguments
+///
+/// \~english @par Brief
+/// Generatings/intializes a Dispatcher and executs main loops for handling events
+/// \~english @param [in] cAppName
+/// PCSTR - Application/ thread name
+/// \~english @param [in] CbHandler
+/// const FrameworkunifiedDefaultCallbackHandler* - Function that primes the dispatch pump. i.e. start function
+/// \~english @param [in] CbShutdown
+/// CbFuncPtr * - Shutdown function. Functions gets called if the dispatcher loop exits.
+/// \~English @param[in] isChildThread
+/// BOOL - Default value is TRUE. TRUE - child thread dispatcher else main thread dispatcher
+/// \~english @retval Never does. Unless any callback function returns eFrameworkunifiedStatusExit
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer
+/// \~english @retval eFrameworkunifiedStatusFail Invalid Parameter
+/// \~english @retval eFrameworkunifiedStatusErrOther Unknown Error
+/// \~english @par Prerequisite
+/// - Prerequisites are nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - cAppName is NULL[eFrameworkunifiedStatusNullPointer]
+/// - Length of cAppName is longer than MAX_NAME_SIZE_APP[eFrameworkunifiedStatusNullPointer]
+/// - NativeService has some issues [eFrameworkunifiedStatusNullPointer]
+/// - When the pointer (CbHandler) to the default-definition callback function specified by the arguments is NULL [eFrameworkunifiedStatusNullPointer]
+/// - If any of the member of the default-defined callback-function sruct specified in he arguments is NULL [eFrameworkunifiedStatusInvldParam]
+/// - When the pointer (CbShutdown) to the callback fuction to be called when the main loop specified by the arguments exits is NULL [eFrameworkunifiedStatusFail]
+/// - Failed to open a message queue (mq_open) [eFrameworkunifiedStatusNullPointer]
+/// - When acquisition (malloc) of the message queue management information area fails, [eFrameworkunifiedStatusNullPointer]
+/// - If the creation (socket, bind, listen) of sockets for error monitoring fails,... [eFrameworkunifiedStatusFail]
+/// - Application handles and callback function cannot be added to Notification lists [eFrameworkunifiedStatusDuplicate]
+/// - When the Notification name specified in the arguments has already been registred i the Dispatcher [eFrameworkunifiedStatusDuplicate]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for the NPP Service.... [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// - When an interrupt by a system call (signal) occurs while sending Service session-specific messages. [eFrameworkunifiedStatusErrOther]
+/// - Failed to create epoll instances (epoll_create1) [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to register Dispatcher message queue descriptor for epoll instances (epoll_ctl) [eFrameworkunifiedStatusFail]
+/// - Failed to create file descriptor for receiving events to Dispatcher (eventfd) [eFrameworkunifiedStatusFail]
+/// - Failed to register file descriptor for receiving Dispatcher events to epoll instances (epoll_ctl) [eFrameworkunifiedStatusFail]
+/// - Failed to register socket for monitoring Dispatcher error in epoll instances (epoll_ctl) [eFrameworkunifiedStatusFail]
+/// - If FrameworkunifiedOnInitialization of result is not eFrameworkunifiedStatusOK [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Detail
+/// Creates, initializes and runs the dispatcher. This dispatcher function can be used with child thread or main
+/// thread. <BR>
+/// But, recommended to use for child thread. For main thread use \ref FrameworkunifiedDispatcherWithArguments<BR>
+/// Intention to provide this API is for child threads created from dynamically loaded plugin, where thread wants
+/// to <BR>
+/// subscribe to PASA notification, attach callbacks. This can be done in the start function specified with this
+/// API.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// FrameworkunifiedDispatcherWithArguments
+/// \~english @todo not enough inforamtion need readon why this API is for child thread.
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSimpleDispatcher(PCSTR cAppName, const FrameworkunifiedDefaultCallbackHandler *CbHandler, CbFuncPtr CbShutdown,
+ BOOL isChildThread = TRUE);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCreateDispatcherWithoutLoop
+/// \~english @par Brief
+/// This API creates and initializes the dispatcher with command-line options.
+/// \~english @param [in] cAppName
+/// PCSTR - Pointer to application thread name
+/// \~english @param [out] hApp
+/// HANDLE - Handle for Application
+/// \~english @param [in] argc
+/// int - Number of command-line options
+/// \~english @param [in] argv
+/// char *[] - Array of pointer to command-line options
+/// \~english @param [in] CbHandler
+/// const FrameworkunifiedDefaultCallbackHandler* - Pointer to default callback functions.
+/// \~english @param [in] bIsConnectSM
+/// BOOL - whether or not connect with System Manager(TRUE/FALSE)
+/// \~english @param [in] cmdLineOptions
+/// CustomCommandLineOptions* - Parser setting of command-line options(Optional. When don't use, set NULL.)
+/// \~english @par
+/// FrameworkunifiedDefaultCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedDefaultCallbackHandler
+/// {
+/// CbFuncPtr onInitilization; /* Function is called when a Dispatcher is created.
+/// */
+/// CbFuncPtr onDestroy; /* Function is called when the Dispatcher is
+/// released. */
+/// CbFuncPtr onStart; /* Function is called when the Dispatcher is started.
+/// */
+/// CbFuncPtr onStop; /* Function is called when the Dispatcher is stopped.
+/// */
+/// CbFuncPtr onPreStart; /* Function is called when the Dispatcher is pre started. */
+/// CbFuncPtr onPreStop; /* Function is called when the Dispatcher is pre stoped. */
+/// CbFuncPtr onBackgroundStart; /* Function is called when the Dispatcher is Background started. */
+/// CbFuncPtr onBackgroundStop; /* Function is called when the Dispatcher is Background stopped. */
+/// CbFuncPtr onDebugDump; /* Function is called when the Dispatcher detects
+/// abnormal state. */
+/// CbFuncPtr createStateMachine; /* Set dummy function that does nothing.
+/// */
+/// CbFuncPtr ssFrameworkInterface; /* Function to connect to SystemManager
+/// */
+/// } FrameworkunifiedDefaultCallbackHandler;
+/// @endcode
+/// \~english @par
+/// CustomCommandLineOptions Structure
+/// \~english @code
+/// typedef struct _CustomCommandLineOptions
+/// {
+/// PCSTR cShortOptions; /* Short options list. */
+/// PCHAR cLongOptions; /* Reserved. Set to NULL. */
+/// CbArgumentParser callback; /* Pointer to callback function to parse command-line
+/// options. */
+/// } CustomCommandLineOptions;
+/// @endcode
+/// \~english @par
+/// About setting of default callback functions(FrameworkunifiedDefaultCallbackHandler)
+/// - Use FRAMEWORKUNIFIED_MAKE_DEFAULT_CALLBACK when initialize of FrameworkunifiedDefaultCallbackHandler structure as argument CbHandler.
+/// - Application that run this API need to define functions below.(allow to dummy function that does nothing.)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnInitialization(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDebugDump(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDestroy(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedCreateStateMachine(HANDLE hApp)
+/// - If application is resident service, link library libSS_SystemIfUnified
+/// (This library provides the function FrameworkunifiedSSFrameworkInterface to connect to SystemManager.).
+/// - If application is nonresident service, define function that does nothing below.
+/// - EFrameworkunifiedStatus FrameworkunifiedSSFrameworkInterface(HANDLE hApp)
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusDuplicate Duplication error of entry
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @par Prerequisite
+/// - Prerequisites are nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Application thread name specified in the argument (cAppName) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - Pointer to default callback functions specified in the argument (CbHandler) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - One of members in default callback functions specified in the argument (CbHandler) is NULL.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Application thread name specified in the argument (cAppName) is not appropriate(The name is more than
+/// 15byte). [eFrameworkunifiedStatusNullPointer]
+/// - Failed to open message queue (mq_open). [eFrameworkunifiedStatusNullPointer]
+/// - Failed to get memory (malloc) of message queue info area. [eFrameworkunifiedStatusNullPointer]
+/// - Failed to initialize socket for monitoring abnormal state (socket, bind, listen). [eFrameworkunifiedStatusFail]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - Failed to create of epoll instance (epoll_create1). [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to register of a descriptor of the message queue to the epoll instance (epoll_ctl).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to create file descriptor for receive event (eventfd). [eFrameworkunifiedStatusFail]
+/// - Failed to register of a descriptor for receive event to the epoll instance (epoll_ctl). [eFrameworkunifiedStatusFail]
+/// - Failed to register of a socket for detect abnormal state to the epoll instance (epoll_ctl). [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// This API creates and initializes the dispatcher with command-line options without running main loop.\n
+/// Use this, if application control some contexts(include NS framework).\n
+/// when the dispatcher generated by this API, Application need to handle event.\n
+/// Use FrameworkunifiedGetDispatcherFD and FrameworkunifiedDispatchProcessWithoutLoop for event handling.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Open Close
+/// \~english @see
+/// FrameworkunifiedCreateDispatcherWithoutLoop, FrameworkunifiedDestroyDispatcherWithoutLoop, FrameworkunifiedGetDispatcherFD
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedCreateDispatcherWithoutLoop(PCSTR cAppName, HANDLE &hApp, int argc, char *argv[], // NOLINT (readability/nolint)
+ const FrameworkunifiedDefaultCallbackHandler *CbHandler,
+ BOOL bIsConnectSM, CustomCommandLineOptions *cmdLineOptions = NULL);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDispatchProcessWithoutLoop
+/// \~english @par Brief
+/// Receive request or notification, and run registered callback to dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedCreateDispatcherWithoutLoop has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - If the waiting message (epoll_wait) , was terminated with an error other than interrupt (EINTR)
+/// [eFrameworkunifiedStatusFail]
+/// - Service name that has been set in the received message exceeds the 20byte. [eFrameworkunifiedStatusFail]
+/// - Message queue in the HANDLE specified in the argument (hApp) is not for receive. [eFrameworkunifiedStatusFail]
+/// - Message queue for receive is empty. [eFrameworkunifiedStatusFail]
+/// - File descriptor of message queue for receive is invalid. [eFrameworkunifiedStatusFail]
+/// - Interruption by the system call (signal) has occurred during the message receiving. [eFrameworkunifiedStatusFail]
+/// - Size of the receive buffer of the message is illegal. [eFrameworkunifiedStatusFail]
+/// - Any errors occur during the message receiving. [eFrameworkunifiedStatusFail]
+/// - Service name in the received message is not appropriate(The name is NULL, Length is 0byte) [eFrameworkunifiedStatusFail]
+/// - The received message data length is more than data length in the received message header. [eFrameworkunifiedStatusFail]
+/// - The received message is not appropriate. [eFrameworkunifiedStatusFail]
+/// - Shared memory ID for receiving message is invalid. [eFrameworkunifiedStatusFail]
+/// - Failed to access to shared memory for receive message. [eFrameworkunifiedStatusFail]
+/// - Data size of shared memory for receiving message is more than destination buffer size. [eFrameworkunifiedStatusFail]
+/// - Message queue of the processing result destination is invalid. [eFrameworkunifiedStatusFail]
+/// - The transmission data that is the received request processing result is NULL. [eFrameworkunifiedStatusFail]
+/// - Service name of the processing result destination is not appropriate(The name is NULL, more than 20byte).
+/// [eFrameworkunifiedStatusFail]
+/// - Failed to access to shared memory for send message. [eFrameworkunifiedStatusFail]
+/// - Message queue type is not for sending. [eFrameworkunifiedStatusFail]
+/// - Message queue for sending is full. [eFrameworkunifiedStatusFail]
+/// - File descriptor of message queue for sending is invalid. [eFrameworkunifiedStatusFail]
+/// - Interruption by the system call (signal) has occurred during the message sending. [eFrameworkunifiedStatusFail]
+/// - Size of the send buffer of the message is illegal. [eFrameworkunifiedStatusFail]
+/// - Any errors occur during the message sending. [eFrameworkunifiedStatusFail]
+/// - Failed to access to shared memory for sending message. [eFrameworkunifiedStatusFail]
+/// - Failed to get memory buffer for message receiving. [eFrameworkunifiedStatusFail]
+/// - Failed to read data from file descriptor that is set from application. [eFrameworkunifiedStatusFail]
+/// - Failed to run callback that is set from application. [eFrameworkunifiedStatusFail]
+/// - The callback that is set from application returned error. [eFrameworkunifiedStatusFail]
+/// - I could not found callback function associated with file descriptor that is set from application.
+/// [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// If the Dispatcher was created by FrameworkunifiedCreateDispatcherWithoutLoop, \n
+/// you use this API to receive request or notification, and run registered callback to dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// FrameworkunifiedCreateDispatcherWithoutLoop, FrameworkunifiedDestroyDispatcherWithoutLoop, FrameworkunifiedGetDispatcherFD
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDispatchProcessWithoutLoop(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDestroyDispatcherWithoutLoop
+/// \~english @par Brief
+/// This API destroy the dispatcher created by FrameworkunifiedCreateDispatcherWithoutLoop.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedCreateDispatcherWithoutLoop has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to release memory referenced by HANDLE specified in the argument (hApp). [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Detail
+/// This API destroy the dispatcher created by FrameworkunifiedCreateDispatcherWithoutLoop.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see
+/// FrameworkunifiedCreateDispatcherWithoutLoop
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDestroyDispatcherWithoutLoop(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetDispatcherFD
+/// \~english @par Brief
+/// Get the Dispatcher file descriptor corresponding to the given application handle.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @param [out] efd
+/// int* - Dispatcher file descriptor
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedCreateDispatcherWithoutLoop has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - The argument efd is NULL. [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Detail
+/// This API gets the Dispatcher file descriptor corresponding to the given application handle.\n
+/// The application can use file descriptor to detect event of NS Framework.\n
+/// When events detected, run FrameworkunifiedDispatchProcessWithoutLoop to handling events.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see FrameworkunifiedDispatchProcessWithoutLoop
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedGetDispatcherFD(HANDLE hApp, SI_32 *efd); // Replace int with SI_32
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetDefaultCbHandler
+/// \~english @par Brief
+/// Get default callback handler table
+/// \~english @param [out] CbHandler
+/// FrameworkunifiedGetDefaultCbHandler * - Default callback handler table pointer
+/// \~english @par
+/// FrameworkunifiedDefaultCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedDefaultCallbackHandler
+/// {
+/// CbFuncPtr onInitilization; /* Function is called when a Dispatcher is created.
+/// */
+/// CbFuncPtr onDestroy; /* Function is called when the Dispatcher is
+/// released. */
+/// CbFuncPtr onStart; /* Function is called when the Dispatcher is started.
+/// */
+/// CbFuncPtr onStop; /* Function is called when the Dispatcher is stopped.
+/// */
+/// CbFuncPtr onPreStart; /* Function is called when the Dispatcher is pre started. */
+/// CbFuncPtr onPreStop; /* Function is called when the Dispatcher is pre stoped. */
+/// CbFuncPtr onBackgroundStart; /* Function is called when the Dispatcher is Background started. */
+/// CbFuncPtr onBackgroundStop; /* Function is called when the Dispatcher is Background stopped. */
+/// CbFuncPtr onDebugDump; /* Function is called when the Dispatcher detects
+/// abnormal state. */
+/// CbFuncPtr createStateMachine; /* Set dummy function that does nothing.
+/// */
+/// CbFuncPtr ssFrameworkInterface; /* Function to connect to SystemManager
+/// */
+/// } FrameworkunifiedDefaultCallbackHandler;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedCreateDispatcherWithoutLoop has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Pointer to default callback functions specified in the argument (CbHandler) is NULL.
+/// [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Detail
+/// Gets the default defined callback fuction set by FrameworkunifiedDispatcherWithArguments, FrameworkunifiedSimpleDispatcher, and FrameworkunifiedCreateDispatcherWithoutLoop.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see FrameworkunifiedDispatchProcessWithoutLoop
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedGetDefaultCbHandler(FrameworkunifiedDefaultCallbackHandler *CbHandler);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachLostSessionCallbackToDispatcher
+/// \~english Register
+/// abnormal session disconnect callback
+/// \~english @param[in] hApp
+/// HANDLE - Application framework handle
+/// \~english @param[in] fpLostSession
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedCreateDispatcherWithoutLoop has been
+/// done.
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid Parameter
+/// \~english @par Preconditions
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedCreateDispatcherWithoutLoop has been
+/// done.
+/// \~english @par Change of internal status
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - hApp is NULL [eFrameworkunifiedStatusInvldParam]
+/// - hApp is invalid [eFrameworkunifiedStatusInvldParam]
+/// - fpLostSession is NULL [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Registers a callback fuction to be called when a session disconnection occurs in the specified application handle.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see FrameworkunifiedCreateDispatcherWithoutLoop, FrameworkunifiedDispatcherWithArguments, FrameworkunifiedSimpleDispatcher
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedAttachLostSessionCallbackToDispatcher(HANDLE hApp, CbFuncPtr fpLostSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetLostSessionData
+/// \~english @par Brief
+/// Get last lost session data
+/// \~english @param [in] hApp
+/// HANDLE - Application framework handle
+/// \~english @param [out] pServiceName
+/// PSTR - Disconnect service name
+/// \~english @param [out] puiSessionId
+/// PUI_32 - Disconnect session ID
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid Parameter
+/// \~english @retval eFrameworkunifiedStatusAccessError Error when accessing resource
+/// \~english @par Preconditions
+/// - Generation/Initialization of Dispatcher for the Application
+/// by FrameworkunifiedCreateDispatcherWithoutLoop has been done.
+/// \~english @par Change of internal status
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - hApp is invalid [eFrameworkunifiedStatusInvldParam]
+/// - pServiceName is NULL [eFrameworkunifiedStatusInvldParam]
+/// - puiSessionId is NULL [eFrameworkunifiedStatusInvldParam]
+/// - Lost session queue is empty [eFrameworkunifiedStatusAccessError]
+/// \~english @par Detail
+/// Gets the service name and session ID disconnected from the hadle for the specified application.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// FrameworkunifiedCreateDispatcherWithoutLoop, FrameworkunifiedDispatcherWithArguments, FrameworkunifiedSimpleDispatcher
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedGetLostSessionData(HANDLE hApp, PSTR pServiceName, PUI_32 puiSessionId);
+
+#endif /* __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_DISPATCHER_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_error.hpp b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_error.hpp
new file mode 100644
index 00000000..8c8e3f5a
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_error.hpp
@@ -0,0 +1,77 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief This file provides framework's API which are used by system services.
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_framework_error.hpp
+ * @brief \~english This file provides framework's API which are used by system services.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_ERROR_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_ERROR_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <stdexcept>
+
+namespace frameworkunified {
+namespace framework {
+namespace error {
+
+class error : public std::runtime_error {
+ public:
+ explicit error(EFrameworkunifiedStatus error, PCSTR errorMsg);
+ private:
+ const EFrameworkunifiedStatus m_error;
+};
+
+}
+}
+}
+
+#define DEFINE_FRAMEWORKUNIFIED_ERROR( name ) \
+class name : public framework_unified::framework::error::error \
+{ \
+public: \
+ explicit name ( EFrameworkunifiedStatus error, PCSTR str ) \
+ : framework_unified::framework::error::error ( error, str ) \
+ {} \
+}
+
+#endif // __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_ERROR_H__ NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_if.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_if.h
new file mode 100644
index 00000000..44ef8542
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_if.h
@@ -0,0 +1,6007 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+// tag_NSFramework
+// Application framework's interface header file.
+//
+// The interfaces exposed here are
+// - Application framework Dispatcher
+// - attaching/detaching service protocol callbacks
+// - attaching/detaching notification callbacks
+// - Message Center
+// - send messaging to services/clients
+// - read the incoming message information
+// - Service Directory
+// - open and close a service
+// - register/unregister a service
+// - Notification & Persistence Service
+// - register/unregister and publish a notification
+// - subscribe/unsubscribe to a notification
+//
+/////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_framework_if.h
+ * @brief \~english Application framework's interface header file.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup Native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_framework_types.h>
+#include <native_service/frameworkunified_service_protocol.h>
+#include <native_service/ns_shared_mem_if.h>
+#include <native_service/ns_np_service.h>
+///////////////////////////////////
+// To avoid integration build break: removing dependency on SM framework.
+// #include <native_service/frameworkunified_sm_hsmframework.h>
+
+// QUICK FIX Files added here, which was included by frameworkunified_sm_hsmframework.h
+// if we simply comment frameworkunified_sm_hsmframework.h inclusion, then other modules build may
+// break, if they are not including below files explicitly and was relying of frameworkunified_framework_if.h.
+#include <native_service/ns_timer_if.h>
+#include <native_service/ns_message_center_if.h>
+#include <native_service/ns_logger_if.h>
+#include <map>
+#include <string>
+#include <vector>
+///////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+// Dispatcher functions
+////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachCallbacksToDispatcher
+/// \~english @par Brief
+/// API to register multiple Callback-informations to the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pServiceName
+/// PCSTR - Pointer to the service name
+/// \~english @param [in] pMsgHandler
+/// FrameworkunifiedProtocolCallbackHandler* - Pointer to the Message Handler structure
+/// \~english @param [in] uiHandlerCount
+/// UI_32 - Message Handler count(1 to 4294967295)
+/// \~english @param [in] hSession
+/// HANDLE - Session handle (Default:NULL)
+/// \~english @par
+/// FrameworkunifiedProtocolCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedProtocolCallbackHandler
+/// {
+/// /* Command ID/request ID/approval ID of protocol on the service */
+/// UI_32 iCmd;
+/// /* Pointer to Callback function that would be called on receiving iCmd from pServiceName. */
+/// CbFuncPtr callBack;
+/// }FrameworkunifiedProtocolCallbackHandler;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
+/// - Message Handler number specified in the argument is 0. [eFrameworkunifiedStatusInvldParam]
+/// - NULL Callback function pointer of the Message Handler structure specified by the argument.
+/// [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Register multiple Callback-informations(iCmd,CbFuncPtr) of the service that has been specified by the argument
+/// \n
+/// to the Dispatcher.\n
+/// Thus, if the iCmd is requested from the service, so the appropriate Callback function is called. \n
+/// When multiple registration, if an error occurs in the second and subsequent, becomes effective only \n
+/// information that has been registered so far. \n
+/// For number of upper limit of the registration possible message handler, depending on \n
+/// the securable size as the area of the message handler structure. Therefore, note to ensure \n
+/// the size of the area of the message handler structure at the call side of API, and define \n
+/// the number of message handler.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - If the handle (hSession) for the session specified by the arguments is not appropriate (disabled),
+/// the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.\n
+/// - It is not possible to register more than one callback with the same command ID (iCmd) for the same service/session ID,
+/// and the callback function will win.
+/// - Operatio is not guaranteed if the number of elements of the array indicated by the address of the pointer (pMsgHandler)
+/// to the message handler structure does not match the number of arrays specified by the number of
+/// party-specified message hadlers (uiHandlerCount).
+/// - The callback information is registered to the heap.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
+/// FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
+/// FrameworkunifiedDetachServiceFromDispatcher
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedAttachCallbacksToDispatcher(HANDLE hApp, PCSTR pServiceName,
+ const FrameworkunifiedProtocolCallbackHandler *pMsgHandler,
+ UI_32 uiHandlerCount, HANDLE hSession = NULL);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachCallbackToDispatcher
+/// \~english @par Brief
+/// API to register a Callback-information to the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @param [in] pServiceName
+/// PCSTR - Pointer to the service name
+/// \~english @param [in] iCmd
+/// UI_32 - Command ID/request ID/approval ID of protocol on the service
+/// \~english @param [in] fpOnCmd
+/// CbFuncPtr - Pointer to Callback function that would be called on receiving iCmd from pServiceName.
+/// \~english @param [in] hSession
+/// HANDLE - Session handle (Default:NULL)
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
+/// - Pointer (fpOnCmd) is NULL to the Callback function specified in the argument. [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Register a Callback-information(iCmd,CbFuncPtr) of the service that has been specified by the argument \n
+/// to the Dispatcher.\n
+/// Thus, if the iCmd is requested from the service, so the appropriate Callback function is called.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - If the handle (hSession) for the session specified by the arguments is not appropriate (disabled),
+/// the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.
+/// - The callback information is registered to the heap.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
+/// FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
+/// FrameworkunifiedDetachServiceFromDispatcher
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedAttachCallbackToDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, CbFuncPtr fpOnCmd,
+ HANDLE hSession = NULL);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachCallbacksToDispatcherWithFd
+/// \~english @par Brief
+/// API to register multiple Callback and file descriptor set to the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] handlers
+/// FrameworkunifiedFdProtocolCallbackHandler* - Pointer to the Message Handler structure to be registered
+/// \~english @param [in] handlerCount
+/// UI_32 - Message Handler Count(1 to 4294967295)
+/// \~english @par
+/// FrameworkunifiedFdProtocolCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedFdProtocolCallbackHandler
+/// {
+/// int fd; /* File descriptor for message waiting control */
+/// CbFuncPtr callBack; /* Pointer to Callback function */
+/// }FrameworkunifiedFdProtocolCallbackHandler;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Pointer (handlers) to the Message Handler structure of the registration object specified in the argument is
+/// NULL. [eFrameworkunifiedStatusInvldParam]
+/// - Message Handler number of registered specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
+/// - File descriptor in the Message Handler structure(FrameworkunifiedFdProtocolCallbackHandler) specified in the argument is
+/// incorrect(If fd is less than or equal to 0). [eFrameworkunifiedStatusInvldParam]
+/// - Pointer(fpOnCmd) to the Callback function in the Message Handler structure(FrameworkunifiedFdProtocolCallbackHandler)
+/// specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - File descriptor specified in the argument is incorrect(If fd is less than or equal to 0).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Pointer (fpOnCmd) is NULL to the Callback function specified in the argument. [eFrameworkunifiedStatusInvldParam]
+/// - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
+/// appropriate. [eFrameworkunifiedStatusFail]
+/// - File descriptor in the Message Handler structure(FrameworkunifiedFdProtocolCallbackHandler) specified in the argument is
+/// already registered to the monitoring control(epoll_ctl). [eFrameworkunifiedStatusFail]
+/// - It failed to add the file descriptor of the message waiting control to the monitoring of epoll_ctl().
+/// [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Register multiple callbacks that link to file descriptor that has been specified by the argument to
+/// the Dispatcher.\n
+/// For epoll_ctl() of Dispatcher, add multiple file descriptor for the specified message waiting control \n
+/// by the argument.\n
+/// Thus, for the file descriptor registered in the message waiting control, when receiving a message, \n
+/// so the appropriate Callback function is called. \n
+/// When multiple registration, if an error occurs in the second and subsequent, becomes effective only \n
+/// information that has been registered so far. \n
+/// For number of upper limit of the registration possible message handler, depending on \n
+/// the securable size as the area of the message handler structure. Therefore, note to ensure \n
+/// the size of the area of the message handler structure at the call side of API, and define \n
+/// the number of message handler.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - The operation cannot be guaranteed if the number of elements of the array entity indicated by the address of the pointer (handlers)
+/// to the message handler structure to be registered does not match the number of arrays specified in the number of message handlers o be registered (handlerCount).\n
+/// - The callback information is registered to the heap.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbackToDispatcherWithFd, FrameworkunifiedDetachCallbackFromDispatcherWithFd,
+/// FrameworkunifiedDetachCallbacksFromDispatcherWithFd
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedAttachCallbacksToDispatcherWithFd(HANDLE hApp, const FrameworkunifiedFdProtocolCallbackHandler *handlers,
+ UI_32 handlerCount);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachCallbackToDispatcherWithFd
+/// \~english @par Brief
+/// API to register a callback that link to a single file descriptor to the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] fd
+/// int - File descriptor for message waiting control
+/// \~english @param [in] fpOnCmd
+/// CbFuncPtr - Pointer to Callback function
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - File descriptor specified in the argument is incorrect(If fd is less than or equal to 0).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Pointer (fpOnCmd) is NULL to the Callback function specified in the argument. [eFrameworkunifiedStatusInvldParam]
+/// - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
+/// appropriate. [eFrameworkunifiedStatusFail]
+/// - File descriptor(fd) specified in the argument is already registered to the monitoring control(epoll_ctl).
+/// [eFrameworkunifiedStatusFail]
+/// - It failed to add the file descriptor(fd) of the message waiting control to the monitoring of epoll_ctl().
+/// [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Register a callback that link to a file descriptor that has been specified by the argument to
+/// the Dispatcher.\n
+/// For epoll_ctl() of Dispatcher, add a file descriptor(fd) for the specified message waiting control \n
+/// by the argument.\n
+/// Thus, for the file descriptor registered in the message waiting control, when receiving a message, \n
+/// so the appropriate Callback function is called.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - The callback information is registered to the heap.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedDetachCallbackFromDispatcherWithFd,
+/// FrameworkunifiedDetachCallbacksFromDispatcherWithFd
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedAttachCallbackToDispatcherWithFd(HANDLE hApp, int fd, CbFuncPtr fpOnCmd);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachParentCallbacksToDispatcher
+/// \~english @par Brief
+/// API to register multiple callback information for the parent thread to the Dispatcher.
+/// \~english @param [in] hChildApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pMsgHandler
+/// FrameworkunifiedProtocolCallbackHandler* - Pointer to the Message Handler structure
+/// \~english @param [in] uiHandlerCount
+/// UI_32 - Message Handler count(1 to 4294967295)
+/// \~english @par
+/// FrameworkunifiedProtocolCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedProtocolCallbackHandler
+/// {
+/// /* Command ID/request ID/approval ID of protocol on the service */
+/// UI_32 iCmd;
+/// /* Pointer to Callback function that would be called on receiving iCmd from pServiceName. */
+/// CbFuncPtr callBack;
+/// }FrameworkunifiedProtocolCallbackHandler;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Parent service name in the HANDLE(hApp) specified in the argument is NULL . [eFrameworkunifiedStatusInvldParam]
+/// - Message Handler number specified in the argument is 0. [eFrameworkunifiedStatusInvldParam]
+/// - NULL Callback function pointer of the Message Handler structure specified by the argument.
+/// [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Register multiple Callback-informations(iCmd,CbFuncPtr) to the Dispatcher to process \n
+/// the message from the parent thread. \n
+/// Thus, if the iCmd is requested from the parent service(application), so the appropriate \n
+/// Callback function is called. \n
+/// When multiple registration, if an error occurs in the second and subsequent, becomes \n
+/// effective only information that has been registered so far.\n
+/// For number of upper limit of the registration possible message handler, depending on \n
+/// the securable size as the area of the message handler structure. Therefore, note to ensure \n
+/// the size of the area of the message handler structure at the call side of API, and define \n
+/// the number of message handler.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Operation is not guaranteed if the number of elements of the array indicated by the address of the pointer (pMsgHandler)
+/// to the message handler structure does not match the number of arrays specified by the number of
+/// party-specified message hadlers (uiHandlerCount).
+/// - The callback information is registered to the heap.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
+/// FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
+/// FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
+/// FrameworkunifiedDetachServiceFromDispatcher
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedAttachParentCallbacksToDispatcher(HANDLE hChildApp, const FrameworkunifiedProtocolCallbackHandler *pMsgHandler,
+ UI_32 uiHandlerCount);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachCallbacksFromDispatcher
+/// \~english @par Brief
+/// API to cancel multiple Callback-informations from the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pServiceName
+/// PCSTR - Pointer to the service name
+/// \~english @param [in] puiCmdArray
+/// PUI_32 - Pointer to Command ID/request ID/approval ID of protocol on the service
+/// \~english @param [in] uiCommandCount
+/// UI_32 - Cancel handler count
+/// \~english @param [in] hSession
+/// HANDLE - Session handle (Default:NULL)
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
+/// - Pointer(puiCmdArray) to cancel target ID specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - The number(uiCommandCount) of handlers to cancel specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
+/// - Specified service (ServiceName) in the argument is not present. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Cancel a Callback-information(iCmd,CbFuncPtr) of the service that has been specified by the argument \n
+/// from the Dispatcher.\n
+/// Thus, if the iCmd is requested from the service, so the appropriate Callback function is not called. \n
+/// If you have already specified the iCmd of revocation has been subject, to return the eFrameworkunifiedStatusOK.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - If the iCmad to be canceled is specified, the eFrameworkunifiedStatusOK is returned.
+/// - Event if an error occurs during deletion of two or more iCmd, the subsequent iCmd is deleted.
+/// - If a iCmd larger than the iCmd array is specified eFrameworkunifiedStatusOK is returned and all iCmd is deleted.\n
+/// - If the hade (hSession) for the session specified by the arguments is not appropriate (disabled),
+/// the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.\n
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedDetachCallbackFromDispatcher,
+/// FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
+/// FrameworkunifiedDetachServiceFromDispatcher
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDetachCallbacksFromDispatcher(HANDLE hApp, PCSTR pServiceName, const PUI_32 puiCmdArray,
+ UI_32 uiCommandCount, HANDLE hSession = NULL);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachCallbackFromDispatcher
+/// \~english @par Brief
+/// API to cancel a Callback-information from the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pServiceName
+/// PCSTR - Pointer to the service name
+/// \~english @param [in] iCmd
+/// UI_32 - Command ID/request ID/approval ID of protocol on the service
+/// \~english @param [in] hSession
+/// HANDLE - Session handle (Default:NULL)
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
+/// - Specified service (ServiceName) in the argument is not present. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Cancel a Callback-information(iCmd,CbFuncPtr) of the service that has been specified by the argument \n
+/// from the Dispatcher.\n
+/// Thus, if the iCmd is requested from the service, so the appropriate Callback function is not called. \n
+/// If you have already specified the cancellation has been the subject or unregistered iCmd, to return \n
+/// the eFrameworkunifiedStatusOK.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - If the handle (hSession) for the session specified by the arguments is not appropriate (disabled),
+/// the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.\n
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
+/// FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
+/// FrameworkunifiedDetachServiceFromDispatcher
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDetachCallbackFromDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, HANDLE hSession = NULL);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachCallbacksFromDispatcherWithFd
+/// \~english @par Brief
+/// API to cancel multiple Callback and file descriptor set from the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] fdArray
+/// int* - Pointer to cancel the target file descriptor array
+/// \~english @param [in] handlerCount
+/// UI_32 - Handler count of cancellation
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Pointer(fdArray) is NULL to cancel the target file descriptor array specified in the argument.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Handler count(handlerCount) of canceled specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
+/// - File descriptor of the file descriptor in the array(fdArray) specified by the argument is incorrect(If fd is
+/// less than or equal to 0). [eFrameworkunifiedStatusInvldParam]
+/// - File descriptor in the file descriptor array(fdArray) specified in the argument is already deleted from the
+/// management table, and can not search. [eFrameworkunifiedStatusFail]
+/// - There is no file descriptor management table of the specified HANDLE(hApp) in argument. [eFrameworkunifiedStatusFail]
+/// - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
+/// appropriate. [eFrameworkunifiedStatusFail]
+/// - It failed to delete the file descriptor(fd) of the message waiting control from the monitoring of
+/// epoll_ctl(). [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Cancel Callback and file descriptor set that has been specified by the argument from the Dispatcher.\n
+/// For epoll_ctl() of Dispatcher, delete multiple file descriptor for the specified message waiting control \n
+/// by the argument.\n
+/// Thus, for the file descriptor became cancellation target, when receiving the message, the appropriate \n
+/// Callback function is not called.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Operation cannot be guaranteed if the number of elements of the array specified by the address of the pointer
+/// to the file descriptor array to be canceled (fdArray) does not match the number of arrays specified by the number of
+/// file descriptors to be canceled (uiCommandCount).
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackFromDispatcherWithFd,
+/// FrameworkunifiedDetachCallbackFromDispatcherWithFd
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDetachCallbacksFromDispatcherWithFd(HANDLE hApp, const int *fdArray, UI_32 uiCommandCount);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachCallbackFromDispatcherWithFd
+/// \~english @par Brief
+/// API to cancel a Callback and file descriptor from the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] fd
+/// int - Cancel the target file descriptor
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - File descriptor(fd) specified in the argument is incorrect(If fd is less than or equal to 0).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - File descriptor specified in the argument is already deleted from the management table, and can not search.
+/// [eFrameworkunifiedStatusFail]
+/// - There is no file descriptor management table of the specified HANDLE(hApp) in argument. [eFrameworkunifiedStatusFail]
+/// - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
+/// appropriate. [eFrameworkunifiedStatusFail]
+/// - It failed to delete the file descriptor(fd) of the message waiting control from the monitoring of
+/// epoll_ctl(). [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Cancel a Callback and file descriptor that has been specified by the argument from the Dispatcher.\n
+/// For epoll_ctl() of Dispatcher, delete a file descriptor(fd) for the specified message waiting control \n
+/// by the argument.\n
+/// Thus, for the file descriptor became cancellation target, when receiving the message, the appropriate \n
+/// Callback function is not called.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackFromDispatcherWithFd,
+/// FrameworkunifiedDetachCallbacksFromDispatcherWithFd
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDetachCallbackFromDispatcherWithFd(HANDLE hApp, int fd);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachParentCallbacksFromDispatcher
+/// \~english @par Brief
+/// API to cancel the multiple of Callback information for the parent thread from Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] puiCmdArray
+/// PUI_32 - Pointer to an array of command/request on the service protocol
+/// \~english @param [in] uiCommandCount
+/// UI_32 - Handler count of cancellation
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Pointer(puiCmdArray) to an array of command/request that you specified in the argument is NULL.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Handler count(uiCommandCount) of canceled specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Parent service name in the HANDLE(hApp) specified in the argument is NULL . [eFrameworkunifiedStatusInvldParam]
+/// - There is no parent service of the target in the HANDLE(hApp) specified in the argument. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Cancel multiple Callback-informations(iCmd,CbFuncPtr) from the Dispatcher to process \n
+/// the message from the parent thread. \n
+/// Thus, if iCmd has been requested from the parent service (application), the corresponding \n
+/// Callback function is no longer referred to. \n
+/// If you have already specified the iCmd of revocation has been subject, to return the eFrameworkunifiedStatusOK.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Operation cannot be guaranteed if the number of elements of the array specified by the address of the pointer (puiCmdArray)
+/// to the array of commands/requests on the service protocol does not match the number of arrays specified by the number of hadles to cancel (uiCommandCount).
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
+/// FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
+/// FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
+/// FrameworkunifiedDetachServiceFromDispatcher
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDetachParentCallbacksFromDispatcher(HANDLE hApp, const PUI_32 puiCmdArray, UI_32 uiCommandCount);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachServiceFromDispatcher
+/// \~english @par Brief
+/// Disconnect the service from Dispatcher, and API to cancel all the associated callbacks.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pServiceName
+/// PCSTR - Pointer to the service name
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Pointer (pServiceName) to the service name specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - Information corresponding to the service name(pServiceName) specified in the argument is not registered in
+/// Dispatcher. [eFrameworkunifiedStatusFail]
+/// - Callback information(Event information) of the service name(pServiceName) specified in the argument is not
+/// registered. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Cancel the entry of service information from Dispatcher, and cancel all callback \n
+/// information(event information) related to the service.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Service registration available/API processing when an event is registered:delete service, delete event, return eFrameworkunifiedStatusOK
+/// - Service registration available/API processing when an event is registered:delete service, return eFrameworkunifiedStatusOK
+/// - Service registration available/API processing when an event is registered:delete event, return eFrameworkunifiedStatusOK
+/// - Service registration available/API processing when an event is registered:nothing, return eFrameworkunifiedStatusFail
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
+/// FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedAttachParentCallbacksToDispatcher
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDetachServiceFromDispatcher(HANDLE hApp, PCSTR pServiceName);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSubscribeNotificationsWithCallback
+/// \~english @par Brief
+/// API to send a message to the notification service in order to register multiple Notification of list format.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pNtfyHandler
+/// FrameworkunifiedNotificationCallbackHandler - Pointer to a structure of the Notification Handler
+/// \~english @param [in] uiHandlerCount
+/// UI_32 - Notification Handler number
+/// \~english @par
+/// FrameworkunifiedNotificationCallbackHandler Structure
+/// \~english @code
+/// #define MAX_STRING_SIZE_NOTIFICATION 64
+/// typedef struct _FrameworkunifiedNotificationCallbackHandler
+/// {
+/// CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name */
+/// CbFuncPtr callBack; /* Callback function pointer */
+/// }FrameworkunifiedNotificationCallbackHandler;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - NS_NPPService of the process has been started.
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified in the argument.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Notification Handler number specified in the argument (uiHandlerCount) has exceeded the maximum number of
+/// Notification. [eFrameworkunifiedStatusFail]
+/// - The acquisition of the buffer for storing a plurality of information of Notification Handler specified by
+/// the argument has failed. [eFrameworkunifiedStatusInvldParam]
+/// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+/// [eFrameworkunifiedStatusFail]
+/// - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
+/// 20byte) [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - It failed to shared memory access for transmission of the session message for the NPP Service.
+/// [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// The Callback information of multiple Notification upon receipt that is specified in the form of a list, \n
+/// set to the notification service (NS_NPPService). \n
+/// In addition, collectively set the Callback information at the time of multiple Notification received that \n
+/// have been specified in the list format to Dispatcher.\n
+/// When the notification service receives the public message of the Notification, it sends a NPS_NOTIFY_EV_REQ \n
+/// message to the client that has registered the Notification. The client having received the NPS_NOTIFY_EV_REQ
+/// \n
+/// message, based on the Callback information registered in the Dispatcher, call a Callback corresponding to the
+/// \n
+/// Notification.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Operation is not guaranteed if the number of elemets of the array entity indicated by the address of the pointer (pNtfyHandler)
+/// to the Notification Handler structure does not match the number of arrays specified by the Notification Handler number (uiHandlerCount).
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
+/// FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationsWithCallback
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationsWithCallback(HANDLE hApp, const FrameworkunifiedNotificationCallbackHandler *pNtfyHandler,
+ UI_32 uiHandlerCount);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSubscribeNotificationWithCallback
+/// \~english @par Brief
+/// API to set the Callback information at the time of Notification received Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - Application handle
+/// \~english @param [in] pNotification
+/// PCSTR - Notification String.
+/// \param [in] fpOnCmd
+/// CbFuncPtr - Callback function that will be called on receiving pNotification.
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusDuplicate Duplication error of entry
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - NS_NPPService of the process has been started.
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - CbFuncPtr specified in the argument (fpOnCmd) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Can not add HANDLE specified in the argument (hApp) and CbFuncPtr specified in the argument (fpOnCmd) to
+/// notification list [eFrameworkunifiedStatusDuplicate]
+/// - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
+/// 20byte) [eFrameworkunifiedStatusInvldHandle]
+/// - Notification name specified by the argument has already been registered in the Dispatcher.
+/// [eFrameworkunifiedStatusDuplicate]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - It failed to shared memory access for transmission of the session message for the NPP Service.
+/// [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// The Callback information at the time of Notification received that has been specified by the argument, \n
+/// set in the notification service (NS_NPPService).\n
+/// Also, it sets the Callback information at the time of Notification received that has been specified by \n
+/// the argument to the Dispatcher.\n
+/// When the notification service receives the public message of the Notification, it sends a NPS_NOTIFY_EV_REQ \n
+/// message to the client that has registered the Notification. The client having received the NPS_NOTIFY_EV_REQ
+/// \n
+/// message, based on the Callback information registered in the Dispatcher, call a Callback corresponding to the
+/// \n
+/// Notification.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
+/// FrameworkunifiedNPPublishNotification, FrameworkunifiedUnsubscribeNotificationWithCallback,
+/// FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationWithCallback(HANDLE hApp, PCSTR pNotification, CbFuncPtr fpOnCmd);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedUnsubscribeNotificationsWithCallback
+/// \~english @par Brief
+/// API to bulk delete the Callback information at the time of multiple Notification received from the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pNtfyHandler
+/// FrameworkunifiedNotificationCallbackHandler - Pointer to a structure of the Notification Handler
+/// \~english @param [in] uiHandlerCount
+/// UI_32 - Notification Handler number
+/// \~english @par
+/// FrameworkunifiedNotificationCallbackHandler Structure
+/// \~english @code
+/// #define MAX_STRING_SIZE_NOTIFICATION 64
+/// typedef struct _FrameworkunifiedNotificationCallbackHandler
+/// {
+/// CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name */
+/// CbFuncPtr callBack; /* Callback function pointer */
+/// }FrameworkunifiedNotificationCallbackHandler;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - NS_NPPService of the process has been started.
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified in the argument.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Notification Handler number specified in the argument (uiHandlerCount) has exceeded the maximum number of
+/// Notification. [eFrameworkunifiedStatusFail]
+/// - In Notification name in the structure of the Notification Handler specified in the argument, there is not
+/// applicable in those registered as Callback information. [eFrameworkunifiedStatusFail]
+/// - The acquisition of the buffer for storing a plurality of information of Notification Handler specified by
+/// the argument has failed. [eFrameworkunifiedStatusInvldParam]
+/// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+/// [eFrameworkunifiedStatusFail]
+/// - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
+/// 20byte) [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - It failed to shared memory access for transmission of the session message for the NPP Service.
+/// [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// The Callback information of multiple Notification upon receipt that is specified in the form of a list, \n
+/// collectively removed from the notification service (NS_NPPService). \n
+/// In addition, the bulk delete the Callback information at the time of multiple Notification received that \n
+/// are specified in the form of a list from the Dispatcher.\n
+/// By bulk delete the Callback information, if the notification services receives the public message
+/// Notification, \n
+/// because the Notification information applicable also been deleted, Callback does not occur.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPRegisterNotifications,
+/// FrameworkunifiedNPUnRegisterNotifications,
+/// FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
+/// FrameworkunifiedSubscribeNotificationsWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationWithCallback
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationsWithCallback(HANDLE hApp, const FrameworkunifiedNotificationCallbackHandler *pNtfyHandler,
+ UI_32 uiHandlerCount);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedUnsubscribeNotificationWithCallback
+/// \~english @par Brief
+/// API to detach a notification callback from the dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - Application handle
+/// \~english @param [in] pNotification
+/// PCSTR - Notification String.
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - NS_NPPService of the process has been started.
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
+/// - Length of pointer (pNotification) is 0 to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Missing HANDLE specified in the argument (hApp) in notification list [eFrameworkunifiedStatusFail]
+/// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+/// [eFrameworkunifiedStatusFail]
+/// - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
+/// 20byte) [eFrameworkunifiedStatusInvldHandle]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - It failed to shared memory access for transmission of the session message for the NPP Service.
+/// [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// The Callback information at the time of Notification received that has been specified by the argument, \n
+/// to remove from the notification service (NS_NPPService).\n
+/// Also, delete the Callback information of Notification upon receipt, which is specified by the argument \n
+/// from the Dispatcher.
+/// By bulk delete the Callback information, if the notification services receives the public message
+/// Notification, \n
+/// because the Notification information applicable also been deleted, Callback does not occur.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPRegisterNotifications,
+/// FrameworkunifiedNPUnRegisterNotifications,
+/// FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
+/// FrameworkunifiedSubscribeNotificationsWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationsWithCallback
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationWithCallback(HANDLE hApp, PCSTR pNotification);
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetAppName
+/// \~english @par Brief
+/// Get the application thread name that is registered with the dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval PCSTR Pointer to application thread name
+/// \~english @retval NULL NULL pointer (Failed to get application name)
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// \~english @par Detail
+/// Get the application thread name that was registered at initialization of dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedDispatcherWithArguments, FrameworkunifiedDispatcher, FrameworkunifiedCreateDispatcherWithoutLoop
+////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR FrameworkunifiedGetAppName(HANDLE hApp);
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSetThreadSpecificData
+/// \~english @par Brief
+/// Set pointer to the application-specific data to the application HANDLE.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] data
+/// PVOID - Pointer to the application-specific data
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// This API sets application-specific data to internal pointer inside application framwork HANDLE.\n
+/// You can share data in callback function or thread.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedGetThreadSpecificData
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSetThreadSpecificData(HANDLE hApp, PVOID data);
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetThreadSpecificData
+/// \~english @par Brief
+/// Get pointer to the application-specific data from the application HANDLE.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @retval PVOID pointer to application-specific data.
+/// \~english @retval NULL NULL pointer(failed to get data)
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// \~english @par Detail
+/// This API gets application-specific data that set with FrameworkunifiedSetThreadSpecificData from internal pointer inside
+/// application framwork HANDLE.\n
+/// You can share data in callback function or thread.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedSetThreadSpecificData
+////////////////////////////////////////////////////////////////////////////////////////////
+PVOID FrameworkunifiedGetThreadSpecificData(HANDLE hApp);
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOpenService
+/// \~english @par Brief
+/// API to acquire a service HANDLE.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pServiceName
+/// PCSTR - Pointer to service name
+/// \~english @retval HANDLE Handle to the service
+/// \~english @retval NULL NULL pointer (Failed to get service handle)
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// - Only when will open the session by FrameworkunifiedOpenSession, you can use the handle obtained by this API.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// - Service name specified in the argument (pServiceName) is NULL. [NULL]
+/// - Service name specified in the argument (pServiceName) is not appropriate (NULL, over 20byte). [NULL]
+/// - Normalized service name for message queue is not appropriate (over 15byte). [NULL]
+/// - Can not be acquired memory for message queue infomation(malloc). [NULL]
+/// - Can not be acquired memory for message queue name(malloc). [NULL]
+/// - Failed to open message queue(mq_open). [NULL]
+/// \~english @par Detail
+/// Create a communication resource for communicating with the specified service , return the HANDLE.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedCloseService, FrameworkunifiedOpenSession
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedOpenService(HANDLE hApp, PCSTR pServiceName);
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCloseService
+/// \~english @par Brief
+/// API to close service HANDLE.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @param [in] hService
+/// HANDLE - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue type of HANDLE specified in the argument (hService) is mismatch.(eQTypeSender or
+/// eQTypeReveiver) [eFrameworkunifiedStatusInvldHndlType]
+/// - Failed to close message queue specified in the argument (hService). [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// This API closes service HANDLE specified by argument.\n
+/// And close message queue of the service.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedOpenService
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedCloseService(HANDLE hApp, HANDLE hService);
+
+//////////////////////////////////////////////////
+// message center functions
+//////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedMcOpenSender
+/// \~english @par Brief
+/// Generate a handle to the message queue for sending.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @param [in] pName
+/// PCSTR - Message queue name of destination service
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// - Message queue name specified in the argument (pName) is NULL. [NULL]
+/// - Message queue name specified in the argument (pName) is not appropriate (NULL, over 20byte). [NULL]
+/// - Normalized message queue name is not appropriate (over 15byte). [NULL]
+/// - Can not be acquired memory for message queue infomation(malloc). [NULL]
+/// - Can not be acquired memory for message queue name(malloc). [NULL]
+/// - Failed to open message queue(mq_open). [NULL]
+/// \~english @par Detail
+/// This API generates and returns a handle to the message queue for sending of service.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedMcClose
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedMcOpenSender(HANDLE hApp, PCSTR pName);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedMcClose
+/// \~english @par Brief
+/// API for closing a message queue handle
+/// \~english @param [in] hService
+/// HANDLE - Handle for services (handle obtained by FrameworkunifiedMcOpenSender)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hService specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hService specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle in the handle (hService) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hService) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - If the message queue types of the handles (hService) specified in the arguments do not match, [eFrameworkunifiedStatusInvldHandle]
+/// - Closing the message queue for the handle (hService) specified in the arguments fails, [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// Closes the message queue for the specified service.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedMcOpenSender
+///
+/// To close message queue handle to a service
+///
+/// \param [in] hService
+/// HANDLE - Handle to a service
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedMcClose(HANDLE hService);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSendMsg
+/// \~english @par Brief
+/// Asynchronous API that sends messages to the service
+/// \~english @param [in] hService
+/// HANDLE - Handle for services (handle acquired by FrameworkunifiedMcOpenSender, etc.)
+/// \~english @param [in] uiCmd
+/// UI_32 - Command ID, Request ID, and Authorization ID on the service's protocol
+/// \~english @param [in] uiLength
+/// UI_32 - Data size to be sent (0 to 4294967255)
+/// \~english @param [in] pData
+/// PCVOID - Pointer to the data to send
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Handles for services must be acquired (FrameworkunifiedMcOpenSender, etc.).
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hService specified in the arguments is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - If the hService specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue name of the handle (hService) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue of the handle (hService) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle in the handle (hService) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hService) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the send data (pData) specified in the parameter is NULL and the data length (uiLength) is not 0, [eFrameworkunifiedStatusInvldBuf]
+/// - When the name of the message queue handle in the handle (hService) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldQName]
+/// - If the name of the message queue handle (hService) specified in the argument exceeds 20 bytes, [eFrameworkunifiedStatusInvldQName]
+/// - When the message queue type of the handle (hService) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
+/// - Failed to access shared memory for sending messages for sessions for services [eFrameworkunifiedStatusErrOther]
+/// - When the size (uiLength) of the data to be sent specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Messages are sent to the service using the message queue associated with the service handle.\n
+/// A destination is a service specified as arguments such as FrameworkunifiedMcOpenSender when a service handle was created.\n
+/// This API operates asynchronously.
+/// \~english @par
+/// - The consistency between the size of the data to be sent and the size of the area indicated by the pointer to the data to be sent is ensure by the caller.
+/// - The maximum data size (uiLength) described above is a theoretical value. The maximum data size that can be actually used depends on the environment requirements.\n
+/// The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
+/// Message header section\n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Method
+/// \~english @see FrameworkunifiedMcOpenSender, FrameworkunifiedOpenService
+///
+/// Send message to the service.
+///
+/// \param [in] hService
+/// HANDLE - Handle to the service.
+/// \param [in] uiCmd
+/// UI_32 - Protocol message id.
+/// \param [in] uiLength
+/// UI_32 - Length of the data to be send.
+/// \param [in] pData
+/// PVOID - Pointer to the data.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSendMsg(HANDLE hService, UI_32 uiCmd, UI_32 uiLength, PCVOID pData);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedSendPriorityMsg
+/// Send message to a service. It places your message at the top of the services message queue.
+/// \b Applications should not use this unless absolutely required - use cases must be reviewed by
+/// \b Framework Team.
+///
+/// \param [in] hService
+/// HANDLE - Handle to the service.
+/// \param [in] uiCmd
+/// UI_32 - Protocol message id.
+/// \param [in] uiLength
+/// UI_32 - Length of the data to be send.
+/// \param [in] pData
+/// PVOID - Pointer to the data.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSendPriorityMsg(HANDLE hService, UI_32 uiCmd, UI_32 uiLength, PCVOID pData);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSendSelf
+/// \~english @par Brief
+/// Asynchronous APIs that send messages to the application's own Dispatcher
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] iCmd
+/// UI_32 - Command ID, Request ID, and Authorization ID on the service's protocol
+/// \~english @param [in] length
+/// UI_32 - Data size to be sent (0 to 4294967255)
+/// \~english @param [in] data
+/// PCVOID - Pointer to the data to send
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hService specified in the arguments is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - If the hService specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle for the own Dispatcher in the handle (hService) specified by the arguments is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - Invalid message queue handle for its own Dispatcher in the handle (hService) specified by the arguments [eFrameworkunifiedStatusInvldHandle]
+/// - When the send data (data) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldBuf]
+/// - When the service name of the handle (hService) specified in the arguments is not appropriate (when the service name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue handle for the own Dispatcher in the handle (hService) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - Failed to access shared memory for sending messages for its own Dispatcher [eFrameworkunifiedStatusErrOther]
+/// - When the message queue type for the own Dispatcher of the handle (hService) specified in the parameter is not the send type [eFrameworkunifiedStatusInvldHndlType]
+/// - If the message queue for your Dispatcher is full [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptor for sending messages for own Dispatcher [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending messages for the Dispatcher itself [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for your Dispatcher [eFrameworkunifiedStatusFail]
+/// - When the size (length) of the data to be sent specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Send messages to the application's own Dispatcher.\n
+/// This API operates asynchronously.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - The maximum data size (length) described above is a theoretical value. The maximum data size that can be actually used depends on the environment requirements.\n
+/// The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
+/// Message header section\n
+/// - Operation cannot be guaranteed when the size of the allocated area indicated by the address of the pointer (data) to the data buffer does not match the size specified by the size of the data buffer (length).
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Method
+/// \~english @see FrameworkunifiedSendMsg
+///
+/// Send message to the hApp.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the dispatcher to receive message
+/// \param [in] iCmd
+/// UI_32 - Protocol message id.
+/// \param [in] length
+/// UI_32 - Length of the data to be send.
+/// \param [in] data
+/// PVOID - Pointer to the data.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSendSelf(HANDLE hApp, UI_32 iCmd, UI_32 length, PCVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedInvokeSync
+/// \~english @par Brief
+/// API for synchronous communication of the message.
+/// \~english @param [in] hService
+/// HANDLE - Handle for the message queue
+/// \~english @param [in] iCmd
+/// UI_32 - Command ID
+/// \~english @param [in] msgLenght
+/// UI_32 - Data length of the send message
+/// \~english @param [in] msgData
+/// PCVOID - Pointer to send the message
+/// \~english @param [in] responseLength
+/// UI_32 - Size of the received message storage buffer
+/// \~english @param [out] responseData
+/// PVOID - Pointer to the received message storage buffer
+/// \~english @param [out] receivedLength
+/// UI_32 * - Data length of the received message
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// - Handles for message queue must be acquired (FrameworkunifiedMcOpenSender, etc.).
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE(hService) specified in the argument is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
+/// - Send message queue HANDLE in HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Send message queue HANDLE in HANDLE(hService) specified in the argument is not appropriate (which is
+/// invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE for the response received is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE for the response received is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - The size of the received message storage buffer specified by the argument is not 0, and the pointer is NULL
+/// to the received message storage buffer. [eFrameworkunifiedStatusInvldHandle]
+/// - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
+/// - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
+/// - Message queue name of HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Message queue name of HANDLE(hService) specified in the argument exceeds 20byte. [eFrameworkunifiedStatusInvldQName]
+/// - Message queue HANDLE name in the HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE name in the HANDLE(hService) specified in the argument exceeds 20byte.
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue type of HANDLE(hService) specified in the argument is not a transmission type.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - To the session message queue is full. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmit and receive file descriptor of the session message. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) occurs during the transmission and reception of the session
+/// message. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of the transmit buffer of the message for the session to the service is illegal.
+/// [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the sending and receiving of a session message. [eFrameworkunifiedStatusFail]
+/// - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
+/// - It failed to Socket connection of the response message for the reception. [eFrameworkunifiedStatusFail]
+/// - The wait control of the response message received failed. [eFrameworkunifiedStatusFail]
+/// - Interruption by the system call (signal) to wait in the response message received has occurred.
+/// [eFrameworkunifiedStatusFail]
+/// - In response message at the time of failure to receive, it failed to re-connection of the Socket.
+/// [eFrameworkunifiedStatusBadConnection]
+/// \~english @par Detail
+/// Under the following procedure, perform synchronous communication of the message.
+/// - During the first call, it generates a message queue name for the response message received by the
+/// McCreateInvokerName(),
+/// and to open the message queue for the response message received by the McOpenSyncReceiver ().
+/// - By the McInvokeSync(), perform synchronous communication of the message.
+/// \~english @par
+/// If the received response message is greater than the storage buffer, to store up to store buffer length.\n
+/// The user is able to detect an abnormality by comparing store buffer length and a received message length.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedSendMsg
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedInvokeSync(HANDLE hService, UI_32 iCmd, UI_32 msgLenght, PCVOID msgData, UI_32 responseLength,
+ PVOID responseData, UI_32 *receivedLength);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSetSyncResponseData
+/// \~english @par Brief
+/// API to set the response data of the synchronization communication.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @param [in] data
+/// PVOID - Pointer to the response data
+/// \~english @param [in] size
+/// UI_32 - The response data size
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE(hApp) specified in the argument is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - Pointer to the response data(data) specified in the argument is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - If the size (size) of the response data specified in the arguments cannot be allocated, [eFrameworkunifiedStatusFail]
+/// - When the response data size (size) specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Store the response data specified in the storage area of the response data \n
+/// in the handle specified by the argument.
+/// \~english @par
+/// Response data set by this PROCESS is automatically sent by the Dispatcher after the callback function completes execution, so the API does not need to send the response data.
+/// \~english @par
+/// - The response data is registered to the heap.
+/// - If the pointer (data) to the response data is normal (not NULL) and 0 is specified for the size (size) of the response data, the response data is set to empty.
+/// - The maximum size (size) of the response data described above is a theoretical value. The maximum size that can be used is environment-dependent.\n
+/// The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
+/// Message header section and response message header section\n
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedInvokeSync
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSetSyncResponseData(HANDLE hApp, PVOID data, UI_32 size);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetMsgLength
+/// \~english @par Brief
+/// API to retrieve the data length of the received message.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval UI_32 The data length of the received message
+/// \~english @retval 0 Error or No data
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE(hApp) specified in the argument is NULL. [0]
+/// - HANDLE(hApp) specified in the argument is not appropriate (which is invalid). [0]
+/// \~english @par Detail
+/// To return the data length of the received messages in the handle(hApp) \n
+/// that you specified in the argument as a return value. \n
+/// It is possible to get by to use when the message was received. \n
+/// If the return value is 0, there is a need for caution because of either \n
+/// error or no data.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see None
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 FrameworkunifiedGetMsgLength(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetMsgProtocol
+/// \~english @par Brief
+/// API to get the Command ID/Request ID/Approval ID on the protocol.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval UI_32 Command ID/Request ID/Approval ID
+/// \~english @retval 0 Error
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE(hApp) specified in the argument is NULL. [0]
+/// - HANDLE(hApp) specified in the argument is not appropriate (which is invalid). [0]
+/// \~english @par Detail
+/// To return the Command ID/Request ID/Approval ID that are within \n
+/// the handle(hApp) specified in the argument as a return value.
+/// \~english @par
+/// The application shall execute this API using an application handle passed as an argument to the callback function.
+/// (Messages are received within the framework, stored in the application handles (hApp),
+/// and then executed by the application callback functions.)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see None
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 FrameworkunifiedGetMsgProtocol(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetMsgDataOfSize
+/// \~english @par Brief
+/// API to get the data of the received message
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [out] pData
+/// PVOID - Pointer to the buffer where the received message data will be copied
+/// \~english @param [in] uiSize
+/// UI_32 - Size of the buffer to which received message data is copied
+/// \~english @param [in] eRetrieveMethod
+/// ESMRetrieveTypes - Shared memory-acquisition-type (optional; eSMRRelease if not specified)
+/// \~english @par
+/// enum ESMRetrieveTypes variables
+/// - eSMRRelease = 0 : The shared memory data is deleted after acquisition.
+/// - eSMRRetain = 1 : Shared memory data is maintained.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
+/// - When the data size is larger than the buffer size (uiSize) specified by the parameter, [eFrameworkunifiedStatusInvldBufSize]
+/// - If the buffer (pData) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldBuf]
+/// - Incoming messages are incorrect [eFrameworkunifiedStatusInvldHndlType]
+/// - If the shared memory ID specified in the received message is invalid [FrameworkunifiedStatusErrOther]
+/// - If accessing shared memory (shm_open/fstat/mmap) fails [eFrameworkunifiedStatusErrOther]
+/// - If the size of the data in shared memory is larger than the buffer size (uiSize) specified by the arguments [FrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Receive message data is acquired from the receive buffer in the application handle (hApp) or the shared memory (message is stored in the shared memory when the size is 4096 bytes or more), and is stored in the area passed in the parameter pData.\n
+/// When data exists in the shared memory, the data is held or deleted in the shared memory by specifying the eRetrieveMethod of arguments of this API
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Execute this API using an application handle passed as an argument of a callback function.
+/// (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
+/// - Before executing this API, the size of the received message must be checked by the FrameworkunifiedGetMsgLength to determine whether data is to be retained in the shared memory.
+/// - If it is kept in shared memory, the application must execute the FrameworkunifiedClearMsgData and delete it.
+/// - If an invalid value other than the ESMRetrieveTypes defined value is specified for the shared memory allocation type (eRetrieveMethod), the shared memory allocation type behaves as if eSMRRetain were specified.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedClearMsgData
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [out] pData
+/// PVOID - Buffer to which the received message data will be copied.
+/// \param [out] uiSize
+/// UI_32 - Size of the buffer to which the received message data will be copied.
+/// \param [in] eRetrieveMethod
+/// ESMRetrieveTypes -
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \~english @par Type
+/// Sync
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedGetMsgDataOfSize(HANDLE hApp, PVOID pData, UI_32 uiSize, ESMRetrieveTypes eRetrieveMethod = eSMRRelease);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetDataPointer
+/// \~english @par Brief
+/// API to get start address of data from received message
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [out] datap
+/// void** - Pointer to the data of the received message
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the receive buffer address of the handle (hApp) specified in the parameter is NULL [eFrameworkunifiedStatusInvldBufSize]
+/// - When the pointer (datap) to the data of the received message specified by the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// This function gets the received message data from the receive buffer in the application handle (hApp)
+/// and returns the start address of the received message in the argument datap.\n
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - This API can be executed for messages that do not use shared memory (messages with a message size less than 4096 bytes).
+/// Check the size of received messages in the FrameworkunifiedGetMsgLength prior to executing this API.
+/// - Since the pointers acquired by this API are part of the Dispatcher, the pointers acquired by this API must not be released by the application.
+/// - Execute this API using an application handle passed as an argument of a callback function.
+/// (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [out] datap
+/// void ** - Pointer to which the receive message data.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+/// \~english @par Type
+/// Sync
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedGetDataPointer(HANDLE hApp, void **datap);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetMsgSrc
+/// \~english @par Brief
+/// API to get the application name of the sender of the received message
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @retval PCSTR Name of the application from which the message was sent
+/// \~english @retval NULL NULL pointer (Acquisition failure)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [NULL]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
+/// \~english @par Detail
+/// This API returns the application name of the sender of the received message.\n
+/// The application name acquired by this API is used for establishing sessions, creating message queues for responses,
+/// and registering/releasing callbacks to the Dispatcher.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Execute this API using an application handle passed as an argument of a callback function.
+/// (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
+/// - Since the pointers acquired by this API are part of the Dispatcher, the pointers acquired by this API must not be released by the application.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedOpenService, FrameworkunifiedCreateSession, FrameworkunifiedMcOpenSender, \n
+/// FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbacksToDispatcher, \n
+/// FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher, FrameworkunifiedDetachServiceFromDispatcher
+///
+/// Source of the message.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+///
+/// \return pSourceName
+/// PCSTR - Source name of the message.
+/// \~english @par Type
+/// Sync
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR FrameworkunifiedGetMsgSrc(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetLastNotification
+/// \~english @par Brief
+/// Get the most recent Notification names
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @retval PCSTR Pointers to Notification
+/// \~english @retval NULL NULL pointer (Acquisition failure)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [NULL]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
+/// \~english @par Detail
+/// This API acquires and returns the most recent Notification name from the received data.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Execute this API using an application handle passed as an argument of a callback function.
+/// (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
+/// - Since the pointers acquired by this API are part of the Dispatcher, the pointers acquired by this API must not be released by the application.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedNPPublishNotification
+///
+/// Returns the last notification string that was received.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+///
+/// \return pSourceName
+/// PCSTR - the last notification name that has been received.
+/// \~english @par Type
+/// Sync
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR FrameworkunifiedGetLastNotification(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedClearMsgData
+/// \~english @par Brief
+/// API to delete shared memory used for sending and receiving messages
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @retval eFrameworkunifiedStatusOK Successful or Use Shared Memory Messages
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldID Invalid ID
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
+/// - Framework generating failure [eFrameworkunifiedStatusInvldParam]
+/// - If the shared memory ID specified in the message is invalid [eFrameworkunifiedStatusInvldParam]
+/// - If an attempt is made to remove a non-existent shared memory, [eFrameworkunifiedStatusInvldID]
+/// - If accessing shared memory (shm_unlink) fails, [eFrameworkunifiedStatusFail]
+/// - When the receive buffer address of the handle (hApp) specified in the parameter is NULL [eFrameworkunifiedStatusInvldBuf]
+/// \~english @par Detail
+/// This API deletes the shared memory used for sending and receiving messages.\n
+/// When an application gets received messages by specifying eSMRRetain as FrameworkunifiedGetMsgDataOfSize, it deletes the shared memories by using this API...\n
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - The shared memory information to be deleted by this API shall be executed by the application on the message receiving side because it is obtained from the received message.\n
+/// - Execute this API using an application handle passed as an argument of a callback function.
+/// (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedSendMsg, FrameworkunifiedGetMsgDataOfSize
+///
+/// Explicit call to clear the data from shared memory.
+/// To be used incase of forwarding messages ???
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+/// \~english @par Type
+/// Sync
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedClearMsgData(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedForwardMessage
+/// Forward a message to a service or a client.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the service
+/// \param [in] hChildQ
+/// HANDLE - Handle to the child thread
+/// \param [in] iCmd
+/// UI_32 - .
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedGetSystemInfo
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedForwardMessage(HANDLE hApp, HANDLE hChildQ, UI_32 iCmd);
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+// Notification & Persistence Service
+////////////////////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPRegisterNotification
+/// \~english @par Brief
+/// To the notification service to register the Notification, API to send a message.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pNotification
+/// PCSTR - A pointer to the Notification name
+/// \~english @param [in] max_length
+/// UI_32 - The maximum length of the Notification message (64byte below)
+/// \~english @param [in] persType
+/// \~english @par
+/// EFrameworkunifiedNotificationType - Type of Notification
+/// enum EFrameworkunifiedNotificationType Variable
+/// - eFrameworkunifiedNotificationVar : Non Persistent. Not stored locally by NPS.
+/// - eFrameworkunifiedStateVar : Non Persistent. stored locally by NPS.
+/// - eFrameworkunifiedPersistedStateVar : Not to be used. Persistent. Also stored locally by NPS.
+/// - eFrameworkunifiedPersistedStateUserVar : Not to be used. User specific Persistent. Also stored locally by NPS.
+/// - eFrameworkunifiedImmediatePersistedStateVar : Not to be used.
+/// - eFrameworkunifiedUnknown : Not to be used. This is not a type of notification.
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - NS_NPPService of the process has been started.
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - It is not appropriate length of the specified Notification name in argument(0, or more than a 64byte).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+/// [eFrameworkunifiedStatusFail]
+/// - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
+/// 20byte) [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - It failed to shared memory access for transmission of the session message for the NPP Service.
+/// [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// To the notification service (NS_NPPService) to register the Notification, \n
+/// send a message for the Notification registration.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
+/// FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationWithCallback,
+/// FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPRegisterNotification(HANDLE hApp, PCSTR pNotification, const UI_32 max_length,
+ const EFrameworkunifiedNotificationType persType);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPSetPersistNotfnDefaultValue
+/// API to send message to Notification Service to set the default value for the notification.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] pNotification
+/// PCSTR - Name of Notification
+/// \param [in] data
+/// PVOID - Set the default value for the notification.
+/// \param [in] uiLength
+/// const UI_32 - length of the data
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPSetPersistNotfnDefaultValue(HANDLE hApp, PCSTR pNotification, PVOID data, const UI_32 uiLength);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPSetPersistentNotfnType
+/// \~english @par Brief
+/// API to send message to Notification Service to set persistent notification category.
+/// \~english @param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \~english @param [in] pNotification
+/// PCSTR - Name of Notification
+/// \~english @param [in] ePersistCategory
+/// EFrameworkunifiedPersistCategory - Persistent Category
+/// \~english @return status
+/// EFrameworkunifiedStatus - success or error
+/// \~english @code
+/// typedef enum _EFrameworkunifiedNotificationType
+/// {
+/// eFrameworkunifiedNotificationVar = 0, /* Not persistent (not retained by NPS) */
+/// eFrameworkunifiedStateVar, /* Not persistent (held by NPS) */
+/// eFrameworkunifiedPersistedStateVar, /* persistent. Only kept in NPS */
+/// eFrameworkunifiedPersistedStateUserVar, /* Invalid handle type. Only kept in NPS */
+/// eFrameworkunifiedImmediatePersistedStateVar, /* Invalid handle. See \ref
+/// FrameworkunifiedNPRegisterImmediatePersistNotification */
+/// eFrameworkunifiedUnknown /* No Notification typing. Not recommended */
+/// } EFrameworkunifiedNotificationType;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see none
+///
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPSetPersistentNotfnType(HANDLE hApp, PCSTR pNotification, EFrameworkunifiedPersistCategory ePersistCategory);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPRegisterImmediatePersNotification
+/// \~english @par Brief
+/// API to send message to Notification Service to register a immediate notification
+/// \~english @param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \~english @param [in] pNotification
+/// PCSTR - Name of Notification
+/// \~english @param [in] max_length
+/// const UI_32 - Max size of the notification message (should be <= 1Kb)
+/// \~english @param [in] delay
+/// const UI_32 - Min time interval between every persist (in sec)
+/// \~english @return status
+/// EFrameworkunifiedStatus - success or error
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the pNotification to the Notification specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the length of the Notification specified by the arguments is 0, [eFrameworkunifiedStatusInvldParam]
+/// - If the length of the Notification specified in the arguments is 64 (MAX_STRING_SIZE_NOTIFICATION) or greater [eFrameworkunifiedStatusInvldParam]
+/// - Failed to get buffers to store Notification [eFrameworkunifiedStatusInvldParam]
+/// - When memory could not be allocated due to the allocation of message-sending buffers (malloc),... [eFrameworkunifiedStatusFail]
+/// - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// This API registers a Notification to the notification service (NS_NPPService).\n
+/// By sending a Notification registration message to the notification service, the specified Notification is registered in the received notification service.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
+/// FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationWithCallback,FrameworkunifiedSubscribeNotificationsWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationsWithCallback
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPRegisterImmediatePersistNotification(HANDLE hApp, PCSTR pNotification, const UI_32 max_length,
+ const UI_32 delay);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPPersistentSync
+/// Processing which synchronizes by NPPService (syncfs)
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPPersistentSync(HANDLE hApp);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPRegisterNotifications
+/// \~english @par Brief
+/// API to send a message to the notification service in order to register multiple Notification of list format.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pList
+/// FrameworkunifiedNotificationsList - Pointer to the Notification list to be registered
+/// \~english @param [in] uiListLength
+/// UI_32 - List length
+/// \~english @par
+/// FrameworkunifiedNotificationsList Structure
+/// \~english @code
+/// #define MAX_STRING_SIZE_NOTIFICATION 64
+/// typedef struct _FrameworkunifiedNotificationsList
+/// {
+/// CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name */
+/// UI_32 uiLengthData; /* Notification Name length(64byte below) */
+/// EFrameworkunifiedNotificationType persType; /* Notification Type */
+/// }
+/// @endcode
+/// \~english @par
+/// enum EFrameworkunifiedNotificationType Variable
+/// - eFrameworkunifiedNotificationVar : Non Persistent. Not stored locally by NPS.
+/// - eFrameworkunifiedStateVar : Non Persistent. stored locally by NPS.
+/// - eFrameworkunifiedPersistedStateVar : Not to be used. Persistent. Also stored locally by NPS.
+/// - eFrameworkunifiedPersistedStateUserVar : Not to be used. User specific Persistent. Also stored locally by NPS.
+/// - eFrameworkunifiedImmediatePersistedStateVar : Not to be used.
+/// - eFrameworkunifiedUnknown : Not to be used. This is not a type of notification.
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - NS_NPPService of the process has been started.
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - A pointer to the Notification list to register specified in the argument (pList) is NULL.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - And fail to acquire the buffer for storing a plurality Notification. [eFrameworkunifiedStatusInvldParam]
+/// - List specified in the argument length (uiListLength) has exceeded the maximum number of Notification.
+/// [eFrameworkunifiedStatusFail]
+/// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+/// [eFrameworkunifiedStatusFail]
+/// - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
+/// 20byte) [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - It failed to shared memory access for transmission of the session message for the NPP Service.
+/// [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// This API is to register multiple Notification of list format to the notification service (NS_NPPService).\n
+/// By transmitting multiple Notification registration message to the notification service, Notification \n
+/// specified in the received notification service is registered. \n
+/// It sends a message for multiple Notification registered with the notification service (NS_NPPService) \n
+/// in order to register multiple Notification of list format.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
+/// FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationWithCallback,
+/// FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPRegisterNotifications(HANDLE hApp, const FrameworkunifiedNotificationsList *pList, UI_32 uiListLength);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPUnRegisterNotification
+/// \~english @par Brief
+/// API to send message to Notification Service to remove a notification.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pNotification
+/// PCSTR - A pointer to the Notification name
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - NS_NPPService of the process has been started.
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - It fails to get the buffer that stores the Notification. [eFrameworkunifiedStatusInvldParam]
+/// - It is not appropriate length of the specified Notification name in argument(0, or more than a 64byte).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Can not be acquired memory in the acquisition of buffer for internal processing (malloc). [eFrameworkunifiedStatusFail]
+/// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+/// [eFrameworkunifiedStatusFail]
+/// - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
+/// 20byte) [eFrameworkunifiedStatusInvldHandle]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - It failed to shared memory access for transmission of the session message for the NPP Service.
+/// [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// This API is, to remove the Notification from the notification service (NS_NPPService). \n
+/// By deleting, Notification specified from the notification service will no longer be delivered.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotifications,
+/// FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationWithCallback,
+/// FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPUnRegisterNotification(HANDLE hApp, PCSTR pNotification);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPUnRegisterNotifications
+/// \~english @par Brief
+/// API to send message to Notification Service to delete a notification.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pList
+/// FrameworkunifiedNotificationsList - Pointer to the Notification list that you want to delete
+/// \~english @param [in] uiListLength
+/// UI_32 - List length
+/// \~english @par
+/// FrameworkunifiedNotificationsList Structure
+/// \~english @code
+/// #define MAX_STRING_SIZE_NOTIFICATION 64
+/// typedef struct _FrameworkunifiedNotificationsList
+/// {
+/// CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name */
+/// UI_32 uiLengthData; /* Notification Name length(64byte below) */
+/// EFrameworkunifiedNotificationType persType; /* Notification Type */
+/// }
+/// @endcode
+/// \~english @par
+/// enum EFrameworkunifiedNotificationType Variable
+/// - eFrameworkunifiedNotificationVar : Non Persistent. Not stored locally by NPS.
+/// - eFrameworkunifiedStateVar : Non Persistent. stored locally by NPS.
+/// - eFrameworkunifiedPersistedStateVar : Not to be used. Persistent. Also stored locally by NPS.
+/// - eFrameworkunifiedPersistedStateUserVar : Not to be used. User specific Persistent. Also stored locally by NPS.
+/// - eFrameworkunifiedImmediatePersistedStateVar : Not to be used.
+/// - eFrameworkunifiedUnknown : Not to be used. This is not a type of notification.
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - NS_NPPService of the process has been started.
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - It fails to get the buffer that stores multiple Notification. [eFrameworkunifiedStatusInvldParam]
+/// - List specified in the argument length (uiListLength) has exceeded the maximum number of Notification.
+/// [eFrameworkunifiedStatusFail]
+/// - Can not be acquired memory in the acquisition of buffer for internal processing (malloc). [eFrameworkunifiedStatusFail]
+/// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+/// [eFrameworkunifiedStatusFail]
+/// - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
+/// 20byte) [eFrameworkunifiedStatusInvldHandle]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - It failed to shared memory access for transmission of the session message for the NPP Service.
+/// [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// This API is, delete multiple Notification of list format from the notification service (NS_NPPService). \n
+/// By deleting, Notification specified from the notification service will no longer be delivered.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotification,
+/// FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
+/// FrameworkunifiedUnsubscribeNotificationWithCallback,
+/// FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPUnRegisterNotifications(HANDLE hApp, const FrameworkunifiedNotificationsList *pList,
+ UI_32 uiListLength);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPPublishNotification
+/// \~english @par Brief
+/// API to send message to Notification Service to notify subscribers
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application
+/// \~english @param [in] pNotification
+/// PCSTR - A pointer to the Notification name
+/// \~english @param [in] pData
+/// VOID * - Data buffer pointer
+/// \~english @param [in] iLength
+/// UI_32 - Size of data buffer
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some kind of error has occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - NS_NPPService of the process has been started.
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Conditions of processing failure
+/// - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldParam]
+/// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
+/// [eFrameworkunifiedStatusFail]
+/// - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
+/// 20byte) [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - It failed to shared memory access for transmission of the session message for the NPP Service.
+/// [eFrameworkunifiedStatusErrOther]
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Detail
+/// Send a message to the notification service(NS_NPPService), and notifies the Subscriber.\n
+/// - Publisher is required registration of Notification in advance FrameworkunifiedNPRegisterNotification.
+/// - Publisher is possible cancellation of the Notification in FrameworkunifiedNPUnRegisterNotification.
+/// - Subscriber need a reception procedure of Notification in advance FrameworkunifiedSubscribeNotification.
+/// - Subscriber is capable of receiving cancellation of the Notification in FrameworkunifiedUnsubscribeNotification.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification
+/// FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotifications
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPPublishNotification(HANDLE hApp, PCSTR pNotification,
+ PCVOID pData, UI_32 iLength);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPReadPersistedData
+/// \~english @par Brief
+/// API to requested the persistent data corresponding to the notification if available
+/// \~english @param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \~english @param [in] pNotification
+/// PCSTR - Name of Notification
+/// \~english @return status
+/// EFrameworkunifiedStatus - success or error
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the pNotification to the Notification specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the length of the Notification specified by the arguments is 0, [eFrameworkunifiedStatusInvldParam]
+/// - Failed to get buffers to store Notification [eFrameworkunifiedStatusInvldParam]
+/// - When memory could not be allocated due to the allocation of message-sending buffers (malloc),... [eFrameworkunifiedStatusFail]
+/// - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for the NPP Service [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see none
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPReadPersistedData(HANDLE hApp, PCSTR pNotification);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPRegisterPersistentFile
+/// \~english @par Brief
+/// APIs that send messages to notification services and register Persistent file tags
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] pTag
+/// PCSTR - Tag name
+/// \~english @param [in] bIsUserFile
+/// BOOL - User specified (TRUE: user-specific/FALSE: all users) (Default:FALSE)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Sends messages to the notification service (NS_NPPService) and registers Persistent file tags.\n
+/// Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Fire and Forget
+/// \~english @see FrameworkunifiedNPLoadPersistentFile, FrameworkunifiedNPReleasePersistentFile
+///
+/// API to send message to Notification Service to add a file path as to be persisted
+///
+/// \param [in] pTag
+/// PCSTR - A unique identifier for the file path specified,
+/// this is used in retrieve/Load the file later
+///
+/// \param [in] bIsUserFile
+/// BOOL - set TRUE if want to register a file for user.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedNPLoadPersistentFile, FrameworkunifiedNPReleasePersistentFile
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPRegisterPersistentFile(HANDLE hApp, PCSTR pTag, BOOL bIsUserFile = FALSE);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPSetFilePersistentType
+/// API to send message to Notification Service to set persistent file category.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] pTag
+/// PCSTR - File tag
+/// \param [in] ePersistCategory
+/// EFrameworkunifiedPersistCategory - Persistent category
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPSetFilePersistentType(HANDLE hApp, PCSTR pTag, EFrameworkunifiedPersistCategory ePersistCategory);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPLoadPersistentFile
+/// \~english @par Brief
+/// APIs that send messages to notification services and request Load of Persistent file tags
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] pDstFilePath
+/// PCSTR - Address of arbitrary data
+/// \~english @param [in] pTag
+/// PCSTR - Tag name
+/// \~english @param [in] hUser
+/// BOOL - Parameter error(Default:NULL)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the Load destination file path (pDstFilePath) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the Load destination filepath (pDstFilePath) specified in the parameter is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Sends messages to the notification service (NS_NPPService) and requests the Load of Persistent file tags.\n
+/// The copy destination file path is 255 bytes or less, and any file that exceeds 255 bytes is truncated to 255 bytes. Therefore, specify a file path of 255 bytes or less.\n
+/// Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.\n
+///
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Method(Async)
+/// \~english @see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPReleasePersistentFile
+///
+/// API to send message to Notification Service to copy file from persistent memory to
+/// specified path. The caller recieves an acknowledgement once NPS completes file copy
+///
+/// \param [in] pDstFilePath
+/// PCSTR - Complete file path to which the file should be copied from persistent area
+/// \param [in] pTag
+/// PCSTR - Tag associated with the file that needs to be copied to pDstFilePath
+/// \param [in] hUser
+/// HANDLE - Handle for the user
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPReleasePersistentFile
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPLoadPersistentFile(HANDLE hApp, PCSTR pDstFilePath, PCSTR pTag, HANDLE hUser = NULL);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPReleasePersistentFile
+/// \~english @par Brief
+/// API to send message to Notification Service to notify that the file can be persisted.
+/// \~english @param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \~english @param [in] bIsPersist
+/// BOOL - If the specified file needs to be persisted or not on release
+/// \~english @param [in] pTag
+/// PCSTR - Tag associated with the file released
+/// \~english @param [in] pFullFilePath
+/// PCSTR - Full path name of the file to be persisted
+/// \~english @param [in] hUser
+/// HANDLE - Handle for the user
+/// \~english @return status
+/// EFrameworkunifiedStatus - success or error
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the Release destination file path (pFullFilePath) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the Release destination filepath (pFullFilePath) specified in the parameter is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Sends messages to the notification service (NS_NPPService) and requests the Load of Persistent file tags.\n
+/// The copy destination file path is 255 bytes or less, and any file that exceeds 255 bytes is truncated to 255 bytes. Therefore, specify a file path of 255 bytes or less.\n
+/// Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.\n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
+///
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFile(HANDLE hApp, BOOL bIsPersist, PCSTR pTag, PCSTR pFullFilePath,
+ HANDLE hUser = NULL);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPReleasePersistentFile
+/// \~english @par Brief
+/// API to send message to Notification Service to notify that the file can be persisted.
+/// \~english @param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \~english @param [in] eReleaseType
+/// EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease :not on release
+/// eFrameworkunifiedPersistOnShutdown:persist on shutdown
+/// eFrameworkunifiedPersistInstantly :persist instantly
+/// \~english @param [in] pTag
+/// PCSTR - Tag associated with the file released
+/// \~english @param [in] pFullFilePath
+/// PCSTR - Full path name of the file to be persisted
+/// \~english @param [in] hUser
+/// HANDLE - Handle for the user
+/// \~english @return status
+/// EFrameworkunifiedStatus - success or error
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the Load destination file path (pDstFilePath) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the Load destination filepath (pDstFilePath) specified in the parameter is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Sends messages to the notification service (NS_NPPService) and requests the Load of Persistent file tags.\n
+/// The copy destination file path is 255 bytes or less, and any file that exceeds 255 bytes is truncated to 255 bytes. Therefore, specify a file path of 255 bytes or less.\n
+/// Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.\n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
+///
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFile(HANDLE hApp, EFrameworkunifiedReleaseType eReleaseType, PCSTR pTag, PCSTR pFullFilePath,
+ HANDLE hUser = NULL);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPRegisterPersistentFolder
+/// API to send message to Notification Service to add a folder path to be persisted
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] pTag
+/// PCSTR - A unique identifier for the folder path specified,
+/// this is used in retrieve/Load the folder later
+///
+/// \param [in] bIsUserFolder
+/// BOOL - set TRUE if want to register a folder for user.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedNPLoadPersistentFolder, FrameworkunifiedNPReleasePersistentFolder
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPRegisterPersistentFolder(HANDLE hApp, PCSTR pTag, BOOL bIsUserFolder = FALSE);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPSetFolderPersistentType
+/// API to send message to Notification Service to set persistent folder category.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] pTag
+/// PCSTR - A unique identifier for the folder path specified,
+/// this is used in retrieve/Load the folder later
+/// \param [in] ePersistCategory
+/// EFrameworkunifiedPersistCategory - Persistent category
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPSetFolderPersistentType(HANDLE hApp, PCSTR pTag, EFrameworkunifiedPersistCategory ePersistCategory);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPLoadPersistentFolder
+/// API to send message to Notification Service to copy folder from persistent memory to
+/// specified path. The caller recieves an acknowledgement once NPS completes folder copy
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] pDstFolderPath
+/// PCSTR - Complete folder path to which the folder should be copied from persistent area
+/// \param [in] pTag
+/// PCSTR - Tag associated with the folder that needs to be copied to pDstFolderPath
+/// \param [in] hUser
+/// HANDLE - Handle for the user
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedNPRegisterPersistentFolder, FrameworkunifiedNPReleasePersistentFolder
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPLoadPersistentFolder(HANDLE hApp, PCSTR pDstFolderPath, PCSTR pTag, HANDLE hUser = NULL);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPReleasePersistentFolder
+/// API to send message to Notification Service to notify that the folder can be persisted.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] bIsPersist
+/// BOOL - If the specified folder needs to be persisted or not on release
+/// \param [in] pTag
+/// PCSTR - Tag associated with the folder released
+/// \param [in] pFullFolderPath
+/// PCSTR - Full path name of the folder to be persisted
+/// \param [in] hUser
+/// HANDLE - Handle for the user
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedNPRegisterPersistentFolder, FrameworkunifiedNPLoadPersistentFolder
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFolder(HANDLE hApp, BOOL bIsPersist, PCSTR pTag, PCSTR pFullFolderPath,
+ HANDLE hUser = NULL);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPReleasePersistentFolder
+/// API to send message to Notification Service to notify that the folder can be persisted.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] eFrameworkunifiedReleaseType
+/// EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease :not on release
+/// eFrameworkunifiedPersistOnShutdown:persist on shutdown
+/// eFrameworkunifiedPersistInstantly :persist instantly
+/// \param [in] pTag
+/// PCSTR - Tag associated with the folder released
+/// \param [in] pFullFolderPath
+/// PCSTR - Full path name of the folder to be persisted
+/// \param [in] hUser
+/// HANDLE - Handle for the user
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedNPRegisterPersistentFolder, FrameworkunifiedNPLoadPersistentFolder
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFolder(HANDLE hApp, EFrameworkunifiedReleaseType eFrameworkunifiedReleaseType, PCSTR pTag,
+ PCSTR pFullFolderPath, HANDLE hUser = NULL);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+// Session APIs
+////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOpenSession
+/// \~english @par Brief
+/// API sends a message to the service requesting a session.
+/// \~english @param [in] hService
+/// HANDLE - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
+/// [eFrameworkunifiedStatusInvldQName]
+/// - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) during the transmission of the session message to the service
+/// occurs. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of the transmit buffer of the message for the session to the service is illegal.
+/// [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the service. [eFrameworkunifiedStatusFail]
+/// - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// To send a message of the session request to the service.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedOpenSessionWithData, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId,
+/// FrameworkunifiedGetSessionId
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOpenSession(HANDLE hService);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOpenSessionWithData
+/// \~english @par Brief
+/// API to send to service the message of the session request together with the data.
+/// \~english @param [in] hService
+/// HANDLE - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
+/// \~english @param [in] pData
+/// PVOID - Pointer to the session data for transmission
+/// \~english @param [in] length
+/// UI_32 - Size of the session data for transmission
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - A pointer to the session data for transmission to the specified non-zero size at NULL in argument.
+/// [eFrameworkunifiedStatusInvldBuf]
+/// - The pointer is NULL to the session data for transmission specified in the argument. [eFrameworkunifiedStatusErrOther]
+/// - Size of the session data for transmission specified in the argument is 0. [eFrameworkunifiedStatusErrOther]
+/// - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
+/// [eFrameworkunifiedStatusInvldQName]
+/// - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) during the transmission of the session message to the service
+/// occurs. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of the transmit buffer of the message for the session to the service is illegal.
+/// [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the service. [eFrameworkunifiedStatusFail]
+/// - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// To send to the service a message of session request together with the data.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId,
+/// FrameworkunifiedGetSessionId
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOpenSessionWithData(HANDLE hService, PVOID pData, UI_32 length);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOpenSessionSync
+/// \~english @par Brief
+/// Synchronous API of sending a message of the session request to the service.
+/// \~english @param [in] hService
+/// HANDLE - Handle to the service(FrameworkunifiedOpenService/FrameworkunifiedGetOpenSessionHandle/FrameworkunifiedGetOpenSessionSyncHandle HANDLE
+/// acquired in)
+/// \~english @param [out] ack
+/// OpenSessionAck - Pointer to the response data of the session initiation
+/// \~english @par
+/// OpenSessionAck Structure
+/// \~english @code
+/// #define MAX_QUEUE_NAME_SIZE 20
+/// typedef struct _OpenSessionAck
+/// {
+/// EFrameworkunifiedStatus eStatus; /* Status */
+/// UI_32 sessionId; /* Session ID */
+/// CHAR cSessionName[MAX_QUEUE_NAME_SIZE]; /* Session Name(20byte) */
+/// UI_32 sessionType; /* Session Type */
+/// }OpenSessionAck;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
+/// - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
+/// - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
+/// - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
+/// [eFrameworkunifiedStatusInvldQName]
+/// - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmit and receive file descriptor of the session message to the service.
+/// [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) occurs during the transmission and reception of the session message
+/// to the service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of the transmit buffer of the message for the session to the service is illegal.
+/// [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the sending and receiving of a session message to the service. [eFrameworkunifiedStatusFail]
+/// - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
+/// - It failed to Socket connection of the response message for the reception from the service. [eFrameworkunifiedStatusFail]
+/// - The wait control of the response message received from the service failed. [eFrameworkunifiedStatusFail]
+/// - Interruption by the system call (signal) to wait in the response message received from the service has
+/// occurred. [eFrameworkunifiedStatusFail]
+/// - In response message at the time of failure to receive from the service, it failed to re-connection of the
+/// Socket. [eFrameworkunifiedStatusBadConnection]
+/// \~english @par Detail
+/// Send in the synchronous type the message of the session request to the service.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedOpenSessionWithDataSync, FrameworkunifiedGetOpenSessionSyncHandle, FrameworkunifiedCloseSessionSync,
+/// FrameworkunifiedGenerateNewSessionId,
+/// FrameworkunifiedGetSessionId
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOpenSessionSync(HANDLE hService, OpenSessionAck *ack);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedOpenSessionWithDataSync
+/// \~english @par Brief
+/// Synchronous API that transmits to the service a message session request with the data.
+/// \~english @param [in] hService
+/// HANDLE - Handle to the service(FrameworkunifiedOpenService/FrameworkunifiedGetOpenSessionHandle/FrameworkunifiedGetOpenSessionSyncHandle HANDLE
+/// acquired in)
+/// \~english @param [in] pData
+/// PVOID - Pointer to session data for transmission
+/// \~english @param [in] length
+/// UI_32 - Size of the session data for transmission
+/// \~english @param [out] ack
+/// OpenSessionAck - Pointer to the response data of the session initiation
+/// \~english @par
+/// OpenSessionAck Structure
+/// \~english @code
+/// #define MAX_QUEUE_NAME_SIZE 20
+/// typedef struct _OpenSessionAck
+/// {
+/// EFrameworkunifiedStatus eStatus; /* Status */
+/// UI_32 sessionId; /* Session ID */
+/// CHAR cSessionName[MAX_QUEUE_NAME_SIZE]; /* Session Name(20byte) */
+/// UI_32 sessionType; /* Session Type */
+/// }OpenSessionAck;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid Buffer
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - A pointer to the session data for transmission to the specified non-zero size at NULL in argument.
+/// [eFrameworkunifiedStatusInvldBuf]
+/// - The pointer is NULL to the session data for transmission specified in the argument. [eFrameworkunifiedStatusErrOther]
+/// - Size of the session data for transmission specified in the argument is 0. [eFrameworkunifiedStatusErrOther]
+/// - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
+/// - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
+/// - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
+/// - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
+/// [eFrameworkunifiedStatusInvldQName]
+/// - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmit and receive file descriptor of the session message to the service.
+/// [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) occurs during the transmission and reception of the session message
+/// to the service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of the transmit buffer of the message for the session to the service is illegal.
+/// [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the sending and receiving of a session message to the service. [eFrameworkunifiedStatusFail]
+/// - In the shared memory access for transmission and reception of the service for the message for the session
+/// failed. [eFrameworkunifiedStatusErrOther]
+/// - It failed to Socket connection of the response message for the reception from the service. [eFrameworkunifiedStatusFail]
+/// - The wait control of the response message received from the service failed. [eFrameworkunifiedStatusFail]
+/// - Interruption by the system call (signal) to wait in the response message received from the service has
+/// occurred. [eFrameworkunifiedStatusFail]
+/// - In response message at the time of failure to receive from the service, it failed to re-connection of the
+/// Socket. [eFrameworkunifiedStatusBadConnection]
+/// \~english @par Detail
+/// Send in the synchronous type to service the message of the session request along with the data.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedOpenSessionSync, FrameworkunifiedGetOpenSessionSyncHandle, FrameworkunifiedCloseSessionSync, FrameworkunifiedGenerateNewSessionId,
+/// FrameworkunifiedGetSessionId
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedOpenSessionWithDataSync(HANDLE hService, PVOID pData, UI_32 length, OpenSessionAck *ack);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetOpenSessionHandle
+/// \~english @par Brief
+/// Asynchronous API to get the session handler.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application (FrameworkunifiedCreateDispatcherWithoutLoop() HANDLE acquired in)
+/// \~english @retval HANDLE HANDLE for the session
+/// \~english @retval NULL Failure to HANDLE acquisition for the session
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// Under the following conditions, HANDLE is returned as NULL.
+/// - HANDLE specified in the argument (hApp) is NULL.
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid).
+/// - Data size received by the HANDLE specified in the argument (hApp) is not the data size of
+/// ProtocolOpenSessionAck message.
+/// - Can not get the data and the data length received by the HANDLE specified in the argument (hApp).
+/// - Size of the session name of the data received by the specified HANDLE (hApp) in the argument is more than
+/// 20byte.
+/// - Not be able to acquire the memory of the buffer for the internal processing.
+/// - Session name is NULL of data received by the HANDLE specified in the argument (hApp).
+/// - It failed to generate the message queue name.
+/// - It failed to open the message queue.
+/// \~english @par Detail
+/// This API will be used in an asynchronous type specification. \n
+/// Acquires received data ProtocolOpenSessionAck from HANDLE specified in the argument (hApp), \n
+/// obtains the session HANDLE from the session name.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionWithData, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId,
+/// FrameworkunifiedGetSessionId
+////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedGetOpenSessionHandle(HANDLE hApp);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetOpenSessionSyncHandle
+/// \~english @par Brief
+/// API to get the session ID without using the received data of ProtocolOpenSessionAck.
+/// \~english @param [in] hApp
+/// HANDLE - HANDLE for Application (FrameworkunifiedCreateDispatcherWithoutLoop() HANDLE acquired in)
+/// \~english @param [in] tAck
+/// OpenSessionAck - Pointer to the OpenSessionAck structure
+/// \~english @par
+/// OpenSessionAck Structure
+/// \~english @code
+/// #define MAX_QUEUE_NAME_SIZE 20
+/// typedef struct _OpenSessionAck
+/// {
+/// EFrameworkunifiedStatus eStatus; /* Status */
+/// UI_32 sessionId; /* Session ID */
+/// CHAR cSessionName[MAX_QUEUE_NAME_SIZE]; /* Session Name(20byte) */
+/// UI_32 sessionType; /* Session Type */
+/// }OpenSessionAck;
+/// @endcode
+/// \~english @retval HANDLE HANDLE for the session
+/// \~english @retval NULL Failure to HANDLE acquisition for the session
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// Under the following conditions, HANDLE is returned as NULL.
+/// - HANDLE specified in the argument (hApp) is NULL.
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid).
+/// - Data size received by the HANDLE specified in the argument (hApp) is not the data size of
+/// ProtocolOpenSessionAck message.
+/// - Size of the session name of the data received by the specified HANDLE (hApp) in the argument is more than
+/// 20byte.
+/// - Not be able to acquire the memory of the buffer for the internal processing.
+/// - Session name is NULL of data received by the HANDLE specified in the argument (hApp).
+/// - It failed to generate the message queue name.
+/// - It failed to open the message queue.
+/// \~english @par Detail
+/// This API is to be used at the time of the synchronous type specification. \n
+/// Use the session name of OpenSessionAck structure specified by the argument, to get the session HANDLE.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithDataSync, FrameworkunifiedCloseSessionSync, FrameworkunifiedGenerateNewSessionId,
+/// FrameworkunifiedGetSessionId
+////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedGetOpenSessionSyncHandle(HANDLE hApp, OpenSessionAck *tAck);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedGenerateSessionHandle
+/// API will be called by server on receiving the Open session request to Create session
+///
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the framework application
+/// \param [in] pServiceName
+/// PCSTR - Service Name
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+///
+/// \see FrameworkunifiedOpenSession, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId
+/// FrameworkunifiedGetSessionId
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedGenerateSessionHandle(HANDLE hApp, PCSTR pServiceName);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCloseSession
+/// \~english @par Brief
+/// API to close the session.
+/// \~english @param [in] hService
+/// HANDLE - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
+/// \~english @param [in] hSession
+/// HANDLE - Handle to the session(FrameworkunifiedOpenSession HANDLE acquired in)
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hSession) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hSession) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
+/// [eFrameworkunifiedStatusInvldQName]
+/// - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) during the transmission of the session message to the service
+/// occurs. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of the transmit buffer of the message for the session to the service is illegal.
+/// [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the service. [eFrameworkunifiedStatusFail]
+/// - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
+/// - Message queue type of HANDLE specified in the argument (hSession) is mismatch.(eQTypeSender or
+/// eQTypeReveiver) [eFrameworkunifiedStatusInvldHndlType]
+/// - Failed to close message queue HANDLE specified in the argument (hSession). [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// Send a message of the session close request to the service.\n
+/// And close message queue of the session.
+/// This is asynchronous API.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionWithData, FrameworkunifiedGetOpenSessionHandle
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedCloseSession(HANDLE hService, HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCloseSessionSync
+/// \~english @par Brief
+/// API to close the session (synchronous).
+/// \~english @param [in] hService
+/// HANDLE - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
+/// \~english @param [in] hSession
+/// HANDLE - Handle to the session(FrameworkunifiedOpenSessionSync HANDLE acquired in)
+/// \~english @param [out] ack
+/// CloseSessionAck - Pointer to the response data of the session close
+/// \~english @par
+/// CloseSessionAck Structure
+/// \~english @code
+/// typedef struct _CloseSessionAck
+/// {
+/// UI_32 sessionId; /* Session ID */
+/// EFrameworkunifiedStatus eStatus; /* Status */
+/// }CloseSessionAck;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusOK [eStatus in CloseSessionAck]Success in serivice side.
+/// \~english @retval eFrameworkunifiedStatusFail [eStatus in CloseSessionAck]Some sort of error occurred in service side.
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure (API)
+/// - CloseSessionAck specified in the argument (ack) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hSession) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - HANDLE specified in the argument (hSession) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
+/// - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
+/// - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
+/// - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
+/// - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
+/// [eFrameworkunifiedStatusInvldQName]
+/// - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmit and receive file descriptor of the session message to the service.
+/// [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) occurs during the transmission and reception of the session message
+/// to the service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of the transmit buffer of the message for the session to the service is illegal.
+/// [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the sending and receiving of a session message to the service. [eFrameworkunifiedStatusFail]
+/// - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
+/// - It failed to Socket connection of the response message for the reception from the service. [eFrameworkunifiedStatusFail]
+/// - The wait control of the response message received from the service failed. [eFrameworkunifiedStatusFail]
+/// - Interruption by the system call (signal) to wait in the response message received from the service has
+/// occurred. [eFrameworkunifiedStatusFail]
+/// - In response message at the time of failure to receive from the service, it failed to re-connection of the
+/// Socket. [eFrameworkunifiedStatusBadConnection]
+/// - Failed to close message queue HANDLE specified in the argument (hSession). [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue type of HANDLE specified in the argument (hSession) is mismatch.(eQTypeSender or
+/// eQTypeReveiver) [eFrameworkunifiedStatusInvldHndlType]
+/// \~english @par Conditions of processing failure (eStatus in CloseSessionAck)
+/// - Any errors occur during in service side. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Send a message synchronously of the session close request to the service.\n
+/// And close message queue of the session.\n
+/// The eStatus value in CloseSessionAck is dependent on service. So we indecates major return value.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithDataSync
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedCloseSessionSync(HANDLE hService, HANDLE hSession, CloseSessionAck *ack);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedGenerateNewSessionId
+/// Used on the Server side to get the next session id
+///
+///
+/// \return sessionID
+/// UI_32 - session ID value
+///
+///
+/// \see FrameworkunifiedOpenSession, FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedCloseSession,
+/// FrameworkunifiedGetSessionId
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 FrameworkunifiedGenerateNewSessionId();
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetSessionId
+/// \~english @par Brief
+/// Returns the session id corresponding to the given session handle.
+/// \~english @param [in] hSession
+/// HANDLE - Handle to the session(FrameworkunifiedMcOpenSender HANDLE acquired in)
+/// \~english @retval UI_32 session ID value
+/// \~english @retval MAX_SESSION_ID_VAL Failed to get session ID value
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hSession) is NULL. [MAX_SESSION_ID_VAL]
+/// - HANDLE specified in the argument (hSession) is not appropriate (which is invalid). [MAX_SESSION_ID_VAL]
+/// \~english @par Detail
+/// Returns the session id corresponding to the given session handle.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithData, FrameworkunifiedOpenSessionWithDataSync, \n
+/// FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedGetOpenSessionSyncHandle, FrameworkunifiedGetCurrentSessionHandle, \n
+/// FrameworkunifiedMcOpenSender, FrameworkunifiedCreateSession
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 FrameworkunifiedGetSessionId(HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetMsgSessionId
+/// \~english @par Brief
+/// Get session ID from received message.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval UI_32 session ID value
+/// \~english @retval MAX_SESSION_ID_VAL Failed to get session ID value
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
+/// done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [MAX_SESSION_ID_VAL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [MAX_SESSION_ID_VAL]
+/// \~english @par Detail
+/// Get session ID from received message.\n
+/// Mostly, this API is used to get session ID from message received by callback function that is registered to
+/// Dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedGetSessionHandle
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 FrameworkunifiedGetMsgSessionId(HANDLE hApp);
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+// Defer Message APIs
+////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedGetDeferQueueCnt
+/// Get the number of messages in the defer queue
+///
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the App / Thread
+///
+/// \return count
+/// UI_32 - number of messages on Defered Queue
+///
+///
+/// \see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 FrameworkunifiedGetDeferQueueCnt(HANDLE hApp);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedIsDeferQueueEmpty
+/// \~english @par Brief
+/// Empty determination of DeferQueue
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval BOOL DeferQueue status (TRUE: empty or FALSE: not empty)
+/// \~english @retval TRUE Judgment failure
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [TRUE]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [TRUE]
+/// \~english @par Detail
+/// Returns whether the DeferQueue in the application-handle given by the arguments is empty
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Not applicable
+/// \~english @see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage
+/// FrameworkunifiedIsDeferQueueEmpty
+/// Get the number of messages in the defer queue
+///
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the App / Thread
+///
+/// \return count
+/// BOOL - Indicates if the defer queue is empty, TRUE (empty), FALSE (not empty)
+///
+///
+/// \see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage, FrameworkunifiedGetDeferQueueCnt
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+BOOL FrameworkunifiedIsDeferQueueEmpty(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDeferMessage
+/// \~english @par Brief
+/// Push messages to the DeferQueue
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Push received messages in the application handles specified by the arguments to the DeferQueue.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Set Get
+/// \~english @see FrameworkunifiedRetrieveDeferMessage
+/// FrameworkunifiedDeferMessage
+/// Defers the current message; Pushes the message on to a defer msg queue
+///
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the App / Thread
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+///
+/// \see FrameworkunifiedClearDeferMessages, FrameworkunifiedRetrieveDeferMessage
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDeferMessage(HANDLE hApp);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedClearDeferMessages
+/// Clear all the defer messages
+///
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the App / Thread
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+///
+/// \see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedClearDeferMessages(HANDLE hApp);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedRetrieveDeferMessage
+/// \~english @par Brief
+/// Write Messages Registered in DeferQueue to FD
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Write the messages registered in the DeferQueue in the application handler specified by arguments to the FD.\n
+/// This allows the main loop to receive the message.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Set Get
+/// \~english @see FrameworkunifiedDeferMessage
+/// FrameworkunifiedRetrieveDeferMessage
+/// Enables Checking for deferred message and retrieves messages when
+/// callback returns to the dispatcher.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the App / Thread
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+///
+/// \see FrameworkunifiedDeferMessage, FrameworkunifiedClearDeferMessages
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedRetrieveDeferMessage(HANDLE hApp);
+
+// TODO(framework_unified) : clean up the old FrameworkunifiedRegisterPersistentStorage api's
+// 20110429_brp
+// defined for backward compatibility; will be removed once the persistence feature is finalized
+EFrameworkunifiedStatus FrameworkunifiedRegisterPersistentStorage(HANDLE hApp, PCSTR pFullFilePath);
+EFrameworkunifiedStatus FrameworkunifiedReleaseFileToPersistentStorage(HANDLE hApp, PCSTR pFullFilePath, BOOL persist);
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedRegisterEvent
+/// \~english @par Brief
+/// Registering Applications for Delivery of Service-Specific Events
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions (obtained by FrameworkunifiedOpenSession)
+/// \~english @param [in] uiEventId
+/// UI_32 - Event ID (Identification ID on the service's protocol)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Services and sessions are established (FrameworkunifiedOpenSession)
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Issues a request for registering the application that executes this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the arguments.\n
+/// The application specifies the type of events to receive in the uiEventId of arguments.\n
+/// (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - This API is deprecated and should now use FrameworkunifiedSubscribeToSessionEventWithCallback.
+/// - When this API is used, the application shall use a FrameworkunifiedAttachCallbackToDispatcher or the like to register callback functions in its own Dispatcher for handling events.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
+/// FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
+/// FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
+/// FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
+///
+/// API to register for event of a service.
+/// This API is depricated, use FrameworkunifiedSubscribeToSessionEventWithCallback.
+///
+/// \param [in] hSession
+/// HANDLE - Handle to the application session
+/// \param [in] uiEventId
+/// UI_32 - Event registering for.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents,
+/// FrameworkunifiedPublishEvent
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedRegisterEvent(HANDLE hSession, UI_32 uiEventId);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedRegisterEvents
+/// \~english @par Brief
+/// Registering Applications for Delivery of Service-Specific Events
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions (obtained by FrameworkunifiedOpenSession)
+/// \~english @param [in] puiEventsArray
+/// PVOID - The event ID to deliver (the identification ID on the service's protocol)
+/// \~english @param [in] uiListSize
+/// UI_32 - Number of elements in the event ID array (0 to 4294967295)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Services and sessions are established (FrameworkunifiedOpenSession)
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the array (puiEventsArray) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldBuf]
+/// - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
+/// - Failed to access shared memory for sending messages for sessions for services [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Issues a request for registering the application that executes this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the arguments.\n
+/// The application specifies more than one type of events to receive in the puiEventsArray of arguments.\n
+/// (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - This API is deprecated and should now use FrameworkunifiedSubscribeToSessionEventsWithCallbacks.
+/// - When this API is used, the application shall use a FrameworkunifiedAttachCallbackToDispatcher or the like to register callback functions in its own Dispatcher for handling events.
+/// - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
+/// Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedRegisterEvent, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
+/// FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
+/// FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
+/// FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
+///
+/// API to register for events of a service.
+/// This API is depricated, use FrameworkunifiedSubscribeToSessionEventsWithCallbacks.
+///
+/// \param [in] hSession
+/// HANDLE - Handle to the application session
+/// \param [in] puiEventsArray
+/// PVOID - Array of events registering for.
+/// \param [in] uiListSize
+/// UI_32 - count of elements in array.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedRegisterEvent, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents,
+/// FrameworkunifiedPublishEvent
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedRegisterEvents(HANDLE hSession, PVOID puiEventsArray, UI_32 uiListSize);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedUnRegisterEvent
+/// \~english @par Brief
+/// Unregistering Service-Specific Events from Delivery
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions (obtained by FrameworkunifiedOpenSession)
+/// \~english @param [in] uiEventId
+/// UI_32 - Event ID (Identification ID on the service's protocol)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Services and sessions are established (FrameworkunifiedOpenSession)
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Issues a request to unregister the application that executed this API from the delivery target of the service-specific event associated with the handle (hSession) specified in the arguments.\n
+/// The application specifies events that are no longer needed for delivery in the uiEventId of arguments.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - This API is deprecated and should now use FrameworkunifiedUnSubscribeSessionEventWithCallback.
+/// - When this API is used, the application shall unregister callbacks for events registered in its own Dispatcher by means of FrameworkunifiedDetachCallbackFromDispatcher, etc.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvents,
+/// FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
+/// FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks,
+/// FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
+///
+/// API to unregister from event of a service.
+/// This API is depricated, use FrameworkunifiedUnSubscribeSessionEventsWithCallbacks.
+///
+/// \param [in] hSession
+/// HANDLE - Handle to the application session
+/// \param [in] uiEventId
+/// UI_32 - Event registering for.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedUnRegisterEvents, FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedPublishEvent
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnRegisterEvent(HANDLE hSession, UI_32 uiEventId);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedUnRegisterEvents
+/// \~english @par Brief
+/// Unregistering Service-Specific Events from Delivery
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions (obtained by FrameworkunifiedOpenSession)
+/// \~english @param [in] puiEventsArray
+/// PVOID - The event ID to deliver (the identification ID on the service's protocol)
+/// \~english @param [in] uiListSize
+/// UI_32 - Number of elements in the event ID array (0 to 4294967295)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Services and sessions are established (FrameworkunifiedOpenSession)
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the array (puiEventsArray) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldBuf]
+/// - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
+/// - Failed to access shared memory for sending messages for sessions for services [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Issues a request to unregister the application that executed this API from the delivery target of the service-specific event associated with the handle (hSession) specified in the arguments.\n
+/// The application specifies the unneeded events in the puiEventsArray of arguments.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - This API is deprecated and should now use FrameworkunifiedUnSubscribeSessionEventsWithCallbacks.
+/// - After executing this API, the callback of the event registered in the Dispatcher of the application itself must be unregistered by FrameworkunifiedDetachCallbackFromDispatcher, etc.
+/// - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
+/// Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent,
+/// FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
+/// FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks,
+/// FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
+///
+/// API to unregister from events of a service.
+/// This API is depricated, use FrameworkunifiedUnSubscribeSessionEventsWithCallbacks.
+///
+/// \param [in] hSession
+/// HANDLE - Handle to the application session
+/// \param [in] puiEventsArray
+/// PVOID - Array of events registering for.
+/// \param [in] uiListSize
+/// UI_32 - count of elements in array.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedUnRegisterEvent, FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedPublishEvent
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnRegisterEvents(HANDLE hSession, PVOID puiEventsArray, UI_32 uiListSize);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDefineStateEvents
+/// \~english @par Brief
+/// Subscribing to Application-Specific Events in the Dispatcher
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] puiEvents
+/// PVOID - Pointer to an array (UI_32 arrays) of event IDs (identification IDs on the service protocol)
+/// \~english @param [in] uiListSize
+/// UI_32 - Number of elements in the event ID array (0 to 4294967295)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the array (puiEvents) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// Register unique events in your Dispatcher that applications can deliver to other applications.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
+/// For application-specific events registered by this API, the event is delivered by Dispatcher when the application executes the FrameworkunifiedPublishPublicEvent.\n
+/// Events are distributed to applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - This API is deprecated, use FrameworkunifiedDefinePublicStateEvents or FrameworkunifiedDefinePrivateStateEvents now.
+/// - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
+/// Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
+/// FrameworkunifiedPublishEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedPublishPublicEvent, FrameworkunifiedPublishPrivateEvent
+/// FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks,
+///
+/// API to define the state events of the service.
+/// This API is depricated, use FrameworkunifiedDefinePublicStateEvents or FrameworkunifiedDefinePrivateStateEvents.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application framework
+/// \param [in] puiEvents
+/// PVOID - Array of state events or single state event.
+/// \param [in] uiListSize
+/// UI_32 - size of events list.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedPublishEvent, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDefineStateEvents(HANDLE hApp, PVOID puiEvents, UI_32 uiListSize);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedPublishEvent
+/// \~english @par Brief
+/// Deliver application-specific events
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] uiEventId
+/// UI_32 - The event ID to deliver (the identification ID on the service's protocol)
+/// \~english @param [in] pClientName
+/// PCSTR - Destination application name (distributed to all registered applications when NULL is specified),
+/// \~english @param [in] pData
+/// PCVOID - Pointer to trasmission data
+/// \~english @param [in] iLength
+/// UI_32 - Transmission data length
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - The events to be delivered must be specified in a FrameworkunifiedDefinePublicStateEvents, etc.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the application name of the delivery destination in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - Sessioninformation is not found with the application being delivered to within the handles (hApp) specified in the arguments. [eFrameworkunifiedStatusErrOther]
+/// - If the destination handles are inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
+/// - If the message queue handle in the destination handle is NULL [eFrameworkunifiedStatusErrOther]
+/// - If the application name in the destination handles is not set, [eFrameworkunifiedStatusErrOther]
+/// - If the message queue handle in the destination handle is inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
+/// - When the send data length (iLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL, [eFrameworkunifiedStatusErrOther]
+/// - When the name of the application in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
+/// - When the name of the message queue in the destination handle is NULL, [eFrameworkunifiedStatusErrOther]
+/// - When the name of the message queue in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
+/// - If the message queue type of the destination handler is not the send type [eFrameworkunifiedStatusErrOther]
+/// - When the message queue is full [eFrameworkunifiedStatusErrOther]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrOther]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrOther]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusErrOther]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusErrOther]
+/// - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Delivers application-specific events to subscribed applications.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
+/// The delivery destination of events is the application specified by the argument pClientName or (when the argument pClientName is NULL)
+/// all the applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks etc.\n
+/// The data (pData) to be distributed is the same for all distribution destinations.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Operation cannot be guaranteed if the size of the area indicated by the pointer (pData) address to the send data does not match the size specified by the send data length (iLength) address.
+/// \~english @par
+/// This API is deprecated, use FrameworkunifiedPublishPublicEvent or FrameworkunifiedPublishPrivateEvent now.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents,
+/// FrameworkunifiedBroadcastEvent, FrameworkunifiedPublishPublicEvent,
+/// FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
+/// FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
+/// FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
+/// FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
+/// FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+///
+/// This API is used to publish the event to one of the client subscribed to this event.
+/// This API can be used to publish the event to all the clients subscribed to this event by
+/// passing pClientName as NULL.
+/// This API is depricated, use FrameworkunifiedPublishPrivateEvent or FrameworkunifiedPublishPublicEvent.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application framework
+/// \param [in] uiEventId
+/// UI_32 - Event id of Message
+/// \param [in] pClientName
+/// PCSTR - Name of the client
+/// \param [in] pData
+/// PCVOID - Data buffer
+/// \param [in] iLength
+/// UI_32 - Size of data buffer
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedPublishEvent(HANDLE hApp, UI_32 uiEventId, PCSTR pClientName, PCVOID pData, UI_32 iLength);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedBroadcastEvent
+/// \~english @par Brief
+/// Broadcast application-specific events
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] uiEventId
+/// UI_32 - The event ID to deliver (the identification ID on the service's protocol)
+/// \~english @param [in] pData
+/// PCVOID - Pointer to trasmission data
+/// \~english @param [in] iLength
+/// UI_32 - Transmission data length
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - The events to be delivered must be specified in a FrameworkunifiedDefinePublicStateEvents, etc.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusNullPointer]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
+/// - When the application name of the delivery destination in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - Sessioninformation is not found with the application being delivered to within the handles (hApp) specified in the arguments. [eFrameworkunifiedStatusErrOther]
+/// - If the destination handles are inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
+/// - If the message queue handle in the destination handle is NULL [eFrameworkunifiedStatusErrOther]
+/// - If the application name in the destination handles is not set, [eFrameworkunifiedStatusErrOther]
+/// - If the message queue handle in the destination handle is inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
+/// - When the send data length (iLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL, [eFrameworkunifiedStatusErrOther]
+/// - When the name of the application in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
+/// - When the name of the message queue in the destination handle is NULL, [eFrameworkunifiedStatusErrOther]
+/// - When the name of the message queue in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
+/// - If the message queue type of the destination handler is not the send type [eFrameworkunifiedStatusErrOther]
+/// - When the message queue is full [eFrameworkunifiedStatusErrOther]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrOther]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrOther]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusErrOther]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Broadcast application-specific events to all registered applications.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
+/// Events are delivered to all applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
+/// The data (pData) to be distributed is the same for all distribution destinations.
+/// \~english @par
+/// This API is deprecated and should now use FrameworkunifiedPublishPublicEvent.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents,
+/// FrameworkunifiedPublishEvent, FrameworkunifiedPublishPublicEvent,
+/// FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
+/// FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
+/// FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
+/// FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
+/// FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+///
+/// This API is used to publish the event to all the clients subscribed to this event.
+/// This API is depricated, use FrameworkunifiedPublishPublicEvent.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application framework
+/// \param [in] uiEventId
+/// UI_32 - Event id of Message
+/// \param [in] pData
+/// PCVOID - Data buffer
+/// \param [in] iLength
+/// UI_32 - Size of data buffer
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedRegisterEvent, FrameworkunifiedPublishEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedBroadcastEvent(HANDLE hApp, UI_32 uiEventId, PCVOID pData, UI_32 iLength);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDefinePublicStateEvents
+/// \~english @par Brief
+/// Subscribing to Application-Specific Events in the Dispatcher
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] puiEvents
+/// PUI_32 - The event ID to deliver (the identification ID on the service's protocol)
+/// \~english @param [in] uiListSize
+/// UI_32 - Number of elements in the event ID array (0 to 4294967295)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the array (puiEvents) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// Register unique events in your Dispatcher that applications can deliver to other applications.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
+/// For application-specific events registered by this API, the event is delivered by Dispatcher when the application executes the FrameworkunifiedPublishPublicEvent.\n
+/// Events are distributed to all applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
+/// \~english @par
+/// The difference from FrameworkunifiedDefinePrivateStateEvents is that when the Dispatcher distributes events registered by this API, the same data is distributed to all registered applications.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
+/// Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
+/// - FrameworkunifiedDefinePrivateStateEvents should be used to deliver individual data by registered application sessions.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedPublishPublicEvent, FrameworkunifiedDefinePrivateStateEvents, FrameworkunifiedPublishPrivateEvent,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+///
+/// This API is used to define the public state events of the service.
+/// Public Event means the data associated with the event will be same for all the clients
+/// subscribed to it.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application framework
+/// \param [in] puiEvents
+/// PUI_32 - Array of state events or single state event.
+/// \param [in] uiListSize
+/// UI_32 - size of events list.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedDefinePrivateStateEvents
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDefinePublicStateEvents(HANDLE hApp, PUI_32 puiEvents, UI_32 uiListSize);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDefinePrivateStateEvents
+/// \~english @par Brief
+/// Subscribing to Application-Specific Events in the Dispatcher
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] puiEvents
+/// PUI_32 - The event ID to deliver (the identification ID on the service's protocol)
+/// \~english @param [in] uiListSize
+/// UI_32 - Number of elements in the event ID array (0 to 4294967295)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the array (puiEvents) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// Register unique events in your Dispatcher that applications can deliver to other applications.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
+/// For application-specific events registered by this API, the event is delivered by Dispatcher when the application executes the FrameworkunifiedPublishPrivateEvent.\n
+/// Events are distributed to applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
+/// \~english @par
+/// The difference from FrameworkunifiedDefinePublicStateEvents is that when the Dispatcher distributes events registered by this API, it distributes individual data by sessions of the registered application.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
+/// Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
+/// - Use FrameworkunifiedDefinePublicStateEvents to deliver broadcasts to all registered applications.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedPublishPrivateEvent, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedPublishPublicEvent,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+///
+/// This API is used to define the private state events of the service.
+/// Private event means the data associated with the event will be specific for
+/// every session of all the clients on which it has subscribed.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application framework
+/// \param [in] puiEvents
+/// PUI_32 - Array of state events or single state event.
+/// \param [in] uiListSize
+/// UI_32 - size of events list.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedDefinePublicStateEvents
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDefinePrivateStateEvents(HANDLE hApp, PUI_32 puiEvents, UI_32 uiListSize);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSubscribeToSessionEventWithCallback
+/// \~english @par Brief
+/// Register delivery of service-specific events and set callback for receiving events
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] uiEventId
+/// UI_32 - Event ID (Identification ID on the service protocol) (PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD)
+/// \~english @param [in] fpOnCmd
+/// CbFuncPtr - Pointer to callback function when event is received
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions (obtained by FrameworkunifiedOpenSession)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Services and sessions are established (FrameworkunifiedOpenSession)
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - If the callback function pointer (fpOnCmd) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Sets the callback function for the event ID (iCmd) specified in the application Dispatcher.\n
+/// Then, it issues a request for registering the application that executed this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the argument.\n
+/// The application specifies the type of event to be received from the service by the event ID (uiEventId) of the arguments.\n
+/// (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedSubscribeToSessionEventsWithCallbacks, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+///
+/// This API is used for subscribing to single event of a service.
+/// This API also attaches the session event with callback.
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] uiEventId
+/// UI_32 - Event id
+/// \param [in] fpOnCmd
+/// CbFuncPtr - pointer to callback function
+/// \param [in] hSession
+/// HANDLE - Session handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedSubscribeToSessionEventsWithCallbacks
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventWithCallback(HANDLE hApp, UI_32 uiEventId, CbFuncPtr fpOnCmd, HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSubscribeToSessionEventsWithCallbacks
+/// \~english @par Brief
+/// Registering multiple service-specific events for delivery and configuring callback settings when an event is received
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] pEventHandler
+/// const FrameworkunifiedProtocolCallbackHandler* - Pointer to array of event handler structure
+/// \~english @param [in] uiHandlerCount
+/// UI_32 - Number of event handlers to register (0 to 214748362)
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions (obtained by FrameworkunifiedOpenSession)
+/// \~english @par
+/// FrameworkunifiedProtocolCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedProtocolCallbackHandler
+/// {
+/// UI_32 iCmd; /* Event ID (Identification ID on the service's protocol) */
+/// CbFuncPtr callBack; /* Reference to an XML stream */
+/// }FrameworkunifiedProtocolCallbackHandler;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Services and sessions are established (FrameworkunifiedOpenSession)
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the event handler structure array (pEventHandler) specified by arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusFail]
+/// - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Sets the callback functions for the IDs specified by the pEventHandler arguments in the Dispatcher of the application.\n
+/// Then, it issues a request for registering the application that executed this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the argument.\n
+/// The application specifies the type of event to be received from the service by the event ID.\n
+/// (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - If the callback function pointer in the event handler structure (pEventHandler) specified in the arguments is NULL, the callback function up to NULL is registered.\n
+/// Later, FrameworkunifiedSendMsg() is executed inside this API, and the result becomes the return code of this API.\n
+/// Do not set NULL in the callback function pointer because operation cannot be guaranteed.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+///
+/// This API is used for subscribing to multiple events of a service.
+/// This API also attaches the session event with callbacks.
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] pEventHandler
+/// FrameworkunifiedProtocolCallbackHandler - Array of event handler structures
+/// \param [in] uiHandlerCount
+/// UI_32 - number of event handlers
+/// \param [in] hSession
+/// HANDLE - Session handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedSubscribeToSessionEventWithCallback
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventsWithCallbacks(HANDLE hApp, const FrameworkunifiedProtocolCallbackHandler *pEventHandler,
+ UI_32 uiHandlerCount, HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedUnSubscribeSessionEventWithCallback
+/// \~english @par Brief
+/// Undeliver service-specific events and delete callbacks when events are received
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] uiEventId
+/// UI_32 - Event ID (Identification ID on the service protocol) (PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD)
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions (obtained by FrameworkunifiedOpenSession)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Services and sessions are established (FrameworkunifiedOpenSession)
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusFail]
+/// - If the service specified by the parameter hSession is not registered in the Dispatcher, [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Issues a request to unregister the application that executed this API from the delivery target of device-specific events
+/// of services associated with the handle (hSession) specified in the arguments.\n
+/// Then, the callback functions for the specified event ID (iCmd) are deleted from the application Dispatcher.\n
+/// The application specifies the type of event to be undelivered from the service by the event ID (uiEventId) of the arguments.\n
+/// (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message.
+/// The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedUnSubscribeSessionEventsWithCallbacks, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks
+///
+/// API to unsubscribe from event of a service. Also detaches callback.
+///
+/// \param [in] hApp
+/// HANDLE - Application Handle
+/// \param [in] uiEventId
+/// UI_32 - Event id
+/// \param [in] hSession
+/// HANDLE - Session Handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventWithCallback(HANDLE hApp, UI_32 uiEventId, HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+/// \~english @par Brief
+/// Undeliver multiple service-specific events and delete callbacks when an event is received
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] pEventsArray
+/// PUI_32 - Pointer to an array of Event IDs (Identification IDs in the service's protocol)
+/// \~english @param [in] uiListSize
+/// UI_32 - Number of elements in the event ID (identification ID in the service protocol) array (1 to 1073741813)
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions (obtained by FrameworkunifiedOpenSession)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Services and sessions are established (FrameworkunifiedOpenSession)
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the array (pEventsArray) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldBuf]
+/// - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusFail]
+/// - When the number of elements (uiListSize) of the event ID array specified by the arguments is 0, [eFrameworkunifiedStatusInvldParam]
+/// - If the service specified by the parameter hSession is not registered in the Dispatcher, [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Issues a request to unregister the application that executed this API from the delivery target of the plurality of unique events of the service associated with the handle (hSession) specified by the argument.\n
+/// Then, the callback functions for the IDs specified in the pEventsArray arguments are deleted from the application Dispatcher.\n
+/// The application specifies the type of event to be undelivered from the service by the event ID (pEventsArray) of the arguments.\n
+/// (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks
+///
+/// API to unsubscribe from multiple events of a service. Also detaches callbacks.
+///
+/// \param [in] hApp
+/// HANDLE - Application Handle
+/// \param [in] pEventsArray
+/// PUI_32 - Array of events id's.
+/// \param [in] uiListSize
+/// UI_32 - count of elements in array.
+/// \param [in] hSession
+/// HANDLE - Session Handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedUnSubscribeSessionEventWithCallback
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventsWithCallbacks(HANDLE hApp, PUI_32 pEventsArray, UI_32 uiListSize,
+ HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedPublishPublicEvent
+/// \~english @par Brief
+/// Broadcast application-specific events
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] uiEventId
+/// UI_32 - The event ID to deliver (the identification ID on the service's protocol)
+/// \~english @param [in] pData
+/// PCVOID - Pointer to trasmission data
+/// \~english @param [in] uiLength
+/// UI_32 - Transmission data length
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - The events to be delivered must be specified in the FrameworkunifiedDefinePublicStateEvents.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the application name of the delivery destination in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - Sessioninformation is not found with the application being delivered to within the handles (hApp) specified in the arguments. [eFrameworkunifiedStatusErrOther]
+/// - If the destination handles are inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
+/// - If the message queue handle in the destination handle is NULL [eFrameworkunifiedStatusErrOther]
+/// - If the application name in the destination handles is not set, [eFrameworkunifiedStatusErrOther]
+/// - If the message queue handle in the destination handle is inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
+/// - When the send data length (uiLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL [eFrameworkunifiedStatusErrOther]
+/// - When the name of the application in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
+/// - When the name of the message queue in the destination handle is NULL, [eFrameworkunifiedStatusErrOther]
+/// - When the name of the message queue in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
+/// - If the message queue type of the destination handler is not the send type [eFrameworkunifiedStatusErrOther]
+/// - When the message queue is full [eFrameworkunifiedStatusErrOther]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrOther]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrOther]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusErrOther]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusErrOther]
+/// - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Broadcast application-specific events to subscribed applications.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
+/// Events are delivered to all applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.\n
+/// The data (pData) to be distributed is the same for all distribution destinations.
+/// \~english @par
+/// FrameworkunifiedPublishPrivateEvent should be used to deliver individual data by registered application sessions.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents, FrameworkunifiedPublishPrivateEvent,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+///
+/// This API is used to publish the event to all the client over all the session it is subscribed to.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application framework
+/// \param [in] uiEventId
+/// UI_32 - Event id of Message
+/// \param [in] pData
+/// PCVOID - Data buffer
+/// \param [in] uiLength
+/// UI_32 - Size of data buffer
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedPublishPrivateEvent
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedPublishPublicEvent(HANDLE hApp, UI_32 uiEventId, PCVOID pData, UI_32 uiLength);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedPublishPrivateEvent
+/// \~english @par Brief
+/// Delivers application-specific events to a specified session
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] uiEventId
+/// UI_32 - The event ID to deliver (the identification ID on the service's protocol)
+/// \~english @param [in] pData
+/// PCVOID - Pointer to trasmission data
+/// \~english @param [in] uiLength
+/// UI_32 - Transmission data length
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusServNotFound Perform the event processing
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - The events to be delivered must be specified in the FrameworkunifiedDefinePrivateStateEvents.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the application handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the application handle (hApp) specified in the arguments is not appropriate (disabled) [eFrameworkunifiedStatusInvldParam]
+/// - If the session handle (hSession) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the sessionhandle (hSession) specified in the arguments is not appropriate (is not valid) [eFrameworkunifiedStatusInvldParam]
+/// - The event ID (uiEventId) specified in the parameter is not registered as an event to be delivered to the Dispatcher. [eFrameworkunifiedStatusServNotFound]
+/// - When the session handle (hSession) specified in the arguments is not registered as the delivery destination in the Dispatcher [eFrameworkunifiedStatusServNotFound]
+/// - When the message queue handle in the session handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the application name in the session handle (hSession) specified by the arguments is not set [eFrameworkunifiedStatusInvldHandle]
+/// - The message queue handle in the session handle (hSession) specified by the arguments is invalid. [eFrameworkunifiedStatusInvldHandle]
+/// - When the send data length (uiLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL [eFrameworkunifiedStatusInvldBuf]
+/// - When the name of the application in the session handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue in the session handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue in the session handle (hSession) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the session handle (hSession) specified in the parameter is not the send type [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusFail]
+/// - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Delivers application-specific events to specified sessions in registered applications.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
+/// Events are delivered to the sessions specified in the hSession of arguments among the applications registered in the FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - When broadcasting to all registered applications, use FrameworkunifiedPublishPublicEvent.
+/// - This API shall be executed from within a callback function, and a session-use handle acquired using FrameworkunifiedGetCurrentSessionHandle shall be passed to the parameter hSession.
+/// - Operation cannot be guaranteed if the size of the area indicated by the pointer (pData) address to the send data does not match
+/// the size specified by the send data length (iLength) address.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see FrameworkunifiedDefinePrivateStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedPublishPublicEvent,
+/// FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
+/// FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
+///
+/// This API is used to publish the event over session to the client subscribed to it using session handle.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application framework
+/// \param [in] uiEventId
+/// UI_32 - Event id of Message
+/// \param [in] pData
+/// PCVOID - Data buffer
+/// \param [in] uiLength
+/// UI_32 - Size of data buffer
+/// \param [in] hSession
+/// HANDLE - Session Handle
+///
+/// \return EFrameworkunifiedStatus
+/// eFrameworkunifiedStatusOK - If publish event success
+/// eFrameworkunifiedStatusInvldParam - Invalid parameter passed
+/// eFrameworkunifiedStatusServNotFound - If event uiEventId not subscribed on hSession by a client
+/// Any other values returned by FrameworkunifiedSendMsg
+///
+/// \see FrameworkunifiedPublishPublicEvent
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedPublishPrivateEvent(HANDLE hApp, UI_32 uiEventId, PCVOID pData, UI_32 uiLength, HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedGetServiceAvailabilityTable
+/// returns the list that stores the available services
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application session
+
+/// \return ServiceAvailabilityList
+/// ServiceAvailabilityTable - ServiceAvailabilityList
+///
+/// \see FrameworkunifiedRegisterEvent
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+std::map<std::string, EFrameworkunifiedServiceAvailableStatus> FrameworkunifiedGetServiceAvailabilityTable(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedIsStateMachineApp
+/// \~english @par Brief
+/// Returns the presence or absence of a State Machine Application
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @retval BOOL State Machine Application existence (TRUE: existent/FALSE: nonexistent)
+/// \~english @retval FALSE Judgment failure
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [FALSE]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [FALSE]
+/// \~english @par Detail
+/// Determines whether there is a State Machine Application from the application handle specified by the arguments, and returns the handle.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Not applicable
+/// \~english @see FrameworkunifiedSetStateMachine, FrameworkunifiedHSMDispatcherWithArguments
+///
+/// FrameworkunifiedIsStateMachineApp
+/// Returns TRUE if it's a state machine application else FALSE.
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application session
+///
+/// \return TRUE - if a state machine application.
+/// FALSE - if not a state machine application
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+BOOL FrameworkunifiedIsStateMachineApp(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedGetXMLConfigHandle
+/// Returns the handle to config file handle
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application session
+///
+/// \return handle
+/// HANDLE - Config file handle
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedGetXMLConfigHandle(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedGetNumberOfSession
+/// API to get the number of sessions created in the system.
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] strServiceName
+/// PCSTR - Service name.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 FrameworkunifiedGetNumberOfSession(HANDLE hApp, PCSTR strServiceName);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSetSessionHandle
+/// \~english @par Brief
+/// Registering Session Handles with an Application Dispatcher
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] strServiceName
+/// PCSTR - Service name established for the session
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions (Acquired by FrameworkunifiedGetOpenSessionHandle, etc.)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
+/// - If the service-name (strServiceName) specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
+/// - If the length of the service-name (strServiceName) specified in the arguments is 0, [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// After the application establishes a session with the service using a FrameworkunifiedOpenSession or the like,
+/// the session handle is registered in the application Dispatcher in association with the service name and session ID.
+/// Session handles shall be acquired by using a FrameworkunifiedGetOpenSessionHandle or the like when a response is received from the service.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedGetSessionHandle, FrameworkunifiedRemoveSessionHandle,
+/// FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionWithData, FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithDataSync,
+/// FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedGetOpenSessionSyncHandle,
+///
+/// Sets the session handle in the Application Framework. It stores the mapping between
+/// source, session id and session handle in the application framework.
+///
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] strServiceName
+/// PCSTR -Name of the associated service name
+/// \param [in] hSession
+/// HANDLE - Session handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedCreateSession, FrameworkunifiedGetSessionHandle, FrameworkunifiedRemoveSessionHandle.
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSetSessionHandle(HANDLE hApp, PCSTR strServiceName, HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetSessionHandle
+/// \~english @par Brief
+/// Get the session handle for the given service name and session ID
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] strServiceName
+/// PCSTR - service name
+/// \~english @param [in] uiSessionId
+/// UI_32 - session ID
+/// \~english @retval HANDLE Handles for sessions
+/// \~english @retval NULL NULL pointer(Acquisition failure)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [NULL]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
+/// - If the service-name (strServiceName) specified in the parameter is NULL, [NULL]
+/// - If the session with the service name (strServiceName) specified in the parameter is not registered in the Dispatcher, [NULL]
+/// - If the session with the session ID name (uiSessionId) specified in the parameter is not registered in the Dispatcher, [NULL]
+/// \~english @par Detail
+/// Gets and returns the session handle associated with the specified service and session id from the application Dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedSetSessionHandle, FrameworkunifiedRemoveSessionHandle
+///
+/// Returns the requested session handle associated with service name and session id.
+///
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] strServiceName
+/// PCSTR -Name of the associated service name
+/// \param [in] uiSessionId
+/// HANDLE - Session Id
+///
+/// \return handle
+/// HANDLE - Session handle
+///
+/// \see FrameworkunifiedSetSessionHandle
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedGetSessionHandle(HANDLE hApp, PCSTR strServiceName, UI_32 uiSessionId);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetCurrentSessionHandle
+/// \~english @par Brief
+/// Get the session handle for the most recent incoming message
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @retval HANDLE Handles for sessions
+/// \~english @retval NULL NULL pointer (Acquisition failure)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [NULL]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
+/// - When the source service name obtained from received messages is NULL [NULL]
+/// - If the Dispatcher does not have a session associated with the source service-name retrieved from the received message [NULL]
+/// - When the session ID acquired from the received message is not registered in the Dispatcher, [NULL]
+/// \~english @par Detail
+/// Gets and returns the session-handle associated with the most recently received message from the application's Dispatcher.
+/// \~english @par
+/// The application shall execute this API using an application handle passed as an argument to the callback function.\n
+/// (The callback functions are executed after the information required to execute the APIs is stored in the application handles (hApp) by receiving messages in the frameworks.)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedGetSessionHandle, FrameworkunifiedSetSessionHandle
+///
+/// Returns the session handle for the current session. Useful, if used in the callback
+/// function of protocol. Current session means on which the protocol message received.
+///
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \return handle
+/// HANDLE - Session handle
+///
+/// \see FrameworkunifiedSetSessionHandle, FrameworkunifiedGetSessionHandle.
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedGetCurrentSessionHandle(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedRemoveSessionHandle
+/// \~english @par Brief
+/// Deletes the session handle for the given service name and session ID
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] strServiceName
+/// PCSTR - Service name
+/// \~english @param [in] uiSessionId
+/// UI_32 - session ID
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
+/// - If the service-name (strServiceName) specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
+/// - If the length of the service-name (strServiceName) specified in the arguments is 0, [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// This service call deletes the session handle associated with the specified service name and session ID among the session handles registered in the application's Dispatcher by FrameworkunifiedSetSessionHandle.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - When a session ID that has been deleted (or unregistered) is specified, this API returns an eFrameworkunifiedStatusOK.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedSetSessionHandle
+///
+/// Removes the session handle from the Application Framework associated with service name
+/// and session id. It actually removes the mapping between source, session id and session
+/// handle in the application framework which was set using FrameworkunifiedSetSessionHandle.
+///
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] strServiceName
+/// PCSTR -Name of the associated service name
+/// \param [in] uiSessionId
+/// HANDLE - Session Id
+///
+/// \return handle
+/// HANDLE - Session handle
+///
+/// \see FrameworkunifiedSetSessionHandle
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedRemoveSessionHandle(HANDLE hApp, PCSTR strServiceName, UI_32 uiSessionId);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSetMandatoryServiceInfo
+/// \~english @par Brief
+/// Registers the specified Notification and event ID in the Notification list of the Dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] pNotification
+/// PCSTR - Notification name
+/// \~english @param [in] uiEventId
+/// UI_32 - Event ID (Identification ID on the service's protocol)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the Notification name (pNotification) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the length of the Notification name (pNotification) specified in the arguments is 64 bytes or greater, [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Registers the specified Notification and event ID in the Notification list of the Dispatcher.\n
+/// (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
+/// By registering a Notification with this API, a Notification registration/unregistration request
+/// to the notification service (NS_NPPService) is automatically issued by the Dispatcher when the Dispatcher starts/ends.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - If the Notification name is specified as an empty character, eFrameworkunifiedStatusOK is returned. Cannot guarantee operation.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Broadcast
+/// \~english @see
+///
+/// Sets the given service as Mandatory service in application handle
+///
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pNotification
+/// PCSTR -Name of the Notification
+/// \param [in] uiEventId
+/// UI_32 - event id
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSetMandatoryServiceInfo(HANDLE hApp, PCSTR pNotification, UI_32 uiEventId);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetSessionName
+/// \~english @par Brief
+/// Gets the name of the message queue from the session handle
+/// \~english @param [in] hSession
+/// HANDLE - Handles for sessions
+/// \~english @retval PCSTR Pointer to the message queue name
+/// \~english @retval NULL NULL pointer (Acquisition failure)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hSession specified in the parameter is NULL, [NULL]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [NULL]
+/// \~english @par Detail
+/// Gets the name of the message queue from the session handle (hSession) passed in the parameter.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see
+///
+/// Returns the session name corresponding to the given session handle.
+///
+///
+/// \param [in] hSession
+/// HANDLE - Session handle
+///
+/// \return session_name
+/// PCSTR - Session name
+///
+/// \see
+////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR FrameworkunifiedGetSessionName(HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedIsServiceAvailable
+/// \~english @par Brief
+/// Determine the availability of services
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application
+/// \~english @retval BOOL Use (TRUE: Available, FALSE: Not Available)
+/// \~english @retval FALSE Acquisition failure
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [FALSE]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [FALSE]
+/// - If the received message is not a service-availability notice... [FALSE]
+/// - Incoming messages are invalid [FALSE]
+/// \~english @par Detail
+/// Based on the received Notification, the service is judged to be usable or unusable, and true/false is returned.
+/// \~english @par
+/// The application shall execute this API using the handle of the application passed as the argument of the service availability notification callback function.\n
+/// (The callback functions are executed after the information required to execute the APIs is stored in the application handles (hApp) by receiving messages in the frameworks.)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Broadcast
+/// \~english @see FrameworkunifiedGetServiceNameOnServiceAvailabilityNotification,
+/// FrameworkunifiedSubscribeNotificationWithCallback, FrameworkunifiedSubscribeNotificationsWithCallback
+///
+/// This API should only be called in the callback/reaction associated with the Service
+/// availability notification. It returns TRUE if service is available and FALSE if service
+/// is not available.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+///
+/// \return service_availability
+/// BOOL - returns TRUE if service is available otherwise returns FALSE
+///
+/// \see
+////////////////////////////////////////////////////////////////////////////////////////////
+BOOL FrameworkunifiedIsServiceAvailable(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedPublishServiceAvailability
+/// \~english @par Brief
+/// Publish application availability status
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] bIsAvailable
+/// BOOL - Availability status of the application (TRUE: Available, FALSE: Not Available)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Notification must be registered by FrameworkunifiedRegisterServiceAvailabilityNotification.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - If the service-availability Notification is not set for the handle (hApp) specified in the parameter, [eFrameworkunifiedStatusFail]
+/// - When the message queue handle for NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the application name in the handler (hApp) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle for NPP services in the handle (hApp) specified in the arguments is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the application in the handle (hApp) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue for the NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue for NPP services in the handle (hApp) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - If the message queue type is not the send type [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusErrFail]
+/// \~english @par Detail
+/// Notifies (issues a Notification) the availability status of an application to another application.\n
+/// Applications must use this API to notify other applications when the availability of services provided by the application changes.\n
+/// (However, the state machine managed application generated by FrameworkunifiedHSMDispatcherWithArguments, etc. is excluded because the state machine automatically issues a Notification.)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Broadcast
+/// \~english @see FrameworkunifiedRegisterServiceAvailabilityNotification, FrameworkunifiedGetSelfAvailability
+///
+/// This API publishes service availability status of the service. This API needs to be
+/// used when service is up and ready to process clients requests.
+/// FrameworkunifiedRegisterServiceAvailabilityNotification must be called before calling this API.
+/// In Frameworkunified HSM Framework based application service availability is published by the Framework
+/// So this API can be used only in Non-FRAMEWORKUNIFIED HSM based application.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] bIsAvailable
+/// BOOL - TRUE if Service Available and FALSE if service is unavailable
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+/// FrameworkunifiedRegisterServiceAvailabilityNotification
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedPublishServiceAvailability(HANDLE hApp, BOOL bIsAvailable);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetSelfAvailability
+/// \~english @par Brief
+/// Gets the availability status of the application itself
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @retval BOOL Use (TRUE: Available, FALSE: Not Available)
+/// \~english @retval FALSE Acquisition failure
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [FALSE]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [FALSE]
+/// \~english @par Detail
+/// Gets the availability status of the applications managed in the Dispatcher.\n
+/// Availability states are the values specified by the application when the FrameworkunifiedPublishServiceAvailability is executed.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Not applicable
+/// \~english @see FrameworkunifiedPublishServiceAvailability
+///
+/// This API get service availability status of the service. This API needs to be
+/// used when service is up and ready to process clients requests.
+/// FrameworkunifiedRegisterServiceAvailabilityNotification must be called before calling this API.
+/// In Frameworkunified HSM Framework based application service availability is published by the Framework
+/// So this API can be used only in Non-FRAMEWORKUNIFIED HSM based application.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+/// FrameworkunifiedRegisterServiceAvailabilityNotification, FrameworkunifiedPublishServiceAvailability
+////////////////////////////////////////////////////////////////////////////////////////////
+BOOL FrameworkunifiedGetSelfAvailability(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedRegisterServiceAvailabilityNotification
+/// \~english @par Brief
+/// Registering Application Availability Notification with NPP-Service
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] pNotification
+/// PCSTR - Pointers to Notification names
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the Notification name (pNotification) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the length of the Notification name (pNotification) specified in the arguments is 64 bytes or greater, [eFrameworkunifiedStatusFail]
+/// - When the length of the Notification name (pNotification) specified in the arguments is 0, [eFrameworkunifiedStatusInvldParam]
+/// - Get buffer for sending messages (malloc) failed [eFrameworkunifiedStatusFail]
+/// - When the message queue handle for NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle for NPP services in the handle (hApp) specified in the arguments is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the application in the handle (hApp) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue for the NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue for NPP services in the handle (hApp) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - If the message queue type is not the send type [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusErrFail]
+/// \~english @par Detail
+/// Requests that NPPservice register a Notification to notify the application availability status.\n
+/// A Notification registered by this API can publish the availability status to other applications by executing FrameworkunifiedPublishServiceAvailability from the application.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Operation is not guaranteed when the same application executes this API more than once with different Notification names.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Broadcast
+/// \~english @see FrameworkunifiedUnRegisterServiceAvailabilityNotification, FrameworkunifiedPublishServiceAvailability
+///
+/// This API registers the given service availability notification. Need to be used by
+/// service.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pNotification
+/// PCSTR -Name of the Notification
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+/// FrameworkunifiedPublishServiceAvailability
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedRegisterServiceAvailabilityNotification(HANDLE hApp, PCSTR pNotification);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedUnRegisterServiceAvailabilityNotification
+/// \~english @par Brief
+/// Revoke application availability Notification from NPPservice
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Notification must be registered by FrameworkunifiedRegisterServiceAvailabilityNotification.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - If the service-availability Notification is not set for the handle (hApp) specified in the parameter, [eFrameworkunifiedStatusInvldParam]
+/// - Get buffer for sending messages (malloc) failed [eFrameworkunifiedStatusFail]
+/// - When the message queue handle for NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue handle for NPP services in the handle (hApp) specified in the arguments is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the application in the handle (hApp) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the name of the message queue for the NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the name of the message queue for NPP services in the handle (hApp) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - If the message queue type is not the send type [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Requests that NPPservice abandon the Notification to notify the availability status of the application that executed this API.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Broadcast
+/// \~english @see FrameworkunifiedRegisterServiceAvailabilityNotification
+///
+/// This API unregisters the service availability notification
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+/// FrameworkunifiedPublishServiceAvailability, FrameworkunifiedRegisterServiceAvailabilityNotification
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnRegisterServiceAvailabilityNotification(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCreateSession
+/// \~english @par Brief
+/// Create handles for sessions and register them with the application's Dispatcher
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] pSessionName
+/// PCSTR - Session name (application name or thread name)
+/// \~english @retval HANDLE Handles for sessions
+/// \~english @retval NULL NULL pointer (Acquisition failure)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [NULL]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
+/// - The session name (pSessionName) specified in the arguments is invalid.
+/// (For NULL, if the length is 0 or 20 bytes or more) [NULL]
+/// - When acquisition (malloc) of the message queue management information area fails, [NULL]
+/// - When the normalized message queue name from the session name (pSessionName) is inappropriate (exceeds 16 bytes) [NULL]
+/// - When acquisition (malloc) of the storage area for the message queue name fails, [NULL]
+/// - The open of the message queue (mq_open) failed [NULL]
+/// \~english @par Detail
+/// Creates handles (send message queues) for sessions with the specified application and registers them in the application's Dispatcher.\n
+/// The pSessionName is set to the application name or thread name of the client that establishes the session.\n
+/// This API is used to establish a session with a client application when an application on the service providing side receives a session start request from the client application.
+/// The application shall execute this API from the corresponding callback function.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedDestroySession
+///
+/// This API generates the session handle and sets it in the Application Framework. This API
+/// should be used by the server in the callback function attached to the open session request.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pSessionName
+/// PCSTR - SessionName can be application name or thread name
+///
+/// \return session_handle
+/// HANDLE - Session Handle
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedCreateSession(HANDLE hApp, PCSTR pSessionName);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDestroySession
+/// \~english @par Brief
+/// Destroys the session handle and removes the session handle from the application Dispatcher
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] hSession
+/// HANDLE - Handle for sessions (handle obtained with FrameworkunifiedCreateSession)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
+/// - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
+/// - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
+/// - When the length of the message queue name of the handle (hSession) specified in the arguments is 0, [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Destroys the specified session handle and removes the specified session handle from the application Dispatcher.\n
+/// This API is used when the service-providing application receives a session termination request from the client application and discards the session with the client application.
+/// The application shall execute this API from the corresponding callback function.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see FrameworkunifiedCreateSession
+///
+/// This API destroys the session handle and removes it from the Application Framework.
+/// This API should be called by the server in the callback attached to the close session
+/// request
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] hSession
+/// HANDLE - Session handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDestroySession(HANDLE hApp, HANDLE hSession);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSendResponse
+/// \~english @par Brief
+/// Sending a Response to the Source of an Incoming Message
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] iCmd
+/// UI_32 - Identification ID on the service's protocol
+/// \~english @param [in] length
+/// UI_32 - Data size to be sent (0 to 4294967255)
+/// \~english @param [in] data
+/// PCVOID - Pointer to the data to send
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// - Sessions are registered in the Dispatcher by FrameworkunifiedCreateSession, etc.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
+/// - When the source service name obtained from received messages is NULL [eFrameworkunifiedStatusFail]
+/// - If the Dispatcher does not have a session associated with the source service-name retrieved from the received message [eFrameworkunifiedStatusFail]
+/// - When the session ID acquired from the received message is not registered in the Dispatcher, [eFrameworkunifiedStatusFail]
+/// - If the sessionhandle for incoming messages is NULL [eFrameworkunifiedStatusNullPointer]
+/// - If the handles for sessions corresponding to incoming messages are inappropriate (disabled) [eFrameworkunifiedStatusNullPointer]
+/// - When the message queue handle corresponding to the received message in the session handle is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - When the application name length in the session handle corresponding to received messages is 0, [eFrameworkunifiedStatusInvldHandle]
+/// - Incorrect (invalid) message queue handle in session handle for incoming message [eFrameworkunifiedStatusInvldHandle]
+/// - When the data (data) of the send message specified by the parameter is NULL and the data length (length) is not 0, [eFrameworkunifiedStatusInvldBuf]
+/// - When the length of the application name in the session handle corresponding to the received message exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
+/// - When the message queue name of the session handle corresponding to the received message is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue name of the session handle corresponding to the received message exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the session handle corresponding to the received message is not the transmission type [eFrameworkunifiedStatusInvldHndlType]
+/// - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages [eFrameworkunifiedStatusFail]
+/// - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
+/// - When the size (length) of the data to be sent specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Gets the session ID and session name from received messages, and the corresponding session handles from Dispatcher.\n
+/// Send a response to the sender of the received message using the acquired session handle.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - The maximum data size (length) described above is a theoretical value. The maximum data size that can be actually used depends on the environment requirements.\n
+/// The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
+/// Message header section\n
+/// - Operation cannot be guaranteed when the size of the allocated area indicated by the address of the pointer (data) to the data buffer does not match the size specified by the size of the data buffer (length).
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Method
+/// \~english @see FrameworkunifiedCreateSession, FrameworkunifiedSetSessionHandle
+///
+/// This API retrieves the session handle from the application framework and sends the response
+/// to the client on the same session. The session id and message source name available in the
+/// hApp at that instance is used to get the session handle. This API will work if server has
+/// created session using FrameworkunifiedCreateSession or has used FrameworkunifiedSetSessionHandle after creating the
+/// session.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] iCmd
+/// UI_32 - Protocol command
+/// \param [in] length
+/// UI_32 - size of message data
+/// \param [in] data
+/// PCVOID - message data
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedCreateSession, FrameworkunifiedSetSessionHandle, FrameworkunifiedSendRequest.
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSendResponse(HANDLE hApp, UI_32 iCmd, UI_32 length, PCVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedSendRequest
+/// This API retrieves the session handle from the application framework and sends the request
+/// to the server with specific service name and session id. This API will work, if application
+/// has previously stored associated session handle using FrameworkunifiedSetSessionHandle.
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] pServerName
+/// PCSTR - Name of the server
+/// \param [in] uiSessionId
+/// UI_32 - session id
+/// \param [in] iCmd
+/// UI_32 - Protocol command
+/// \param [in] length
+/// UI_32 - size of message data
+/// \param [in] data
+/// PCVOID - message data
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedSetSessionHandle, FrameworkunifiedSendResponse
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSendRequest(HANDLE hApp, PCSTR pServerName, UI_32 uiSessionId, UI_32 iCmd,
+ UI_32 length, PCVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPSetPersonality
+/// API to send message to Notification Service to set Personality
+///
+/// \param [in] hApp
+/// HANDLE - Application Handle
+/// \param [in] pUserName
+/// PCSTR - Name of the new Personality
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPSetPersonality(HANDLE hApp, PCSTR pUserName);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPChangePersonality
+/// API to send message to Notification Service to set new Personality
+///
+/// \param [in] hApp
+/// HANDLE - Application Handle
+/// \param [in] pUserName
+/// PCSTR - Name of the new Personality
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPChangePersonality(HANDLE hApp, PCSTR pUserName);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSendStopToNSNPP
+/// \~english @par Brief
+/// API that sends a message to the notification service and requests a shutdown
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] eShutdownType
+/// EFrameworkunifiedShutdownType - Shutdown type
+/// \~english @param [in] uiStopMsgData
+/// UI_32 - Flag subject to resetting (Default:0)
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Sends a message to the notification service (NS_NPPService) and requests shutdown.\n
+/// The reset target flag (uiStopMsgData) is valid only when the shutdown type (eShutdownType) is eFrameworkunifiedDataResetShutdown.\n
+/// The reset target flag (uiStopMsgData) indicates the target of data reset at shutdown.\n
+/// The target can be OR-set by using EFrameworkunifiedPersistCategory defined values.\n
+/// The specified target is reset from the non-volatile memory.
+/// Eg: uiStopMsgData = (eFrameworkunifiedUserData | eFrameworkunifiedFactoryCustomerData) = 0x0101\n
+/// eFrameworkunifiedUserData bit : 1 : user data resets\n
+/// eFrameworkunifiedFactoryData bit : 0 : factory data not reset-target\n
+/// eFrameworkunifiedFactoryCustomerData bit : 1 : factory customer data resets\n
+/// eFrameworkunifiedDealerData bit : 0 : persist dealer data not reset-target\n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync
+/// \~english @see
+///
+/// FrameworkunifiedSendStopToNSNPP
+/// To be used by System Manager Service only. This API would push NPP Service to persist
+/// the data/files. Ideally this should be sent during system shutdown by System Manager Service
+///
+/// \param [in] hApp
+/// HANDLE - Application Handle
+///
+/// \param [in] eShutdownType
+/// EFrameworkunifiedShutdownType - shutdown type
+///
+/// \param [in] uiStopMsgData
+/// UI_32 - Flag representing which data to persist and which data to delete from
+/// persistent memory during shutdown.
+/// This needs to be specified only when shutdown type is eFrameworkunifiedDataResetShutdown.
+/// If not specified with DataReset type, then NPP will do normal shutdown.
+/// For other shutdown type this parameter has no effect.
+/// uiStopMsgData = 0 means Normal shutdown persisting all data
+/// else value from enum EFrameworkunifiedPersistCategory, multiple value from enum can be ORed.
+/// Bit value 1 represent resetting of data while value 0 bit represent data persisting
+/// Eg: uiStopMsgData = (eFrameworkunifiedUserData|eFrameworkunifiedFactoryCustomerData) = 0x0101 indicates
+/// eFrameworkunifiedUserData bit value 1 means delete user data
+/// eFrameworkunifiedFactoryData bit value 0 means persist factory data
+/// eFrameworkunifiedFactoryCustomerData bit value 1 means delete factory customer data
+/// eFrameworkunifiedDealerData bit value 0 means persist dealer data
+///
+/// \return status
+/// EFrameworkunifiedStatus - success if request sent to NPPService or error
+/// \~english @par Type
+/// Pub-Sub
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSendStopToNSNPP(HANDLE hApp, EFrameworkunifiedShutdownType eShutdownType, UI_32 uiStopMsgData = 0x0);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedNPGetReadyStatusOfNPP
+/// \~english @par Brief
+/// APIs that send messages to notification services and obtain Ready status
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - The process of NS_NPPService is started.
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
+/// - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
+/// - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
+/// - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
+/// - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
+/// - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
+/// - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Sends messages to the notification service (NS_NPPService) and acquires the Ready status.\n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Method
+/// \~english @see
+///
+/// FrameworkunifiedNPGetReadyStatusOfNPP
+/// To be used by System Manager Service only. SystemManager will use this API to get the
+/// ready status of NPPService.
+///
+/// \param [in] hApp
+/// HANDLE - Application Handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success if request sent to NPPService or error
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPGetReadyStatusOfNPP(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetServiceNameOnServiceAvailabilityNotification
+/// \~english @par Brief
+/// Get the available service names
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [out] pServiceName
+/// PSTR - Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some error occurred
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - When the service-name storage area (pServiceName) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
+/// - If the received message is not a service-availability notice... [eFrameworkunifiedStatusFail]
+/// - Incoming messages are invalid [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// When an application receives a service availability notification, it gets the name of the available service.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - The application shall execute this API using an application handle passed as an argument to the callback function.\n
+/// (The callback functions are executed after the information required to execute the APIs is stored in the application handles (hApp) by receiving messages in the frameworks.)
+/// - The size of the buffer passed in the argument pServiceName must be at least MAX_NAME_SIZE_APP(20).
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Not applicable
+/// \~english @see FrameworkunifiedIsServiceAvailable, FrameworkunifiedSubscribeNotificationWithCallback,
+/// FrameworkunifiedSubscribeNotificationsWithCallback
+///
+/// To be used when client receives service availability notification to get the available
+/// service name.
+///
+/// \param [in] hApp
+/// HANDLE - Application Handle
+/// \param [out] pServiceName
+/// PSTR - Name of the available service.
+/// Size of the buffer should be equal to or greater than MAX_NAME_SIZE_APP
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedGetServiceNameOnServiceAvailabilityNotification(HANDLE hApp, PSTR pServiceName);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedGetCurrentUser
+/// Get the current user for the application
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+///
+/// \return userhandle
+/// HANDLE - Returns current user handle
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedGetCurrentUser(HANDLE hApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedSetUser
+/// Set the current user for the application in application framework
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] hUser
+/// HANDLE - User handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSetUser(HANDLE hApp, HANDLE hUser);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSetAppData
+/// \~english @par Brief
+/// Hold the specified arbitrary data
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] pKey
+/// PCSTR - Key strings
+/// \~english @param [in] pData
+/// PVOID - Service name that can be used
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Retention failure
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
+/// - If the addresses of the key strings are NULL [eFrameworkunifiedStatusInvldParam]
+/// - Failed to retain arbitrary data. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// This function stores an arbitrary data address in the heap using the specified key string as a key.
+/// Since the object to be held is an address, the caller must specify an accessible global address, etc.
+/// The caller should pay attention to the addresses of arbitrary data, since they retain the addresses of arbitrary data even if they are NULL.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Set Get
+/// \~english @see FrameworkunifiedGetAppData, FrameworkunifiedRemoveAppData
+///
+/// FrameworkunifiedSetAppData
+/// This API stores the data pointer against a key in application framework. This can be used
+/// as a global data and can be accessed in the FRAMEWORKUNIFIED functions. Please note that application
+/// developer should avoid using global data.
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] pKey
+/// PSTR - Data key
+/// \param [in] pData
+/// PVOID - data
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedGetAppData, FrameworkunifiedRemoveAppData
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSetAppData(HANDLE hApp, PCSTR pKey, PVOID pData);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetAppData
+/// \~english @par Brief
+/// Returns the address of any data associated with the key string
+/// \~english @param [in] hApp
+/// HANDLE - Handle for the application
+/// \~english @param [in] pKey
+/// PCSTR - Key strings
+/// \~english @retval PVOID Address of arbitrary data
+/// \~english @retval NULL NULL pointers (unsuccessful retrieval, anomaly parameters)
+/// \~english @par Prerequisite
+/// - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the hApp specified in the parameter is NULL, [NULL]
+/// - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
+/// - If the addresses of the Key strings are NULL [NULL]
+/// \~english @par Detail
+/// Returns the corresponding data address using the specified key string as the key.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Set Get
+/// \~english @see FrameworkunifiedSetAppData, FrameworkunifiedRemoveAppData
+///
+/// FrameworkunifiedGetAppData
+/// This API retrieves the data stored against a key in application framework.
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] pKey
+/// PSTR - Data key
+/// \return [in] pData
+/// PVOID - data
+///
+/// \see FrameworkunifiedSetAppData, FrameworkunifiedRemoveAppData
+////////////////////////////////////////////////////////////////////////////////////////////
+PVOID FrameworkunifiedGetAppData(HANDLE hApp, PCSTR pKey);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedRemoveAppData
+/// This API removes the data stored against a key in application framework.
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] pKey
+/// PSTR - Data key
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedSetAppData, FrameworkunifiedGetAppData
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedRemoveAppData(HANDLE hApp, PCSTR pKey);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedGetSystemInfo
+/// Gets some internal notification information
+///
+/// \param [in] hApp
+/// HANDLE - Handle to a Application Framework
+/// \param [in, out] pSystemInfo
+/// PVOID - Buffer pointer to which system info is copied.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
+/// FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedGetSystemInfo(HANDLE hApp, PVOID pSystemInfo);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedSetDeferredSyncResponse
+/// Set sync response deferred flag
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the dispatcher to receive message
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSetDeferredSyncResponse(HANDLE hApp);
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_H__ */ // NOLINT (build/header_guard)
+/**@}*/ // end of framework
+/**@}*/ // end of framework_unified
+/**@}*/ // end of native_service
+/**@}*/ // end of BaseSystem
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_sync.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_sync.h
new file mode 100644
index 00000000..3573e8cc
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_sync.h
@@ -0,0 +1,370 @@
+/*
+ *
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NativeService
+/// \brief This file contains the class declaration for synchronization
+/// API's.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_framework_sync.h
+ * @brief \~english This file contains the class declaration for synchronization
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_SYNC_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_SYNC_H__
+
+#include <pthread.h>
+#include <native_service/frameworkunified_framework_types.h>
+#include <time.h>
+#include <map>
+#include <string>
+
+struct SFrameworkunifiedSyncDataPacket;
+
+// Map containing the synchronization data as per the notification
+typedef std::map<std::string, SFrameworkunifiedSyncDataPacket *> TSyncDataPacketList;
+
+// Iterator to the map containing the synchronization data as per the notification
+typedef TSyncDataPacketList::iterator TSyncDataPacketItr;
+
+/**
+ * @class CFrameworkunifiedSyncData
+ * \~english @brief this file has the CFrameworkunifiedSyncData class definitions
+ * \~english @par Brief Introduction
+ * - This class provids some functions to handle the synchronization data as per the notification.
+ *
+ */
+class CFrameworkunifiedSyncData {
+ public:
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedSyncData
+ /// \~english @par Brief
+ /// - This function is used to get the singleton instance of class.
+ /// \~english @param None
+ /// \~english @retval CFrameworkunifiedSyncData - singleton instance of class
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - If m_psSyncData is NULL,will create a new object,otherwise, will return m_psSyncData.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @see CFrameworkunifiedSyncData::CFrameworkunifiedSyncData
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ static CFrameworkunifiedSyncData *FrameworkunifiedGetSyncDataInstance();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedSyncData
+ /// \~english @par Brief
+ /// - This function is used to release the instance of class.
+ /// \~english @param None
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval except eFrameworkunifiedStatusOK - failure
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - system function error.[Not eFrameworkunifiedStatusOK]
+ /// \~english @par Detail
+ /// - If m_psSyncData is NULL,return success,otherwise, will delete m_psSyncData.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see CFrameworkunifiedSyncData::CFrameworkunifiedSyncData
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ static EFrameworkunifiedStatus FrameworkunifiedReleaseSyncDataInstance();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedSyncData
+ /// \~english @par Brief
+ /// - This method is used by the application to start the notification synchronization thread.
+ /// \~english @param [in] hApp
+ /// HANDLE - Application Handle.
+ /// \~english @retval eFrameworkunifiedStatusOK - On Success
+ /// \~english @retval eFrameworkunifiedStatusThreadAlreadyRunning - If thread already running
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - Null Handle
+ /// \~english @retval eFrameworkunifiedStatusInvldHandle - Invalid Handle
+ /// \~english @par Preconditons
+ /// - The function FrameworkunifiedReleaseSyncDataInstance is successed, object is created successfully.
+ /// \~english @par Change of internal status
+ /// -m_hSyncThreadMsgQHandle saves sync thread handle.
+ /// \~english @par Conditions of processing failure
+ /// - m_hSyncThreadMsgQHandle is not NULL, thread already running.[eFrameworkunifiedStatusThreadAlreadyRunning]
+ /// - Null Handle.[eFrameworkunifiedStatusNullPointer]
+ /// - Invalid Handle.[eFrameworkunifiedStatusInvldHandle]
+ /// \~english @par Detail
+ /// - This fucntion create a child thread of hApp, m_hSyncThreadMsgQHandle saves the child thread.
+ /// - The child thread will be used to receive and send notification data.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedStartNotificationSync(HANDLE hApp);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedSyncData
+ /// \~english @par Brief
+ /// - This method is used to stop the synchronization notification thread.
+ /// \~english @param [in] hApp
+ /// HANDLE - Application Handle.
+ /// \~english @retval eFrameworkunifiedStatusOK - On Success
+ /// \~english @retval eFrameworkunifiedStatusThreadNotExist - If thread already running
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - Null Handle
+ /// \~english @retval eFrameworkunifiedStatusInvldHandle - Invalid Handle
+ /// \~english @par Preconditons
+ /// -The function FrameworkunifiedStartNotificationSync is successed.
+ /// \~english @par Change of internal status
+ /// - m_hSyncThreadMsgQHandle will be delete.
+ /// \~english @par Conditions of processing failure
+ /// - If thread doesn't exist.[eFrameworkunifiedStatusThreadNotExist]
+ /// - Null Handle.[eFrameworkunifiedStatusNullPointer]
+ /// - Invalid Handle.[eFrameworkunifiedStatusInvldHandle]
+ /// \~english @par Detail
+ /// - This method is used by the application to stop the notification synchronization thread.
+ /// m_hSyncThreadMsgQHandle is Invalid and can't be used to get notification data for hApp.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedStopNotificationSync(HANDLE hApp);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedSyncData
+ /// \~english @par Brief
+ /// - API to subscribe to a synchronization notification data.
+ /// \~english @param [in] f_cNotification
+ /// std::string - Notification to be subscribed.
+ /// \~english @retval eFrameworkunifiedStatusOK - On Success
+ /// \~english @retval eFrameworkunifiedStatusFail - On failure
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If f_cNotification is empty or m_hSyncThreadAppHandle is NULL.[eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - API to subscribe to a synchronization notification data.\n
+ /// application will get the synchronization notification data at run-time.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - eFrameworkunifiedStatusFail:Failure
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationWithDataSync(const std::string &f_cNotification);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedSyncData
+ /// \~english @par Brief
+ /// - API to unsubscribe to a synchronization notification data.
+ /// \~english @param [in] f_cNotification
+ /// std::string - Notification to be subscribed.
+ /// \~english @retval eFrameworkunifiedStatusOK - On Success
+ /// \~english @retval eFrameworkunifiedStatusFail - On failure
+ /// \~english @par Preconditons
+ /// - the FrameworkunifiedSubscribeNotificationWithDataSync result is success.
+ /// \~english @par Change of internal status
+ /// - The synchronization data's pointor of the special notification will be remove and delete.
+ /// - The synchronization data of the special notification will delete from m_mSyncDataMap.
+ /// \~english @par Conditions of processing failure
+ /// - If f_cNotification is empty or m_hSyncThreadAppHandle is NULL.[eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - API to unsubscribe to a synchronization notification data.\n
+ /// After unsubscribing,notification synchronization data of application will be freed.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - eFrameworkunifiedStatusFail:Failure
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedUnSubscribeNotificationWithDataSync(const std::string &f_cNotification);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedSyncData
+ /// \~english @par Brief
+ /// - This function is used to get the synchronization notification data for a particular notification.
+ /// \~english @param [in] f_cNotification
+ /// std::string - Notification for which data is required
+ /// \~english @param [in] f_pBuffer
+ /// PVOID - Buffer for the synchronization data
+ /// \~english @param [in] f_nBufferSize
+ /// UI_16 - size of notification data buffer
+ /// \~english @retval eFrameworkunifiedStatusOK - Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - Null pointor
+ /// \~english @retval eFrameworkunifiedStatusFail - failure
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If f_cNotification is empty or m_hSyncThreadAppHandle is NULL or f_nBufferSize is 0.[eFrameworkunifiedStatusFail]
+ /// - If l_itSyncDataPacketItr is not in m_mSyncDataMap.[eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// - This function is used to get the synchronization notification data for a particular notification.
+ /// f_cNotification is the iterator to the map containing the synchronization data of notification,\n
+ /// using this iterator to get data from m_mSyncDataMap.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedGetSyncNotificationData(const std::string &f_cNotification, PVOID f_pBuffer, UI_16 f_nBufferSize);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedSyncData
+ /// \~english @par Brief
+ /// - API to get the size of synchronization notification data.
+ /// \~english @param [in] f_cNotification
+ /// const std::string - Notification to be subscribed.
+ /// \~english @retval UI_32 - size of notification data
+ /// \~english @par Preconditons
+ /// -Instance is created successfully.
+ /// \~english @par Change of internal status
+ /// -None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - This function is used to get the size of the synchronization data.
+ /// if f_cNotification is null or l_itSyncDataPacketItr is not in m_mSyncDataMap\n
+ /// the function will return 0.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ UI_32 FrameworkunifiedGetSyncDataSize(const std::string &f_cNotification);
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedSyncData
+ /// Constructor of CFrameworkunifiedSyncData class
+ ///
+ /// \param
+ ///
+ /// \return
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedSyncData();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedSyncData
+ /// Destructor of CFrameworkunifiedSyncData class
+ ///
+ /// \param
+ ///
+ /// \return
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CFrameworkunifiedSyncData();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedSyncDataThreadStart
+ /// Callback on the start of the sync thread.
+ ///
+ /// \param [in] hThread
+ /// HANDLE - Thread Application Handle.
+ ///
+ /// \return status
+ /// EFrameworkunifiedStatus - success or error
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedSyncDataThreadStart(HANDLE hThread);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedSyncDataThreadStop
+ /// Callback on the stop of the sync thread.
+ ///
+ /// \param [in] hThread
+ /// HANDLE - Thread Application Handle.
+ ///
+ /// \return status
+ /// EFrameworkunifiedStatus - success or error
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedSyncDataThreadStop(HANDLE hThread);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedSyncDataNotifCallback
+ /// Callback on the receiving the published notification.
+ ///
+ /// \param [in] hThread
+ /// HANDLE - Thread Application Handle.
+ ///
+ /// \return status
+ /// EFrameworkunifiedStatus - success or error
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedSyncDataNotifCallback(HANDLE hThread);
+
+ static CFrameworkunifiedSyncData *m_psSyncData; ///< singleton instance of class
+
+ BOOL m_bSyncThreadStarted; /// Check to verify if thread started
+
+ TSyncDataPacketList
+ *m_mSyncDataMap; /// Pointer to the map containing the synchronization data as per the notification
+
+ HANDLE m_hSyncThreadAppHandle; /// S ynchronization thread Application Handle
+
+ HANDLE m_hAppHandle; /// Application Handle
+
+ HANDLE m_hSyncThreadMsgQHandle; /// Synchronization thread message queue handle
+
+ static pthread_spinlock_t m_pSyncLock; /// Synchronization Spinlock
+};
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_SYNC_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_system_if.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_system_if.h
new file mode 100644
index 00000000..af7a4f9b
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_system_if.h
@@ -0,0 +1,110 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief This file provides framework's API which are used by system services.
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_framework_system_if.h
+ * @brief \~english This file provides framework's API which are used by system services.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_INC_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_SYSTEM_IF_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_INC_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_SYSTEM_IF_H__
+
+#include <native_service/frameworkunified_types.h>
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup FrameworkunifiedNPClearPersistedData
+ /// \~english @par Summary
+ /// API to delete all the persistent files and notification data from persistent memory
+ /// related to NS_NPS.
+ /// Note: This API is only to be used HMI service.
+ /// This API should not be used by the other application.
+ /// \~english @param [in] hApp
+ /// hApp - Handle to the Framework
+ /// \~english @par
+ /// hApp HANDLE*
+ /// \~english @param [in] eFrameworkunifiedClearPersistenceScope
+ /// eFrameworkunifiedClearPersistenceScope - specifies what data to delete from persistent memory
+ /// \~english @par
+ /// eFrameworkunifiedClearPersistenceScope EFrameworkunifiedClearPersistence enum
+ /// \~english @code
+ /// typedef enum _EFrameworkunifiedClearPersistence {
+ /// eFrameworkunifiedClearAllData = 0, ///< clears all the data in persistence memory for all users
+ /// ///< (currently only this enum value is supported.)
+ /// eFrameworkunifiedClearAllApplicationData, ///< clears all the data(files, folders) related to all application for all
+ /// users
+ /// eFrameworkunifiedClearAllNotificationData, ///< clears all the notification data related to all application for all users
+ /// eFrameworkunifiedClearCurrentUserData, ///< clears all the data in persistence memory for current users
+ /// eFrameworkunifiedClearCurrentUserApplicationData, ///< clears all the data(files, folders) related to all application for
+ /// current users
+ /// eFrameworkunifiedClearCurrentUserNotificationData ///< clears all the notification data related to all application for
+ /// current users
+ /// } EFrameworkunifiedClearPersistence;
+ /// @endcode
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @par
+ /// eFrameworkunifiedStatusOK
+ /// eFrameworkunifiedStatusNullPointer
+ /// eFrameworkunifiedStatusInvldParam
+ /// \~english @par Preconditions
+ /// -
+ /// \~english @par Change of the internal state
+ /// - The internal state is not changed.
+ /// \~english @par Causes of failures
+ /// - If input parameter Framework handler is invalid. [eFrameworkunifiedStatusNullPointer]
+ /// - If communicate handler of NPPService is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Function NPClearPersistedData return invalid parameter. [eFrameworkunifiedStatusInvldParam]
+ /// \~english @par Classification
+ /// - public
+ /// \~english @par Type
+ /// - sync only
+ /// \~english @par Detail
+ /// API to delete all the persistent files and notification data from persistent memory
+ /// related to NS_NPS.
+ /// Note: This API is only to be used HMI service.
+ /// This API should not be used by the other application.
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPClearPersistedData(HANDLE hApp, EFrameworkunifiedClearPersistence eFrameworkunifiedClearPersistenceScope = eFrameworkunifiedClearAllData);
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_INC_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_SYSTEM_IF_H__ */ // NOLINT (build/header_guard)
+/**@}*/ // end of framework
+/**@}*/ // end of framework_unified
+/**@}*/ // end of native_service
+/**@}*/ // end of BaseSystem
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_types.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_types.h
new file mode 100644
index 00000000..aa4119df
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_framework_types.h
@@ -0,0 +1,173 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup
+/// \brief Application framework's core structures and data types.
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_framework_types.h
+ * @brief \~english Application framework's core structures and data types.
+ *
+ */
+/** @addtogroup BaseSystem
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_TYPES_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_TYPES_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <boost/function.hpp>
+
+#define MAX_LEN MAX_QUEUE_NAME_SIZE
+#define MAX_MSGQ_BUFFER MAX_QUEUE_MSG_SIZE
+#define MAX_SESSION_ID_VAL 0xFFFF
+#define MAX_FD_MULTIWAITING 8
+
+#define FRAMEWORKUNIFIED_ANY_SOURCE "NS_ANY_SRC"
+#define FRAMEWORKUNIFIED_ANY_COMMAND 0xFFFFFFFF
+#define FRAMEWORKUNIFIED_NS_NPSERVICE "NS_NPPService"
+#define FRAMEWORKUNIFIED_NS_VERSIONUTIL "nsverutil"
+#define FRAMEWORKUNIFIED_NS_MSGPROFILERUTIL "NSDisMsgProfile"
+#define FRAMEWORKUNIFIED_NS_REMOTECONTROLSERVICE "NS_RemoteControlService"
+
+// call back function definition
+typedef boost::function< EFrameworkunifiedStatus(HANDLE) > TCbFunction;
+typedef TCbFunction CallbackFunctionPtr;
+typedef TCbFunction CbFuncPtr;
+typedef EFrameworkunifiedStatus(*CbArgumentParser)(SI_32 argument, PCHAR argumentValue);
+
+typedef enum _EFrameworkunifiedServiceAvailableStatus {
+ eFrameworkunifiedServiceAvailable = 0,
+ eFrameworkunifiedServiceNotAvailable,
+} EFrameworkunifiedServiceAvailableStatus;
+
+// Share Memory Retrieve Types
+typedef enum _ESMRetrieveTypes {
+ eSMRRelease = 0, ///< data will be released on a read
+ eSMRRetain = 1, ///< data will be retained in the shared memory
+} ESMRetrieveTypes;
+
+/**
+ * \~english Callbacks structure of Application Life cycle
+ */
+typedef struct _FrameworkunifiedDefaultCallbackHandler {
+ CbFuncPtr onInitilization; //!< \~english Callback of initialization
+ CbFuncPtr onDestroy; //!< \~english Callback of destroy
+ CbFuncPtr onStart; //!< \~english Callback of startup
+ CbFuncPtr onStop; //!< \~english Callback of stop
+ CbFuncPtr onPreStart; //!< \~english Callback of pre start
+ CbFuncPtr onPreStop; //!< \~english Callback of pre stop
+ CbFuncPtr onBackgroundStart; //!< \~english Callback of Background start
+ CbFuncPtr onBackgroundStop; //!< \~english Callback of Background stop
+ CbFuncPtr onDebugDump; //!< \~english Callback of debug dump
+ CbFuncPtr createStateMachine; //!< \~english Callback of created state machine
+ CbFuncPtr ssFrameworkInterface; //!< \~english Callback to Establish a session with the system_manager
+} FrameworkunifiedDefaultCallbackHandler;
+
+// LCOV_EXCL_BR_START 11:Occurred in the above test
+typedef struct _FrameworkunifiedProtocolCallbackHandler {
+ UI_32 iCmd;
+ CbFuncPtr callBack;
+} FrameworkunifiedProtocolCallbackHandler;
+// LCOV_EXCL_BR_STOP
+
+typedef struct _FrameworkunifiedFdProtocolCallbackHandler {
+ int fd;
+ CbFuncPtr callBack;
+} FrameworkunifiedFdProtocolCallbackHandler;
+
+// LCOV_EXCL_BR_START 11:Occurred in the above test
+typedef struct _FrameworkunifiedNotificationCallbackHandler {
+ CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION];
+ CbFuncPtr callBack;
+} FrameworkunifiedNotificationCallbackHandler;
+// LCOV_EXCL_BR_STOP
+
+typedef struct _FrameworkunifiedNotificationsList {
+ CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION];
+ UI_32 uiLengthData;
+ EFrameworkunifiedNotificationType persType;
+} FrameworkunifiedNotificationsList;
+
+typedef struct _FrameworkunifiedProtocolEvent {
+ UI_32 iCmd;
+ UI_32 iEventId;
+} FrameworkunifiedProtocolEvent;
+
+typedef struct _FrameworkunifiedNotificationEvent {
+ CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION];
+ UI_32 iEventId;
+} FrameworkunifiedNotificationEvent;
+
+typedef struct _ServiceAvailability {
+ CHAR cServiceName[MAX_NAME_SIZE_APP];
+ EFrameworkunifiedServiceAvailableStatus eServiceAvailability;
+} ServiceAvailability;
+
+typedef enum _EFrameworkunifiedShutdowntatus {
+ eFrameworkunifiedShutdownOk = 0,
+ eFrameworkunifiedShutdownTimeout,
+ eFrameworkunifiedShutdownFail,
+} EFrameworkunifiedShutdownStatus;
+
+typedef struct _ShutdownComplete {
+ CHAR cServiceName[MAX_NAME_SIZE_APP];
+ EFrameworkunifiedShutdownStatus eShutdownCompleteStatus;
+} ShutdownComplete;
+
+typedef struct _CustomCommandLineOptions {
+ PCSTR cShortOptions;
+ PCHAR cLongOptions; // reserved for long options.
+ CbArgumentParser callback;
+} CustomCommandLineOptions;
+
+/// Scheduling Policy
+typedef enum _EFrameworkunifiedSchedPolicy {
+ eFrameworkunifiedSchedPolicyInherit = 0,
+ eFrameworkunifiedSchedPolicyTSS,
+ eFrameworkunifiedSchedPolicyFIFO,
+ eFrameworkunifiedSchedPolicyRR,
+ eFrameworkunifiedSchedPolicyMAX
+} EFrameworkunifiedSchedPolicy;
+
+/// Child Thread Attribute
+typedef struct _FrameworkunifiedChildThreadAttr {
+ EFrameworkunifiedSchedPolicy schedPolicy;
+ SI_32 schedPriority;
+} FrameworkunifiedChildThreadAttr;
+
+#endif /* __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_TYPES_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_multithreading.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_multithreading.h
new file mode 100644
index 00000000..b9435969
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_multithreading.h
@@ -0,0 +1,745 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief Application framework's core structures and data types.
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_multithreading.h
+ * @brief \~english Application framework's core structures and data types.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __NSFRAMEWORK_NFRAMEWORKCORE_MULTITHREADING__ // NOLINT (build/header_guard)
+#define __NSFRAMEWORK_NFRAMEWORKCORE_MULTITHREADING__
+
+#include <native_service/frameworkunified_framework_types.h>
+
+#define INHERIT_PARENT_THREAD_PRIO -100
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCreateChildThread
+/// \~english @par Brief
+/// Create child thread and dispatcher for child thread, and initialize it
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application of parent thread
+/// \~english @param [in] childName
+/// PCSTR - Child thread name
+/// \~english @param [in] CbInitialize
+/// CbFuncPtr - Pointer to the callback function for initializing child thread
+/// \~english @param [in] CbShutdown
+/// CbFuncPtr - Pointer to the callback function for stopping child thread
+/// \~english @retval HANDLE handle for communicate with child thread
+/// \~english @retval NULL Failure to get HANDLE
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// - Message queue name specified in the argument (childName) is not appropriate (NULL, over 16byte). [NULL]
+/// - Callback function pointer specified in the argument (CbInitialize, CbShutdown) is NULL. [NULL]
+/// - Failed to set the inherit-scheduler attribute (pthread_attr_setinheritsched) of the child thread. [NULL]
+/// - Failed to initialize barrier object (pthread_barrier_init) for thread synchronization. [NULL]
+/// - Failed to create child thread (pthread_create). [NULL]
+/// - Failed to wait thread synchronization (pthread_barrier_wait). [NULL]
+/// - Can not be acquired memory for message queue name(malloc). [NULL]
+/// - Failed to open message queue(mq_open). [NULL]
+/// \~english @par Detail
+/// This API creates child thread and returns handle for communicate with child thread.\n
+/// Generated child thread creates dispatcher for itself, and initializes the dispatcher. \n
+/// It starts to mainloop that receives request or notification,
+/// and runs registered callback to dispatcher for child thread.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Open Close
+/// \~english @see
+/// FrameworkunifiedDestroyChildThread
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedCreateChildThread(HANDLE hApp, PCSTR childName, CbFuncPtr CbInitialize, CbFuncPtr CbShutdown);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCreateChildThreadWithPriority
+/// \~english @par Brief
+/// Create child thread with specified priority and dispatcher for child thread, and initialize it
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application of parent thread
+/// \~english @param [in] childName
+/// PCSTR - Child thread name
+/// \~english @param [in] CbInitialize
+/// CbFuncPtr - Pointer to the callback function for initializing child thread
+/// \~english @param [in] CbShutdown
+/// CbFuncPtr - Pointer to the callback function for stopping child thread
+/// \~english @param [in] schedPrio
+/// SI_32 - priority of child thread
+/// (If INHERIT_PARENT_THREAD_PRIO specified, inherit from parent thread priority)
+/// \~english @retval HANDLE handle for communicate with child thread
+/// \~english @retval NULL Failure to get HANDLE
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// - Message queue name specified in the argument (childName) is not appropriate (NULL, over 16byte). [NULL]
+/// - Callback function pointer specified in the argument (CbInitialize,CbShutdown) is NULL. [NULL]
+/// - Failed to set the inherit-scheduler attribute (pthread_attr_setinheritsched) of the child thread. [NULL]
+/// - Failed to initialize barrier object (pthread_barrier_init) for thread synchronization. [NULL]
+/// - Failed to create child thread (pthread_create). [NULL]
+/// - Failed to wait thread synchronization (pthread_barrier_wait). [NULL]
+/// - Can not be acquired memory for message queue name(malloc). [NULL]
+/// - Failed to open message queue(mq_open). [NULL]
+/// \~english @par Detail
+/// This API creates child thread with specified priority(schedPrio) and
+/// returns handle for communicate with child thread.\n
+/// The thread scheduling policy of generated child thread is fixed to first in-first out scheduling
+/// (eFrameworkunifiedSchedPolicyFIFO).\n
+/// Generated child thread creates dispatcher for itself, and initializes the dispatcher. \n
+/// It starts to mainloop that receives request or notification,
+/// and runs registered callback to dispatcher for child thread.\n
+/// \n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Open Close
+/// \~english @see
+/// FrameworkunifiedDestroyChildThread
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedCreateChildThreadWithPriority(HANDLE hApp, PCSTR childName, CbFuncPtr CbInitialize
+ , CbFuncPtr CbShutdown, SI_32 schedPrio);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCreateDispatcherChild
+/// \~english @par Breif
+/// Creates and initializes a handle for the child thread's application
+/// \~english @param [out] hChildApp
+/// HANDLE & - A handle for the child thread's application
+/// \~english @param [in] childName
+/// PCSTR - Child thread name
+/// \~english @param [in] parentName
+/// PCSTR - Parent thread name
+/// \~english @retval eFrameworkunifiedStatusOK succss
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusNullPointer Framework generation failure
+/// \~english @par Prerequisite
+/// - A child thread has been created.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If the childName to the child thread name of the application specified in the arguments is NULL [eFrameworkunifiedStatusInvldParam]
+/// - If the parentName to the parent thread name of the application specified in the arguments is NULL [eFrameworkunifiedStatusInvldParam]
+/// - When the parent thread name (parentName) of the application specified in the arguments exceeds 16 bytes [eFrameworkunifiedStatusInvldParam]
+/// - When the normalized message queue name from the childName specified in the arguments exceeds 16 bytes [eFrameworkunifiedStatusNullPointer]
+/// - Failed to open a message queue (mq_open) [eFrameworkunifiedStatusNullPointer]
+/// - When acquisition (malloc) of the message queue management information area fails [eFrameworkunifiedStatusNullPointer]
+/// - If the creation (socket, bind, listen) of sockets for error monitoring fails [eFrameworkunifiedStatusFail]
+/// - When a message queue is created with the name of an already registered thread [eFrameworkunifiedStatusFail]
+/// - Failed to create epoll instances (epoll_create1) [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to register Dispatcher message queue descriptor for epoll instances (epoll_ctl) [eFrameworkunifiedStatusFail]
+/// - Failed to create file descriptor for receiving events to Dispatcher (eventfd) [eFrameworkunifiedStatusFail]
+/// - Failed to register file descriptor for receiving Dispatcher events to epoll instances (epoll_ctl) [eFrameworkunifiedStatusFail]
+/// - Failed to register socket for monitoring Dispatcher error in epoll instances (epoll_ctl) [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// This API creates a handle for the application of the child thread, initializes it, and returns the handle.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Open Close
+/// \~english @see
+///
+/// \~english @par Brief
+/// Create and initialize an threads dispatcher.
+///
+/// \~english \param [out] hChildApp
+/// HANDLE& - Reference of application handle
+/// \~english \param [in] childName
+/// PCSTR - create thread name
+/// \~english \param [in] parentName
+/// PCSTR - parent thread name
+///
+/// \~english \return status
+/// EFrameworkunifiedStatus - eFrameworkunifiedStatusOK if Success
+/// possible errors from call CreateDispatcher
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedCreateDispatcherChild(HANDLE &hChildApp, PCSTR childName, PCSTR parentName); // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCreateChildThreadWithAttribute
+/// \~english @par Brief
+/// Create child thread with specified thread attributes and dispatcher for child thread, and initialize it
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application of parent thread
+/// \~english @param [in] childName
+/// PCSTR - Child thread name
+/// \~english @param [in] CbInitialize
+/// CbFuncPtr - Pointer to the callback function for initializing child thread
+/// \~english @param [in] CbShutdown
+/// CbFuncPtr - Pointer to the callback function for stopping child thread
+/// \~english @param [out] attr
+/// FrameworkunifiedChildThreadAttr* - Pointer to thread attributes
+/// \~english @par
+/// FrameworkunifiedChildThreadAttr Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedChildThreadAttr
+/// {
+/// EFrameworkunifiedSchedPolicy schedPolicy; // Thread scheduling policy(Default is eFrameworkunifiedSchedPolicyInherit)
+/// SI_32 schedPriority; // Thread priority(Default is INHERIT_PARENT_THREAD_PRIO)
+/// } FrameworkunifiedChildThreadAttr;
+/// @endcode
+/// \~english @par
+/// enum EFrameworkunifiedSchedPolicy Variable
+/// \~english @code
+/// typedef enum _EFrameworkunifiedSchedPolicy {
+/// eFrameworkunifiedSchedPolicyInherit = 0, // Inherit from parent thread.
+/// eFrameworkunifiedSchedPolicyTSS, // Time Sharing System scheduling
+/// eFrameworkunifiedSchedPolicyFIFO, // First in-first out scheduling
+/// eFrameworkunifiedSchedPolicyRR, // Round-robin scheduling
+/// eFrameworkunifiedSchedPolicyMAX // EFrameworkunifiedSchedPolicy Max(Not to be used.)
+/// } EFrameworkunifiedSchedPolicy;
+/// @endcode
+/// \~english @retval HANDLE handle for communicate with child thread
+/// \~english @retval NULL Failure to get HANDLE
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// - Message queue name specified in the argument (childName) is not appropriate (NULL, over 16byte). [NULL]
+/// - Callback function pointer specified in the argument (CbInitialize,CbShutdown) is NULL. [NULL]
+/// - Thread attribute specified in the argument (attr) is NULL. [NULL]
+/// - Failed to set the inherit-scheduler attribute (pthread_attr_setinheritsched) of the child thread. [NULL]
+/// - Failed to initialize barrier object (pthread_barrier_init) for thread synchronization. [NULL]
+/// - Failed to create child thread (pthread_create). [NULL]
+/// - Failed to wait thread synchronization (pthread_barrier_wait). [NULL]
+/// - Can not be acquired memory for message queue name(malloc). [NULL]
+/// - Failed to open message queue(mq_open). [NULL]
+/// \~english @par Detail
+/// This API creates child thread with specified thread attributes(attr)
+/// and returns handle for communicate with child thread.\n
+/// Generated child thread creates dispatcher for itself, and initializes the dispatcher. \n
+/// It starts to mainloop that receives request or notification,
+/// and runs registered callback to dispatcher for child thread.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Open Close
+/// \~english @see
+/// FrameworkunifiedDestroyChildThread
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedCreateChildThreadWithAttribute(HANDLE hApp, PCSTR childName, CbFuncPtr CbInitialize
+ , CbFuncPtr CbShutdown, const FrameworkunifiedChildThreadAttr *attr);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCreateChildThreadAttrInit
+/// \~english @par Brief
+/// Initialize thread attribute object.
+/// \~english @param [out] attr
+/// FrameworkunifiedChildThreadAttr* - Pointer to thread attribute
+/// \~english @par
+/// FrameworkunifiedChildThreadAttr Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedChildThreadAttr
+/// {
+/// EFrameworkunifiedSchedPolicy schedPolicy; // Thread scheduling policy(Default is eFrameworkunifiedSchedPolicyInherit)
+/// SI_32 schedPriority; // Thread priority(Default is INHERIT_PARENT_THREAD_PRIO)
+/// } FrameworkunifiedChildThreadAttr;
+/// @endcode
+/// \~english @par
+/// enum EFrameworkunifiedSchedPolicy Variable
+/// \~english @code
+/// typedef enum _EFrameworkunifiedSchedPolicy {
+/// eFrameworkunifiedSchedPolicyInherit = 0, // Inherit from parent thread.
+/// eFrameworkunifiedSchedPolicyTSS, // Time Sharing System scheduling
+/// eFrameworkunifiedSchedPolicyFIFO, // First in-first out scheduling
+/// eFrameworkunifiedSchedPolicyRR, // Round-robin scheduling
+/// eFrameworkunifiedSchedPolicyMAX // EFrameworkunifiedSchedPolicy Max(Not to be used.)
+/// } EFrameworkunifiedSchedPolicy;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @par Prerequisite
+/// None
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - the argument attr is NULL. [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Detail
+/// This API initialize thread attribute (attr) by default value of NS framework.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// FrameworkunifiedCreateChildThreadWithAttribute
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedCreateChildThreadAttrInit(FrameworkunifiedChildThreadAttr *attr);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCreateChildThreadAttrSetSched
+/// \~english @par Brief
+/// Initialize thread attribute object with specified value.
+/// \~english @param [out] attr
+/// FrameworkunifiedChildThreadAttr* - Pointer to thread attribute
+/// \~english @param [in] policy
+/// EFrameworkunifiedSchedPolicy - Thread shcheduling policy at thread start
+/// \~english @param [in] priority
+/// SI_32 - Thread priority at thread start
+/// \~english @par
+/// FrameworkunifiedChildThreadAttr Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedChildThreadAttr
+/// {
+/// EFrameworkunifiedSchedPolicy schedPolicy; // Thread scheduling policy(Default is eFrameworkunifiedSchedPolicyInherit)
+/// SI_32 schedPriority; // Thread priority(Default is INHERIT_PARENT_THREAD_PRIO)
+/// } FrameworkunifiedChildThreadAttr;
+/// @endcode
+/// \~english @par
+/// enum EFrameworkunifiedSchedPolicy Variable
+/// \~english @code
+/// typedef enum _EFrameworkunifiedSchedPolicy {
+/// eFrameworkunifiedSchedPolicyInherit = 0, // Inherit from parent thread.
+/// eFrameworkunifiedSchedPolicyTSS, // Time Sharing System scheduling
+/// eFrameworkunifiedSchedPolicyFIFO, // First in-first out scheduling
+/// eFrameworkunifiedSchedPolicyRR, // Round-robin scheduling
+/// eFrameworkunifiedSchedPolicyMAX // EFrameworkunifiedSchedPolicy Max(Not to be used.)
+/// } EFrameworkunifiedSchedPolicy;
+/// @endcode
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @par Prerequisite
+/// None
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - the argument attr is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - the argument policy is out of range
+/// (less than eFrameworkunifiedSchedPolicyInherit, over eFrameworkunifiedSchedPolicyMAX). [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// This API initializes thread attribute object for child thread with specified value.\n
+/// \n
+/// \~english @par Classification
+/// Public
+/// \~english @see
+/// FrameworkunifiedCreateChildThreadWithAttribute
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedCreateChildThreadAttrSetSched(FrameworkunifiedChildThreadAttr *attr, EFrameworkunifiedSchedPolicy policy, SI_32 priority);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedStartChildThread
+/// \~english @par Brief
+/// Send initialize request to the child thread.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application of parent thread
+/// \~english @param [in] hChildQ
+/// HANDLE - Handle for communicate with child thread(returned by FrameworkunifiedCreateChildThread)
+/// \~english @param [in] length
+/// UI_32 - Length of send message data
+/// \~english @param [in] data
+/// PCVOID - Pointer to message data
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// - Generation/Initialization of Dispatcher for the child thread (FrameworkunifiedCreateChildThread, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state is depend on application implements.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hChildQ) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hChildQ) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Data buffer specified in the argument (data) is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Thread name specified in the argument (hChildQ) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldQName]
+/// - Message queue name of child thread specified in the argument (hChildQ) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to access to shared memory for sending message. [eFrameworkunifiedStatusErrOther]
+/// - Type of message queue to child thread is not for sending. [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sending is full. [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor of sending message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during message sending. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Any errors occur during the transmission of message to the child thread. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// This API sends initialize request to the child thread from parent thread.\n
+/// Taking this request,
+/// child thread runs callback function for initialize that specified when the thread create.
+/// \~english @par
+/// \n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Open Close
+/// \~english @see
+/// FrameworkunifiedStopChildThread
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedStartChildThread(HANDLE hApp, HANDLE hChildQ, UI_32 length, PCVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedStopChildThread
+/// \~english @par Brief
+/// Send shutdown request to the child thread.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application of parent thread
+/// \~english @param [in] hChildQ
+/// HANDLE - Handle for communicate with child thread(returned by FrameworkunifiedCreateChildThread)
+/// \~english @param [in] length
+/// UI_32 - Length of send message data
+/// \~english @param [in] data
+/// PCVOID - Pointer to message data
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// - Generation/Initialization of Dispatcher for the child thread (FrameworkunifiedCreateChildThread, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state is depend on application implements.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hChildQ) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hChildQ) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Data buffer specified in the argument (data) is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Thread name specified in the argument (hChildQ) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldQName]
+/// - Message queue name of child thread specified in the argument (hChildQ) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to access to shared memory for sending message. [eFrameworkunifiedStatusErrOther]
+/// - Type of message queue to child thread is not for sending. [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sending is full. [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor of sending message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during message sending. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Any errors occur during the transmission of message to the child thread. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// This API sends shutdown request to the child thread.\n
+/// Taking this request,
+/// child thread runs callback function for shutdown that specified when the thread create.\n
+/// This API does not terminate child thread.
+/// Use FrameworkunifiedDestroyChildThread to terminate child thread from parent thread.
+/// \~english @par
+/// \n
+/// \~english @par Classification
+/// Public
+/// \~english @see
+/// FrameworkunifiedStartChildThread FrameworkunifiedDestroyChildThread
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedStopChildThread(HANDLE hApp, HANDLE hChildQ, UI_32 length, PCVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDestroyChildThread
+/// \~english @par Brief
+/// Terminate child thread.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application of parent thread
+/// \~english @param [in] hChildQ
+/// HANDLE - Handle for communicate with child thread(returned by FrameworkunifiedCreateChildThread)
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusThreadNotExist Thread is not exist
+/// \~english @retval eFrameworkunifiedStatusThreadSelfJoin Self thread specified
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// - Generation/Initialization of Dispatcher for the child thread
+/// (FrameworkunifiedCreateChildThread, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state is depend on application implements.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hChildQ) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - HANDLE specified in the argument (hChildQ) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Thread name specified in the argument (hChildQ) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldQName]
+/// - Message queue name of child thread specified in the argument (hChildQ) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
+/// - Type of message queue to child thread is not for sending. [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sending is full. [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor of sending message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during message sending. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Message data size is invalid. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of message to the child thread. [eFrameworkunifiedStatusFail]
+/// - Child thread is invalid (thread exit or invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Another thread is already waiting to join with this child thread. [eFrameworkunifiedStatusInvldParam]
+/// - Already child thread is in termination process [eFrameworkunifiedStatusInvldParam]
+/// - Thread specified in argument is self thread. [eFrameworkunifiedStatusThreadSelfJoin]
+/// - Failed to close message queue specified in the argument (hChildQ). [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// This API sends terminate request to child thread , and waits to terminate child thread.\n
+/// Taking this request, child thread terminates itself.\n
+/// After child thread terminates, parent thread destroys handle for communicate with child thread.
+/// \~english @par Classification
+/// Public
+/// \~english @see FrameworkunifiedCreateChildThread FrameworkunifiedCreateChildThreadWithAttribute FrameworkunifiedCreateChildThreadWithPriority
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDestroyChildThread(HANDLE hApp, HANDLE hChildQ);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSendChild
+/// \~english @par Brief
+/// Send a message to the child thread.
+/// \~english @param [in] hApp
+/// HANDLE - Handle for Application of parent thread
+/// \~english @param [in] hChildQ
+/// HANDLE - Handle for communicate with child thread(returned by FrameworkunifiedCreateChildThread)
+/// \~english @param [in] iCmd
+/// UI_32 - Command of message
+/// \~english @param [in] length
+/// UI_32 - Length of send message data
+/// \~english @param [in] data
+/// PCVOID - Pointer to message data
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// - Generation/Initialization of Dispatcher for the child thread (FrameworkunifiedCreateChildThread, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hChildQ) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hChildQ) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Data buffer specified in the argument (data) is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Thread name specified in the argument (hChildQ) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldQName]
+/// - Message queue name of child thread specified in the argument (hChildQ) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to access to shared memory for sending message. [eFrameworkunifiedStatusErrOther]
+/// - Type of message queue to child thread is not for sending. [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sending is full. [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor of sending message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during message sending. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Any errors occur during the transmission of message to the child thread. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// This API sends a message to the child thread from parent thread.\n
+/// This API is available only from parent thread.
+/// \~english @par
+/// \n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// FrameworkunifiedSendParent
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSendChild(HANDLE hApp, HANDLE hChildQ, UI_32 iCmd, UI_32 length, PCVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSendParent
+/// \~english @par Brief
+/// Send a message to the parent thread.
+/// \~english @param [in] hChildApp
+/// HANDLE - Handle for Application of child thread(get as argument of callback function)
+/// \~english @param [in] iCmd
+/// UI_32 - Command of message
+/// \~english @param [in] length
+/// UI_32 - Length of send message data
+/// \~english @param [in] data
+/// PCVOID - Pointer to message data
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// - Generation/Initialization of Dispatcher for the child thread (FrameworkunifiedCreateChildThread, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hChildApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hChildApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue for parent thread in HANDLE (hChildApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue for parent thread in HANDLE (hChildApp) is not appropriate
+/// (which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Data buffer specified in the argument (data) is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Thread name specified in the argument (hChildApp) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldQName]
+/// - The name of message queue for parent thread specified in the argument (hChildApp) is not appropriate
+/// (The name is NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to access to shared memory for sending message. [eFrameworkunifiedStatusErrOther]
+/// - Type of message queue to parent thread is not for sending. [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sending is full. [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor of sending message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during message sending. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Any errors occur during the transmission of message to the parent thread. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// This API sends a message to the parent thread from child thread.\n
+/// This API is available only from child thread.
+/// \~english @par
+/// \n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// FrameworkunifiedSendChild
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSendParent(HANDLE hChildApp, UI_32 iCmd, UI_32 length, PCVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedJoinChild
+/// \~english @par Brief
+/// Wait for child thread terminates.
+/// \~english @param [in] hChildApp
+/// HANDLE - Handle for communicate with child thread(returned by FrameworkunifiedCreateChildThread)
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusThreadNotExist Thread is not exist
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusThreadSelfJoin Self thread specified
+/// \~english @retval eFrameworkunifiedStatusFail thread exit or invalid
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// - Generation/Initialization of Dispatcher for the child thread (FrameworkunifiedCreateChildThread, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hChildApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hChildApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Child thread is invalid (thread exit or invalid) [eFrameworkunifiedStatusFail]
+/// - Another thread is already waiting to join with this child thread. [eFrameworkunifiedStatusInvldParam]
+/// - Already child thread is in termination process [eFrameworkunifiedStatusInvldParam]
+/// - Thread specified in argument is self thread. [eFrameworkunifiedStatusThreadSelfJoin]
+/// \~english @par Detail
+/// It waits for terminate of child thread it was created by FrameworkunifiedCreateChildThread
+/// (or similar one) in the parent thread.\n
+/// This API blocks the calling thread until child thread terminates.\n
+/// This API does not terminate child thread.
+/// Use FrameworkunifiedDestroyChildThread to terminate child thread from parent thread.
+/// \~english @par Classification
+/// Public
+/// \~english @see
+/// FrameworkunifiedCreateChildThread, FrameworkunifiedCreateChildThreadWithPriority, FrameworkunifiedDestroyChildThread
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedJoinChild(HANDLE hChildApp);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetChildThreadPriority
+/// \~english @par Brief
+/// Get the child thread priority.
+/// \~english @param [in] hChildApp
+/// HANDLE - Handle for communicate with child thread(returned by FrameworkunifiedCreateChildThread)
+/// \~english @param [out] threadPrio
+/// PSI_32 - Dispatcher file descriptor
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusThreadNotExist Thread is not exist
+/// \~english @retval eFrameworkunifiedStatusFault Error occured during function
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// - Generation/Initialization of Dispatcher for the child thread (FrameworkunifiedCreateChildThread, etc.) has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hChildApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hChildApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - child thread priority in the argument (threadPrio) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - Failed to get child thread priority (pthread_getschedparam). [eFrameworkunifiedStatusFault]
+/// - If child threads are inalid or already terminated. [eFrameworkunifiedStatusThreadNotExist]
+/// \~english @par Detail
+/// This API set the child thread priority generated by FrameworkunifiedCreateChildThread to argument threadPrio.
+/// Use to get child thread priority from parent thread.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// FrameworkunifiedCreateChildThread, FrameworkunifiedCreateChildThreadWithPriority
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedGetChildThreadPriority(HANDLE hChildApp, PSI_32 threadPrio);
+#endif // __NSFRAMEWORK_NFRAMEWORKCORE_MULTITHREADING__ NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_service_if.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_service_if.h
new file mode 100644
index 00000000..b142d110
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_service_if.h
@@ -0,0 +1,267 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_HMI_CWORD77_Controller
+/// \brief
+///
+///
+///
+////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_service_if.h
+ * @brief \~english This is base class for service interface classes
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __CSERVICESESSION_H__ // NOLINT (build/header_guard)
+#define __CSERVICESESSION_H__
+#include <native_service/frameworkunified_service_protocol.h>
+#include <native_service/frameworkunified_framework_if.h>
+#include <string>
+
+///////////////////////////////////////////////////////////////////////////
+/// class: CServiceSession
+/// Description: This is base class for service interface classes
+///
+////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedServiceInterface {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedServiceInterface
+ /// \~english @par Brief
+ /// Constructor for CFrameworkunifiedServiceInterface
+ /// \~english @retval none
+ /// \~english @par Preconditions
+ /// no preconditions
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// create CFrameworkunifiedServiceInterface class instance
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see ~CFrameworkunifiedServiceInterface
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedServiceInterface();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedServiceInterface
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunifiedServiceInterface
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// CFrameworkunifiedServiceInterface is decleared in constructor
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Release CFrameworkunifiedServiceInterface instance
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedServiceInterface
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ ~CFrameworkunifiedServiceInterface();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedServiceInterface
+ /// \~english @par Brief
+ /// API to open Service.
+ /// \~english @param [in] f_hApp
+ /// HANDLE* - Handle of framework
+ /// \~english @param [in] f_sServiceName
+ /// std::string - Service Name
+ /// \~english @retval HANDLE
+ /// \~english @par Preconditions
+ /// - no preconditions
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Open service by specified name and retrun handle of service. \n
+ /// If FrameworkunifiedOpenService failed, handle is NULL.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedOpenService
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ HANDLE OpenService(const HANDLE f_hApp, std::string f_sServiceName);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedServiceInterface
+ /// \~english @par Brief
+ /// API to close service.
+ /// \~english @param [in] f_hApp
+ /// HANDLE* - Handle of framework
+ /// \~english @param [in] f_hService
+ /// HANDLE - Handle of the service
+ /// \~english @retval EFrameworkunifiedStatus
+ /// Success or Error
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If parameter f_hApp is NULL. [eFrameworkunifiedStatusInvldParam]
+ /// - If parameter f_hService is NULL. [eFrameworkunifiedStatusInvldParam]
+ /// - If FrameworkunifiedCloseService failed. [eFrameworkunifiedStatusInvldHandle]
+ /// \~english @par Detail
+ /// close service by handle \n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedCloseService
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CloseService(const HANDLE f_hApp, const HANDLE f_hService);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedServiceInterface
+ /// \~english @par Brief
+ /// API to open session
+ /// \~english @param [in] f_hApp
+ /// HANDLE* -framework handle
+ /// \~english @param [in] f_uisessionType
+ /// UI_32 - sessiontype
+ /// \~english @retval EFrameworkunifiedStatus
+ /// Success or Error
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If parameter f_hApp is NULL. [eFrameworkunifiedStatusInvldParam]
+ /// - If FrameworkunifiedOpenSessionWithData failed. [eFrameworkunifiedStatusInvldHandle]
+ /// \~english @par Detail
+ /// open session by specified session type \n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedOpenSessionWithData
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus OpenSession(const HANDLE f_hApp, UI_32 f_uisessionType);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedServiceInterface
+ /// \~english @par Brief
+ /// API to open session Acknowledge
+ /// \~english @param [in] f_hApp
+ /// HANDLE* - Handle of framework
+ /// \~english @param [in] hSession
+ /// HANDLE - Session Handle
+ /// \~english @retval EFrameworkunifiedStatus
+ /// Success or Error
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Empty implement.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see one
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus OpenSessionAcknowledge(const HANDLE f_hApp, HANDLE &hSession); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedServiceInterface
+ /// \~english @par Brief
+ /// API to close session.
+ /// \~english @param [in] f_hService
+ /// HANDLE* - Handle of service
+ /// \~english @param [in] hSession
+ /// HANDLE - Session Handle
+ /// \~english @retval EFrameworkunifiedStatus
+ /// Success or Error
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If parameter f_hService is NULL. [eFrameworkunifiedStatusInvldParam]
+ /// - If parameter f_hSession is NULL. [eFrameworkunifiedStatusInvldParam]
+ /// - If FrameworkunifiedCloseSession failed. [eFrameworkunifiedStatusInvldHandle]
+ /// \~english @par Detail
+ /// close session of specified service. \n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedCloseSession
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CloseSession(const HANDLE f_hService, const HANDLE f_hSession);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedServiceInterface
+ /// \~english @par Brief
+ /// API to close session.
+ /// \~english @param [in] f_hService
+ /// HANDLE* - Handle of service
+ /// \~english @param [in] hSession
+ /// HANDLE - Session Handle
+ /// \~english @retval EFrameworkunifiedStatus
+ /// Success or Error
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If parameter hClient is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - If FrameworkunifiedGetMsgDataOfSize failed. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// Check close session acknowledge.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedGetMsgDataOfSize
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CloseSessionAcknowledge(const HANDLE hClient);
+};
+#endif // __CSERVICESESSION_H__ NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_service_protocol.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_service_protocol.h
new file mode 100644
index 00000000..e66119e9
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_service_protocol.h
@@ -0,0 +1,116 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NativeServices
+/// \brief
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_service_protocol.h
+ * @brief \~english Include enums, structs and frameworkunified_types.h
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef FRAMEWORKUNIFIED_SERVICE_PROTOCOL_H_ // NOLINT (build/header_guard)
+#define FRAMEWORKUNIFIED_SERVICE_PROTOCOL_H_
+
+#include <native_service/frameworkunified_types.h>
+
+#define NS_INVALID_SESSION 0xFFFF
+
+typedef enum _EBaseProtocol {
+ PROTOCOL_OPEN_SESSION_REQ = 0x00, ///< Open session request (client > service)
+ PROTOCOL_OPEN_SESSION_ACK = 0x01, ///< Open session ack (service > client)
+ PROTOCOL_OPEN_SESSION_REQ_SYNC = 0x02, ///< Open session request sync (client > service)
+ PROTOCOL_CLOSE_SESSION_REQ = 0x03, ///< Close session request (client > service)
+ PROTOCOL_CLOSE_SESSION_ACK = 0x04, ///< Close session ack (service > client)
+ PROTOCOL_CLOSE_SESSION_REQ_SYNC = 0x05, ///< Close session request sync (client > service)
+
+ PROTOCOL_REGISTER_EVENTS = 0x06, ///< Register for events (client > service)
+ PROTOCOL_REGISTER_EVENTS_ACK = 0x07, ///< Register for events ack (service > client)
+ PROTOCOL_UNREGISTER_EVENTS = 0x08, ///< Un-Register for events (client > service)
+
+ PROTOCOL_THREAD_INITIALIZATION = 0x09, ///< Initialize thread after creation
+ PROTOCOL_THREAD_WAKEUP = 0x0A, ///< Wakeup Thread after sleep
+ PROTOCOL_THREAD_SHUTDOWN = 0x0B, ///< Stop the thread
+ PROTOCOL_THREAD_DESTROY = 0x0C, ///< Destroy the thread
+ PROTOCOL_RSV_0D = 0x0D, ///< Reserved
+ PROTOCOL_RSV_0E = 0x0E, ///< Reserved
+ PROTOCOL_DIS_MSGPROFILER = 0x0F, ///< Reserved
+
+ PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD = 0x10, ///< Protocols between range PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD
+ PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD = 0xFFFFFFF0, ///< are available for FRAMEWORKUNIFIED applications to use.
+
+ PROTOCOL_RSV_xF1 = 0xFFFFFFF1, ///< Reserved
+ PROTOCOL_RSV_xF2 = 0xFFFFFFF2, ///< Reserved
+ PROTOCOL_RSV_xF3 = 0xFFFFFFF3, ///< Reserved
+ PROTOCOL_RSV_xF4 = 0xFFFFFFF4, ///< Reserved
+ PROTOCOL_RSV_xF5 = 0xFFFFFFF5, ///< Reserved
+ PROTOCOL_RSV_xF6 = 0xFFFFFFF6, ///< Reserved
+ PROTOCOL_RSV_xF7 = 0xFFFFFFF7, ///< Reserved
+ PROTOCOL_RSV_xF8 = 0xFFFFFFF8, ///< Reserved
+ PROTOCOL_RSV_xF9 = 0xFFFFFFF9, ///< Reserved
+ PROTOCOL_RSV_xFA = 0xFFFFFFFA, ///< Reserved
+ PROTOCOL_RSV_xFB = 0xFFFFFFFB, ///< Reserved
+ PROTOCOL_RSV_xFC = 0xFFFFFFFC, ///< Reserved
+
+ PROTOCOL_TIMER_DUMMY_CMD = 0xFFFFFFFD, ///< NS internally use this command in timer
+
+ PROTOCOL_FRAMEWORKUNIFIED_NOTIFICATION = 0xFFFFFFFE,
+ PROTOCOL_FRAMEWORKUNIFIED_ANY_COMMAND = 0xFFFFFFFF
+} EBaseProtocol;
+
+typedef struct _OpenSessionAck {
+ EFrameworkunifiedStatus eStatus;
+ UI_32 sessionId;
+ CHAR cSessionName[MAX_QUEUE_NAME_SIZE];
+ UI_32 sessionType;
+} OpenSessionAck;
+
+
+typedef struct _CloseSessionReq {
+ UI_32 sessionId;
+ CHAR cSessionName[MAX_QUEUE_NAME_SIZE];
+} CloseSessionReq;
+
+typedef struct _CloseSessionAck {
+ UI_32 sessionId;
+ EFrameworkunifiedStatus eStatus;
+} CloseSessionAck;
+
+#endif /* FRAMEWORKUNIFIED_SERVICE_PROTOCOL_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_action.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_action.h
new file mode 100644
index 00000000..58dbf225
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_action.h
@@ -0,0 +1,150 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief This file has class declaration of the CFrameworkunifiedAction. This is an
+/// interface class that defines interfaces for implementing action
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_action.h
+ * @brief \~english This file has class declaration of the CFrameworkunifiedAction. This is an interface class that defines
+ * interfaces for implementing action
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NSFRAMEWORKCORE_STATEMACHINE_INC_FRAMEWORKUNIFIEDSMACTION_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NSFRAMEWORKCORE_STATEMACHINE_INC_FRAMEWORKUNIFIEDSMACTION_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <boost/smart_ptr.hpp>
+#include <string>
+
+class CFrameworkunifiedState;
+
+class CEventData;
+typedef boost::shared_ptr<CEventData> CEventDataPtr;
+
+class CFrameworkunifiedAction {
+ public:
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedAction
+ /// \~english @par Brief
+ /// Constructor for class CFrameworkunifiedAction.
+ /// \~english @param [in] f_strName
+ /// std::string -Name of Action object
+ /// \~english @retval
+ /// \~english @par Prerequisite
+ /// none
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Constructor of CFrameworkunifiedAction class. Create an object of CFrameworkunifiedAction. \n
+ /// Initialize member value with name designated by f_strName. \n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see ~CFrameworkunifiedAction
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedAction(std::string f_strName); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedAction
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunifiedAction
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// none
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Pure virtual function , implemented by child class
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedAction
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedAction() {
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedAction
+ /// \~english @par Brief
+ /// Callback function of CFrameworkunifiedAction.(pure virtual function)
+ /// \~english @param [in] f_pSourceState
+ /// CFrameworkunifiedState - pointer of source state
+ /// \~english @param [in] f_pTargetState
+ /// CFrameworkunifiedState - pointer of target state
+ /// \~english @param [in] f_pData
+ /// CEventDataPtr - pointer of event data
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - none
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// Callback function of CFrameworkunifiedAction.(pure virtual function)
+ /// Implement action by subclass
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual VOID FrameworkunifiedAction(CFrameworkunifiedState *f_pSourceState, CFrameworkunifiedState *f_pTargetState,
+ CEventDataPtr f_pData) = 0;
+
+ // action name
+ std::string m_strName;
+};
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NSFRAMEWORKCORE_STATEMACHINE_INC_FRAMEWORKUNIFIEDSMACTION_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_compositestate.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_compositestate.h
new file mode 100644
index 00000000..72ac6400
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_compositestate.h
@@ -0,0 +1,434 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedCompositeState class definitions. CFrameworkunifiedCompositeState is derived from C
+/// FrameworkunifiedState class.This class implements the additional functionality supported by HSM Composite
+/// state. It provides the standard interfaces for adding state.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_compositestate.h
+ * @brief \~english This file has the CFrameworkunifiedCompositeState class definitions. CFrameworkunifiedCompositeState is derived from C
+ * FrameworkunifiedState class.This class implements the additional functionality supported by HSM Composite
+ * state. It provides the standard interfaces for adding state.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIEDCOMPOSITESTATE_H // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIEDCOMPOSITESTATE_H
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_sm_state.h>
+#include <map>
+#include <string>
+
+typedef std::map<std::string, CFrameworkunifiedState *> ChildStateList;
+typedef std::map<std::string, CFrameworkunifiedState *>::iterator StateIterator;
+
+class CFrameworkunifiedHSM;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class implements the additional functionality supported by HSM Composite
+/// state. It provides the standard interfaces for adding state.
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedCompositeState : public CFrameworkunifiedState {
+ public :
+
+ typedef enum _FRAMEWORKUNIFIED_STATE_TYPE {
+ eFrameworkunifiedState = 0,
+ eFrameworkunifiedDefaultState
+ } FRAMEWORKUNIFIED_STATE_TYPE;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// Constructor for class CFrameworkunifiedCompositeState.
+ /// \~english @param [in] f_strName
+ /// std::string -Name of state
+ /// \~english @retval
+ /// \~english @par Prerequisite
+ /// none
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// This class inherit from CFrameworkunifiedState(basic class of state machine), \n
+ /// and create object of CFrameworkunifiedCompositeState class. \n
+ /// Create and initialize child state, and set the pointor to member variable. \n
+ /// Initialize other member variables with NULL. \n
+ /// Output the process error logs.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedState, ~CFrameworkunifiedCompositeState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedCompositeState(std::string f_pName); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunifiedCompositeState
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedCompositeState created.
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Release the objects of CFrameworkunifiedState class and CFrameworkunifiedCompositeState class. \n
+ /// Release all the child states registered in child states list of member variable. \n
+ /// Output error log if failed.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedState, CFrameworkunifiedCompositeState::CFrameworkunifiedCompositeState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedCompositeState();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// sets the given state as a substate of the current state. If the f_eStateType is
+ /// eFrameworkunifiedDefaultState then substate is default state for current state.
+ /// \~english @param [in] f_pState
+ /// CFrameworkunifiedState* - Pointer to the substate object to be added in the current state
+ /// \~english @param [in] f_eStateType
+ /// FRAMEWORKUNIFIED_STATE_TYPE - state type indicating if it is default state
+ /// \~english @retval EFrameworkunifiedStatus
+ /// success or fail
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedCompositeState created.
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If parameter f_pState is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - If m_pChildStates is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// sets the given state as a substate of the current state. If the f_eStateType is
+ /// eFrameworkunifiedDefaultState then substate is default state for current state.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedAddState(CFrameworkunifiedState *f_pState,
+ FRAMEWORKUNIFIED_STATE_TYPE f_eStateType = eFrameworkunifiedState);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// Returns the default state of the current composite state.
+ /// \~english @param none
+ /// \~english @retval CFrameworkunifiedState* - pointer default state
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedCompositeState created.
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Returns the default state of the current composite state.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedState *FrameworkunifiedGetDefaultState();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// Logs the state name and events associated with the state.
+ /// \~english @param none
+ /// \~english @retval eFrameworkunifiedStatusOK succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer failed
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedCompositeState created.
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - Don't create instance of CFrameworkunifiedCompositeState [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// This function overrides the fuction of CFrameworkunifiedState::FrameworkunifiedPrintStates.
+ /// This function outputs log of state name and events associated with the state as follows:
+ /// - state name of parent state machine and self state machine
+ /// - all the event names in event list
+ /// - all the event names in delay event list
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedPrintStates();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// This indicates if the state has sub states. It returns TRUE only in the CompositeState
+ /// where this function is overridden
+ /// \~english @param none
+ /// \~english @retval BOOL TRUE - has substate FALSE - has not substatue
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedCompositeState created.
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// This function overrides the fuction of CFrameworkunifiedState::FrameworkunifiedHasSubStates.
+ /// Return true only in CFrameworkunifiedCompositeState class.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedState::FrameworkunifiedHasSubStates
+ virtual BOOL FrameworkunifiedHasSubStates();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// This interface returns the Active state of the current composite state. In case of
+ /// non-composite state current state is active state
+ /// \~english @param none
+ /// \~english @retval CFrameworkunifiedState* pointer of active state
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedCompositeState created.
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// This function overrides the pure virtual fuction of CFrameworkunifiedState::FrameworkunifiedGetActiveState.
+ /// Reture active state of current composite state. If it isn't a composite state,
+ /// return current state as an active state.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedState::FrameworkunifiedGetActiveState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedGetActiveState();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// This function stores the last active state
+ /// \~english @param none
+ /// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedCompositeState created.
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// This function overrides the pure virtual fuction of CFrameworkunifiedState::UpdateHistory.
+ /// Store the last active state.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedState::UpdateHistory
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus UpdateHistory();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// Update the State information in the given stream in the form of XML tags
+ ///
+ /// \~english @param f_strXMLString
+ /// std::ostringstream & - reference to the XML stream
+ /// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK
+ /// eFrameworkunifiedStatusNullPointer
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedCompositeState created.
+ /// - State machine of current state in the applicaton is setted in FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal status
+ /// - Self instance of CFrameworkunifiedCompositeState created failed. [eFrameworkunifiedStatusNullPointer].
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Detail
+ /// This function overrides the fuction of CFrameworkunifiedState::FrameworkunifiedPrintXML.
+ /// Set parameter f_strXMLString with the following state information by XML type.
+ /// - state name
+ /// - all the event information in event list(event ID, event name)
+ /// - all the event information in delay event list(event ID, event name)
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedState::FrameworkunifiedPrintXML
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedPrintXML(std::ostringstream &f_strXMLString);
+
+
+ protected :
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// Initialize state
+ /// \~english @param f_pEventData
+ /// CEventDataPtr - Pointer to the event data class
+ /// \~english @retval eFrameworkunifiedStatusOK
+ /// \~english @par Preconditions
+ /// - Its own instance (CFrameworkunifiedCompositeState) has been created.
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This method overrides and uses CFrameworkunifiedState::FrameworkunifiedOnEntry, which is pure virtual functions, to initialize state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedState::FrameworkunifiedOnEntry, FrameworkunifiedOnExit
+ ///
+ /// state initialization can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedOnEntry(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// Clean up state.
+ /// \~english @param f_pEventData
+ /// CEventDataPtr - Pointer to the event data class
+ /// \~english @retval eFrameworkunifiedStatusOK
+ /// \~english @par Preconditions
+ /// - Its own instance (CFrameworkunifiedCompositeState) has been created.
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This method overrides and uses CFrameworkunifiedState::FrameworkunifiedOnExit, which is pure virtual functions, to clean up state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedState::FrameworkunifiedOnExit, FrameworkunifiedOnEntry
+ ///
+ /// state cleanup can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedOnExit(CEventDataPtr f_pEventData);
+
+ /// stores the pointers to sub state, key is state name
+ ChildStateList *m_pChildStates;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedCompositeState
+ /// \~english @par Brief
+ /// Associate the state machine with the current state.
+ /// \~english @param [in] f_pStatemachine
+ /// CFrameworkunifiedHSM* - Pointers to state machines (CFrameworkunifiedHSM classes)
+ /// \~english @retval eFrameworkunifiedStatusOK
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+ /// \~english @par Preconditions
+ /// - Its own instance (CFrameworkunifiedCompositeState) has been created.
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - When the pointers to the state machines (CFrameworkunifiedHSM classes) specified in the arguments (f_pStatemachine) are NULL [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// This method is used by overriding CFrameworkunifiedState::FrameworkunifiedSetHSM.\n
+ /// Associates a state machine with the current state by setting a pointer (f_pStatemachine)
+ /// to the state machine (CFrameworkunifiedHSM) specified by the argument to the pointer to the state machine of the member variable. \n
+ /// Calling FrameworkunifiedSetHSM() for child states also associates the state machine of the child states with the state of the current state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedHSM, CFrameworkunifiedState::FrameworkunifiedSetHSM
+ ///
+ /// Sets the statemachine in the status
+ ///
+ /// \param [in] f_pStatemachine
+ /// CFrameworkunifiedHSM* - Statemachine pointer
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedSetHSM(CFrameworkunifiedHSM *f_pStatemachine);
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CheckHistory
+ /// This function searches for history state in this composite state and updates it.
+ ///
+ /// \param [in] l_cHistoryType
+ /// string - Type of history state (shallow or deep)
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CheckHistory(std::string l_cHistoryType);
+};
+
+#endif // _FRAMEWORKUNIFIEDCOMPOSITESTATE_H // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_conditionconnector.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_conditionconnector.h
new file mode 100644
index 00000000..110c1517
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_conditionconnector.h
@@ -0,0 +1,203 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief
+/// This file has class declaration of the CFrameworkunifiedConditionConnector. This class is responsible for
+/// implementing interfaces required to use condition connector in statemachine.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_conditionconnector.h
+ * @brief \~english This file has class declaration of the CFrameworkunifiedConditionConnector. This class is responsible for
+ * implementing interfaces required to use condition connector in statemachine.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NSFRAMEWORKCORE_STATEMACHINE_INC_FRAMEWORKUNIFIEDSMCONDITIONCONNECTOR_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NSFRAMEWORKCORE_STATEMACHINE_INC_FRAMEWORKUNIFIEDSMCONDITIONCONNECTOR_H__
+
+#include <native_service/frameworkunified_sm_externaltransition.h>
+#include <string>
+#include <vector>
+
+// This class is responsible for implementing interfaces required to use condition connector in statemachine.
+class CFrameworkunifiedConditionConnector : public CFrameworkunifiedExternalTransition {
+ public:
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedConditionConnector
+ /// \~english @par Brief
+ /// Constructor for class CFrameworkunifiedConditionConnector.
+ /// \~english @param [in] f_strName
+ /// std::string - Name of the condition connector
+ /// \~english @retval
+ /// \~english @par Prerequisite
+ /// none
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Inherite from base class CFrameworkunifiedExternalTransition.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedExternalTransition, ~CFrameworkunifiedConditionConnector
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedConditionConnector(std::string f_strName); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedConditionConnector
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunifiedCompositeState
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedConditionConnector created.
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Class CFrameworkunifiedExternalTransition instance and CFrameworkunifiedConditionConnector instance release.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedConditionConnector::CFrameworkunifiedConditionConnector
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedConditionConnector();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedConditionConnector
+ /// \~english @par Brief
+ /// This API evaluates the guards added in the condition list. If the guard is evaluated as
+ /// true then statemachine transitions to target state associated with guard.
+ /// \~english @param [in] f_pSourceState
+ /// CFrameworkunifiedState* - Source state in which reaction is being executed
+ /// \~english @param [in] f_pData
+ /// CEventDataPtr - event data
+ /// \~english @retval CFrameworkunifiedState*
+ /// CFrameworkunifiedState* - Returns Active state
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedConditionConnector created.
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If parameter f_pSourceState is NULL. [NULL]
+ /// - If m_pConditionList is NULL. [NULL]
+ /// \~english @par Detail
+ /// This API evaluates the guards added in the condition list. If the guard is evaluated as
+ /// true then statemachine transitions to target state associated with guard.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedReaction(CFrameworkunifiedState *f_pSourceState, CEventDataPtr f_pData);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedConditionConnector
+ /// \~english @par Brief
+ /// Adds connect condition into condition list of current connection
+ /// \~english @param [in] f_pGuard
+ /// CFrameworkunifiedState* - Pointer to the guard object to be added in the currrent connection
+ /// \~english @param [in] f_pTargetState
+ /// CFrameworkunifiedState* - Target state for given guard condition
+ /// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK
+ /// eFrameworkunifiedStatusNullPointer
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedConditionConnector created.
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If m_pConditionList is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - If parameter f_pGuard is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - If parameter f_pTargetState is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// Adds connect condition into condition list of current connection.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedAddCondition(CFrameworkunifiedGuard *f_pGuard, CFrameworkunifiedState *f_pTargetState);
+
+ private:
+ // This class defines the conditions required in condition connector
+ class CCondition {
+ public:
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CCondition
+ /// Parameterized constructor
+ /// \param [in] f_pGuard
+ /// CFrameworkunifiedGuard* - guard object
+ /// \param [in] f_pTargetState
+ /// CFrameworkunifiedState* - target state for a condition
+ ///
+ /// \return none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CCondition(CFrameworkunifiedGuard *f_pGuard, CFrameworkunifiedState *f_pTargetState);
+
+ // pointer to guard that will be evaluated for a condition
+ CFrameworkunifiedGuard *m_pGuard;
+
+ // pointer to target state for a condition
+ CFrameworkunifiedState *m_pTargetState;
+ };
+
+ // Condition list
+ typedef std::vector<CCondition *> TConditionList;
+
+ // Condition list iterator
+ typedef TConditionList::iterator TConditionIterator;
+
+ // condition connector name
+ std::string m_strName;
+
+ // List of conditions
+ TConditionList *m_pConditionList;
+};
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NSFRAMEWORKCORE_STATEMACHINE_INC_FRAMEWORKUNIFIEDSMCONDITIONCONNECTOR_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_deephistorystate.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_deephistorystate.h
new file mode 100644
index 00000000..fbb74eeb
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_deephistorystate.h
@@ -0,0 +1,141 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief
+///
+/// This file has the declaration of class CFrameworkunifiedDeepHistoryState . CFrameworkunifiedDeepHistoryState is
+/// derived from CFrameworkunifiedHistoryState class.This class implements the additional functionality supported
+/// by HSM Deep History state.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_deephistorystate.h
+ * @brief \~english This file has the declaration of class CFrameworkunifiedDeepHistoryState.CFrameworkunifiedDeepHistoryState is
+ * derived from CFrameworkunifiedHistoryState class.This class implements the additional functionality supported
+ * by HSM Deep History state.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_SM_DEEPHISTORYSTATE_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_SM_DEEPHISTORYSTATE_H__
+
+#include <native_service/frameworkunified_sm_historystate.h>
+#include <string>
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class implements the additional functionality supported by HSM Shallow History state.
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedDeepHistoryState : public CFrameworkunifiedHistoryState {
+ public :
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedDeepHistoryState
+ /// \~english @par Brief
+ /// Constructor for class CFrameworkunifiedDeepHistoryState.
+ /// \~english @param [in] f_pName
+ /// std::string - Name of the state
+ /// \~english @retval
+ /// \~english @par Prerequisite
+ /// none
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Inherite from base class CFrameworkunifiedHistoryState.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedHistoryState, ~CFrameworkunifiedDeepHistoryState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedDeepHistoryState(std::string f_pName); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedDeepHistoryState
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunifiedDeepHistoryState
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedDeepHistoryState created.
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Class CFrameworkunifiedHistoryState instance and CFrameworkunifiedDeepHistoryState instance release.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedDeepHistoryState::CFrameworkunifiedDeepHistoryState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ~CFrameworkunifiedDeepHistoryState();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedDeepHistoryState
+ /// \~english @par Brief
+ /// This function stores the last active state
+ /// \~english @param
+ /// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK
+ /// eFrameworkunifiedStatusNullPointer
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedConditionConnector created.
+ /// \~english @par Change of internal status
+ /// - none
+ /// \~english @par Conditions of processing failure
+ /// - If m_pParentState is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// This function stores the last active state.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus UpdateHistory();
+
+ private:
+ static const UI_32 m_suievDeepHistory;
+};
+
+#endif /* __FRAMEWORKUNIFIED_SM_DEEPHISTORYSTATE_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_dispatcher.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_dispatcher.h
new file mode 100644
index 00000000..2f392bab
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_dispatcher.h
@@ -0,0 +1,338 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief Application dispatch interface functions
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_dispatcher.h
+ * @brief \~english Application dispatch interface functions
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_SM_DISPATCHER_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_SM_DISPATCHER_H__
+#include <native_service/frameworkunified_framework_types.h>
+#include <native_service/frameworkunified_sm_framework_types.h>
+
+class CFrameworkunifiedHSMFramework;
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedHSMDispatcher
+/// \~english @par Brief
+/// Creates, initializes and runs the HSM dispatcher.
+/// \~english @param [in] cAppName
+/// PCSTR - pointer of Application/ thread name
+/// \~english @retval EFrameworkunifiedStatus
+/// \~english @par Prerequisite
+/// - Prerequisites are nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// - none
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// none
+/// \~english @see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedHSMDispatcher(PCSTR cAppName);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedHSMDispatcherWithArguments
+/// \~english @par Brief
+/// This API creates, initializes the dispatcher and runs loop with command-line options.
+/// \~english @param [in] cAppName
+/// PCSTR - Pointer to application thread name
+/// \~english @param [in] argc
+/// int - Number of command-line options
+/// \~english @param [in] argv
+/// char *[] - Array of pointer to command-line options
+/// \~english @param [in] CbHandler
+/// const FrameworkunifiedDefaultCallbackHandler* - Pointer to default callback functions.
+/// \~english @param [in] f_pFrameworkunifiedHSM
+/// CFrameworkunifiedHSMFramework* - state machine object pointer(default NULL)
+/// \~english @param [in] cmdLineOptions
+/// CustomCommandLineOptions* - Parser setting of command-line options(Optional. When don't use, set NULL.)
+/// \~english @par
+/// FrameworkunifiedDefaultCallbackHandler Structure
+/// \~english @code
+/// typedef struct _FrameworkunifiedDefaultCallbackHandler
+/// {
+/// CbFuncPtr onInitilization; /* Function is called when a Dispatcher is created. */
+/// CbFuncPtr onDestroy; /* Function is called when the Dispatcher is released. */
+/// CbFuncPtr onStart; /* Function is called when the Dispatcher is started. */
+/// CbFuncPtr onStop; /* Function is called when the Dispatcher is stopped. */
+/// CbFuncPtr onPreStart; /* Function is called when the Dispatcher is pre started. */
+/// CbFuncPtr onPreStop; /* Function is called when the Dispatcher is pre stoped. */
+/// CbFuncPtr onBackgroundStart; /* Function is called when the Dispatcher is Background started. */
+/// CbFuncPtr onBackgroundStop; /* Function is called when the Dispatcher is Background stopped. */
+/// CbFuncPtr onDebugDump; /* Function is called when the Dispatcher detects abnormal state. */
+/// CbFuncPtr createStateMachine; /* Set dummy function that does nothing. */
+/// CbFuncPtr ssFrameworkInterface; /* Function to connect to SystemManager */
+/// } FrameworkunifiedDefaultCallbackHandler;
+/// @endcode
+/// \~english @par
+/// CustomCommandLineOptions Structure
+/// \~english @code
+/// typedef struct _CustomCommandLineOptions
+/// {
+/// PCSTR cShortOptions; /* Short options list. */
+/// PCHAR cLongOptions; /* Reserved. Set to NULL. */
+/// CbArgumentParser callback; /* Pointer to callback function to parse command-line options. */
+/// } CustomCommandLineOptions;
+/// @endcode
+/// \~english @par
+/// About setting of default callback functions(FrameworkunifiedDefaultCallbackHandler)
+/// - Use FRAMEWORKUNIFIED_MAKE_DEFAULT_CALLBACK when initialize of FrameworkunifiedDefaultCallbackHandler structure as argument CbHandler.
+/// - Application that run this API need to define functions below.(allow to dummy function that does nothing.)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnInitialization(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnPreStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStart(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStop(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDebugDump(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedOnDestroy(HANDLE hApp)
+/// - EFrameworkunifiedStatus FrameworkunifiedCreateStateMachine(HANDLE hApp)
+/// - If application is resident service, link library libSS_SystemIfUnified
+/// (This library provides the function FrameworkunifiedSSFrameworkInterface to connect to SystemManager.).
+/// - If application is nonresident service, define function that does nothing below.
+/// - EFrameworkunifiedStatus FrameworkunifiedSSFrameworkInterface(HANDLE hApp)
+/// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusDuplicate Duplication error of entry
+/// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
+/// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
+/// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
+/// \~english @par Prerequisite
+/// - Prerequisites are nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - Application thread name specified in the argument (cAppName) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - Pointer to default callback functions specified in the argument (CbHandler) is NULL. [eFrameworkunifiedStatusNullPointer]
+/// - One of members in default callback functions specified in the argument (CbHandler) is NULL.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Application thread name specified in the argument (cAppName) is not appropriate(The name is more than
+/// 15byte). [eFrameworkunifiedStatusNullPointer]
+/// - Failed to open message queue (mq_open). [eFrameworkunifiedStatusNullPointer]
+/// - Failed to get memory (malloc) of message queue info area. [eFrameworkunifiedStatusNullPointer]
+/// - Failed to initialize socket for monitoring abnormal state (socket, bind, listen). [eFrameworkunifiedStatusFail]
+/// - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
+/// - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
+/// - Interruption by the system call (signal) has occurred during the transmission of the session message for the
+/// NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
+/// - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
+/// - Failed to create of epoll instance (epoll_create1). [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to register of a descriptor of the message queue to the epoll instance (epoll_ctl).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to create file descriptor for receive event (eventfd). [eFrameworkunifiedStatusFail]
+/// - Failed to register of a descriptor for receive event to the epoll instance (epoll_ctl). [eFrameworkunifiedStatusFail]
+/// - Failed to register of a socket for detect abnormal state to the epoll instance (epoll_ctl). [eFrameworkunifiedStatusFail]
+/// - The result of FrameworkunifiedOnInitialization is not eFrameworkunifiedStatusOK. [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Detail
+/// This API creates and initializes the dispatcher with command-line options.\n
+/// It starts to mainloop that receives request or notification, and runs registered callback to dispatcher.
+/// When success starting mainloop, never return.
+/// Use this API to take over a command-line options to the dispatcher.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - Error handling is not performed when the state machine event registration process (CFrameworkunifiedHSMFramework::FrameworkunifiedCreate) fails.\n
+/// The behavior of state machine objects must be guaranteed by the application implementation.
+/// - When an exception occurs during Dispatcher generating, an error log is output and eFrameworkunifiedStatusOK is returned.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see none
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedHSMDispatcherWithArguments(PCSTR cAppName, int argc, char *argv[],
+ const FrameworkunifiedDefaultCallbackHandler *CbHandler,
+ CFrameworkunifiedHSMFramework *f_pFrameworkunifiedHSM = NULL,
+ CustomCommandLineOptions *cmdLineOptions = NULL);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSetHSMType
+/// \~english @par Brief
+/// Set the Application Statemachine Type
+/// \~english @param [in] cAppName
+/// PCSTR - pointer of Application/ thread name
+/// \~english @code
+/// typedef enum _EUserChangeOptions {
+/// eUserchangeIgnore = 0,
+/// eUserchangeReInit,
+/// eUserchangeRetPrevState
+/// } EUserChangeOptions;
+/// @endcode
+/// \~english @retval EFrameworkunifiedStatus
+/// \~english @par Prerequisite
+/// - Prerequisites are nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// - none
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// none
+/// \~english @see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+void FrameworkunifiedSetHSMType(EUserChangeOptions f_eHSMType);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedEnableAutoPublishServiceAvailable
+/// \~english @par Brief
+/// Enables the AutoPublishServiceAvailability Feature
+/// \~english @param none
+/// \~english @retval EFrameworkunifiedStatus
+/// \~english @par Prerequisite
+/// - Prerequisites are nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// Enables the AutoPublishServiceAvailability Feature that publishes the service
+/// availability on entry of sFrameworkunifiedReady state and publishes the service unavailability
+/// on exit of sFrameworkunifiedReady state.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// none
+/// \~english @see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+void FrameworkunifiedEnableAutoPublishServiceAvailable();
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDisableAutoPublishServiceAvailable
+/// \~english @par Brief
+/// Disable to the AutoPublishServiceAvailability Feature.
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - Prerequisite is nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// None.
+/// \~english @par Detail
+/// This API disable feature that notify automatically service availability to clients
+/// at the timing of changing of internal state.\n
+/// If you disable this feature, the application needs to publish service availability state explicitly
+/// using FrameworkunifiedPublishServiceAvailability.
+/// \~english @par Classification
+/// Forbidden
+/// \~english @see FrameworkunifiedHSMDispatcherWithArguments FrameworkunifiedPublishServiceAvailability
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedDisableAutoPublishServiceAvailable
+/// Disables the AutoPublishServiceAvailability Feature that publishes the service
+/// availability on entry of sFrameworkunifiedReady state and publishes the service unavailability
+/// on exit of sFrameworkunifiedReady state. Applications are responsible for publishing the service
+/// availability.
+void FrameworkunifiedDisableAutoPublishServiceAvailable();
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedHSMEnableWaitInStoppingState
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedHSMEnableWaitInStoppingState
+/// If HSM application should wait in sStoppingState until user explicitly publishes evFrameworkunifiedStopComplete,
+/// then call this function before FrameworkunifiedHSMDispatcher APIs.
+/// Default behavior is application will not wait is sStoppingState.
+///
+/// \~english @par Brief
+/// Change state application when call FrameworkunifiedOnStop().
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - Prerequisite is nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// None.
+/// \~english @par Detail
+/// If HSM application should wait in sStoppingState until user explicitly publishes evFrameworkunifiedStopComplete,
+/// then call this function before FrameworkunifiedHSMDispatcher APIs.
+/// Default behavior is application will not wait in sStoppingState.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// none
+/// \~english @see FrameworkunifiedHSMDisableWaitInStoppingState
+VOID FrameworkunifiedHSMEnableWaitInStoppingState();
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedHSMDisableWaitInStoppingState
+/// \~english @par Brief
+/// Chanage state to not wait in sStoppingState.
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - Prerequisite is nothing.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// None.
+/// \~english @par Detail
+/// If HSM application should not wait in sStoppingState, then call this function before FrameworkunifiedHSMDispatcher APIs.\n
+/// Default behavior is application will not wait is sStoppingState. So, it's not mandatory to use it.\n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// none
+/// \~english @see FrameworkunifiedHSMEnableWaitInStoppingState
+VOID FrameworkunifiedHSMDisableWaitInStoppingState();
+
+#endif // __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_SM_DISPATCHER_H__ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_eventdata.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_eventdata.h
new file mode 100644
index 00000000..e54d095e
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_eventdata.h
@@ -0,0 +1,83 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief
+/// This file has class declaration of the CFrameworkunifiedAction. This is an interface class that defines
+/// interfaces for implementing action
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_eventdata.h
+ * @brief \~english This file has class declaration of the CFrameworkunifiedAction. This is an interface class that defines
+ * interfaces for implementing action
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NSFRAMEWORKCORE_STATEMACHINE_INC_FRAMEWORKUNIFIEDSMEVENTDATA_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NSFRAMEWORKCORE_STATEMACHINE_INC_FRAMEWORKUNIFIEDSMEVENTDATA_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_logger_if.h>
+#include <boost/smart_ptr.hpp>
+
+
+class CEventData {
+ public:
+ CEventData(UI_32 f_uiEventId): m_uiEventId(f_uiEventId) { // NOLINT (readability/nolint)
+ FRAMEWORKUNIFIEDLOG(ZONE_NS_SM_USR_INFO, __FUNCTION__, "CEventData parameterized constructor"); // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
+ }
+
+ virtual ~CEventData() {
+ FRAMEWORKUNIFIEDLOG(ZONE_NS_SM_USR_INFO, __FUNCTION__, "CEventData destructor"); // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"
+ }
+
+ // event id
+ UI_32 m_uiEventId;
+
+ private:
+ CEventData() {
+ FRAMEWORKUNIFIEDLOG(ZONE_NS_SM_USR_INFO, __FUNCTION__, "CEventData constructor");
+ }
+};
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NSFRAMEWORKCORE_STATEMACHINE_INC_FRAMEWORKUNIFIEDSMEVENTDATA_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_eventfactory.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_eventfactory.h
new file mode 100644
index 00000000..02a2b3b7
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_eventfactory.h
@@ -0,0 +1,114 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file defines the events used by the statemachine framework
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_eventfactory.h
+ * @brief \~english This file defines the events used by the statemachine framework.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef CFRAMEWORKUNIFIEDEVENTFACTORY_H_ // NOLINT (build/header_guard)
+#define CFRAMEWORKUNIFIEDEVENTFACTORY_H_
+
+#include <native_service/frameworkunified_types.h>
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class defines the events used by the statemachine framework
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedEventFactory {
+ public:
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedEventFactory
+ /// \~english @par Brief
+ /// Constructor for class CFrameworkunifiedEventFactory.
+ /// \~english @param none
+ /// \~english @retval
+ /// \~english @par Prerequisite
+ /// none
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// none
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see ~CFrameworkunifiedEventFactory
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedEventFactory();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedEventFactory
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunifiedEventFactory
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedEventFactory created.
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Class CFrameworkunifiedHistoryState instance release.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedEventFactory::CFrameworkunifiedEventFactory
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedEventFactory();
+
+ /// Defines the events for starting an application
+ static const UI_32 evFrameworkunifiedStart = 0;
+
+ /// Defines the Higher limit for event id reserved only for framework
+ static const UI_32 evFrameworkunifiedEventLimit = 10;
+};
+
+#endif /* CFRAMEWORKUNIFIEDEVENTFACTORY_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_externaltransition.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_externaltransition.h
new file mode 100644
index 00000000..a4668064
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_externaltransition.h
@@ -0,0 +1,268 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedExternalTransition class definitions. CFrameworkunifiedExternalTransition is derived
+/// from CFrameworkunifiedTransition class.This class implements the FrameworkunifiedReaction interface to support transition
+/// from one state to another state.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_externaltransition.h
+ * @brief \~english This file has the CFrameworkunifiedExternalTransition class definitions. CFrameworkunifiedExternalTransition is derived
+ * from CFrameworkunifiedTransition class.This class implements the FrameworkunifiedReaction interface to support transition
+ * from one state to another state.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_EXTERNALTRANSITION_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_EXTERNALTRANSITION_H__
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_sm_transition.h>
+#include <vector>
+class CFrameworkunifiedGuard;
+class CFrameworkunifiedAction;
+class CEventData;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class implements the FrameworkunifiedReaction interface to support transition
+/// from one state to another state.
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedExternalTransition : public CFrameworkunifiedTransition {
+ public :
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedExternalTransition
+ /// \~english @par Brief
+ /// Constructor for class CFrameworkunifiedExternalTransition.
+ /// \~english @param [in] f_pTargetState
+ /// CFrameworkunifiedState* - pointer of target CFrameworkunifiedState object
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// none
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// inherit the CFrameworkunifiedTransition class and create instance of CFrameworkunifiedExternalTransition class \n
+ /// create the list for CFrameworkunifiedAction class,set pointer as member parameter\n
+ /// this class is intanced with FrameworkunifiedReaction interfase in order to support changing one state to other state.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedExternalTransition, FrameworkunifiedReaction, FrameworkunifiedAddAction
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedExternalTransition
+ /// Parameterized constructor
+ /// \param [in] f_pTargetState
+ /// CFrameworkunifiedState* - Target state object
+ ///
+ /// \return none
+ CFrameworkunifiedExternalTransition(CFrameworkunifiedState *f_pTargetState); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedExternalTransition
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunifiedExternalTransition
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedExternalTransition created.
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Class CFrameworkunifiedHistoryState instance release. \n
+ /// Member variable active action list of CFrameworkunifiedAction release.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedExternalTransition::CFrameworkunifiedExternalTransition
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedExternalTransition
+ /// Class destructor
+ ///
+ /// \return none
+ virtual ~CFrameworkunifiedExternalTransition();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedExternalTransition
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedReaction
+ /// The reaction for an event is implemented in this function. For external transition, Exit
+ /// of the source state is called and entry of the target state is called recursively.
+ ///
+ /// \~english @par Brief
+ /// CFrameworkunifiedExternalTransition instance event process.
+ /// \~english @param f_pSourceState
+ /// CFrameworkunifiedState* - source state object pointer
+ /// \~english @param f_pData
+ /// CEventDataPtr* - CEventData event pointer
+ /// \~english @retval CFrameworkunifiedState* active state pointer
+ /// \~english @retval NULL
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedExternalTransition created.
+ /// \~english @par Change of internal status
+ /// - If input parameter f_pSourceState is NULL. [NULL]
+ /// - If member variable m_pTargetState is NULL. [NULL]
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// if the self-instance has guard object,event operation will not conduct.
+ /// return soucestate(CFrameworkunifiedState class)object()f_pSourceState(set from parameter) as
+ /// activestate(CFrameworkunifiedState class)object\n
+ /// as activestate(CFrameworkunifiedState class)object
+ /// if there is no guard object:
+ /// - Exit process(FrameworkunifiedOnHSMStop call)for sorcestate(CFrameworkunifiedStateclass)object will conduct once more.
+ /// - Entryt process(FrameworkunifiedOnHSMStart call)for target state(CFrameworkunifiedState class)objectwill conduct once more.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedSetGuard, FrameworkunifiedAddAction
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedReaction(CFrameworkunifiedState *f_pSourceState, CEventDataPtr f_pData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedExternalTransition
+ /// \~english @par Brief
+ /// Sets the Guard object in External Transition
+ /// \~english @param f_pGuard
+ /// CFrameworkunifiedGuard* - CFrameworkunifiedGuard object pointer
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer set null pointer
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedExternalTransition created.
+ /// \~english @par Change of internal status
+ /// - If input parameter CFrameworkunifiedGuard is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Sets the Guard object in CFrameworkunifiedExternalTransition instance\n
+ /// in order to guard the transform process. and during setting process,\n
+ /// transform is not conduct
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedReaction, FrameworkunifiedAddAction
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedSetGuard
+ /// Sets the Guard object in External Transition
+ ///
+ /// \param [in] f_pGuard
+ /// CFrameworkunifiedGuard* - guard object
+ ///
+ ///
+ /// \return status
+ /// EFrameworkunifiedStatus -
+ ///
+ virtual EFrameworkunifiedStatus FrameworkunifiedSetGuard(CFrameworkunifiedGuard *f_pGuard);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedExternalTransition
+ /// \~english @par Brief
+ /// Adds CFrameworkunifiedAction object to the action list
+ /// \~english @param f_pAction
+ /// CFrameworkunifiedAction* - CFrameworkunifiedAction object pointer
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer set null pointer
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedExternalTransition created.
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - If input parameter CFrameworkunifiedAction is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - If member variable m_pActionList is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// add CFrameworkunifiedAction class object to the end of the list for CFrameworkunifiedAction class in parameter
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedReaction, FrameworkunifiedSetGuard
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedAddAction(CFrameworkunifiedAction *f_pAction);
+
+
+ protected :
+ /// pointer to the guard condition object
+ CFrameworkunifiedGuard *m_pGuard;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ExecuteTransition
+ /// Execute the transition actions, calls OnExit of Source State and OnEntry of target state
+ ///
+ /// \param [in] f_pSourceState
+ /// CEventDataPtr - source state
+ ///
+ /// \param [in] f_pData
+ /// CFrameworkunifiedState* - Event data
+ ///
+ ///
+ /// \return status
+ /// EFrameworkunifiedStatus -
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedState *ExecuteTransition(CFrameworkunifiedState *f_pSourceState, CEventDataPtr f_pData);
+
+ // Action list
+ typedef std::vector<CFrameworkunifiedAction *> TActionList;
+
+ // Action list iterator
+ typedef TActionList::iterator TActionListIterator;
+
+ // List of conditions
+ TActionList *m_pActionList;
+};
+#endif // __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_EXTERNALTRANSITION_H__ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_dispatch.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_dispatch.h
new file mode 100644
index 00000000..70afea16
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_dispatch.h
@@ -0,0 +1,1054 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_framework_dispatch.h
+ * @brief \~english This file contains basic api to operate state machine
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_FRAMEWORK_DISPATCH_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_FRAMEWORK_DISPATCH_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_framework_types.h>
+#include <native_service/frameworkunified_sm_framework_types.h>
+#include <native_service/frameworkunified_sm_hsmframework.h>
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedSetStateMachine
+/// \~english @par Brief
+/// Get pointer to the statemachine object.
+/// \~english @param [in] hApp
+/// HANDLE - Handle to the framework application
+/// \~english @retval CFrameworkunifiedHSMParentFramework* pointer to the statemachine object
+/// \~english @retval NULL Failed to get pointer to the statemachine object
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) . [NULL]
+/// - Pointer to statemachine object is NULL. [NULL]
+/// \~english @par Detail
+/// Get pointer to the statemachine object associated with application framework handle.\n
+/// Do not release the statemachine object in application, because it is a part of the Dispathcer.
+/// \~english @par Classification
+/// public
+/// \~english @par type
+/// sync only
+/// \~english @see FrameworkunifiedHSMDispatcherWithArguments,FrameworkunifiedGetStateMachine
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedSetStateMachine
+/// sets the statemachine object
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application session
+///
+/// \param [in] f_pFrameworkunifiedHSM
+/// CFrameworkunifiedHSM - Pointer to statemachine object
+///
+/// \return pointer to the StateMachine object
+/// CFrameworkunifiedHSMParentFramework* - pointer to the StateMachine object
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSetStateMachine(HANDLE hApp,
+ CFrameworkunifiedHSM *f_pFrameworkunifiedHSM);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventToDispatcher
+/// \~english @par Brief
+/// Register an event in dispatcher
+/// \~english @param [in] hApp
+/// HANDLE hApp - Application framework handle
+/// \~english @param [in] pServiceName
+/// PCSTR pServiceName - Service Name
+/// \~english @param [in] iCmd
+/// UI_32 iCmd - service protocol command/request/acknowledgment ID
+/// \~english @param [in] iEvent
+/// UI_32 iEvent - event to be posted to active state on receiving iCmd from pServiceName.
+/// \~english @param [in] hSession
+/// HANDLE hSession - Session Handle.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer to service name specified in the argument (pServiceName) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// Register an event information (iCmd,iEvent) for service specified in the argument in dispatcher.\n
+/// After that, when receiving an iCmd from service, post the event to active state.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - Operation is not guaranteed if a different handle is set for an application handle.
+/// - Operation is not guaranteed if an invalid handle is set for a session handle.
+/// - This API registers one event for one command and one callback for one event.\n
+/// When registration is performed for the same command, the previously registered event is activated.
+/// - The callback information is registered to the heap.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see FrameworkunifiedAttachHSMEventsToDispatcher
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedAttachHSMEventToDispatcher
+/// Registers a single event with the dispatcher for a given service.
+///
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pServiceName
+/// PCSTR - Service Name
+/// \param [in] iCmd
+/// UI_32 - service protocol command/request/acknowledgment ID
+/// \param [in] iEvent
+/// UI_32 - event to be posted to active state on receiving iCmd from pServiceName.
+/// \param [in] hSession
+/// HANDLE - Session Handle.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedAttachHSMEventToDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, UI_32 iEvent,
+ HANDLE hSession = NULL);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// Register events in dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Application framework handle
+/// \~english @param [in] pServiceName
+/// PCSTR pServiceName - Service Name
+/// \~english @param [in] pEventIds
+/// const FrameworkunifiedProtocolEvent *pEventIds - structure mapping event ids with the messages
+/// \~english @param [in] uiEventCount
+/// UI_32 uiEventCount - no of events
+/// \~english @param [in] hSession
+/// HANDLE hSession - Session Handle.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer to service name specified in the argument (pServiceName) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// Register events information (iCmd,iEvent) for service specified in the argument in dispatcher.\n
+/// After that, when receiving an iCmd from service, post the event to active state.\n
+/// If register failed, only the events that register before it are valid.\n
+/// When multiple registration, if an error occurs in the second and subsequent, becomes effective only \n
+/// information that has been registered so far. \n
+/// For number of upper limit of the registration possible event, depending on \n
+/// the securable size as the area of the FrameworkunifiedProtocolEvent structure. Therefore, note to ensure \n
+/// the size of the area of the FrameworkunifiedProtocolEvent structure at the call side of API, and define \n
+/// the number of event.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - Operation is not guaranteed if a different handle is set to Handle for the application.
+/// - Operation is not guaranteed if an invalid handle is set for a session handle.
+/// - If an error occurs when multiple events are registered, it is impossible to determine which event was valid.
+/// Therefore, either register multiple event information again or delete multiple event information at the same time when registration fails.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see FrameworkunifiedAttachHSMEventToDispatcher
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedAttachHSMEventsToDispatcher
+/// Registers a multiple event with the dispatcher for a given service.
+///
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pServiceName
+/// PCSTR - Service Name
+/// \param [in] pEventIds
+/// const FrameworkunifiedProtocolEvent* - structure mapping event ids with the messages
+/// \param [in] uiEventCount
+/// UI_32 - no of events
+/// \param [in] hSession
+/// HANDLE - Session Handle.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedAttachHSMEventsToDispatcher(HANDLE hApp, PCSTR pServiceName,
+ const FrameworkunifiedProtocolEvent *pEventIds,
+ UI_32 uiEventCount,
+ HANDLE hSession = NULL);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// register a notification in service
+/// \~english @param [in] hApp
+/// HANDLE hApp - Handle to the Framework
+/// \~english @param [in] pNotification
+/// PCSTR pNotification - Name of Notification
+/// \~english @param [in] max_length
+/// const UI_32 max_length - Max size of the notification message
+/// \~english @param [in] persType
+/// const EFrameworkunifiedNotificationType persType - Type of persistent
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer(pNotification) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// send message to Notification Service to register a notification
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPHSMRegisterNotificatsionEvent
+/// API to send message to Notification Service to register a notification
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] pNotification
+/// PCSTR - Name of Notification
+/// \param [in] max_length
+/// const UI_32 - Max size of the notification message
+/// \param [in] persType
+/// const EFrameworkunifiedNotificationType - Type of persistent
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPHSMRegisterNotificatsionEvent(HANDLE hApp, PCSTR pNotification, const UI_32 max_length,
+ const EFrameworkunifiedNotificationType persType);
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// register many notifications in service
+/// \~english @param [in] hApp
+/// HANDLE hApp - Handle to the Framework
+/// \~english @param [in] pList
+/// const FrameworkunifiedNotificationsList *pList - List of the notifications that need to be registered
+/// \~english @param [in] uiListLength
+/// UI_32 uiListLength - Length of the list
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer(pList) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// send message to Notification Service to register many notifications
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPHSMRegisterNotificationsEvents
+/// API to send message to Notification Service to register a notification
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] pList
+/// FrameworkunifiedNotificationsList - List of the notifications that need to be registered
+/// \param [in] uiListLength
+/// const UI_32 - Length of the list
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPHSMRegisterNotificationsEvents(HANDLE hApp, const FrameworkunifiedNotificationsList *pList,
+ UI_32 uiListLength);
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// remove a notification in service
+/// \~english @param [in] hApp
+/// HANDLE hApp - Handle to the Framework
+/// \~english @param [in] pNotification
+/// cPCSTR pNotification - Name of Notification
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer(pNotification) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// send message to Notification Service to remove a notification
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedNPHSMUnRegisterNotificationEvent
+/// API to send message to Notification Service to remove a notification
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the Framework
+/// \param [in] pNotification
+/// PCSTR - Name of Notification
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedNPHSMUnRegisterNotificationEvent(HANDLE hApp, PCSTR pNotification);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// attach an event to the dispatcher on receiving a specific notification.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Handle to the Framework
+/// \~english @param [in] pNotification
+/// cPCSTR pNotification - Name of Notification
+/// \~english @param [in] iEventId
+/// UI_32 iEventId - event ID
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer(pNotification) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// attach an event to the dispatcher on receiving a specific notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedAttachNotificationEventToDispatcher
+/// API to attach a event to the dispatcher on receiving a specific notification.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pNotification
+/// PCSTR - Notification String.
+/// \param [in] iEventId
+/// UI_32 - event to be posted to active state on receiving iCmd from pServiceName.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationWithHSMEvent(HANDLE hApp, PCSTR pNotification,
+ UI_32 iEventId);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// attach many events to eath dispatcher on receiving a specific notification.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Handle to the Framework
+/// \~english @param [in] pNtfyEvent
+/// const FrameworkunifiedNotificationEvent *pNtfyEvent - Notification event structure.
+/// \~english @param [in] uiEventCount
+/// UI_32 uiEventCount - Number of Notification event
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// attach many events to eath dispatcher on receiving a specific notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedAttachNotificationEventsToDispatcher
+/// API to attach a event to the dispatcher on receiving a specific notification.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pNtfyEvent
+/// const FrameworkunifiedNotificationEvent* - Notification event structure.
+/// \param [in] uiEventCount
+/// UI_32 - Number of Notification event
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationsWithHSMEvent(HANDLE hApp, const FrameworkunifiedNotificationEvent *pNtfyEvent,
+ UI_32 uiEventCount);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// detach events from the dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Handle to the Framework
+/// \~english @param [in] pNtfyHandler
+/// const FrameworkunifiedNotificationEvent *pNtfyHandler - Notification handler structure.
+/// \~english @param [in] uiHandlerCount
+/// UI_32 uiHandlerCount - Notification handler structure.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// detach events from the dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedUnsubscribeNotificationsWithHSMEvent
+/// API to detach a notification event from the dispatcher.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pNtfyHandler
+/// const FrameworkunifiedNotificationEvent* - Notification handler structure.
+/// \param [in] uiHandlerCount
+/// UI_32 - Number of notification handlers
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationsWithHSMEvent(HANDLE hApp, const FrameworkunifiedNotificationEvent *pNtfyHandler,
+ UI_32 uiHandlerCount);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// detach a notification event from the dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Handle to the Framework
+/// \~english @param [in] pNotification
+/// PCSTR pNotification - Notification String.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer(pNotification) to service name is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// detach a notification event from the dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedDetachNotificationEventsFromDispatcher
+/// API to detach a notification event from the dispatcher.
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pNotification
+/// PCSTR - Notification String.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationWithHSMEvent(HANDLE hApp, PCSTR pNotification);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// Registers a multiple HSM event with the dispatcher for a given service.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Child Thread handle
+/// \~english @param [in] pEventIds
+/// const FrameworkunifiedProtocolEvent *pEventIds - structure mapping event ids with the messages
+/// \~english @param [in] uiEventCount
+/// UI_32 uiEventCount - no of events
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// Registers a multiple HSM event with the dispatcher for a given service.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedAttachParentHSMEventsToDispatcher
+/// Registers a multiple HSM event with the dispatcher for a given service.
+///
+///
+/// \param [in] hChildApp
+/// HANDLE - Application framework handle
+/// \param [in] pEventIds
+/// const FrameworkunifiedProtocolEvent* - structure mapping event ids with the messages
+/// \param [in] uiEventCount
+/// UI_32 - no of events
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedAttachParentHSMEventsToDispatcher(HANDLE hChildApp, const FrameworkunifiedProtocolEvent *pEventIds,
+ UI_32 uiEventCount);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachHSMEventsToDispatcher
+/// \~english @par Brief
+/// detach notification HSM events from the dispatcher.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Child Thread handle
+/// \~english @param [in] puiEventArray
+/// const PUI_32 puiEventArray - Array of events
+/// \~english @param [in] uiEventCount
+/// UI_32 uiEventCount - Number of events
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// detach notification HSM events from the dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+/////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedDetachParentHSMEventsFromDispatcher
+/// API to detach a notification HSM event from the dispatcher.
+///
+///
+/// \param [in] hChildApp
+/// HANDLE - Child Thread handle
+/// \param [in] puiEventArray
+/// const PUI_32 puiEventArray - Array of events
+/// \param [in] uiEventCount
+/// UI_32 - Number of events
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDetachParentHSMEventsFromDispatcher(HANDLE hChildApp, const PUI_32 puiEventArray, UI_32 uiEventCount);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachHSMEventsFromDispatcher
+/// \~english @par Brief
+/// detach multiple events from the dispatcher
+/// \~english @param [in] hApp
+/// HANDLE hApp - Application framework handle
+/// \~english @param [in] pServiceName
+/// PCSTR pServiceName - Service Name
+/// \~english @param [in] puiCmdArray
+/// const PUI_32 puiCmdArray - Array of commands
+/// \~english @param [in] uiCmdCount
+/// UI_32 uiCmdCount - Number of Commands
+/// \~english @param [in] hSession
+/// HANDLE hSession - Session Handle.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @retval eFrameworkunifiedStatusFail process failed
+/// \~english @retval eFrameworkunifiedStatusInvldParam invalid parameter
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer to service name specified in the argument (pServiceName) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer(pServiceName) to service name doesn't exist [eFrameworkunifiedStatusFail]
+/// - Pointer to event array specified in the argument which will be deleted is NULL [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// Detach multiple events(puiCmdArray) information for service specified in the argument from dispatcher.\n
+/// After that, when receiving command from service, post the event to unactive state.\n
+/// If the information has been deleted, return eFrameworkunifiedStatusOK.\n
+/// If the specific event has not been registered, return eFrameworkunifiedStatusOK.\n
+/// If number of puiCmdArray to be deleted is 0, return eFrameworkunifiedStatusOK.\n
+/// When deleting multiple events, if an error occurs, stop deleting. \n
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - Operation is not guaranteed if a different handle is set for an application handle.
+/// - Operation is not guaranteed if an invalid handle is set for a session handle.
+/// - Operatuib is not guaranteed if a puiCmdArray that differs from the events to be deleted is set.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see FrameworkunifiedDetachHSMEventFromDispatcher
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedDetachHSMEventsFromDispatcher
+/// API to detach a notification HSM event from the dispatcher.
+///
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pServiceName
+/// PCSTR - Service Name
+/// \param [in] puiCmdArray
+/// const PUI_32 - Array of commands
+/// \param [in] uiCmdCount
+/// UI_32 - Number of Commands
+/// \param [in] hSession
+/// HANDLE - Session Handle.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+EFrameworkunifiedStatus FrameworkunifiedDetachHSMEventsFromDispatcher(HANDLE hApp, PCSTR pServiceName, const PUI_32 puiCmdArray,
+ UI_32 uiCmdCount, HANDLE hSession = NULL);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
+/// \~english @par Brief
+/// detach an event from the dispatcher
+/// \~english @param [in] hApp
+/// HANDLE hApp - Application framework handle
+/// \~english @param [in] pServiceName
+/// PCSTR pServiceName - Service Name
+/// \~english @param [in] iCmd
+/// UI_32 iCmd - service protocol command/request/acknowledgment ID
+/// \~english @param [in] hSession
+/// HANDLE hSession - Session Handle.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @retval eFrameworkunifiedStatusFail process failed
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer to service name specified in the argument (pServiceName) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer(pServiceName) to service name doesn't exist [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Detach an event information for service specified in the argument from dispatcher.\n
+/// After that, when receiving command from service, post the event to unactive state.\n
+/// If the information has been deleted or the specific iCmd has not been registered, return eFrameworkunifiedStatusOK.\n
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - Operation is not guaranteed if a different handle is set for an application handle.
+/// - Operation is not guaranteed if an invalid handle is set for a session handle.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see FrameworkunifiedDetachHSMEventsFromDispatcher
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedDetachHSMEventFromDispatcher
+/// API to detach a notification HSM event from the dispatcher.
+///
+///
+/// \param [in] hApp
+/// HANDLE - Application framework handle
+/// \param [in] pServiceName
+/// PCSTR - Service Name
+/// \param [in] iCmd
+/// UI_32 - service protocol command/request/acknowledgment ID
+/// \param [in] hSession
+/// HANDLE - Session Handle.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see
+///
+EFrameworkunifiedStatus FrameworkunifiedDetachHSMEventFromDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, HANDLE hSession = NULL);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedGetStateMachine
+/// \~english @par Brief
+/// Get pointer to the statemachine object.
+/// \~english @param [in] hApp
+/// HANDLE - Handle to the framework application
+/// \~english @retval CFrameworkunifiedHSMParentFramework* pointer to the statemachine object
+/// \~english @retval NULL Failed to get pointer to the statemachine object
+/// \~english @par Prerequisite
+/// - Generation/Initialization of Dispatcher for the Application by FrameworkunifiedHSMDispatcherWithArguments has been done.
+/// \~english @par Change of internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) . [NULL]
+/// - HANDLE specified in the argument (hApp) is not generated by FrameworkunifiedHSMDispatcherWithArguments. [NULL]
+/// \~english @par Detail
+/// Get pointer to the statemachine object associated with application framework handle.\n
+/// Do not release the statemachine object in application, because it is a part of the Dispathcer.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see FrameworkunifiedHSMDispatcherWithArguments,FrameworkunifiedSetStateMachine
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedGetStateMachine
+/// returns the pointer to the statemachine object
+///
+/// \param [in] hApp
+/// HANDLE - Handle to the application session
+///
+/// \return pointer to the StateMachine object
+/// CFrameworkunifiedHSMParentFramework* - pointer to the StateMachine object
+///
+/// \see
+///
+CFrameworkunifiedHSMFramework *FrameworkunifiedGetStateMachine(HANDLE hApp);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
+/// \~english @par Brief
+/// subscribing to single event of a service. attaches the session event with HSM events.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Application handle
+/// \~english @param [in] uiEventId
+/// UI_32 uiEventId - Session Event id
+/// \~english @param [in] uiHSMEventId
+/// UI_32 uiHSMEventId- Statemachine Event id
+/// \~english @param [in] hSession
+/// HANDLE hSession - Session Handle.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @retval eFrameworkunifiedStatusFail process failed
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// This API is used for subscribing to single event of a service.
+/// This API also attaches the session event with HSM events.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedSubscribeToSessionEventWithHSMEvent
+/// This API is used for subscribing to single event of a service.
+/// This API also attaches the session event with HSM events.
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] uiEventId
+/// UI_32 - Session Event id
+/// \param [in] uiHSMEventId
+/// UI_32 - Statemachine Event id
+/// \param [in] hSession
+/// HANDLE - Session handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedSubscribeToSessionEventsWithHSMEvents
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventWithHSMEvent(HANDLE hApp, UI_32 uiEventId, UI_32 uiHSMEventId, HANDLE hSession);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
+/// \~english @par Brief
+/// subscribing to multiple events of a service. attaches the session events with HSM events.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Application handle
+/// \~english @param [in] pEventIds
+/// const FrameworkunifiedProtocolEvent *pEventIds - structure mapping session event id's with the hsm event id's
+/// \~english @param [in] uiEventCount
+/// UI_32 uiEventCount - count of events
+/// \~english @param [in] hSession
+/// HANDLE hSession - Session Handle.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @retval eFrameworkunifiedStatusFail process failed
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// - Pointer to FrameworkunifiedProtocolEvent structure specified in the argument is NULL [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// This API is used for subscribing to multiple events of a service.
+/// his API also attaches the session events with hsm events.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedSubscribeToSessionEventsWithHSMEvents
+/// This API is used for subscribing to multiple events of a service.
+/// This API also attaches the session events with hsm events.
+///
+/// \param [in] hApp
+/// HANDLE - Application handle
+/// \param [in] pEventIds
+/// FrameworkunifiedProtocolEvent - structure mapping session event id's with the hsm event id's
+/// \param [in] uiEventCount
+/// UI_32 - count of events
+/// \param [in] hSession
+/// HANDLE - Session handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedSubscribeToSessionEventWithHSMEvent
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventsWithHSMEvents(HANDLE hApp, const FrameworkunifiedProtocolEvent *pEventIds, UI_32 uiEventCount,
+ HANDLE hSession);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
+/// \~english @par Brief
+/// unsubscribe from event of a service. detaches HSM event from session event.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Application handle
+/// \~english @param [in] uiEventId
+/// UI_32 uiEventId - Event id
+/// \~english @param [in] hSession
+/// HANDLE hSession - Session Handle.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @retval eFrameworkunifiedStatusFail process failed
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// API to unsubscribe from event of a service. Also detaches HSM event from session event.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedUnSubscribeSessionEventWithHSMEvent
+/// API to unsubscribe from event of a service. Also detaches HSM event from session event.
+///
+/// \param [in] hApp
+/// HANDLE - Application Handle
+/// \param [in] uiEventId
+/// UI_32 - Event id
+/// \param [in] hSession
+/// HANDLE - Session Handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedUnSubscribeSessionEventsWithHSMEvents
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventWithHSMEvent(HANDLE hApp, UI_32 uiEventId, HANDLE hSession);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachHSMEventFromDispatcher
+/// \~english @par Brief
+/// unsubscribe from multiple events of a service. detaches HSM events from session events.
+/// \~english @param [in] hApp
+/// HANDLE hApp - Application handle
+/// \~english @param [in] pEventsArray
+/// PUI_32 pEventsArray - Array of events id's.
+/// \~english @param [in] uiListSize
+/// UI_32 uiListSize - count of elements in array.
+/// \~english @param [in] hSession
+/// HANDLE hSession - Session Handle.
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle invalid state handle
+/// \~english @retval eFrameworkunifiedStatusFail process failed
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// API to unsubscribe from multiple events of a service. Also detaches HSM events from session events.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @see
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////
+/// FrameworkunifiedUnSubscribeSessionEventsWithHSMEvents
+/// API to unsubscribe from multiple events of a service. Also detaches HSM events from session events.
+///
+/// \param [in] hApp
+/// HANDLE - Application Handle
+/// \param [in] pEventsArray
+/// PUI_32 - Array of events id's.
+/// \param [in] uiListSize
+/// UI_32 - count of elements in array.
+/// \param [in] hSession
+/// HANDLE - Session Handle
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+///
+/// \see FrameworkunifiedUnSubscribeSessionEventWithHSMEvent
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventsWithHSMEvents(HANDLE hApp, PUI_32 pEventsArray, UI_32 uiListSize,
+ HANDLE hSession);
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_FRAMEWORK_DISPATCH_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_if.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_if.h
new file mode 100644
index 00000000..8c90e595
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_if.h
@@ -0,0 +1,486 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_framework_if.h
+ * @brief \~english This File has public Macro definition that simplifies the statemachine implementation
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_FRAMEWORK_IF_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_FRAMEWORK_IF_H__
+
+#include <native_service/frameworkunified_framework_if.h>
+#include <native_service/frameworkunified_sm_framework_types.h>
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_framework_types.h>
+#include <native_service/frameworkunified_sm_framework_dispatch.h>
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro creates an instance of a state object.
+/// \~english @param [in] class_name Class name
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macro creates an instance of a state object with the specified class name.
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// Create a instance of state object
+#define CREATE_STATE(class_name) \
+ C## class_name *l_p## class_name = new C## class_name(#class_name);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro associates a framework event with a process and adds it to a state.
+/// \~english @param [in] state State
+/// \~english @param [in] eventid Event ID
+/// \~english @param [in] reaction Pointers to CFrameworkunifiedReaction objects
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macros retrieves the current state machine from the application handles used in the process
+/// and associates framework events with the process and adds them to the state using FrameworkunifiedFrameworkConnect().
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// Connect framework event to reaction and add to state
+#define FRAMEWORKUNIFIED_CONNECT_EVENT(state, eventid, reaction) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedFrameworkConnect(CFrameworkunifiedHSMParentFramework::e## state, \
+ CFrameworkunifiedHSMParentFramework::_## eventid, l_pTrn## reaction, #eventid);
+
+#define FRAMEWORKUNIFIED_CONNECT_LOCAL_EVENT(state, eventid, reaction) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedFrameworkConnect(CFrameworkunifiedHSMParentFramework::e## state, \
+ CFrameworkunifiedHSMParentFramework::_## eventid, l_pLocalTrn## reaction, #eventid);
+
+/// Connect framework event to reaction and add to state as deferred event
+#define FRAMEWORKUNIFIED_CONNECT_DEFERREDEVENT(state, eventid) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedFrameworkConnect(CFrameworkunifiedHSMParentFramework::e## state, \
+ CFrameworkunifiedHSMParentFramework::_## eventid, NULL, #eventid, TRUE);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro associates a child state as the default state with the ready state of the framework.
+/// \~english @param [in] child Child state
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macro retrieves the current state machine from the application handles used in the process and uses FrameworkunifiedFrameworkConnect() to associate the specified child state with the ready state of the framework as the default state.
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// connect state to framework ready state as default state
+#define FRAMEWORKUNIFIED_CONNECT_DEFAULTSTATE(child) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedFrameworkConnect(l_p## child, TRUE);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro associates the child state with the ready state of the framework.
+/// \~english @param [in] child Child state
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macro retrieves the current state machine from the application handles used in the process and associates the specified child state with the ready state of the framework using FrameworkunifiedFrameworkConnect().
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// connect state to framework ready state
+#define FRAMEWORKUNIFIED_CONNECT_STATE(child) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedFrameworkConnect(l_p## child);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// A macro that associates a child state as the defaut state with a parent state.
+/// \~english @param [in] parent Parent state
+/// \~english @param [in] child Child state
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macro takes the current state machine from the application handles used in the process and uses FrameworkunifiedConnect() to associate the specified child state with the specified parent state as the default state.
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// connect child state to parent state as default state
+#define CONNECT_DEFAULTSTATE(parent, child) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## parent, l_p## child, TRUE);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// A macro that associates a child state with a parent state.
+/// \~english @param [in] parent Parent state
+/// \~english @param [in] child Child state
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macro takes the current state machine from the application handles used in the process and associates the specified child state with the specified parent state using FrameworkunifiedConnect().
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// connect child state to parent state
+#define CONNECT_STATE(parent, child) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## parent, l_p## child);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro associates a state as the state of the root.
+/// \~english @param [in] orthogonalstate quadrature state(CFrameworkunifiedOrthogonalState*)
+/// \~english @param [in] orthogonalregion orthographic region(CFrameworkunifiedCompositeState*)
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macro gets the current state machine from the application handles used in the process and associates the specified orthographic state as the state of the root using FrameworkunifiedConnectOrthogonal().
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// connect child state to parent state
+#define CONNECT_ORTHOGONAL_REGION(orthogonalstate, orthogonalregion) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnectOrthogonal(l_p## orthogonalstate, l_p## orthogonalregion);
+
+/// connect the deferred event and reactions and associate them with the state
+#define CONNECT_DEFERREDEVENT(state, eventid) \
+ FrameworkunifiedGetStateMachine(hApp)->FrameworkunifiedConnect(l_p## state, _## eventid, NULL, #eventid, TRUE);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro associates a framework event with a process and adds it to a state.
+/// \~english @param [in] state State
+/// \~english @param [in] eventid Event ID
+/// \~english @param [in] reaction Pointers to CFrameworkunifiedReaction objects
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macros retrieves the current state machine from the application handles used in the process and associates framework events with the process and adds them to the state using FrameworkunifiedConnect().
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// connect event to reaction and add to state
+#define CONNECT_EVENT(state, eventid, reaction) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## state, _## eventid, l_pTrn## reaction, #eventid);
+
+/// connect event to reaction and add to state
+#define CONNECT_LOCAL_EVENT(state, eventid, reaction) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## state, _## eventid, l_pLocalTrn## reaction, #eventid);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro logs state and events of the state machine.
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macro gets the current state machine from the application handles used in the process and logs the state and events of the state machine using FrameworkunifiedPrintAllStates().
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// print state machine states and events
+#define PRINTSTATEMACHINE() \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedPrintAllStates();
+
+/// Connect application defined event to application defined reaction and add to framework state
+#define CONNECT_FRAMEWORKUNIFIED_EVENT(state, eventid, reaction) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## state, CFrameworkunifiedHSMParentFramework::_## eventid, \
+ l_pTrn## reaction, #eventid);
+
+/// Connect application defined deferred event to framework state
+#define CONNECT_FRAMEWORKUNIFIED_DEFERREDEVENT(state, eventid) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## state, CFrameworkunifiedHSMParentFramework::_## eventid, \
+ NULL, #eventid, TRUE);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro associates an application event with a process and adds it to a state.
+/// \~english @param [in] state State
+/// \~english @param [in] eventid Event ID
+/// \~english @param [in] reaction Pointers to CFrameworkunifiedReaction objects
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macros retrieves the current state machine from the application handles used in the process, and associates the events of the application with the process and adds them to the state using FrameworkunifiedFrameworkConnect().
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+#define FRAMEWORKUNIFIED_CONNECT_APP_EVENT(state, eventid, reaction) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedFrameworkConnect(CFrameworkunifiedHSMParentFramework::e## state, _## eventid, \
+ l_pTrn## reaction, #eventid);
+
+#define FRAMEWORKUNIFIED_CONNECT_APP_DEFERREDEVENT(state, eventid) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedFrameworkConnect(CFrameworkunifiedHSMParentFramework::e## state, _## eventid, \
+ NULL, #eventid, TRUE);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// Macros that create and add Shallow history states to their parents.
+/// \~english @param [in] parent Parent state
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macro retrieves the current state machine from the application handles used in the process after a new Shallow history state is created, and adds the Shallow history state created to the parent state using FrameworkunifiedConnect().
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+// create a new shallow history state and add it in parent state
+#define ADD_SHALLOWHISTORYSTATE(parent) \
+ CFrameworkunifiedShallowHistoryState *l_p##parent##SHALLOWHISTORYSTATE = new CFrameworkunifiedShallowHistoryState(SHALLOWHISTORYSTATE);\
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## parent, l_p##parent##SHALLOWHISTORYSTATE);\
+ CHKNULL(l_p##parent##SHALLOWHISTORYSTATE);\
+ l_p##parent##SHALLOWHISTORYSTATE->SetDefaultHistory();
+
+// create a new shallow history state and add it in parent state
+#define ADD_DEEPHISTORYSTATE(parent) \
+ CFrameworkunifiedDeepHistoryState *l_p##parent##DEEPHISTORYSTATE = new CFrameworkunifiedDeepHistoryState(DEEPHISTORYSTATE);\
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## parent, l_p##parent##DEEPHISTORYSTATE);\
+ CHKNULL(l_p##parent##DEEPHISTORYSTATE);\
+ l_p##parent##DEEPHISTORYSTATE->SetDefaultHistory();
+
+/// connect deep history event to reaction and add to state
+#define CONNECT_DEEPHISTORYEVENT(state, eventid, reaction) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## state, _## eventid, l_pTrn##reaction##DEEPHISTORYSTATE, #eventid);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// Macros that associate Shallow history events with processes and add them to states.
+/// \~english @param [in] state State
+/// \~english @param [in] eventid Event ID
+/// \~english @param [in] reaction Pointers to CFrameworkunifiedReaction objects
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macros retrieves the current state machine from the application handles used in the process and associates Shallow history events with the process and adds them to the state using FrameworkunifiedConnect().
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// connect shallow history event to reaction and add to state
+#define CONNECT_SHALLOWHISTORYEVENT(state, eventid, reaction) \
+ (FrameworkunifiedGetStateMachine(hApp))->FrameworkunifiedConnect(l_p## state, _## eventid, l_pTrn##reaction##SHALLOWHISTORYSTATE, #eventid);
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/// FrameworkunifiedCreateStateMachine
+/// The application state machine is created in this interface. User defined events can also
+/// be connected to the framework states in this interface.
+///
+/// \~english @par Brief
+/// - It's a callback function to create state machine used by application.
+/// \~english @param [in] hApp
+/// HANDLE - handle to application
+/// \~english @retval eFrameworkunifiedStatusOK -successed
+/// \~english @retval Except eFrameworkunifiedStatusOK - failure
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Inside state change
+/// - None
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// The application state machine is created in this interface. User defined events can also\n
+/// be connected to the framework states in this interface.
+/// - FrameworkunifiedDispatcherWithArguments
+/// - FrameworkunifiedDispatcher
+/// - FrameworkunifiedCreateDispatcherWithoutLoop
+/// \~english @par Classification
+/// - Public
+/// \~english @see FrameworkunifiedDispatcherWithArguments, FrameworkunifiedDispatcher, FrameworkunifiedCreateDispatcherWithoutLoop
+///////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedCreateStateMachine(HANDLE hApp);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+///////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////
+/// All HSM applications must define this function. This function will be called on entry
+/// of sFrameworkunifiedLoadData state.
+// Expected in this function:
+/// All the persistent data of the applications should be loaded in this function.
+///
+/// \~english @par Brief
+/// - This function defines loading persistent data of HSM application.
+/// \~english @param [in] hApp
+/// HANDLE - handle to application
+/// \~english @retval eFrameworkunifiedStatusOK -successed
+/// \~english @retval Except eFrameworkunifiedStatusOK - failure
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Inside state change
+/// - None
+/// \~english @par Conditions of processing failure
+/// - The implementation specification of the callback depends on the implementation (design) of the application.
+/// For this reason, the application should consider the Public of errors in the failed condition.
+/// \~english @par Detail
+/// - All HSM applications must define this function. This function will be called on entry\n
+/// of sFrameworkunifiedLoadData state.Expected in this function:\n
+/// All the persistent data of the applications should be loaded in this function.
+/// \~english @par Classification
+/// - Private
+/// \~english @par Detail
+/// - None
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedHSMOnLoadData(HANDLE hApp);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+///////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////
+/// All HSM applications must define this function. This function will be called on exit
+/// of sFrameworkunifiedRun state.
+// Expected in this function:
+/// Send stop request to all the child threads.
+///
+/// \~english @par Brief
+/// - This function defines sending stop request to the child threads of HSM application.
+/// \~english @param [in] hApp
+/// HANDLE - handle to application
+/// \~english @retval eFrameworkunifiedStatusOK -successed
+/// \~english @retval Except eFrameworkunifiedStatusOK - failure
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Inside state change
+/// - None
+/// \~english @par Conditions of processing failure
+/// - The implementation specification of the callback depends on the implementation (design) of the application.
+/// For this reason, the application should consider the Public of errors in the failed condition.
+/// \~english @par Detail
+/// - All HSM applications must define this function.\n
+/// This function will be called on exit of sFrameworkunifiedRun state.\n
+/// Expected in this function:Send stop request to all the child threads.
+/// \~english @par Classification
+/// - Private
+/// \~english @par Type
+/// - None
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedHSMOnStopInsFrameworkunifiedRun(HANDLE hApp);
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_FRAMEWORK_IF_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_types.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_types.h
new file mode 100644
index 00000000..fb00ecd3
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_framework_types.h
@@ -0,0 +1,494 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This File has public Macro definition that simplifies the statemachine implementation
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_framework_types.h
+ * @brief \~english This File has public Macro definition that simplifies the statemachine implementation
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_FRAMEWORKUNIFIED_SM_FRAMEWORK_TYPES_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_FRAMEWORKUNIFIED_SM_FRAMEWORK_TYPES_H__
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_sm_leafstate.h>
+#include <native_service/frameworkunified_sm_internaltransition.h>
+#include <native_service/frameworkunified_sm_compositestate.h>
+#include <native_service/frameworkunified_sm_eventfactory.h>
+#include <native_service/frameworkunified_sm_externaltransition.h>
+#include <native_service/frameworkunified_sm_localtransition.h>
+#include <native_service/frameworkunified_sm_orthogonalstate.h>
+#include <native_service/frameworkunified_sm_shallowhistorystate.h>
+#include <native_service/frameworkunified_sm_deephistorystate.h>
+#include <native_service/frameworkunified_sm_guard.h>
+#include <native_service/frameworkunified_sm_conditionconnector.h>
+#include <native_service/frameworkunified_sm_action.h>
+#include <native_service/frameworkunified_sm_eventdata.h>
+#include <exception>
+#include <string>
+
+class CFrameworkunifiedState;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// Defines the null pointer exception
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CNullPointerException: public std::exception {
+ virtual const char *what() const throw() {
+ return "Null pointer exception";
+ }
+};
+
+
+/// Macro to check pointer for null value and throw null pointer exception
+#define CHKNULL(x) if (NULL == x) throw CNullPointerException();
+
+#define SHALLOWHISTORYSTATE "ShallowHistory"
+#define DEEPHISTORYSTATE "DeepHistory"
+
+/// Defines the state machine class
+#define DEFINE_STATEMACHINE(class_name) \
+ class C## class_name : public CFrameworkunifiedHSM{ \
+ public: \
+ C## class_name(); \
+ virtual ~C## class_name(); \
+ EFrameworkunifiedStatus FrameworkunifiedCreate(PVOID f_pEventData = NULL); \
+ };
+
+/// Defines the leafstate class that does not override entry and exit of base state
+#define DEFINE_LEAFSTATE(class_name) \
+ class C## class_name : public CFrameworkunifiedLeafState { \
+ public: \
+ C## class_name(std::string f_pName):CFrameworkunifiedLeafState(f_pName) {} };
+
+/// Defines the Composite state that does not override entry and exit of base state
+#define DEFINE_COMPOSITESTATE(class_name) \
+ class C## class_name : public CFrameworkunifiedCompositeState { \
+ public: \
+ C## class_name(std::string f_pName):CFrameworkunifiedCompositeState(f_pName) {} };
+
+/// Defines the Orthogonal state that does not override entry and exit of base state
+#define DEFINE_ORTHOGONALSTATE(class_name) \
+ class C## class_name : public CFrameworkunifiedOrthogonalState { \
+ public: \
+ C## class_name(std::string f_pName):CFrameworkunifiedOrthogonalState(f_pName) {} };
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// Macros that inherit CFrameworkunifiedLeafState classes.
+/// \~english @param [in] class_name Class name
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// Macros that inherit from CFrameworkunifiedLeafState classes and override the following methods:
+/// The following overriding methods should be implemented by the user.
+/// - FrameworkunifiedOnEntry
+/// - FrameworkunifiedOnExit
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// Defines the leafstate that overrides entry and exit of base state
+#define DEFINE_LEAFSTATE_OVERRIDE(class_name) \
+ class C## class_name : public CFrameworkunifiedLeafState{ \
+ public: \
+ C## class_name(std::string f_pName); \
+ virtual ~C## class_name(); \
+ EFrameworkunifiedStatus FrameworkunifiedOnEntry(CEventDataPtr f_pEventData); \
+ EFrameworkunifiedStatus FrameworkunifiedOnExit(CEventDataPtr f_pEventData); \
+ };
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// Macros that inherit CFrameworkunifiedCompositeState classes.
+/// \~english @param [in] class_name Class name
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// Macros that inherit from CFrameworkunifiedCompositeState classes and override the following methods:
+/// The following overriding methods should be implemented by the user.
+/// - FrameworkunifiedOnEntry
+/// - FrameworkunifiedOnExit
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// Defines the Composite state class that overrides entry and exit of base state
+#define DEFINE_COMPOSITESTATE_OVERRIDE(class_name) \
+ class C## class_name : public CFrameworkunifiedCompositeState{ \
+ public: \
+ C## class_name(std::string f_pName); \
+ virtual ~C## class_name(); \
+ EFrameworkunifiedStatus FrameworkunifiedOnEntry(CEventDataPtr f_pEventData); \
+ EFrameworkunifiedStatus FrameworkunifiedOnExit(CEventDataPtr f_pEventData); \
+ };
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// Macros that inherit CFrameworkunifiedOrthogonalState classes.
+/// \~english @param [in] class_name Class name
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// Macros that inherit from CFrameworkunifiedOrthogonalState classes and override the following methods:
+/// The following overriding methods should be implemented by the user.
+/// - FrameworkunifiedOnEntry
+/// - FrameworkunifiedOnExit
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// Defines the Orthogonal state that overrides entry and exit of base state
+#define DEFINE_ORTHOGONALSTATE_OVERRIDE(class_name) \
+ class C## class_name : public CFrameworkunifiedOrthogonalState{ \
+ public: \
+ C## class_name(std::string f_pName); \
+ virtual ~C## class_name(); \
+ EFrameworkunifiedStatus FrameworkunifiedOnEntry(CEventDataPtr f_pEventData); \
+ EFrameworkunifiedStatus FrameworkunifiedOnExit(CEventDataPtr f_pEventData); \
+ };
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// Macros that inherit CFrameworkunifiedInternalTransition classes.
+/// \~english @param [in] class_name Class name
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// Macros that inherit from CFrameworkunifiedInternalTransition classes and override the following methods:
+/// The following overriding methods should be implemented by the user.
+/// - FrameworkunifiedReaction
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// Defines the InternalTransition class
+#define DEFINE_INTERNALTRANSITION(class_name) \
+ class C## class_name : public CFrameworkunifiedInternalTransition{ \
+ public: \
+ virtual CFrameworkunifiedState* FrameworkunifiedReaction(CFrameworkunifiedState* f_pSourceState, CEventDataPtr f_pData); \
+ };
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// Macros that define application events.
+/// \~english @param [in] event_name Event name
+/// \~english @param [in] value Event value
+/// \~english @retval UI_32 Event value for the application
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// Values of events defined in CFrameworkunifiedEventFactory classes (evFrameworkunifiedEventLimit:10) are specifiedMacros that define events for an application by adding event values (value).
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// Defines the application event
+#define DEFINE_EVENT(event_name, value) \
+ static const UI_32 _## event_name = CFrameworkunifiedEventFactory::evFrameworkunifiedEventLimit + value;
+
+#define DEFINE_ACTION(class_name) \
+ class C## class_name: public CFrameworkunifiedAction{ \
+ public: \
+ C## class_name(std::string f_strName):CFrameworkunifiedAction(f_strName) {} \
+ VOID FrameworkunifiedAction(CFrameworkunifiedState *f_pSourceState, CFrameworkunifiedState *f_pTargetState, CEventDataPtr f_pEventData); \
+ };
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro creates an instance for an internal transition.
+/// \~english @param [in] class_name Class name
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// This macro creates an instance for an internal transition of a class with the specified name.\n
+/// Otherwise, the CNullPointerException objects are excepted.
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// creates the instance of the internal transition
+#define CREATE_INTERNALTRANSITION(class_name) \
+ C## class_name *l_pTrn## class_name = new C## class_name(); \
+ CHKNULL(l_pTrn## class_name);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// This macro creates an instance for an external transition.
+/// \~english @param [in] target_state State name for external transition
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// Macros that instantiate CFrameworkunifiedExternalTransition classes for external transitions.\n
+/// Otherwise, the CNullPointerException objects are excepted.
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// creates the instance of the external transition
+#define CREATE_EXTERNALTRANSITION(target_state) \
+ CFrameworkunifiedExternalTransition *l_pTrn## target_state = new CFrameworkunifiedExternalTransition(l_p## target_state); \
+ CHKNULL(l_pTrn## target_state);
+
+/// creates the instance of the external transition
+#define CREATE_CONDITIONCONNECTOR(connector_name) \
+ CFrameworkunifiedConditionConnector *l_pTrn## connector_name = new CFrameworkunifiedConditionConnector( #connector_name); \
+ CHKNULL(l_pTrn## connector_name);
+
+
+/// creates the instance of the local transition
+#define CREATE_LOCALTRANSITION(target_state) \
+ CFrameworkunifiedLocalTransition *l_pLocalTrn## target_state = new CFrameworkunifiedLocalTransition(l_p## target_state); \
+ CHKNULL(l_pLocalTrn## target_state);
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// A macro that instantiates an orthographic region.
+/// \~english @param [in] target_state State name for external transition
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// Macros that create instances of compound states (CFrameworkunifiedCompositeState classes) as instances of orthographic regions.\n
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// create orthogonal region
+#define CREATE_ORTHOGONALREGION(name) \
+ CFrameworkunifiedCompositeState *l_p## name = new CFrameworkunifiedCompositeState(#name);
+
+/// create action for external transition
+#define CREATE_ACTION(class_name) \
+ C## class_name *l_pTrn## class_name = new C## class_name( #class_name); \
+ CHKNULL(l_pTrn## class_name);
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// A macro that defines events for the framework.
+/// \~english @param [in] eventid Event ID
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// These macros define the IDs of the current events in the CFrameworkunifiedHSMParentFramework classes.
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// framework event
+#define FRAMEWORKUNIFIED_EVENT(eventid) \
+ CFrameworkunifiedHSMParentFramework::_## eventid
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// Is a macro that defines events for an application
+/// \~english @param [in] eventid Event ID
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// A macro that defines an event ID for an application.
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// Application event
+#define EVENT(eventid) \
+ _## eventid
+
+/// FrameworkunifiedReaction function signature for internal transition class
+#define IMPLEMENT_INTERNALTRANSITION(name) \
+ CFrameworkunifiedState* C## name::FrameworkunifiedReaction(CFrameworkunifiedState* f_pSourceState, CEventDataPtr f_pData)
+
+#define IMPLEMENT_ACTION(action_name) \
+ void C## action_name::FrameworkunifiedAction(CFrameworkunifiedState *f_pSourceState, CFrameworkunifiedState *f_pTargetState, CEventDataPtr f_pEventData)
+
+#define DEFINE_GUARD(guard_name)\
+ class C## guard_name : public CFrameworkunifiedGuard{ \
+ public: \
+ C## guard_name(std::string f_pName):CFrameworkunifiedGuard(f_pName) {} \
+ virtual BOOL FrameworkunifiedEvaluate();\
+ };
+
+#define CREATE_GUARD(guard_name)\
+ CFrameworkunifiedGuard *l_pGrd## guard_name = new C## guard_name(#guard_name);
+
+#define CONNECT_GUARD(transition, guard)\
+ l_pTrn## transition->FrameworkunifiedSetGuard(l_pGrd## guard);
+
+#define CONNECT_CONDITION(connector_name , guard , target_state) \
+ CHKNULL(l_pTrn## connector_name)\
+ l_pTrn## connector_name->FrameworkunifiedAddCondition(l_pGrd## guard , l_p## target_state); \
+
+#define IMPLEMENT_GUARD(guard_name) \
+ BOOL C## guard_name::FrameworkunifiedEvaluate()
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup StateMachine_Macro
+/// \~english @par Brief
+/// These macros create instances for Shallow history transitions.
+/// \~english @param [in] parent State name for external transition
+/// \~english @retval None
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// These macros create instances of CFrameworkunifiedExternalTransition classes for external transitions of Shallow history transitions.\n
+/// Otherwise, the CNullPointerException objects are excepted.
+/// \~english @par Classification
+/// Public
+/// \~english @see None
+///////////////////////////////////////////////////////////////////////////////////////////
+/// creates the instance of the shallow history transition
+#define CREATE_SHALLOWHISTORYTRANSITION(parent) \
+ CFrameworkunifiedExternalTransition *l_pTrn##parent##SHALLOWHISTORYSTATE = \
+ new CFrameworkunifiedExternalTransition(l_p##parent##SHALLOWHISTORYSTATE); \
+ CHKNULL(l_pTrn##parent##SHALLOWHISTORYSTATE);
+
+/// creates the instance of the deep history transition
+#define CREATE_DEEPHISTORYTRANSITION(parent) \
+ CFrameworkunifiedExternalTransition *l_pTrn##parent##DEEPHISTORYSTATE = \
+ new CFrameworkunifiedExternalTransition(l_p##parent##DEEPHISTORYSTATE); \
+ CHKNULL(l_pTrn##parent##DEEPHISTORYSTATE);
+
+#define CONNECT_CONDITION_SHALLOWHISTORYTRANSITION(connector_name , guard , target_state) \
+ CHKNULL(l_pTrn## connector_name)\
+ l_pTrn## connector_name->FrameworkunifiedAddCondition(l_pGrd## guard , l_p## target_state##SHALLOWHISTORYSTATE); \
+
+
+#define CONNECT_CONDITION_DEEPHISTORYTRANSITION(connector_name , guard , target_state) \
+ CHKNULL(l_pTrn## connector_name)\
+ l_pTrn## connector_name->FrameworkunifiedAddCondition(l_pGrd## guard , l_p## target_state##DEEPHISTORYSTATE); \
+
+
+#define CONNECT_ACTION(transition, action_name) \
+ CHKNULL(l_pTrn## action_name); \
+ CHKNULL(l_pTrn## transition); \
+ l_pTrn## transition->FrameworkunifiedAddAction(l_pTrn## action_name); \
+
+#ifdef DEBUG
+#define FRAMEWORKUNIFIED_PRINT_HSM(x) (FrameworkunifiedGetStateMachine(x))->FrameworkunifiedPrintXML();
+#define PRINT_HSM() FrameworkunifiedPrintXML();
+#else
+#define FRAMEWORKUNIFIED_PRINT_HSM(x)
+#define PRINT_HSM()
+#endif
+
+/// defines options for integrating user change state
+typedef enum _EUserChangeOptions {
+ eUserchangeIgnore = 0,
+ eUserchangeReInit,
+ eUserchangeRetPrevState
+} EUserChangeOptions;
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_FRAMEWORKUNIFIED_SM_FRAMEWORK_TYPES_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_guard.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_guard.h
new file mode 100644
index 00000000..1792f72f
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_guard.h
@@ -0,0 +1,145 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedGuard class definitions. This is an interface that defines the Evaluate
+/// interface for guard condition validation.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_guard.h
+ * @brief \~english This file has the CFrameworkunifiedGuard class definitions.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIEDGUARD_H // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIEDGUARD_H
+
+#include <native_service/frameworkunified_types.h>
+#include <string>
+
+
+/**
+ * @class CNSSharedMem
+ * \~english @brief this file has the CFrameworkunifiedGuard class definitions
+ * \~english @par Brief Introduction
+ * This file has the CFrameworkunifiedGuard class definitions. This is an interface \n
+ * that defines the Evaluate interface for guard condition validation.
+ *
+ */
+class CFrameworkunifiedGuard {
+ public :
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedGuard
+ /// \~english @par Brief
+ /// CFrameworkunifiedGuard's constructor
+ /// \~english @param [in] f_strName
+ /// string - Name of the guard
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - CFrameworkunifiedGuard's constructor
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see ~CFrameworkunifiedGuard
+ ////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedGuard(std::string f_strName); // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ~CFrameworkunifiedGuard
+ /// \~english @par Brief
+ /// - Destructor of CFrameworkunifiedGuard class
+ /// \~english @param None
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - Destruct the object of this class.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see CFrameworkunifiedGuard
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedGuard();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedGuard
+ /// \~english @par Brief
+ /// This is a pure virtual function that defines the logic for evaluating the guard condition
+ /// \~english @param None
+ /// \~english @retval TRUE - if test passes
+ /// \~english @retval FALSE - otherwise returns false
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - This is a pure virtual function that defines the logic for evaluating the guard condition
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual BOOL FrameworkunifiedEvaluate() = 0;
+
+ private:
+ std::string m_strName;
+};
+
+#endif // _FRAMEWORKUNIFIEDGUARD_H // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_historystate.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_historystate.h
new file mode 100644
index 00000000..47d5914b
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_historystate.h
@@ -0,0 +1,253 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the declaration of CFrameworkunifiedHistoryState interface.
+/// CFrameworkunifiedHistoryState is derived from CFrameworkunifiedState class.
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_historystate.h
+ * @brief \~english This file has the declaration of CFrameworkunifiedHistoryState interface.
+ * CFrameworkunifiedHistoryState is derived from CFrameworkunifiedState class.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIEDHISTORYSTATE_H // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIEDHISTORYSTATE_H
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_sm_state.h>
+#include <string>
+
+/**
+ * @class CFrameworkunifiedHistoryState
+ * \~english @brief this file has the CFrameworkunifiedHistoryState class definitions
+ * \~english @par Brief Introduction
+ * This class implements the additional functionality supported by HSM History state.
+ *
+ */
+class CFrameworkunifiedHistoryState : public CFrameworkunifiedState {
+ public :
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHistoryState
+ /// \~english @par Brief
+ /// -Constructor of CFrameworkunifiedHistoryState.
+ /// \~english @param [in] f_pName
+ /// std::string - Name of the state
+ /// \~english @retval None
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - This class inherits from CFrameworkunifiedState, which is the base class of state machine.
+ /// This class implements the additional functionality supported by HSM History state.
+ /// This function creates an object of CFrameworkunifiedHistoryState class.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @see ~CFrameworkunifiedHistoryState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedHistoryState
+ /// Parameterized constructor
+ /// \param [in] f_pName
+ /// string - Name of the state
+ ///
+ /// \return none
+ CFrameworkunifiedHistoryState(std::string f_pName); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHistoryState
+ /// \~english @par Brief
+ /// -Destructor of CFrameworkunifiedHistoryState.
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditons
+ /// -Calls constructor to successfully create object.
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// -Destruct the object of this class.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @see CFrameworkunifiedHistoryState::CFrameworkunifiedHistoryState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedHistoryState
+ /// Class destructor
+ ///
+ /// \return none
+ virtual ~CFrameworkunifiedHistoryState();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHistoryState
+ /// \~english @par Brief
+ /// - Gets the pointor of this class.
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditons
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - Gets the pointor of this class.The pointor of this class's base class will get it.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedGetActiveState();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHistoryState
+ /// \~english @par Brief
+ /// - This function stores the last active state.
+ /// \~english @param None
+ /// \~english @retval EFrameworkunifiedStatus - Returns status of operation
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - This function stores the last active state.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus UpdateHistory() = 0;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHistoryState
+ /// \~english @par Brief
+ /// - This function sets the default active state in history state.
+ /// \~english @param None
+ /// \~english @retval eFrameworkunifiedStatusOK - Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - Null Pointer
+ /// \~english @par Preconditons
+ /// -Calls constructor to successfully create object.
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// -m_pParentState is NULL.[eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// -This function sets the default state of parent state to the newest active state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// SetDefaultHistory
+ /// This function sets the default active state in history state
+ /// \param
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ EFrameworkunifiedStatus SetDefaultHistory();
+
+ protected :
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnEntry
+ /// state initialization can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedOnEntry(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnExit
+ /// state cleanup can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedOnExit(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnHSMStart
+ /// This function is called recursively till the leaf state is reached. This internally
+ /// calls the Entry function of the current state.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return CurrentState
+ /// CFrameworkunifiedState* - Returns current state after operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedOnHSMStart(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnHSMStop
+ /// This function is called recursively till the required parent state is reached. This
+ /// internally calls the Exit function of the current state.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return CurrentState
+ /// CFrameworkunifiedState* - Returns current state after operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedOnHSMStop(CEventDataPtr f_pEventData);
+
+ // last active state
+ CFrameworkunifiedState *m_pLastActiveState;
+
+ // event id of history state
+ UI_32 m_uiEventId;
+
+ // event name
+ std::string m_cEventName;
+};
+#endif // _FRAMEWORKUNIFIEDHISTORYSTATE_H // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_hsm.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_hsm.h
new file mode 100644
index 00000000..1a8e1d74
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_hsm.h
@@ -0,0 +1,798 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedHSM class definitions. CFrameworkunifiedHSM is base class for HSM Framework.
+/// This class implements interfaces for connecting child states to parent states, connecting events
+/// to state.
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_hsm.h
+ * @brief \~english This file has the CFrameworkunifiedHSM class definitions. CFrameworkunifiedHSM is base class for HSM Framework.
+ * This class implements interfaces for connecting child states to parent states, connecting events to state.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_HSM_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_HSM_H__
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_logger_if.h>
+#include <native_service/frameworkunified_sm_eventdata.h>
+#include <vector>
+#include <exception>
+#include <map>
+#include <string>
+
+class CFrameworkunifiedEvent;
+
+class CFrameworkunifiedState;
+
+class CFrameworkunifiedCompositeState;
+
+class CFrameworkunifiedReaction;
+
+class CFrameworkunifiedOrthogonalState;
+
+class CEventData;
+
+typedef boost::shared_ptr<CEventData> CEventDataPtr;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class implements interfaces for connecting child states to parent states, connecting events
+/// to state.
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedHSM {
+ public :
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// Destructor for CFrameworkunifiedHSM
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal status
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Release class CFrameworkunifiedHistoryState instance.\n
+ /// Release event in postevent list.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedHSM
+ /// Class destructor
+ ///
+ /// \return none
+ virtual ~CFrameworkunifiedHSM();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// Constructor for class CFrameworkunifiedHSM.
+ /// \~english @param
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// none
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSM class is the super class of HSM framework.
+ /// this class produce interface to connected super class state with sub class state and to connect event with
+ /// state
+ /// create the instance of CFrameworkunifiedHSM class\n
+ /// create event list as following and hold the member parameter,others will be initialized as NULL
+ /// - event list which is supported in state
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see ~CFrameworkunifiedHSM
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedHSM();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// Constructor for class CFrameworkunifiedHSM.
+ /// \~english @param f_pHApp
+ /// PVOID - handle of application
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// none
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSM class is the super class of HSM framework.
+ /// this class produce interface to connected super class state with sub class state and to connect event with
+ /// state
+ /// create the instance of CFrameworkunifiedHSM class\n
+ /// create event list as following and hold the member parameter,others will be initialized as NULL
+ /// - event list which is supported in state
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see ~CFrameworkunifiedHSM
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedHSM(PVOID f_pHApp)
+ /// Class constructor
+ ///
+ /// \return none
+ CFrameworkunifiedHSM(PVOID f_pHApp); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// Returns the active state of the statemachine
+ /// \~english @param none
+ /// \~english @retval CFrameworkunifiedState* - Returns ActiveState
+ /// \~english @retval NULL - failed
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created and active state exist.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - active state do not exist. [NULL]
+ /// \~english @par Detail
+ /// route state search will be continued until current state become active
+ /// route state search will be continued until Leaf State or orthogonal State is found\n
+ /// if there is no active state.reture NULL\n
+ /// if there is active state,this state will be hold in memeber parameter as return value
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see CFrameworkunifiedState::FrameworkunifiedGetActiveState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedState *FrameworkunifiedGetActiveState();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// This creates the default event data and sends the event to the active HSM state.
+ /// \~english @param f_uiEventId
+ /// UI_32 - Event Id
+ /// \~english @retval eFrameworkunifiedStatusOK add succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer set null pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - Event data instance create faield. [eFrameworkunifiedStatusNullPointer]
+ /// - The pointer of post event list in State machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - The pointer of active state in State machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - The name of active state in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// create new event data object and send this event to active HSM state,\n
+ /// then add to event queue of the statemachine
+ /// add to event queque in order to process event using statemachine
+ /// event will be deleted from event queue when process complete
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedPostEvent(CEventDataPtr), CEventData, FrameworkunifiedQueueEvent, ProcessEvent
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedPostEvent
+ /// This creates the default event data and sends the event to the active HSM state.
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event Id
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ EFrameworkunifiedStatus FrameworkunifiedPostEvent(UI_32 f_uiEventId);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedPostEvent
+ /// This sends the event to the active HSM state
+ ///
+ /// \~english @par Brief
+ /// Add event data into event queue of state machine.
+ /// \~english @param f_pEventData
+ /// CEventDataPtr - Event data
+ /// \~english @retval eFrameworkunifiedStatusOK add succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer set null pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - Input parameter f_pEventData is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - The pointer of post event list in State machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - The pointer of active state in State machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - The name of active state in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ ///
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedPostEvent(UI_32), CEventData, FrameworkunifiedQueueEvent, ProcessEvent
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedPostEvent(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// This is pure virtual function to be implemented by the derived classes. Statemachine
+ /// states and events created and connected in this interface.
+ /// \~english @param f_pEventData
+ /// PVOID - Event data
+ /// \~english @retval EFrameworkunifiedStatus Returns status of operation
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ // none
+ /// \~english @par Detail
+ /// none
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedCreate(PVOID f_pEventData = NULL) = 0;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedStart
+ /// This starts the state machine
+ ///
+ /// \~english @par Brief
+ /// Start the state machine.
+ /// \~english @param f_pEventData
+ /// CEventDataPtr - Event data
+ /// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer set null pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ // - Pointer of active state in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ ///
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedPostEvent(UI_32), CEventData, FrameworkunifiedQueueEvent, ProcessEvent
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedStart(CEventDataPtr f_pEventData = boost::make_shared<CEventData>(0));
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// Stop the state machine.
+ /// \~english @param f_pEventData
+ /// CEventDataPtr - Event data
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusNullPointer null pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ // - Pointer of active state in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// Stop the state machine.\n
+ /// Release route state of state machine.\n
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedPostEvent(UI_32), CEventData, FrameworkunifiedQueueEvent, ProcessEvent
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedClose(CEventDataPtr f_pEventData = boost::make_shared<CEventData>(0));
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedPrintAllStates
+ /// This prints all states and events associated with every state on console.
+ ///
+ /// \~english @par Brief
+ /// Output log of all states and events name associated with every state.
+ /// \~english @param
+ /// \~english @retval EFrameworkunifiedStatus succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer null pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - Root state in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Self instance of CFrameworkunifiedHSM does not create. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// print out log for connected state name and event name\n
+ /// following log will be print put
+ /// - super statemachine state name and self-statemachine state name
+ /// - all the event name on event list
+ /// - all the event on delayed event list
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedPrintAllStates();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// This connects the reaction to event and add event to child states then add child state
+ /// to parent state.
+ /// \~english @param f_pParentState
+ /// CFrameworkunifiedState* - Parent state pointer
+ /// \~english @param f_pChildState
+ /// CFrameworkunifiedState* - Child state pointer
+ /// \~english @param f_uiEventId
+ /// UI_32 - eventi id
+ /// \~english @param f_pReaction
+ /// CFrameworkunifiedReaction* - Reaction object for attaching to event
+ /// \~english @param f_eIsDefaultState
+ /// BOOL - Does has default state.(default: FALSE)
+ /// \~english @par
+ /// - TRUE : has default state
+ /// - FALSE: not has default state
+ /// \~english @param f_eIsDeferredEventType
+ /// BOOL - Does has the deferred event(default: FALSE)
+ /// \~english @par
+ /// - TRUE : has the deferred event
+ /// - FALSE: not has the deferred event
+ /// \~english @param f_strEventName
+ /// std::string - name of event(default:"")
+ /// \~english @retval eFrameworkunifiedStatusOK succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer null pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - Input parameter f_pParentState pointer is NULL.[eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pChildState pointer is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pReaction pointer is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pParentState does not instance. [eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pChildState does not instance. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// connect process with event and add the event to sub state.
+ /// and do following considering the event delay and event declare(f_eIsDeferredEventType)
+ /// - if TRUE : add the event as delayed event(add to event name list and delayed event list)
+ /// - if FALSE:add normal event and event(add to event name list and event list)
+ /// \~english @par
+ /// After adding an event to a child state, associate the child state with the parent state and
+ /// set the HSM state machine for the child state only if the parent state is a compound state.
+ /// The following associations are made depending on whether or not a default state is defined (f_eIsDefaultState).
+ /// - TRUE: Associates a child state as the default state with the parent state.
+ /// - FALSE: Associates a child state with a parent state as a normal state.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedConnect(CFrameworkunifiedState*,UI_32,CFrameworkunifiedReaction*,std::string,BOOL),
+ /// FrameworkunifiedConnect(CFrameworkunifiedState*,CFrameworkunifiedState*,BOOL)
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedConnect
+ /// This connects the reaction to event and add event to child states then add child state
+ /// to parent state.
+ ///
+ /// \param [in] f_pParentState
+ /// CFrameworkunifiedState* - Parent state
+ ///
+ /// \param [in] f_pChildState
+ /// CFrameworkunifiedState* - Child state
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event id
+ ///
+ /// \param [in] f_pReaction
+ /// CFrameworkunifiedReaction* - Reaction object for attaching to event
+ ///
+ /// \param [in] f_eIsDefaultState
+ /// BOOL - Defines if the state is default state
+ ///
+ /// \param [in] f_eIsDeferredEventType
+ /// BOOL - defines if the event is deferred event
+ ///
+ /// \param [in] f_strEventName
+ /// BOOL - Event name
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ EFrameworkunifiedStatus FrameworkunifiedConnect(CFrameworkunifiedState *f_pParentState, CFrameworkunifiedState *f_pChildState,
+ UI_32 f_uiEventId, CFrameworkunifiedReaction *f_pReaction,
+ BOOL f_eIsDefaultState = FALSE,
+ BOOL f_eIsDeferredEventType = FALSE,
+ std::string f_strEventName = "");
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// This add child state to parent state.
+ /// \~english @param f_pParentState
+ /// CFrameworkunifiedState* - Parent state pointer
+ /// \~english @param f_pChildState
+ /// CFrameworkunifiedState* - Child state pointer
+ /// \~english @param f_eIsDefaultState
+ /// BOOL - Does has default state.(default: FALSE)
+ /// \~english @par
+ /// - TRUE : has default state
+ /// - FALSE: not has default state
+ /// \~english @retval eFrameworkunifiedStatusOK succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer null pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - Input parameter f_pParentState pointer is NULL.[eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pChildState pointer is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pParentState does not instance. [eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pChildState does not instance. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// connect super state with sub state and set HSM state machine to sub state only when super state is compond
+ /// state
+ /// according to the default state define(f_eIsDefaultState),doing the connection below
+ /// - if TRUE: connect sub state as default state with super state
+ /// - if FALSE: connect sub state as normal state with super state
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedConnect(CFrameworkunifiedState*,UI_32,CFrameworkunifiedReaction*,std::string,BOOL),
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedConnect
+ /// This add child state to parent state.
+ ///
+ /// \param [in] f_pParentState
+ /// CFrameworkunifiedState* - Parent state
+ ///
+ /// \param [in] f_pChildState
+ /// CFrameworkunifiedState* - Child state
+ ///
+ /// \param [in] f_eIsDefaultState
+ /// BOOL - Defines if the state is default state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ EFrameworkunifiedStatus FrameworkunifiedConnect(CFrameworkunifiedState *f_pParentState, CFrameworkunifiedState *f_pChildState,
+ BOOL f_eIsDefaultState = FALSE);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedConnect
+ /// This connects the reaction to event and add event to states
+ ///
+ /// \~english @par Brief
+ /// This connects the reaction to event and add event to states.
+ /// \~english @param f_pState
+ /// CFrameworkunifiedState* - pointer of state class
+ /// \~english @param f_uiEventId
+ /// UI_32 - eventi id
+ /// \~english @param f_pReaction
+ /// CFrameworkunifiedReaction* - Reaction object for attaching to event
+ /// \~english @param f_eIsDefaultState
+ /// BOOL - Does has default state.(default: FALSE)
+ /// \~english @par
+ /// - TRUE : has default state
+ /// - FALSE: not has default state
+ /// \~english @param f_eIsDeferredEventType
+ /// BOOL - Does has the deferred event(default: FALSE)
+ /// \~english @par
+ /// - TRUE : has the deferred event
+ /// - FALSE: not has the deferred event
+ /// \~english @param f_strEventName
+ /// std::string - name of event(default:"")
+ /// \~english @retval eFrameworkunifiedStatusOK succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer null pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - Input parameter f_pReaction pointer is NULL.[eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pState pointer is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pState pointer does not instance. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// connect process with event and add event to sub state
+ /// following will be added according to whether delayed event or event define exsist
+ /// - if TRUE : add event as delayed event(add to event name list and delayed event list)
+ /// - if FALSE: add event as normal event(add to event name list and event list)
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedConnect(CFrameworkunifiedState*,CFrameworkunifiedState*,UI_32,CFrameworkunifiedReaction*,BOOL,BOOL,std::string)
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedConnect(CFrameworkunifiedState *f_pState, UI_32 f_uiEventId, CFrameworkunifiedReaction *f_pReaction,
+ std::string f_strEventName = "", BOOL f_eIsDeferredEventType = FALSE);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// This sets the givens state as root state in the state machine
+ /// \~english @param f_pRootState
+ /// CFrameworkunifiedState* - Root state
+ /// \~english @retval eFrameworkunifiedStatusOK succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer null pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - Input parameter f_pRootState pointer is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pRootState does not instance. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// set state(f_pRootState, which is designated as route state) to HSM state machine
+ /// set route state pointer(f_pRootState,which is set as parameter value)as pointer of
+ /// active state for member
+ /// parameter and routestate
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see FrameworkunifiedConnect(CFrameworkunifiedState*,CFrameworkunifiedState*,UI_32,CFrameworkunifiedReaction*,BOOL,BOOL,std::string)
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedConnect
+ /// This sets the givens state as root state in the state machine
+ ///
+ /// \param [in] f_pRootState
+ /// CFrameworkunifiedState* - Root state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ EFrameworkunifiedStatus FrameworkunifiedConnect(CFrameworkunifiedState *f_pRootState);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// Set Composite state as HSM state OrthogonalState.
+ /// \~english @param f_pOrthogonalState
+ /// CFrameworkunifiedOrthogonalState* - Orthogonal state pointer
+ /// \~english @param f_pOrthogonalRegion
+ /// CFrameworkunifiedCompositeState* - Composite state pointer
+ /// \~english @retval eFrameworkunifiedStatusOK succ
+ /// \~english @retval eFrameworkunifiedStatusNullPointer null pointer(process failed)
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - Input parameter f_pOrthogonalState pointer is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pOrthogonalRegion pointer is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Input parameter f_pOrthogonalState does not instance. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// Set Composite state as HSM state OrthogonalState.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedConnect
+ /// This sets the givens state as root state in the state machine
+ ///
+ /// \param [in] f_pOrthogonalState
+ /// CFrameworkunifiedOrthogonalState* - Orthogonal state
+ ///
+ /// \param [in] f_pOrthogonalRegion
+ /// CFrameworkunifiedCompositeState* - Orthogonal region
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ EFrameworkunifiedStatus FrameworkunifiedConnectOrthogonal(CFrameworkunifiedOrthogonalState *f_pOrthogonalState,
+ CFrameworkunifiedCompositeState *f_pOrthogonalRegion);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// This interface returns the application handle
+ /// \~english @param none
+ /// \~english @retval HANDLE application handle
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// none
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ HANDLE FrameworkunifiedGetAppHandle();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// Output statemachine information into XML file.
+ /// \~english @param none
+ /// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK succ
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// none
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedPrintXML();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// Push the event in the post event list.
+ /// \~english @param f_pEventData
+ /// CEventDataPtr - pointer of event data
+ /// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK succ
+ /// eFrameworkunifiedStatusNullPointer NULL pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - If input parameter f_pEventData is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - If member variable m_pActiveState is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - If member variable m_pPostEventList is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// none
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedQueueEvent(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSM
+ /// \~english @par Brief
+ /// Remove the all events of eventId f_uiEventId from event queue of statemachine.
+ /// \~english @param f_pEventData
+ /// const UI_32 - event id
+ /// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK succ
+ /// eFrameworkunifiedStatusInvldID Not found event id
+ /// eFrameworkunifiedStatusNullPointer NULL pointer
+ /// \~english @par Prerequisite
+ /// - Self instance of CFrameworkunifiedHSM created.
+ /// \~english @par Change of internal state
+ /// none
+ /// \~english @par Conditions of processing failure
+ /// - If not find event id. [eFrameworkunifiedStatusInvldID]
+ /// - If member variable m_pPostEventList is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// none
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus RemoveEventFromPostedEventQueue(const UI_32 f_uiEventId);
+
+ UI_32 m_uiCurrentEvent;
+
+ /// Application handle
+ HANDLE m_pHApp;
+
+ private:
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ProcessEventQueue
+ /// Gets the event from StateMachine events list and post it.
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus ProcessEventQueue();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ProcessEvent
+ /// Processes the event posted to the statemachine
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus ProcessEvent(CEventDataPtr f_pEventData);
+
+ /// pointer to the active state object
+ CFrameworkunifiedState *m_pActiveState;
+
+ /// pointer to the root state object
+ CFrameworkunifiedState *m_pRootState;
+
+ std::vector<CEventDataPtr> *m_pPostEventList;
+
+ BOOL m_bIsTransitioning;
+};
+
+#endif // __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_HSM_H__ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_hsmframework.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_hsmframework.h
new file mode 100644
index 00000000..fd61117f
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_hsmframework.h
@@ -0,0 +1,873 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedHSMParentFramework class definitions. CFrameworkunifiedHSMParentFramework is derived from
+/// CFrameworkunifiedHSM class. It defines the states required for NS statemachine framework, it creates the NS
+/// statemachine and implements the reaction associated with the events
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_hsmframework.h
+ * @brief \~english This file has the CFrameworkunifiedHSMParentFramework class definitions. CFrameworkunifiedHSMParentFramework is derived from
+ * CFrameworkunifiedHSM class. It defines the states required for NS statemachine framework, it creates the NS
+ * statemachine and implements the reaction associated with the events
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_HSMFRAMEWORK_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_HSMFRAMEWORK_H__
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_sm_hsm.h>
+#include <native_service/frameworkunified_sm_framework_types.h>
+#include <native_service/ns_timer_if.h>
+#include <native_service/ns_message_center_if.h>
+#include <native_service/frameworkunified_framework_types.h>
+#include <map>
+#include <string>
+
+class CFrameworkunifiedHSMFramework: public CFrameworkunifiedHSM {
+ public:
+ /**
+ * \~english state machine state
+ */
+ typedef enum _FRAMEWORKUNIFIED_HSM_STATES {
+ esFrameworkunifiedRoot = 0, //!< \~english Root state
+ esFrameworkunifiedInitialization, //!< \~english Initialization state
+ esFrameworkunifiedLoadData, //!< \~english LoadData state
+ esFrameworkunifiedPre, //!< \~english Pre state
+ esFrameworkunifiedBackground, //!< \~english Background state
+ esFrameworkunifiedRun, //!< \~english Run state
+ esFrameworkunifiedLoadSessions, //!< \~english LoadSessions state
+ esFrameworkunifiedReady, //!< \~english Ready state
+ esFrameworkunifiedStop, //!< \~english Stop state
+ esFrameworkunifiedApp, //!< \~english App state
+ esFrameworkunifiedUserChange, //!< \~english UserChange state
+ esFrameworkunifiedThreadRoot, //!< \~english ThreadRoot state
+ esFrameworkunifiedThreadIdle, //!< \~english ThreadIdle state
+ esFrameworkunifiedThreadStart, //!< \~english ThreadStart state
+ esFrameworkunifiedThreadReady, //!< \~english ThreadReady state
+ esFrameworkunifiedThreadStop, //!< \~english ThreadStop state
+ esFrameworkunifiedStopping, //!< \~english Stopping state
+ } FRAMEWORKUNIFIED_HSM_STATES;
+
+ /// Define evFrameworkunifiedStart event
+ DEFINE_EVENT(evFrameworkunifiedStart, 1)
+
+ /// Define evFrameworkunifiedStop event
+ DEFINE_EVENT(evFrameworkunifiedStop, 5)
+
+ /// Define evFrameworkunifiedDestroy event
+ DEFINE_EVENT(evFrameworkunifiedDestroy, 3)
+
+ /// Define evFrameworkunifiedReady event
+ DEFINE_EVENT(evFrameworkunifiedReady, 12)
+
+ /// Define evFrameworkunifiedError event
+ DEFINE_EVENT(evFrameworkunifiedError, 16)
+
+ /// Define evFrameworkunifiedPreStart event
+ DEFINE_EVENT(evFrameworkunifiedPreStart, 19)
+
+ /// Define evFrameworkunifiedPreStop event
+ DEFINE_EVENT(evFrameworkunifiedPreStop, 20)
+
+ /// Define evFrameworkunifiedBackgroundStart event
+ DEFINE_EVENT(evFrameworkunifiedBackgroundStart, 21)
+
+ /// Define evFrameworkunifiedBackgroundStop event
+ DEFINE_EVENT(evFrameworkunifiedBackgroundStop, 22)
+
+ // Define internal transition for event evFrameworkunifiedStart in sFrameworkunifiedStop state
+ DEFINE_INTERNALTRANSITION(OnEventStartInStopState)
+
+ // Define internal transition for event evFrameworkunifiedUserChange in sFrameworkunifiedInitialization state
+ DEFINE_INTERNALTRANSITION(OnEventUserChangeInInitializationState)
+
+ // Define internal transition for event evFrameworkunifiedUserChange in sFrameworkunifiedRun state
+ DEFINE_INTERNALTRANSITION(OnEventUserChangeInRunState)
+
+ DEFINE_INTERNALTRANSITION(OnEventStopInStoppingState)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMFramework
+ /// \~english @par Brief
+ /// CFrameworkunifiedHSMFramework default constructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// CFrameworkunifiedHSM()
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSMFramework default constructor, for create CFrameworkunifiedHSMFramework object
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedHSMFramework();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMFramework
+ /// \~english @par Brief
+ /// CFrameworkunifiedHSMFramework constructor with param
+ /// \~english @param [in] f_pHApp
+ /// PVOID f_pHApp - for parent class constructor
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// CFrameworkunifiedHSM(f_pHApp)
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSMFramework constructor with param, for create CFrameworkunifiedHSMFramework object
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedHSMFramework(PVOID f_pHApp); // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMFramework
+ /// \~english @par Summary
+ /// pure virtual fuction
+ /// \~english @param [in] f_pEventData
+ /// PVOID f_pEventData - event data
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// pure virtual function , implement by child class
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedCreate
+ /// Statemachine states and events created and connected in this interface.
+ ///
+ /// \param [in] f_pEventData
+ /// PVOID - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedCreate(PVOID f_pEventData = NULL) = 0;
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMFramework
+ /// \~english @par Summary
+ /// pure virtual fuction
+ /// \~english @param [in] f_pAppState
+ /// CFrameworkunifiedState *f_pAppState - state object to be added in the ready state.
+ /// \~english @param [in] f_bIsDefaultState
+ /// BOOL f_bIsDefaultState - if the state is default state
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// pure virtual function , implement by child class
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedFrameworkConnect
+ /// This adds the given state as a sub state of sReady state of the Framework
+ ///
+ /// \param [in] f_pAppState
+ /// CFrameworkunifiedState* - state object to be added in the ready state.
+ ///
+ /// \param [in] f_bIsDefaultState
+ /// BOOL - defines if the state is default state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedFrameworkConnect(CFrameworkunifiedState *f_pAppState, BOOL f_bIsDefaultState = FALSE) = 0;
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMFramework
+ /// \~english @par Summary
+ /// pure virtual fuction
+ /// \~english @param [in] f_eFrameworkunifiedState
+ /// FRAMEWORKUNIFIED_HSM_STATES f_eFrameworkunifiedState - enum maping to framework state
+ /// \~english @param [in] f_uiEventId
+ /// UI_32 f_uiEventId - Event id
+ /// \~english @param [in] f_pReaction
+ /// CFrameworkunifiedReaction *f_pReaction - Reaction object for attaching to event
+ /// \~english @param [in] f_strEventName
+ /// std::string f_strEventName - Event name
+ /// \~english @param [in] f_bIsDeferredEvent
+ /// BOOL f_bIsDeferredEvent - defines if the event is deferred event
+ /// \~english @retval EFrameworkunifiedStatus depend on implement class
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// pure virtual function , implement by child class
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedFrameworkConnect
+ /// This connects the reaction to event and add event to states
+ ///
+ /// \param [in] f_eFrameworkunifiedState
+ /// FRAMEWORKUNIFIED_HSM_STATES - enum maping to framework state
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event id
+ ///
+ /// \param [in] f_pReaction
+ /// CFrameworkunifiedReaction* - Reaction object for attaching to event
+ ///
+ /// \param [in] f_strEventName
+ /// std::string - Event name
+ ///
+ /// \param [in] f_bIsDeferredEvent
+ /// BOOL - defines if the event is deferred event
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedFrameworkConnect(FRAMEWORKUNIFIED_HSM_STATES f_eFrameworkunifiedState, UI_32 f_uiEventId,
+ CFrameworkunifiedReaction *f_pReaction, std::string f_strEventName = "",
+ BOOL f_bIsDeferredEvent = FALSE) = 0;
+
+ protected:
+ /// Stores the state objects against FRAMEWORKUNIFIED_HSM_STATES enumerations
+ std::map<UI_32, CFrameworkunifiedState *> *m_pFrameworkunifiedStateList;
+};
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// It defines the states required for NS statemachine framework, it creates the NS
+/// statemachine and implements the reaction associated with the events
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedHSMParentFramework: public CFrameworkunifiedHSMFramework {
+ public:
+ /// Define evFrameworkunifiedLoadPersistenceAck event
+ DEFINE_EVENT(evFrameworkunifiedLoadFileAck, 2)
+
+ /// Define evFrameworkunifiedLoadComplete event
+ DEFINE_EVENT(evFrameworkunifiedLoadComplete, 4)
+
+ /// Define evFrameworkunifiedUserChange event
+ DEFINE_EVENT(evFrameworkunifiedUserChange, 6)
+
+ /// Define evFrameworkunifiedReInit event
+ DEFINE_EVENT(evFrameworkunifiedReInit, 7)
+
+ /// Define evFrameworkunifiedLoadUserData event
+ DEFINE_EVENT(evFrameworkunifiedLoadUserData, 8)
+
+ /// Define evFrameworkunifiedCloseSessionAck event
+ DEFINE_EVENT(evFrameworkunifiedCloseSessionAck, 9)
+
+ /// Define evFrameworkunifiedCloseSessionAck event
+ DEFINE_EVENT(evFrameworkunifiedOpenSessionAck, 10)
+
+ /// Define evFrameworkunifiedStopComplete event
+ DEFINE_EVENT(evFrameworkunifiedStopComplete, 11)
+
+ /// Define evFrameworkunifiedOpenSessionReq event
+ DEFINE_EVENT(evFrameworkunifiedOpenSessionReq, 14)
+
+ /// Define evFrameworkunifiedCloseSessionReq event
+ DEFINE_EVENT(evFrameworkunifiedCloseSessionReq, 15)
+
+ /// Define evFrameworkunifiedInit event
+ DEFINE_EVENT(evFrameworkunifiedInit, 16)
+
+ /// Define evFrameworkunifiedUserChangeComplete event
+ DEFINE_EVENT(evFrameworkunifiedUserChangeComplete, 17)
+
+ /// Define evFrameworkunifiedLoadSessions event
+ DEFINE_EVENT(evFrameworkunifiedLoadSessions, 18)
+
+ /// Define sFrameworkunifiedRoot state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedRoot)
+
+ /// Define sFrameworkunifiedRoot state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedApp)
+
+ /// Define sFrameworkunifiedInitialization state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedInitialization)
+
+ /// Define sFrameworkunifiedPre state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedPre)
+
+ /// Define sFrameworkunifiedBackground state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedBackground)
+
+ /// Define sFrameworkunifiedRun state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedRun)
+
+ /// Define sFrameworkunifiedStop state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedStop)
+
+ /// Define sFrameworkunifiedReady state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedReady)
+
+ /// Define sFrameworkunifiedLoadData state
+ DEFINE_LEAFSTATE_OVERRIDE(sFrameworkunifiedLoadData)
+
+ /// Define sFrameworkunifiedLoadSessions state
+ DEFINE_LEAFSTATE_OVERRIDE(sFrameworkunifiedLoadSessions)
+
+ /// Define sFrameworkunifiedStopping state
+ DEFINE_LEAFSTATE_OVERRIDE(sFrameworkunifiedStopping)
+
+ /// Define sFrameworkunifiedUserChange state
+ DEFINE_LEAFSTATE_OVERRIDE(sFrameworkunifiedUserChange)
+
+ // DEFINE_ACTION(aFrameworkunifiedOnStart)
+ DEFINE_ACTION(aFrameworkunifiedOnStop)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMParentFramework
+ /// \~english @par Brief
+ /// CFrameworkunifiedHSMFramework default constructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// m_pFrameworkunifiedStateList = new std::map<UI_32, CFrameworkunifiedState *>();
+ /// \~english @par Conditions of processing failure
+ /// apply space for m_pFrameworkunifiedStateList failed
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSMFramework default constructor, for create CFrameworkunifiedHSMFramework object
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedHSMParentFramework();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMParentFramework
+ /// \~english @par Brief
+ /// CFrameworkunifiedHSMFramework constructor with param
+ /// \~english @param [in] f_pHApp
+ /// PVOID f_pHApp - Name of the state
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// m_pFrameworkunifiedStateList = new std::map<UI_32, CFrameworkunifiedState *>();
+ /// \~english @par Conditions of processing failure
+ /// apply space for m_pFrameworkunifiedStateList failed
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSMFramework constructor with param, for create CFrameworkunifiedHSMFramework object
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedHSMParentFramework
+ /// default constructor
+ /// \param [in] f_pName
+ /// string - Name of the state
+ ///
+ /// \return none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedHSMParentFramework(PVOID f_pHApp); // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMParentFramework
+ /// \~english @par Brief
+ /// CFrameworkunifiedHSMFramework destructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSMFramework destructor, for destory CFrameworkunifiedHSMFramework object
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedHSMParentFramework
+ /// Class destructor
+ ///
+ /// \return none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedHSMParentFramework();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMParentFramework
+ /// \~english @par Brief
+ /// create state and event
+ /// \~english @param [in] f_pEventData
+ /// PVOID f_pEventData - event data
+ /// \~english @retval eFrameworkunifiedStatusOK create state and event success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer NULL point exception occur when create state and event
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// NULL pointer exception occur
+ /// \~english @par Detail
+ /// Statemachine states and events created and connected in this interface.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedCreate
+ /// Statemachine states and events created and connected in this interface.
+ ///
+ /// \param [in] f_pHApp
+ /// PVOID - application handle
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedCreate(PVOID f_pEventData = NULL);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMParentFramework
+ /// \~english @par Brief
+ /// add sub state
+ /// \~english @param [in] f_pAppState
+ /// CFrameworkunifiedState *f_pAppState - state object to be added in the ready state.
+ /// \~english @param [in] f_bIsDefaultState
+ /// BOOL f_bIsDefaultState - defines if the state is default state.
+ /// \~english @retval eFrameworkunifiedStatusOK add sub state success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer NULL point exception occur when add sub state
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// NULL point exception occur when add sub state
+ /// \~english @par Detail
+ /// This adds the given state as a sub state of sReady state of the Framework
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedFrameworkConnect
+ /// This adds the given state as a sub state of sReady state of the Framework
+ ///
+ /// \param [in] f_pAppState
+ /// CFrameworkunifiedState* - state object to be added in the ready state.
+ ///
+ /// \param [in] f_bIsDefaultState
+ /// BOOL - defines if the state is default state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedFrameworkConnect(CFrameworkunifiedState *f_pAppState, BOOL f_bIsDefaultState = FALSE);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMParentFramework
+ /// \~english @par Brief
+ /// connects the reaction to event and add event to states
+ /// \~english @param [in] f_eFrameworkunifiedState
+ /// FRAMEWORKUNIFIED_HSM_STATES f_eFrameworkunifiedState - framework state
+ /// \~english @param [in] f_uiEventId
+ /// UI_32 f_uiEventId - Event id
+ /// \~english @param [in] f_pReaction
+ /// CFrameworkunifiedReaction *f_pReaction - Reaction object
+ /// \~english @param [in] f_strEventName
+ /// std::string f_strEventName - Event name
+ /// \~english @param [in] f_bIsDeferredEvent
+ /// BOOL f_bIsDeferredEvent - defines if the event is deferred event
+ /// \~english @retval eFrameworkunifiedStatusOK add sub state success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer NULL point exception occur when add sub state
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// NULL point exception occur when add sub state
+ /// \~english @par Detail
+ /// This connects the reaction to event and add event to states
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedFrameworkConnect
+ /// This connects the reaction to event and add event to states
+ ///
+ /// \param [in] f_eFrameworkunifiedState
+ /// FRAMEWORKUNIFIED_HSM_STATES - enum maping to framework state
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event id
+ ///
+ /// \param [in] f_pReaction
+ /// CFrameworkunifiedReaction* - Reaction object for attaching to event
+ ///
+ /// \param [in] f_strEventName
+ /// std::string - Event name
+ ///
+ /// \param [in] f_bIsDeferredEvent
+ /// BOOL - defines if the event is deferred event
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedFrameworkConnect(FRAMEWORKUNIFIED_HSM_STATES f_eFrameworkunifiedState, UI_32 f_uiEventId,
+ CFrameworkunifiedReaction *f_pReaction, std::string f_strEventName = "",
+ BOOL f_bIsDeferredEvent = FALSE);
+};
+
+class CFrameworkunifiedHSMChildFramework: public CFrameworkunifiedHSMFramework {
+ public:
+ /// Define sFrameworkunifiedThreadIdle state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedThreadRoot)
+
+ /// Define sFrameworkunifiedThreadIdle state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedThreadIdle)
+
+ /// Define sFrameworkunifiedThreadStart state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedThreadStart)
+
+ /// Define sFrameworkunifiedThreadReady state
+ DEFINE_COMPOSITESTATE_OVERRIDE(sFrameworkunifiedThreadReady)
+
+ /// Define sFrameworkunifiedThreadStop state
+ DEFINE_LEAFSTATE_OVERRIDE(sFrameworkunifiedThreadStop)
+
+ // Define internal transition for event evFrameworkunifiedDestroy
+ DEFINE_INTERNALTRANSITION(OnDestroyThread)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMChildFramework
+ /// \~english @par Brief
+ /// CFrameworkunifiedHSMChildFramework constructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSMChildFramework constructor, for create CFrameworkunifiedHSMChildFramework object
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedHSMChildFramework
+ /// default constructor
+ ///
+ /// \return none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedHSMChildFramework();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMChildFramework
+ /// \~english @par Brief
+ /// CFrameworkunifiedHSMChildFramework constructor with param
+ /// \~english @param [in] f_pHApp
+ /// PVOID f_pHApp - application handle
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// m_pFrameworkunifiedStateList = new std::map<UI_32, CFrameworkunifiedState *>();
+ /// \~english @par Conditions of processing failure
+ /// m_pFrameworkunifiedStateList apply space fail
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSMChildFramework constructor with param, for create CFrameworkunifiedHSMChildFramework object
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedHSMChildFramework
+ /// default constructor
+ /// \param [in] f_pHApp
+ /// PVOID - application handle
+ ///
+ /// \return none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedHSMChildFramework(PVOID f_pHApp); // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMChildFramework
+ /// \~english @par Brief
+ /// CFrameworkunifiedHSMChildFramework destructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// CFrameworkunifiedHSMChildFramework destructor, for destory CFrameworkunifiedHSMChildFramework object
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedHSMChildFramework
+ /// Class destructor
+ ///
+ /// \return none
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedHSMChildFramework();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMChildFramework
+ /// \~english @par Brief
+ /// create state and event
+ /// \~english @param [in] f_pEventData
+ /// PVOID f_pEventData - event data
+ /// \~english @retval eFrameworkunifiedStatusOK create state and event success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer NULL point exception occur when create state and event
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// NULL pointer exception occur
+ /// \~english @par Detail
+ /// Statemachine states and events created and connected in this interface.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedCreate
+ /// Statemachine states and events created and connected in this interface.
+ ///
+ /// \param [in] f_pEventData
+ /// PVOID - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedCreate(PVOID f_pEventData = NULL);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMChildFramework
+ /// \~english @par Brief
+ /// add sub state
+ /// \~english @param [in] f_pAppState
+ /// CFrameworkunifiedState *f_pAppState - state object to be added in the ready state.
+ /// \~english @param [in] f_bIsDefaultState
+ /// BOOL f_bIsDefaultState - defines if the state is default state.
+ /// \~english @retval eFrameworkunifiedStatusOK add sub state success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer NULL point exception occur when add sub state
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// NULL point exception occur when add sub state
+ /// \~english @par Detail
+ /// This adds the given state as a sub state of sReady state of the Framework
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedFrameworkConnect
+ /// This adds the given state as a sub state of sReady state of the Framework
+ ///
+ /// \param [in] f_pAppState
+ /// CFrameworkunifiedState* - state object to be added in the ready state.
+ ///
+ /// \param [in] f_bIsDefaultState
+ /// BOOL - defines if the state is default state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedFrameworkConnect(CFrameworkunifiedState *f_pAppState, BOOL f_bIsDefaultState = FALSE);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedHSMChildFramework
+ /// \~english @par Brief
+ /// connects the reaction to event and add event to states
+ /// \~english @param [in] f_eFrameworkunifiedState
+ /// FRAMEWORKUNIFIED_HSM_STATES f_eFrameworkunifiedState - framework state
+ /// \~english @param [in] f_uiEventId
+ /// UI_32 f_uiEventId - Event id
+ /// \~english @param [in] f_pReaction
+ /// CFrameworkunifiedReaction *f_pReaction - Reaction object
+ /// \~english @param [in] f_strEventName
+ /// std::string f_strEventName - Event name
+ /// \~english @param [in] f_bIsDeferredEvent
+ /// BOOL f_bIsDeferredEvent - defines if the event is deferred event
+ /// \~english @retval eFrameworkunifiedStatusOK add sub state success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer NULL point exception occur when add sub state
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// NULL point exception occur when add sub state
+ /// \~english @par Detail
+ /// This connects the reaction to event and add event to states
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedFrameworkConnect
+ /// This connects the reaction to event and add event to states
+ ///
+ /// \param [in] f_eFrameworkunifiedState
+ /// FRAMEWORKUNIFIED_HSM_STATES - enum maping to framework state
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event id
+ ///
+ /// \param [in] f_pReaction
+ /// CFrameworkunifiedReaction* - Reaction object for attaching to event
+ ///
+ /// \param [in] f_strEventName
+ /// std::string - Event name
+ ///
+ /// \param [in] f_bIsDeferredEvent
+ /// BOOL - defines if the event is deferred event
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedFrameworkConnect(FRAMEWORKUNIFIED_HSM_STATES f_eFrameworkunifiedState,
+ UI_32 f_uiEventId,
+ CFrameworkunifiedReaction *f_pReaction, std::string f_strEventName = "",
+ BOOL f_bIsDeferredEvent = FALSE);
+
+ /// function pointer of the Thread start routine
+ CbFuncPtr m_fpStartThread;
+
+ /// function pointer of the Thread stop routine
+ CbFuncPtr m_fpStopThread;
+};
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_HSMFRAMEWORK_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_internaltransition.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_internaltransition.h
new file mode 100644
index 00000000..71eebecf
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_internaltransition.h
@@ -0,0 +1,111 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedInternalTransition class definitions. CFrameworkunifiedInternalTransition is derived
+/// from CFrameworkunifiedReaction class.This class provides the interface for defining a reaction for an event
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_internaltransition.h
+ * @brief \~english This file has the CFrameworkunifiedInternalTransition class definitions. CFrameworkunifiedInternalTransition is derived
+ * from CFrameworkunifiedReaction class.This class provides the interface for defining a reaction for an event
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIEDINTERNALTRANSITION_H // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIEDINTERNALTRANSITION_H
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_sm_reaction.h>
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class provides the interface for defining a reaction for an event
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedInternalTransition : public CFrameworkunifiedReaction {
+ public :
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedInternalTransition
+ /// \~english @par Summary
+ /// pure virtual fuction
+ /// \~english @param [in] f_pSourceState
+ /// CFrameworkunifiedState* f_pSourceState - source state
+ /// \~english @param [in] f_pData
+ /// CEventDataPtr f_pData - event data
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// Pure virtual function , implemented by child class
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedReaction
+ /// The reaction for the event has to be implemented in this function
+ ///
+ /// \param [in] f_pSourceState
+ /// CFrameworkunifiedState* - Event id of the event to be added in the state
+ ///
+ /// \param [in] f_pData
+ /// CEventDataPtr - Reaction to be associated with the with event id in the state
+ ///
+ /// \return ActiveState
+ /// CFrameworkunifiedState* - Returns Active state
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedReaction(CFrameworkunifiedState *f_pSourceState, CEventDataPtr f_pData) = 0;
+};
+
+#endif // _FRAMEWORKUNIFIEDINTERNALTRANSITION_H // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_leafstate.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_leafstate.h
new file mode 100644
index 00000000..e1aa6bda
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_leafstate.h
@@ -0,0 +1,252 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedLeafState class definitions. CFrameworkunifiedLeafState is derived from C
+/// FrameworkunifiedState class.This class implements the additional functionality supported by HSM Leafstate.
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_leafstate.h
+ * @brief \~english This file has the CFrameworkunifiedLeafState class definitions. CFrameworkunifiedLeafState is derived from C
+ * FrameworkunifiedState class.This class implements the additional functionality supported by HSM Leafstate.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIEDLEAFSTATE_H // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIEDLEAFSTATE_H
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_sm_state.h>
+#include <string>
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class implements the additional functionality supported by HSM Leafstate.
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedLeafState : public CFrameworkunifiedState {
+ public :
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedLeafState
+ /// \~english @par Brief
+ /// It is a constructor for CFrameworkunifiedLeafState classes.
+ /// \~english @param [in] f_pName
+ /// std::string - state name
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// Inherits CFrameworkunifiedState, which is a superclass of state machines.\n
+ /// This class is implemented by HSM Leafstate as an additional class of functional support.\n
+ /// It inherits from the CFrameworkunifiedState classes and instantiates the CFrameworkunifiedLeafState.
+ /// \~english @par Immediate
+ /// Brief
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see ~CFrameworkunifiedLeafState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedState
+ /// Parameterized constructor
+ /// \param [in] f_pName
+ /// string - Name of the state
+ ///
+ /// \return none
+ CFrameworkunifiedLeafState(std::string f_pName); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedLeafState
+ /// \~english @par Brief
+ /// Destructors for CFrameworkunifiedLeafState classes.
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedLeafState) has been created.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// Frees instances of CFrameworkunifiedLeafState classes.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedLeafState::CFrameworkunifiedLeafState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedState
+ /// Class destructor
+ ///
+ /// \return none
+ virtual ~CFrameworkunifiedLeafState();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedLeafState
+ /// \~english @par Brief
+ /// Get the active state.
+ /// \~english @retval CFrameworkunifiedState* Pointers to active-state (CFrameworkunifiedState classes) objects
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedLeafState) has been created.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This method overrides and uses CFrameworkunifiedState::FrameworkunifiedGetActiveState, which is pure virtual functions.\n
+ /// Returns the current state (this) as the active state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedState::FrameworkunifiedGetActiveState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedGetActiveState
+ /// This interface returns the Active state of the current composite state. In case of
+ /// non-composite state current state is active state
+ ///
+ /// \return Active state
+ /// CFrameworkunifiedState* - Active state
+ virtual CFrameworkunifiedState *FrameworkunifiedGetActiveState();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedLeafState
+ /// \~english @par Brief
+ /// Save the last active state.
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedLeafState) has been created.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This method overrides CFrameworkunifiedState::UpdateHistory, which is pure virtual functions.Used and saves the last active state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedState::UpdateHistory
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// UpdateHistory
+ /// This function stores the last active state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ EFrameworkunifiedStatus UpdateHistory();
+
+ protected :
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedLeafState
+ /// \~english @par Brief
+ /// Initialize state
+ /// \~english @param f_pEventData
+ /// CEventDataPtr - Pointer to the event data class
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedLeafState) has been created.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This method overrides and uses CFrameworkunifiedState::FrameworkunifiedOnEntry, which is pure virtual functions, to initialize state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedState::FrameworkunifiedOnEntry, FrameworkunifiedOnExit
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnEntry
+ /// state initialization can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ virtual EFrameworkunifiedStatus FrameworkunifiedOnEntry(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedLeafState
+ /// \~english @par Brief
+ /// Clean up state.
+ /// \~english @param f_pEventData
+ /// CEventDataPtr - Pointer to the event data class
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedLeafState) has been created.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This method overrides and uses CFrameworkunifiedState::FrameworkunifiedOnExit, which is pure virtual functions, to clean up state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedState::FrameworkunifiedOnExit, FrameworkunifiedOnEntry
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnExit
+ /// state cleanup can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ virtual EFrameworkunifiedStatus FrameworkunifiedOnExit(CEventDataPtr f_pEventData);
+};
+
+#endif // _FRAMEWORKUNIFIEDLEAFSTATE_H // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_localtransition.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_localtransition.h
new file mode 100644
index 00000000..99975eb1
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_localtransition.h
@@ -0,0 +1,163 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedLocalTransition class definitions. CFrameworkunifiedLocalTransition is derived
+/// from CFrameworkunifiedTransition class.This class provides the interface for local transition over event
+///////////////////////////////////////////// //////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_localtransition.h
+ * @brief \~english This file has the CFrameworkunifiedLocalTransition class definitions. CFrameworkunifiedLocalTransition is derived
+ * from CFrameworkunifiedTransition class.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIEDLOCALTRANSITIONS_H // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIEDLOCALTRANSITIONS_H
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_sm_transition.h>
+
+class CFrameworkunifiedEventData;
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class provides the interface for local transition over event
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedLocalTransition : public CFrameworkunifiedTransition {
+ public :
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedLocalTransition
+ /// \~english @par Brief
+ /// CFrameworkunifiedLocalTransition constructor
+ /// \~english @param [in] f_pTargetState
+ /// CFrameworkunifiedState *f_pTargetState - target state
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// Constructor of CFrameworkunifiedLocalTransition, to create CFrameworkunifiedLocalTransition object
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedLocalTransition(CFrameworkunifiedState *f_pTargetState); // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedLocalTransition
+ /// \~english @par Brief
+ /// CFrameworkunifiedLocalTransition destructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// CFrameworkunifiedLocalTransition destructor, for destory CFrameworkunifiedLocalTransition object
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedLocalTransition();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedLocalTransition
+ /// \~english @par Brief
+ /// reaction for location transition
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// For local transition from inner
+ /// state to outer state exit of the inner state is invoked, but entry of outer state is not
+ /// invoked and from outer state to inner state entry of the inner state is invoked but exit of
+ /// outer state is not invoked
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedReaction
+ /// The reaction for an event is implemented in this function. For local transition from inner
+ /// state to outer state exit of the inner state is invoked, but entry of outer state is not
+ /// invoked and from outer state to inner state entry of the inner state is invoked but exit of
+ /// outer state is not invoked
+ ///
+ /// \param [in] f_pSourceState
+ /// CFrameworkunifiedState* - Source state in which reaction is being executed
+ ///
+ /// \param [in] f_pData
+ /// CEventDataPtr - event data
+ ///
+ /// \return ActiveState
+ /// CFrameworkunifiedState* - Returns Active state
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedReaction(CFrameworkunifiedState *f_pSourceState, CEventDataPtr f_pData);
+};
+
+#endif // _FRAMEWORKUNIFIEDLOCALTRANSITIONS_H // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_multithreading.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_multithreading.h
new file mode 100644
index 00000000..827b180b
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_multithreading.h
@@ -0,0 +1,227 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \~english \brief Application framework's core structures and data types.
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_multithreading.h
+ * @brief \~english Application framework's core structures and data types.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_MULTITHREADING_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_MULTITHREADING_H__
+
+#include <native_service/frameworkunified_framework_types.h>
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedCreateHSMChildThread
+/// \~english @par Brief
+/// Start a subordinate dispatcher in a separate thread
+///
+/// \~english \param [in] hApp
+/// HANDLE - parent framework HANDLE
+/// \~english \param [in] childName
+/// PCSTR - Name to give to the child object
+/// \~english \param [in] CbInitialize
+/// CbFuncPtr - Initialization callback - use this to initialize and configure
+/// the child's dispatcher.
+/// \~english \param [in] CbShutdown
+/// CbFuncPtr - Shutdown callback - use this to shutdown and close the child
+/// The correct way for child to exit dispatch loop is to return eFrameworkunifiedStatusExit
+/// directly from this callback, or from some other interaction triggered by this
+/// callback
+///
+/// \~english \param [in] CbCreateStateMachine
+/// CbFuncPtr - StateMachine callback - use this to add new states, events and reactions
+/// in the Thread statemachine.
+/// \~english @retval HANDLE create thread with Priority success
+/// \~english @retval NULL create thread with Priority failed
+/// \~english @par Preconditions
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+/// \~english @par Change of the internal state
+/// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// - Message queue name specified in the argument (childName) is not appropriate (NULL, over 16byte). [NULL]
+/// - Callback function pointer specified in the argument (CbInitialize,CbShutdown) is NULL. [NULL]
+/// - Thread attribute specified in the argument (attr) is NULL. [NULL]
+/// - Failed to set the inherit-scheduler attribute (pthread_attr_setinheritsched) of the child thread. [NULL]
+/// - Failed to initialize barrier object (pthread_barrier_init) for thread synchronization. [NULL]
+/// - Failed to create child thread (pthread_create). [NULL]
+/// - Failed to wait thread synchronization (pthread_barrier_wait). [NULL]
+/// - Can not be acquired memory for message queue name(malloc). [NULL]
+/// - Failed to open message queue(mq_open). [NULL]
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @par Detail
+/// Start a subordinate dispatcher in a separate thread
+/// This API creates a child thread and returns a handle for communication with the child thread.\n
+/// After creating/initializing the Dispatcher for the child thread, the child thread receives requests
+/// and notifications to the Dispatcher and starts a main loop that executes the registered callback.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedCreateHSMChildThread(HANDLE hApp, PCSTR childName, CbFuncPtr CbInitialize, CbFuncPtr
+ CbShutdown, CbFuncPtr CbCreateStateMachine);
+
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup FrameworkunifiedCreateHSMChildThread
+ /// \~english @par Summary
+ /// Start a subordinate dispatcher in a separate thread with given Priority
+ /// \~english @param [in] hApp
+ /// HANDLE - parent framework HANDLE
+ /// \~english @param [in] childName
+ /// PCSTR - Name to give to the child object
+ /// \~english @param [in] CbInitialize
+ /// CbFuncPtr - Initialization callback - use this to initialize and configure
+ /// the child's dispatcher.
+ /// \~english @param [in] CbShutdown
+ /// CbFuncPtr - Shutdown callback - use this to shutdown and close the child
+ /// The correct way for child to exit dispatch loop is to return eFrameworkunifiedStatusExit
+ /// directly from this callback, or from some other interaction triggered by this
+ /// callback
+ ///
+ /// \~english @param [in] CbCreateStateMachine
+ /// CbFuncPtr - StateMachine callback - use this to add new states, events and reactions
+ /// in the Thread statemachine.
+ /// \~english @param [in] schedPrio
+ /// SI_32 - given Priority for create thread
+ /// \~english @retval HANDLE create thread with Priority success
+ /// \~english @retval NULL create thread with Priority failed
+ /// \~english @par Preconditions
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// - Message queue name specified in the argument (childName) is not appropriate (NULL, over 16byte). [NULL]
+/// - Callback function pointer specified in the argument (CbInitialize,CbShutdown) is NULL. [NULL]
+/// - Thread attribute specified in the argument (attr) is NULL. [NULL]
+/// - Failed to set the inherit-scheduler attribute (pthread_attr_setinheritsched) of the child thread. [NULL]
+/// - Failed to initialize barrier object (pthread_barrier_init) for thread synchronization. [NULL]
+/// - Failed to create child thread (pthread_create). [NULL]
+/// - Failed to wait thread synchronization (pthread_barrier_wait). [NULL]
+/// - Can not be acquired memory for message queue name(malloc). [NULL]
+/// - Failed to open message queue(mq_open). [NULL]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// Start a subordinate dispatcher in a separate thread with given Priority
+ /// This API creates a child thread and returns a handle for communication with the child thread.\n
+ /// After creating/initializing the Dispatcher for the child thread, the child thread receives requests
+ /// and notifications to the Dispatcher and starts a main loop that executes the registered callback.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedCreateHSMChildThreadWithPriority(HANDLE hApp, PCSTR childName, CbFuncPtr CbInitialize,
+ CbFuncPtr CbShutdown, CbFuncPtr CbCreateStateMachine, SI_32 schedPrio);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup FrameworkunifiedCreateHSMChildThread
+ /// \~english @par Summary
+ /// Start a subordinate dispatcher in a separate thread with given attribute
+ /// \~english @param [in] hApp
+ /// HANDLE - parent framework HANDLE
+ /// \~english @param [in] childName
+ /// PCSTR - Name to give to the child object
+ /// \~english @param [in] CbInitialize
+ /// CbFuncPtr - Initialization callback - use this to initialize and configure
+ /// the child's dispatcher.
+ /// \~english @param [in] CbShutdown
+ /// CbFuncPtr - Shutdown callback - use this to shutdown and close the child
+ /// The correct way for child to exit dispatch loop is to return eFrameworkunifiedStatusExit
+ /// directly from this callback, or from some other interaction triggered by this
+ /// callback
+ ///
+ /// \~english @param [in] CbCreateStateMachine
+ /// CbFuncPtr - StateMachine callback - use this to add new states, events and reactions
+ /// in the Thread statemachine.
+ /// \~english @param [in] attr
+ /// const FrameworkunifiedChildThreadAttr * - given attribute to create thread
+ /// \~english @retval HANDLE create thread with Priority success
+ /// \~english @retval NULL create thread with Priority failed
+ /// \~english @par Preconditions
+/// - Generation/Initialization of Dispatcher for the Application
+/// (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been done.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+/// \~english @par Conditions of processing failure
+/// - HANDLE specified in the argument (hApp) is NULL. [NULL]
+/// - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
+/// - Message queue name specified in the argument (childName) is not appropriate (NULL, over 16byte). [NULL]
+/// - Callback function pointer specified in the argument (CbInitialize,CbShutdown) is NULL. [NULL]
+/// - Thread attribute specified in the argument (attr) is NULL. [NULL]
+/// - Failed to set the inherit-scheduler attribute (pthread_attr_setinheritsched) of the child thread. [NULL]
+/// - Failed to initialize barrier object (pthread_barrier_init) for thread synchronization. [NULL]
+/// - Failed to create child thread (pthread_create). [NULL]
+/// - Failed to wait thread synchronization (pthread_barrier_wait). [NULL]
+/// - Can not be acquired memory for message queue name(malloc). [NULL]
+/// - Failed to open message queue(mq_open). [NULL]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// Start a subordinate dispatcher in a separate thread with given attribute
+ /// This API creates a child thread and returns a handle for communication with the child thread.\n
+ /// After creating/initializing the Dispatcher for the child thread, the child thread receives requests
+ /// and notifications to the Dispatcher and starts a main loop that executes the registered callback.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedCreateHSMChildThreadWithAttribute(HANDLE hApp, PCSTR childName, CbFuncPtr CbInitialize,
+ CbFuncPtr CbShutdown, CbFuncPtr CbCreateStateMachine,
+ const FrameworkunifiedChildThreadAttr *attr);
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_MULTITHREADING_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_orthogonalstate.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_orthogonalstate.h
new file mode 100644
index 00000000..c9ea8c7f
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_orthogonalstate.h
@@ -0,0 +1,513 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedOrthogonalState class definitions. CFrameworkunifiedOrthogonalState is derived from
+/// CFrameworkunifiedCompositeState class.This class implements the additional functionality supported by HSM
+/// Orthogonal state. It provides the standard interfaces for adding orthogonal state machines.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_orthogonalstate.h
+ * @brief \~english This file has the CFrameworkunifiedOrthogonalState class definitions. CFrameworkunifiedOrthogonalState is derived from
+ * CFrameworkunifiedCompositeState class.This class implements the additional functionality supported by HSM
+ * Orthogonal state. It provides the standard interfaces for adding orthogonal state machines.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIEDORTHOGONALSTATE_H // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIEDORTHOGONALSTATE_H
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_sm_state.h>
+#include <vector>
+
+typedef std::vector<CFrameworkunifiedState *> OrthogonalRegionList;
+
+class CFrameworkunifiedCompositeState;
+
+class CFrameworkunifiedHSM;
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class implements the additional functionality supported by HSM
+/// Orthogonal state. It provides the standard interfaces for adding orthogonal state machines.
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedOrthogonalState : public CFrameworkunifiedState {
+ public :
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Constructors for CFrameworkunifiedOrthogonalState classes
+ /// \~english @param [in] f_pName
+ /// std::string - state name
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - When the quadrature region list cannot be created due to insufficient memory
+ /// \~english @par Detail
+ /// Generates an orthographic region list.\n
+ /// CFrameworkunifiedOrthogonalState classes are used to manage the status of independent features individually.\n
+ /// For example, when the function of the clock is set to the following two, the management of the internal state is performed according to the function.\n
+ /// - Clock function (Clock display by 12h/24h)\n
+ /// - Alarm function (on/off setting)
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see ~CFrameworkunifiedOrthogonalState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedCompositeState
+ /// Parameterized constructor
+ /// \param [in] f_pName
+ /// string - Name of the state
+ ///
+ /// \return none
+ CFrameworkunifiedOrthogonalState(std::string f_pName); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Destructors of CFrameworkunifiedOrthogonalState classes
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// Frees the memory in the orthographic area list and clears the memory contents.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedOrthogonalState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedOrthogonalState
+ /// Class destructor
+ ///
+ /// \return none
+ virtual ~CFrameworkunifiedOrthogonalState();
+
+
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Initialize state
+ /// \~english @param [in] f_pEventData
+ /// CEventDataPtr - Pointer to the event data class
+ /// \~english @retval Successful pointer to the current state after processing
+ /// \~english @retval NULL Exception supine in internal processing
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// - The State Machine for the current state of the application is set in the FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - Failed recursive function call (FrameworkunifiedOnEntry call)[NULL]
+ /// - If the pointers to the orthographic regions are NULL [NULL]
+ /// \~english @par Detail
+ /// Loops as many times as the number of elements in the quadrature area list, and initializes the active state (calls FrameworkunifiedOnEntry).\n
+ /// If the current state is Leaf State, it does not initialize because it does not have any active state.\n
+ /// If, after initialization, the current state is a child state of Orthogonal State, sets itself (the this pointer) to the current state.\n
+ /// Breaks looping if the current state is not a child state of Orthogonal State.\n
+ /// To maintain the hierarchy, the active state of the parent state is set to the current state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see FrameworkunifiedOnHSMStop, FrameworkunifiedOnEntry, CFrameworkunifiedState::FrameworkunifiedOnHSMStart, IsOrthogonalChildState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnHSMStart
+ /// This function is called recursively till the leaf state is reached. This internally
+ /// calls the Entry function of the current state.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return CurrentState
+ /// CFrameworkunifiedState* - Returns current state after operation
+ CFrameworkunifiedState *FrameworkunifiedOnHSMStart(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Clean up state.
+ /// \~english @param [in] f_pEventData
+ /// CEventDataPtr - Pointer to the event data class
+ /// \~english @retval Successful pointer to the current state after processing
+ /// \~english @retval NULL Exception supine in internal processing
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// - The State Machine for the current state of the application is set in the FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - If the pointers to the orthographic regions are NULL [NULL]
+ /// - If the pointers to the orthographic area lists of the member variables are NULL [NULL]
+ /// - Active state pointers from orthographic area lists of member variables are NULL [NULL]
+ /// - If the current state of the state being cleaned up is NULL [NULL]
+ /// \~english @par Detail
+ /// Loops as many times as the number of elements in the quadrature area list, and performs cleanup of the active state (calls FrameworkunifiedOnExit).\n
+ /// If the current state is Leaf State,Do not clean up because it does not have any active state.\n
+ /// If the current state is a child state of Orthogonal State (orthographic state) after the cleanup process finishes,Sets itself (the this pointer) to the current state.\n
+ /// Breaks looping if the current state is not a child state of Orthogonal State.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see FrameworkunifiedOnHSMStart, CFrameworkunifiedState::FrameworkunifiedOnHSMStop, CFrameworkunifiedState::FrameworkunifiedPostEvent, FrameworkunifiedOnExit,
+ /// IsOrthogonalChildState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnHSMStop
+ /// This function is called recursively till the required parent state is reached. This
+ /// internally calls the Exit function of the current state.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return CurrentState
+ /// CFrameworkunifiedState* - Returns current state after operation
+ CFrameworkunifiedState *FrameworkunifiedOnHSMStop(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedAddOrthogonalRegion
+ /// This Interface adds orthogonal region in the orthogonal state.
+ ///
+ /// \param [in] f_pOrthogonalRegion
+ /// CFrameworkunifiedCompositeState - Orthogonal region object to be associated with state.
+ ///
+ /// \return CurrentState
+ /// CFrameworkunifiedState* - Returns current state after operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedAddOrthogonalRegion(CFrameworkunifiedCompositeState *f_pOrthogonalRegion);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Checks whether OrthogonalRegion (orthographic area) is registered or not.
+ /// \~english @retval TRUE OrthogonalRegion (orthographic area) is registered
+ /// \~english @retval FALSE OrthogonalRegion (orthographic area) is not registered
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// - OrthogonalRegion (orthographic area) is registered in FrameworkunifiedAddOrthogonalRegion.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - If the pointers to the orthographic regions are NULL [FALSE]
+ /// - When the OrthogonalRegion (orthographic area) is not registered and the number of elements (size) of the orthographic area is 0, [FALSE]
+ /// \~english @par Detail
+ /// Checks whether OrthogonalRegion (orthographic area) is registered by referring to the number of elements (size) of the orthographic area list.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedHasOrthogoanlRegions
+ /// This checks if the current state has Orthogonal regions
+ ///
+ ///
+ /// \return TRUE/FASLE
+ /// BOOL - returns TRUE if orthogonal regions are available in the state
+ virtual BOOL FrameworkunifiedHasOrthogoanlRegions();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Event handling
+ /// \~english @param [in] f_pEventData
+ /// CEventDataPtr - Pointer to the event data class
+ /// \~english @retval Successful pointer to the current state after processing
+ /// \~english @retval NULL Operation cannot be guaranteed.
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// - The State Machine for the current state of the application is set in the FrameworkunifiedSetHSM.
+ /// - OrthogonalRegion (orthographic area) is registered in FrameworkunifiedAddOrthogonalRegion.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - If the pointers to the orthographic regions are NULL [NULL]
+ /// - If the event data class is pointed to by NULL [NULL]
+ /// \~english @par Detail
+ /// If the event specified in the argument (f_pEventData) is available in the current state,Set itself (this) to current state and return it.\n
+ /// Invokes the parent-state FrameworkunifiedOnEvent if not available in the current state
+ /// (Repeated until the root state is reached.)\n
+ /// However, since the FrameworkunifiedState that is the parent state of the Orthogonal State (orthographic state) is the root state,You call the FrameworkunifiedOnEvent of FrameworkunifiedState.\n
+ /// If the current state is a child state of the Orthogonal State (quadrature state) after the above process, sets itself (the this pointer) to the current state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedCompositeState::FrameworkunifiedGetActiveState, CFrameworkunifiedState::FrameworkunifiedIsReactionAvailable, CFrameworkunifiedState::FrameworkunifiedOnEvent,
+ /// IsOrthogonalChildState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnEvent
+ /// This function processes the event. If the reaction for event is available in the current
+ /// state within eventlist and deferred eventlist then it is consumed in the current state
+ /// otherwise forwarded to the parent state. Event forwarding is done recursively till either
+ /// event is consumed or the root state has encountered. This also process the events posted
+ /// in the reactions recursively till all posted events are cleared.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ ///
+ /// \return state
+ /// CFrameworkunifiedState* - Returns current state after the event is processed
+ ///
+ virtual CFrameworkunifiedState *FrameworkunifiedOnEvent(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Logs the state name and event name.
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// - OrthogonalRegion (orthographic area) is registered in FrameworkunifiedAddOrthogonalRegion.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - If the pointers to the orthographic regions are NULL [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// Size of the log output data
+ /// - State name of the parent state machine and the state name of the self-state machine
+ /// - All event names on the event list
+ /// - All event names on the deferred event list
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedCompositeState::FrameworkunifiedPrintStates
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedPrintStates
+ /// This logs the state name and events associated with the state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedPrintStates();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Get the active state.
+ /// \~english @retval Successful pointer to the active state
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// In this class, the current state (this state) is always returned as the active state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see None
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedGetActiveState
+ /// This interface returns the Active state of the current composite state. In case of
+ /// non-composite state current state is active state
+ ///
+ /// \return Active state
+ /// CFrameworkunifiedState* - Active state
+ virtual CFrameworkunifiedState *FrameworkunifiedGetActiveState();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Associate the state machine with the current state.
+ /// \~english @param [in] f_pStatemachine
+ /// CFrameworkunifiedHSM* - Pointers to state machines (CFrameworkunifiedHSM classes)
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Specifiying NULL pointers
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - When the pointers to the state machines (CFrameworkunifiedHSM classes) specified in the arguments (f_pStatemachine) are NULL
+ /// [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// Associates a state machine with the current state by setting a pointer (f_pStatemachine) to the state machine (CFrameworkunifiedHSM) specified by the argument to the pointer to the state machine of the member variables.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedCompositeState::FrameworkunifiedSetHSM
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedSetHSM
+ /// This Interface associates the gives statemachine with the current state
+ ///
+ /// \param [in] f_pStatemachine
+ /// CFrameworkunifiedHSM* - Statemachine associated with the state.
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedSetHSM(CFrameworkunifiedHSM *f_pStatemachine);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Outputs state information in the form of XML tags.
+ /// \~english @param [out] f_strXMLString
+ /// std::ostringstream& - Only kept in NPS
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Specifiying NULL pointers
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// - The State Machine for the current state of the application is set in the FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - If generating of own instance (CFrameworkunifiedOrthogonalState) failed, [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// Outputs the following state information in XML tag format to the XML stream specified by the argument.
+ /// - Sate name
+ /// - All event information (event ID and event name) in the event list
+ /// - All event information (event ID and event name) in the deferred event list
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see CFrameworkunifiedCompositeState::FrameworkunifiedPrintXML
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedPrintXML
+ /// Update the State information in the given stream in the form of XML tags
+ ///
+ /// \param [in] f_strXMLString
+ /// std::ostringstream & - reference to the XML stream
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedPrintXML(std::ostringstream &f_strXMLString);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_CFrameworkunifiedOrthogonalState
+ /// \~english @par Brief
+ /// Always returns eFrameworkunifiedStatusOK (Successful).
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @par Prerequisite
+ /// - Its own instance (CFrameworkunifiedOrthogonalState) has been created.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// In this class, eFrameworkunifiedStatusOK is always returned because the class does not require the History feature.\n
+ /// The History feature holds the active state prior to preprocessing and
+ /// returns the inside state to the active state prior to processing after the processing is executed.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Not applicable
+ /// \~english @see
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// UpdateHistory
+ /// This function stores the last active state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ EFrameworkunifiedStatus UpdateHistory();
+
+ protected :
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnEntry
+ /// state initialization can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedOnEntry(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnExit
+ /// state cleanup can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedOnExit(CEventDataPtr f_pEventData);
+
+ private:
+ /// Pointer to the map that stores the pointer to Orthogonal region list
+ OrthogonalRegionList *m_pOrthogonalReigonList;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// IsOrthogonalChildState
+ /// Checks if the given state is a child of orthogonal region
+ ///
+ /// \param [in] f_pChildState
+ /// CFrameworkunifiedState* - Child state pointer
+ ///
+ /// \return TRUE/FASLE
+ /// BOOL - returns TRUE if the given state is child of orthogonal state
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ BOOL IsOrthogonalChildState(CFrameworkunifiedState *f_pChildState);
+};
+
+#endif // _FRAMEWORKUNIFIEDORTHOGONALSTATE_H // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_reaction.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_reaction.h
new file mode 100644
index 00000000..83beea0a
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_reaction.h
@@ -0,0 +1,184 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedReaction class definitions.This class provides the interface
+/// for defining a reaction for an event
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_reaction.h
+ * @brief \~english This file has the CFrameworkunifiedReaction class definitions.This class provides the interface
+ * for defining a reaction for an event
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef _FRAMEWORKUNIFIEDREACTION_H // NOLINT (build/header_guard)
+#define _FRAMEWORKUNIFIEDREACTION_H
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+#include <boost/smart_ptr.hpp>
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_logger_if.h>
+#include <exception>
+
+class CFrameworkunifiedState;
+class CEventData;
+
+typedef boost::shared_ptr<CEventData> CEventDataPtr;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class provides the interface for defining a reaction for an event
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedReaction {
+ public :
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedReaction
+ /// \~english @par Summary
+ /// pure virtual fuction
+ /// \~english @param [in] f_pSourceState
+ /// CFrameworkunifiedState* f_pSourceState - source state
+ /// \~english @param [in] f_pData
+ /// CEventDataPtr f_pData - event data
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// pure virtual function , implement by child class
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedReaction
+ /// The reaction for the event has to be implemented in this function
+ ///
+ /// \param [in] f_pSourceState
+ /// CFrameworkunifiedState* - Source state in which reaction is being executed
+ ///
+ /// \param [in] f_pData
+ /// CEventDataPtr - event data
+ ///
+ /// \return ActiveState
+ /// CFrameworkunifiedState* - Returns Active state
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedReaction(CFrameworkunifiedState *f_pSourceState, CEventDataPtr f_pData) = 0;
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedReaction
+ /// \~english @par Summary
+ /// CFrameworkunifiedReaction constructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - m_ucRefCount = 0
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// CFrameworkunifiedReaction Constructor, for create CFrameworkunifiedReaction object
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedReaction
+ /// Constructor
+ ///
+ /// \param
+ ///
+ /// \return
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedReaction() {
+ m_ucRefCount = 0;
+ }
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedReaction
+ /// \~english @par Summary
+ /// CFrameworkunifiedReaction destructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// CFrameworkunifiedReaction destructor, for destory CFrameworkunifiedReaction object
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedReaction
+ /// Destructor
+ ///
+ /// \param
+ ///
+ /// \return
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedReaction() {}
+
+ // count to check the number of reference of this reaction in all the states of statemachine
+ UI_8 m_ucRefCount;
+};
+#endif // _FRAMEWORKUNIFIEDREACTION_H // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_shallowhistorystate.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_shallowhistorystate.h
new file mode 100644
index 00000000..945749db
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_shallowhistorystate.h
@@ -0,0 +1,163 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief
+///
+/// This file has the declaration of class CFrameworkunifiedShallowHistoryState . CFrameworkunifiedShallowHistoryState is
+/// derived from CFrameworkunifiedHistoryState class.This class implements the additional functionality supported
+/// by HSM Shallow History state.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_shallowhistorystate.h
+ * @brief \~english This file has the declaration of class CFrameworkunifiedShallowHistoryState . CFrameworkunifiedShallowHistoryState is
+ * derived from CFrameworkunifiedHistoryState class.This class implements the additional functionality supported
+ * by HSM Shallow History state.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_SM_SHALLOWHISTORYSTATE_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_SM_SHALLOWHISTORYSTATE_H__
+
+#include <native_service/frameworkunified_sm_historystate.h>
+#include <string>
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class implements the additional functionality supported by HSM Shallow History state.
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedShallowHistoryState : public CFrameworkunifiedHistoryState {
+ public :
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedShallowHistoryState
+ /// \~english @par Brief
+ /// CFrameworkunifiedShallowHistoryState constructor
+ /// \~english @param [in] f_pName
+ /// std::string - Name of the state
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This class inherits from CFrameworkunifiedHistoryState class and creates CFrameworkunifiedShallowHistoryState object. \n
+ /// In this function, we set member variable m_uiEventId to ShallowHistoryID(71), \n
+ /// and set member variable m_cEventName to evShallowHistory"evShallowHistory".
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see ~CFrameworkunifiedShallowHistoryState
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedShallowHistoryState
+ /// Parameterized constructor
+ /// \param [in] f_pName
+ /// string - Name of the state
+ ///
+ /// \return none
+ CFrameworkunifiedShallowHistoryState(std::string f_pName); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedShallowHistoryState
+ /// \~english @par Brief
+ /// CFrameworkunifiedShallowHistoryState destructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// Destory CFrameworkunifiedShallowHistoryState object.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CFrameworkunifiedShallowHistoryState::CFrameworkunifiedShallowHistoryState
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedShallowHistoryState
+ /// Class destructor
+ ///
+ /// \return none
+ ~CFrameworkunifiedShallowHistoryState();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedShallowHistoryState
+ /// \~english @par Brief
+ /// update history infomation
+ /// \~english @param None
+ /// \~english @retval eFrameworkunifiedStatusOK update history infomation success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer exception occur when update history infomation
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// m_pParentState is NULL
+ /// \~english @par Detail
+ /// update last active state, failed if m_pParentState is NULL
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// UpdateHistory
+ /// This function stores the last active state
+ /// \param
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus UpdateHistory();
+
+ private:
+ static const UI_32 m_suievShallowHistory;
+};
+
+#endif /* __FRAMEWORKUNIFIED_SM_SHALLOWHISTORYSTATE_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_state.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_state.h
new file mode 100644
index 00000000..438e2e5a
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_state.h
@@ -0,0 +1,872 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedState class definitions. CFrameworkunifiedState is base class for all types of
+/// state classes.This class implements the basic functionality required for HSM state.
+/// It provides the standard interfaces for entering, exiting and reacting in a state.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_state.h
+ * @brief \~english This file has the CFrameworkunifiedState class definitions. CFrameworkunifiedState is base class for all types of
+ * state classes.This class implements the basic functionality required for HSM state.
+ * It provides the standard interfaces for entering, exiting and reacting in a state.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_STATE_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_STATE_H__
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_sm_reaction.h>
+#include <string>
+#include <map>
+#include <exception>
+#include <vector>
+
+class CFrameworkunifiedReaction;
+class CFrameworkunifiedHSM;
+
+/// defines the map of event reactions
+typedef std::map<UI_32, CFrameworkunifiedReaction *> EventReactionList;
+
+typedef std::vector<UI_32> DeferredEventList;
+
+/// defines the map of event names
+typedef std::map<UI_32, std::string> EventNameList;
+
+/// defines the iterator for event reaction map
+typedef std::map<UI_32, CFrameworkunifiedReaction *>::iterator EventReactionIterator;;
+
+typedef std::vector<CEventDataPtr> EventInfoList;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class implements the basic functionality required for HSM state. It provides the standard
+/// interfaces for entering, exiting and reacting in a state.
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedState {
+ public :
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// CFrameworkunifiedState constructor
+ /// \~english @param [in] f_pName
+ /// std::string - Name of the state
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This clase is a base class of state machine. \n
+ /// It creates object of CFrameworkunifiedState class, and initializes the member variable with state name specified by
+ /// argument(f_pName). \n
+ /// It creates the following event lists, and saves them as member variables. About the other member variables,
+ /// it initialzes them with NULL. \n
+ /// If error occurs, output the error log. \n
+ /// - list of events associated with the state(used for managing state of eace event)
+ /// - list of deferred events associated with the state(used for managing state of deferred event)
+ /// - list of deferred events posted in the state(used for posting list of deferred events)
+ /// - list of event names(used for managing event names)
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see ~CFrameworkunifiedState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// CFrameworkunifiedState
+ /// Parameterized constructor
+ /// \param [in] f_pName
+ /// string - Name of the state
+ ///
+ /// \return none
+ CFrameworkunifiedState(std::string f_pName); // NOLINT (readability/nolint)
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// CFrameworkunifiedState destructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This class destroys object of CFrameworkunifiedState class.\n
+ /// It destroys the following event list. If error occurs, output the error log.
+ /// - list of events associated with the state
+ /// - list of deferred events associated with the state
+ /// - list of deferred events posted in the state
+ /// - list of event names
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CFrameworkunifiedState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// ~CFrameworkunifiedState
+ /// Class destructor
+ ///
+ /// \return none
+ virtual ~CFrameworkunifiedState();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// add event information
+ /// \~english @param [in] f_uiEventId
+ /// UI_32 f_uiEventId - event ID
+ /// \~english @param [in] f_pReaction
+ /// CFrameworkunifiedReaction *f_pReaction - event reaction
+ /// \~english @param [in] f_strEventName
+ /// std::string f_strEventName - event name
+ /// \~english @retval eFrameworkunifiedStatusOK add event success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer exception occur when add event
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// given param is NULL
+ /// \~english @par Detail
+ /// add event information to event list, failed if given param is NULL
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedAddEvent
+ /// Associates the event id with the reaction in the state. When the event is posted to the
+ /// state the associated reaction is executed. This also adds the event name to the map
+ /// which is used for debugging.
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event id of the event to be added in the state
+ ///
+ /// \param [in] f_pReaction
+ /// CFrameworkunifiedReaction* - Reaction to be associated with the with event id in the state
+ ///
+ /// \param [in] f_strEventName
+ /// string - Name of the event (used for debugging purpose only)
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedAddEvent(UI_32 f_uiEventId, CFrameworkunifiedReaction *f_pReaction, std::string f_strEventName = "");
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// This function processes the event.
+ /// \~english @param [in] f_pEventData
+ /// CEventDataPtr - Pointer to event data class
+ /// \~english @retval CFrameworkunifiedState* Pointer to current CFrameworkunifiedState object after processing event
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// - State machine of current state in the applicaton is setted in FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Failed to call constructor to create object. [this(current CFrameworkunifiedState object]
+ /// - Pointer to event data class is NULL. [NULL]
+ /// \~english @par Detail
+ /// This function processes the event. If the reaction for event is available in the current
+ /// state within eventlist and deferred eventlist then it is consumed in the current state
+ /// otherwise forwarded to the parent state. Event forwarding is done recursively till either
+ /// event is consumed or the root state has encountered. This also process the events posted
+ /// in the reactions recursively till all posted events are cleared.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CEventData, FrameworkunifiedIsReactionAvailable
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnEvent
+ /// This function processes the event. If the reaction for event is available in the current
+ /// state within eventlist and deferred eventlist then it is consumed in the current state
+ /// otherwise forwarded to the parent state. Event forwarding is done recursively till either
+ /// event is consumed or the root state has encountered. This also process the events posted
+ /// in the reactions recursively till all posted events are cleared.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ ///
+ /// \return state
+ /// CFrameworkunifiedState* - Returns current state after the event is processed
+ ///
+ virtual CFrameworkunifiedState *FrameworkunifiedOnEvent(CEventDataPtr f_pEventData);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// add deferred event information
+ /// \~english @param [in] f_uiEventId
+ /// UI_32 f_uiEventId - event ID
+ /// \~english @param [in] f_strEventName
+ /// std::string f_strEventName - event name
+ /// \~english @retval eFrameworkunifiedStatusOK add deferred event success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer exception occur when add deferred event
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// given param is NULL
+ /// \~english @par Detail
+ /// add deferred event information to event list , failed if given param is NULL
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedAddDeferredEvent
+ /// Associates the deferred event id with the reaction in the state. When the event is posted
+ /// to the state the event is deferred and stored in the state. In case of implicit recall
+ /// of the deferred events, events are processed before exiting the state. The deferred
+ /// events can also be recalled explicitly in the state This also adds the event name
+ /// to the map which is used for debugging.
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event id of the event to be added in the state
+ ///
+ /// \param [in] f_strEventName
+ /// string - Name of the event (used for debugging purpose only)
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedAddDeferredEvent(UI_32 f_uiEventId, std::string f_strEventName = "");
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// This function creates new eventdata object and add it to event queue of the state machine.
+ /// \~english @param [in] f_uiEventId
+ /// UI_32 f_uiEventId - event ID
+ /// \~english @retval eFrameworkunifiedStatusOK post event success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer exception occur when post event
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// - State machine of current state in the applicaton is setted in FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - State machine of application is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Failed to create object of eventdata. [eFrameworkunifiedStatusNullPointer]
+ /// - Pointer to event list in which to add eventdata in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Pointer to active state in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Name of active state in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// This function creates new eventdata object and add it to event queue of the state machine.\n
+ /// The events are posted in the reaction which are executed in the state.
+ /// The event queue is processed once the execution of the reaction is completed.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedPostEvent(CEventDataPtr), CEventData, CFrameworkunifiedHSM::FrameworkunifiedQueueEvent, CFrameworkunifiedHSM::ProcessEvent
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedPostEvent
+ /// This function creates new eventdata object and add the to event queue of the state.
+ /// The events are posted in the reaction which are executed in the state.
+ /// The event queue is processed once the execution of the reaction is completed.
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event Id
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ EFrameworkunifiedStatus FrameworkunifiedPostEvent(UI_32 f_uiEventId);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// This function adds event data to event queue of the state machine.
+ /// \~english @param [in] f_pEventData
+ /// CEventDataPtr - Pointer to event data class
+ /// \~english @retval eFrameworkunifiedStatusOK post event success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer exception occur when post event
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// - State machine of current state in the applicaton is setted in FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - State machine of application is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Pointer to event data class specified by argument(f_pEventData) is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Pointer to event list in which to add eventdata in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Pointer to active state in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// - Name of active state in state machine is NULL. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// This function adds event data to event queue of the state machine. The events are posted in the reaction
+ /// which are executed in the state. The event queue is processed once the execution of the
+ /// reaction is completed.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CEventData, FrameworkunifiedIsReactionAvailable, CFrameworkunifiedHSM::FrameworkunifiedQueueEvent, CFrameworkunifiedHSM::ProcessEvent
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedPostEvent
+ /// This function adds the event queue of the state. The events are posted in the reaction
+ /// which are executed in the state. The event queue is processed once the execution of the
+ /// reaction is completed.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///
+ EFrameworkunifiedStatus FrameworkunifiedPostEvent(CEventDataPtr f_pEventData);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// delete event from deferred event list
+ /// \~english @param [in] f_uiEventId
+ /// UI_32 f_uiEventId - event ID
+ /// \~english @retval eFrameworkunifiedStatusOK delete deferred event success
+ /// \~english @retval eFrameworkunifiedStatusInvldID invalid event ID
+ /// \~english @retval eFrameworkunifiedStatusNullPointer exception occur when delete deferred event
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// delete event from deferred event list by event ID
+ /// failed if event id is not exist. exception occur if given param is NULL
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedRemoveEventFromDeferredEventList
+ /// This function removes the event from the posted deferred queue list of the state.
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event id
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - eFrameworkunifiedStatusOK if event removed
+ /// eFrameworkunifiedStatusInvldID if event not found in list
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus FrameworkunifiedRemoveEventFromDeferredEventList(UI_32 f_uiEventId);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// This function indicates if the state has sub states.
+ /// \~english @param None
+ /// \~english @retval BOOL if the state has sub states
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This function indicates if the state has sub states. It returns TRUE only in the CompositeState
+ /// where this function is overridden
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CFrameworkunifiedCompositeState::FrameworkunifiedHasSubStates
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedHasSubStates
+ /// This indicates if the state has sub states. It returns TRUE only in the CompositeState
+ /// where this function is overridden
+ ///
+ /// \return TRUE/FASLE
+ /// BOOL - returns TRUE if it has sub states otherwise returns false.
+ virtual BOOL FrameworkunifiedHasSubStates();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// This function indicates if the state has sub states.
+ /// \~english @param None
+ /// \~english @retval BOOL if the state has sub states
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This function indicates if the state has sub states. It returns TRUE only in the OrthogonalState
+ /// where this function is overridden
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CFrameworkunifiedOrthogonalState
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedHasOrthogoanlRegions
+ /// This indicates if the state has sub states. It returns TRUE only in the OrthogonalState
+ /// where this function is overridden
+ ///
+ /// \return TRUE/FASLE
+ /// BOOL - returns TRUE if it has sub states otherwise returns false.
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual BOOL FrameworkunifiedHasOrthogoanlRegions();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// This logs the state name and event name associated with the state
+ /// \~english @param None
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer null pointer exception
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Failed to call constructor to create object. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// This logs the state name and event name associated with the state. \n
+ /// It outputs the following logs:
+ /// - state name of parent state machine and self state machine
+ /// - all event names in event list
+ /// - all event names in deferred event list
+ /// CFrameworkunifiedCompositeState and CFrameworkunifiedOrthogonalState class overrides this function
+ /// and use it.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedPrintStates
+ /// This logs the state name and events associated with the state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedPrintStates();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// Initialize state.
+ /// \~english @param [in] f_pEventData
+ /// CEventDataPtr - Pointer to event data class
+ /// \~english @retval CFrameworkunifiedState* Pointer to current CFrameworkunifiedState object after processing event
+ /// \~english @retval NULL error occurs in internal process
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// - State machine of current state in the applicaton is setted in FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Failed to call function(FrameworkunifiedOnEntry) recursively. [NULL]
+ /// \~english @par Detail
+ /// This function is called recursively till the leaf state is reached. This internally
+ /// calls the Entry function of the current state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CEventData, FrameworkunifiedOnEntry, FrameworkunifiedOnHSMStop
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnHSMStart
+ /// This function is called recursively till the leaf state is reached. This internally
+ /// calls the Entry function of the current state.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return CurrentState
+ /// CFrameworkunifiedState* - Returns current state after operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedOnHSMStart(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// Clearup state.
+ /// \~english @param [in] f_pEventData
+ /// CEventDataPtr - Pointer to event data class
+ /// \~english @retval CFrameworkunifiedState* Pointer to current CFrameworkunifiedState object after processing event
+ /// \~english @retval NULL error occurs in internal process
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// - State machine of current state in the applicaton is setted in FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Failed to call constructor to create object. [NULL]
+ /// - Pointer to list of deferred events posted in the state is NULL. [NULL]
+ /// - Pointer to event data getted from list of deferred events posted in the state is NULL. [NULL]
+ /// - Event name of event data getted from list of deferred events posted in the state is NULL. [NULL]
+ /// \~english @par Detail
+ /// This function is called recursively till the required parent state is reached. This
+ /// internally calls the Exit function of the current state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CEventData, FrameworkunifiedOnExit, FrameworkunifiedOnHSMStart
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnHSMStop
+ /// This function is called recursively till the required parent state is reached. This
+ /// internally calls the Exit function of the current state.
+ ///
+ /// \param [in] f_pEventData
+ /// CECEventDataPtr Event data
+ /// \return CurrentState
+ /// CFrameworkunifiedState* - Returns current state after operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedOnHSMStop(CEventDataPtr f_pEventData);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// Check the availability of event.
+ /// \~english @param [in] f_uiEventId
+ /// UI_32 - event ID
+ /// \~english @retval TRUE reaction is available for this event
+ /// \~english @retval FALSE reaction is not available for this event
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// If the event specified by argument(f_uiEventId) is in event list,
+ /// the reaction is available for this event, return TRUE.
+ /// If the event specified by argument(f_uiEventId) is in deferred event list
+ /// but not in event list, the reaction is available for this event, return TRUE.
+ /// Otherwise, the event specified by argument(f_uiEventId) isn't available, return FALSE.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see FrameworkunifiedPostEvent
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedIsReactionAvailable
+ ///
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event identifier
+ ///
+ /// \return TRUE/FASLE
+ /// BOOL - returns TRUE if it reaction is available for this event
+ virtual BOOL FrameworkunifiedIsReactionAvailable(UI_32 f_uiEventId);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Summary
+ /// pure virtual fuction
+ /// \~english @param None
+ /// \~english @retval CFrameworkunifiedState* depend on implement class
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// pure virtual function , implement by child class
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedGetActiveState
+ /// This interface returns the Active state of the current composite state. In case of
+ /// non-composite state current state is active state
+ ///
+ /// \return Active state
+ /// CFrameworkunifiedState* - Active state
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedGetActiveState() = 0;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// This Interface associates the gives statemachine with the current state
+ /// \~english @param [in] f_pStatemachine
+ /// CFrameworkunifiedHSM* - Statemachine associated with the state.
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer exception
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Pointer to state machine(CFrameworkunifiedHSM class) specified by argument(f_pStatemachine) is NULL.
+ /// [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// This Interface sets state machine of member variable to state machine specified by argument,
+ /// so it can associate the giving statemachine with current state.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CFrameworkunifiedHSM
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedSetHSM
+ /// This Interface associates the gives statemachine with the current state
+ ///
+ /// \param [in] f_pStatemachine
+ /// CFrameworkunifiedHSM* - Statemachine associated with the state.
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ virtual EFrameworkunifiedStatus FrameworkunifiedSetHSM(CFrameworkunifiedHSM *f_pStatemachine);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// Get application handle.
+ /// \~english @param None
+ /// \~english @retval HANDLE application handle
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// - State machine of current state in the applicaton is setted in FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Failed to get application handle. [NULL]
+ /// \~english @par Detail
+ /// This interface gets and returns the application handle with following steps:
+ /// - If member variable used for state machine of application is not setted, return NULL.
+ /// - Get application handle from state machine of application.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CFrameworkunifiedHSM::FrameworkunifiedGetAppHandle
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedGetAppHandle
+ /// This interface returns the application handle
+ ///
+ /// \return HANDLE
+ /// HANDLE - Application Handle
+ ///
+ virtual HANDLE FrameworkunifiedGetAppHandle();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Brief
+ /// Update the State information in the given stream in the form of XML tags
+ /// \~english @param [out] f_strXMLString
+ /// std::ostringstream & - reference to the XML stream
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer exception
+ /// \~english @par Prerequisite
+ /// - Calls constructor to successfully create object.
+ /// - State machine of current state in the applicaton is setted in FrameworkunifiedSetHSM.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Failed to call constructor to create object. [eFrameworkunifiedStatusNullPointer]
+ /// \~english @par Detail
+ /// Update the following State information in the given stream in the form of XML tags
+ /// - state name
+ /// - all event information in event list(eventID, event name)
+ /// - all event information in deferred event list(eventID, event name)
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CEventData, FrameworkunifiedIsReactionAvailable, CFrameworkunifiedHSM::FrameworkunifiedQueueEvent, CFrameworkunifiedHSM::ProcessEvent
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedPrintXML
+ /// Update the State information in the given stream in the form of XML tags
+ ///
+ /// \param [in] f_strXMLString
+ /// std::ostringstream & - reference to the XML stream
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ virtual EFrameworkunifiedStatus FrameworkunifiedPrintXML(std::ostringstream &f_strXMLString);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedState
+ /// \~english @par Summary
+ /// pure virtual fuction
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// pure virtual function , implement by child class
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// UpdateHistory
+ /// This function stores the last active state
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus UpdateHistory() = 0;
+
+ protected :
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnEntry
+ /// This is pure virtual function implemented by the derived classes of the application.
+ /// state initialization can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedOnEntry(CEventDataPtr f_pEventData) = 0;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// FrameworkunifiedOnExit
+ /// This is pure virtual function implemented by the derived classes of the application.
+ /// state cleanup can be performed in this function.
+ ///
+ /// \param [in] f_pEventData
+ /// CEventDataPtr - Event data
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// EFrameworkunifiedStatus - Returns status of operation
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus FrameworkunifiedOnExit(CEventDataPtr f_pEventData) = 0;
+
+ private:
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ /// IsEventDeferred
+ /// This checks if the given event is marked as deferred in the state.
+ ///
+ /// \param [in] f_uiEventId
+ /// UI_32 - Event identifier
+ ///
+ /// \return BOOL
+ /// BOOL - event deferred or not
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ BOOL IsEventDeferred(UI_32 f_uiEventId);
+
+ public:
+ /// state name
+ std::string m_strStateName;
+
+ /// Pointer to the parent state
+ CFrameworkunifiedState *m_pParentState;
+
+ /// pointer to the default state
+ CFrameworkunifiedState *m_pDefaultState;
+
+ /// pointer to the active state
+ CFrameworkunifiedState *m_pActiveState;
+
+ /// pointer to the map that stores the event name against event id
+ EventNameList *m_pEventName;
+
+ protected :
+ /// pointer to the map that stores the reaction against event id
+ EventReactionList *m_pEventList;
+
+ /// pointer to the map that stores deferred event ids
+ DeferredEventList *m_pDeferredEventList;
+
+ /// pointer to the vector that stores the eventinfo of the posted deferred event
+ EventInfoList *m_pDeferredPostEventList;
+
+ /// pointer to the application statemachine
+ CFrameworkunifiedHSM *m_pStateMachine;
+};
+
+#endif // __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_STATE_H__ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_transition.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_transition.h
new file mode 100644
index 00000000..232c91e7
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_sm_transition.h
@@ -0,0 +1,150 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_StateMachine
+/// \brief
+///
+/// This file has the CFrameworkunifiedTransition class definitions.This class provides the
+/// interface for reacting local transition and external transition
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_sm_transition.h
+ * @brief \~english This file has the CFrameworkunifiedTransition class definitions.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+/** @addtogroup statemachine
+ * @ingroup framework
+ * @{
+ */
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_TRANSITION_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_TRANSITION_H__
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_sm_reaction.h>
+
+class CFrameworkunifiedState;
+class CFrameworkunifiedEventData;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class provides the interface for reacting local transition and external transition
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedTransition : public CFrameworkunifiedReaction {
+ public :
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedTransition
+ /// \~english @par Summary
+ /// CFrameworkunifiedTransition constructor
+ /// \~english @param [in] f_pTargetState
+ /// CFrameworkunifiedState *f_pTargetState - set m_pTargetState value
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - m_pTargetState = f_pTargetState
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// CFrameworkunifiedTransition constructor, for create CFrameworkunifiedTransition object
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedTransition(CFrameworkunifiedState *f_pTargetState); // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedTransition
+ /// \~english @par Summary
+ /// CFrameworkunifiedTransition destructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// CFrameworkunifiedTransition destructor, for destroy CFrameworkunifiedTransition object
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedTransition();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedTransition
+ /// \~english @par Summary
+ /// virtual fuction
+ /// \~english @param [in] f_pSourceState
+ /// CFrameworkunifiedState *f_pSourceState - source state
+ /// \~english @param [in] f_pData
+ /// CEventDataPtr f_pData - event data
+ /// \~english @retval CFrameworkunifiedState* depend on implement class
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// virtual function , implement by child class
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual CFrameworkunifiedState *FrameworkunifiedReaction(CFrameworkunifiedState *f_pSourceState, CEventDataPtr f_pData) = 0;
+
+ protected :
+
+ /// Pointer to the target state of transition
+ CFrameworkunifiedState *m_pTargetState;
+};
+
+#endif // __FRAMEWORKUNIFIED_NATIVESERVICES_NATIVESERVICES_INC_FRAMEWORK_STATEMACHINE_FRAMEWORKUNIFIED_SM_TRANSITION_H__ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_thread_priority.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_thread_priority.h
new file mode 100644
index 00000000..2af26a31
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_thread_priority.h
@@ -0,0 +1,235 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief The file provide CFrameworkunifiedThreadPriorities class.
+///
+///
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_thread_priority.h
+ * @brief \~english The file contains declaration of CFrameworkunifiedThreadPriorities class
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+
+#ifndef FRAMEWORKUNIFIED_THREAD_PRIORITY_H_ // NOLINT (build/header_guard)
+#define FRAMEWORKUNIFIED_THREAD_PRIORITY_H_
+
+#include <native_service/frameworkunified_types.h>
+#include <string>
+#include <map>
+
+#define FRAMEWORKUNIFIED_PRIORITY_NOT_FOUND -1 ///< \~english if specified thread name not found
+
+namespace frameworkunified {
+namespace framework {
+class args {
+ public:
+ enum {
+ name,
+ priority
+ };
+};
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// This class parses and stores thread priorities
+///////////////////////////////////////////////////////////////////////////////////////////////////
+class CFrameworkunifiedThreadPriorities {
+ public:
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedThreadPriorities
+ /// \~english @par Brief
+ /// CFrameworkunifiedThreadPriorities constructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// CFrameworkunifiedThreadPriorities constructor, for create CFrameworkunifiedThreadPriorities
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedThreadPriorities();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedThreadPriorities
+ /// \~english @par Brief
+ /// CFrameworkunifiedThreadPriorities destructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// None
+ /// \~english @par Change of internal state
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// CFrameworkunifiedThreadPriorities destructor, for destory CFrameworkunifiedThreadPriorities
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ ///
+ /////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedThreadPriorities();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedThreadPriorities
+ /// \~english @par Brief
+ /// Get the priority of the thread. Priority of the thread was added by \ref AddPriority(),
+ /// when parsing command line arguments.
+ /// \~english @param [in] f_cThreadName
+ /// const std::string& - Name of thread
+ /// \~english @retval SI_32 Returns the priority of a thread.
+ /// \~english @retval FRAMEWORKUNIFIED_PRIORITY_NOT_FOUND if specified thread name not found
+ /// \~english @par
+ /// FRAMEWORKUNIFIED_PRIORITY_NOT_FOUND
+ /// \~english @code
+ /// #define FRAMEWORKUNIFIED_PRIORITY_NOT_FOUND -1 // if specified thread name not found
+ /// @endcode
+ /// \~english @par Prerequisite
+ /// - Call AddPriority() and set priority.
+ /// \~english @par Change of internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - Thread name is not registered in AddPriority()
+ /// \~english @par Detail
+ /// Get the priority of the thread. Priority of the thread was added by \ref AddPriority(),
+ /// when parsing command line arguments.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see
+ /// AddPriority
+ /////////////////////////////////////////////////////////////////////////////////////
+ static SI_32 GetPriority(const std::string &f_cThreadName);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedThreadPriorities
+ /// \~english @par Summary
+ /// set thread Priority
+ /// \~english @param [in] f_cThreadName
+ /// const std::string &f_cThreadName - thread name
+ /// \~english @param [in] f_si32Priority
+ /// SI_32 f_si32Priority - Priority
+ /// \~english @retval eFrameworkunifiedStatusOK set Priority success
+ /// \~english @par Preconditions
+ /// - None
+ /// \~english @par Change of the internal state
+ /// - ms_mapThreadPritories[f_cThreadName] = f_si32Priority
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// set thread Priority through thread name
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ static EFrameworkunifiedStatus AddPriority(const std::string &f_cThreadName, SI_32 f_si32Priority);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedThreadPriorities
+ /// \~english @par Summary
+ /// print thread Priority
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// read each thread and print it's Priority
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+ static VOID PrintPriorites();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CFrameworkunifiedThreadPriorities
+ /// \~english @par Summary
+ /// analyse thread param
+ /// \~english @param [in] f_cArgumentValue
+ /// PCHAR f_cArgumentValue - thread param string
+ /// \~english @retval eFrameworkunifiedStatusOK parse thread param success
+ /// \~english @retval eFrameworkunifiedStatusFail parse thread param failed
+ /// \~english @par Preconditions
+ /// - None
+ /// \~english @par Change of the internal state
+ /// - None
+ /// \~english @par Causes of failures
+ /// - f_cArgumentValue == NULL
+ /// - f_cArgumentValue is invalid
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// analyse thread param data, and set param to thread.
+ /// if given data is NULL or invalid , return false
+ /// \~english @see getsubopt, AddPriority
+ ////////////////////////////////////////////////////////////////////////////////////
+ static EFrameworkunifiedStatus ParseThreadArguments(PCHAR f_cArgumentValue);
+
+ private:
+ typedef std::map<std::string, SI_32> TThreadPriorityList;
+ typedef TThreadPriorityList::iterator ThreadPrioMapIter;
+ static TThreadPriorityList ms_mapThreadPritories; // map of thread name and priority
+};
+
+} // namespace framework
+}; // namespace frameworkunified
+
+#endif /* FRAMEWORKUNIFIED_THREAD_PRIORITY_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_timer.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_timer.h
new file mode 100644
index 00000000..7a3c762e
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_timer.h
@@ -0,0 +1,143 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+/// \brief Application framework's core structures and data types.
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file frameworkunified_timer.h
+ * @brief \~english Application framework's core structures and data types.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __NSFRAMEWORK_NFRAMEWORKCORE_FRAMEWORKUNIFIEDTIMER__ // NOLINT (build/header_guard)
+#define __NSFRAMEWORK_NFRAMEWORKCORE_FRAMEWORKUNIFIEDTIMER__
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_framework_if.h>
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedAttachTimerCallback
+/// \~english @par Brief
+/// Attach a callback to hApp dispatcher that will get called initially at initNS nanoseconds,
+/// and then repeatedly at repeatNS nanoseconds
+/// \~english @param[in] hApp
+/// HANDLE - hApp parent framework HANDLE
+/// \~english @param[in] initMS
+/// UI_32 - milliseconds to begin triggering callback(0 to 4294967295)
+/// \~english @param[in] repeatMS
+/// UI_32 - milliseconds between repeated triggerings of callback(0 to 4294967295)
+/// \~english @param[in] CbFn
+/// CbFuncPtr - Callback to be triggered
+/// \~english @retval Handle to the timer object or NULL on failure
+/// \~english @par Preconditons
+/// - hApp has already gotten the dispatcher(return NULL)
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - hApp is not application HNADLE(return NULL)
+/// - eFrameworkunifiedStatusFail if the hApp specified in the arguments is not appropriate (not valid) [NULL]
+/// - CbFn is NULL(return NULL))
+/// - If the send message queue handle specified in the argument (hApp) to itself is NULL [NULL]
+/// - Failed to create epoll instances (epoll_create1/eventfd) for timer event monitoring [NULL]
+/// - Failed to create a timer event monitor thread (pthread_create) [NULL]
+/// - When acquisition (malloc) of the timer-management-information area fails [NULL]
+/// - If the send message queue type to the handle (hApp) specified in the parameter is neither send nor receive, [NULL]
+/// - Failed to generate timers (timerfd_create) [NULL]
+/// - Failed to register file descriptors for timer notification to epoll instances (epoll_ctl) [NULL]
+/// - Failed to start/stop timer (timerfd_settime) [NULL]
+/// \~english @par Detail
+/// After registering the callback functions for timer events in the Dispatcher specified by the hApp arguments,
+/// it creates and starts a timer and returns its handles.\n
+/// Dispatcher executes callback functions when the timers generated by the APIs fire.\n
+/// The application shall use this API when there is a process to be executed once or repeatedly in response to a specified time elapsed.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - If the application specifies a initMS of 0, a timer is created and handles are returned, but the callback is not executed because the timer is stopped.
+/// - If the application specifies a repeatMS of zero, the callback is executed only once.
+/// - Since the timer handle is a FrameworkunifiedAttachTimerCallback return value, the callback cannot be set twice with the same timer handle.
+/// - If multiple calls are made with the same application handle, the second and subsequent callbacks are not set,
+/// and the first registered callback function is started at the last registered timer interval.
+/// - Create a thread for sending messages, but do not make dynamic calls because the thread is not destroyed even if FrameworkunifiedDetachTimerCallback is executed.
+/// \~english @par Classification
+/// \~english @par Type
+/// Open Close
+/// \~english @see FrameworkunifiedDetachTimerCallback
+/// \~english @todo needs to clarify this API require initMS except 0
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE FrameworkunifiedAttachTimerCallback(HANDLE hApp, UI_32 initMS, UI_32 repeatMS, CbFuncPtr CbFn);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup FrameworkunifiedDetachTimerCallback
+/// \~english @par Brief
+/// Detach callback and deallocate a timer previous created with FrameworkunifiedAttachTimerCallback
+/// \~english @param[in] hApp
+/// HANDLE - hApp parent framework HANDLE
+/// \~english @param[in] hTimer
+/// HANDLE - timer HANDLE
+/// \~english @retval HANDLE HANDLE used to communicate with child. NULL...failure, otherwize...success
+/// \~english @retval eFrameworkunifiedStatusOK
+/// \~english @retval eFrameworkunifiedStatusFail(not happened)
+/// \~english @retval eFrameworkunifiedStatusInvldParam
+/// \~englsih @par Preconditions
+/// - Timer is dispatched for hApp Callback
+/// \~englsih @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - hApp is not application HNADLE(eFrameworkunifiedStatusInvldParam)
+/// - eFrameworkunifiedStatusFail if the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
+/// - hTimer is NULL(eFrameworkunifiedStatusInvldParam)
+/// - When the timer has been stopped by the timer administrative info of the timer handle specified by the arguments, [eFrameworkunifiedStatusFail]
+/// - When the timer administrative information of the timer handle specified by the arguments is NULL, [eFrameworkunifiedStatusFail]
+/// - Failed to stop the timer (timerfd_settime) [eFrameworkunifiedStatusFail]
+/// - If a callback for the timer event is not registered in the Dispatcher specified by the hApp, [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Stops the timer (hTimer) specified by the argument and registrations the callback functions
+/// for timer events from the Dispacther specified by the argument hApp.
+/// \~english @par
+/// Please note the following points when using this API for application.\n
+/// - Operation is not guaranteed if a different handle is set for the timer handle.
+/// - If a normal timer handle and an invalid application handle are set, only the timer information is deleted, resulting in an inconsistent state.
+/// \~english @par Classification
+/// \~english @par Type
+/// Open Close
+/// \~english @see FrameworkunifiedAttachTimerCallback
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus FrameworkunifiedDetachTimerCallback(HANDLE hApp, HANDLE hTimer);
+
+#endif // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/frameworkunified_types.h b/nsframework/framework_unified/client/include/native_service/frameworkunified_types.h
new file mode 100644
index 00000000..faaf3aa0
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/frameworkunified_types.h
@@ -0,0 +1,268 @@
+/*
+ *
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file frameworkunified_types.h
+ * @brief \~english This file contains basic define,enum and struct of framework_unified.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef FRAMEWORKUNIFIED_TYPES_H_ // NOLINT (build/header_guard)
+#define FRAMEWORKUNIFIED_TYPES_H_
+
+#include <stdint.h>
+
+#define DEFINE_HANDLE_TYPE(struct_type, handle_type) typedef struct struct_type* handle_type;
+
+#define MIN_VAL(a, b) ((a) < (b)? (a) : (b))
+
+#ifndef NULL
+#define NULL 0
+#endif
+#ifndef VOID
+typedef void VOID;
+#endif
+#ifndef CONST
+#define CONST const
+#endif
+
+/// Lengths and Max Sizes
+#define INVALID_HANDLE NULL
+#define MAX_QUEUE_MSG_SIZE 4096
+// #define MAX_QUEUE_NAME_SIZE 24
+#define MAX_QUEUE_NAME_SIZE 20
+#define LIMIT_QUEUE_NAME_SIZE 16
+#define MAX_SYS_INFO_SIZE 64
+
+#define MAX_NAME_SIZE_APP MAX_QUEUE_NAME_SIZE ///< Maximum name size of the APP (Client/Service)
+#define LIMIT_NAME_SIZE_APP LIMIT_QUEUE_NAME_SIZE ///< Limit name size of the APP (Client/Service)
+#define MAX_NAME_SIZE_NOTIFICATION 24 ///< Maximum name size of the Notification
+#define MAX_STRING_SIZE_NOTIFICATION 64
+
+#define MAX_STRING_SIZE_TAG 64
+#define MAX_PATH_LENGTH 255
+
+
+#define NS_SHM_ERROR -1
+
+// Types
+typedef int8_t SI_8;
+typedef uint8_t UI_8;
+typedef int16_t SI_16;
+typedef uint16_t UI_16;
+typedef int32_t SI_32;
+typedef uint32_t UI_32;
+typedef int64_t SI_64;
+typedef uint64_t UI_64;
+typedef float F_32;
+typedef double F_64;
+// use it defined kernelmoduleevklibdd.h typedef UI_32 BOOL;
+#define PFALSE ((BOOL)0)
+#define PTRUE ((BOOL)1)
+
+#ifndef FALSE
+#define FALSE PFALSE
+#endif
+#ifndef TRUE
+#define TRUE PTRUE
+#endif
+
+// Pointer Types
+typedef BOOL *PBOOL;
+typedef SI_8 *PSI_8;
+typedef UI_8 *PUI_8;
+typedef SI_16 *PSI_16;
+typedef UI_16 *PUI_16;
+typedef UI_32 *PUI_32;
+typedef SI_32 *PSI_32;
+typedef UI_64 *PUI_64;
+typedef SI_64 *PSI_64;
+typedef F_32 *PF_32;
+typedef void *PVOID;
+typedef CONST void *PCVOID;
+
+typedef char CHAR, *PCHAR;
+typedef CONST char *PCSTR;
+typedef char *PSTR;
+
+typedef UI_8 _TUCHAR;
+typedef SI_32 HFILE;
+typedef PVOID HANDLE;
+typedef HANDLE *PHANDLE;
+typedef CHAR TSysMsgSystemInfo[MAX_SYS_INFO_SIZE]; ///< Information passed via the framework
+
+
+/// CR carry over types...
+/// \brief Types that have been carried
+/// over from Color Radio header file WPFAPI_types.h.
+typedef UI_16 MID;
+typedef UI_16 FRAMEWORKUNIFIED_CID;
+typedef UI_8 RID;
+typedef UI_16 PNO;
+typedef UI_8 BYTE;
+
+#define LOWORD(l) ((WORD)(l))
+#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
+#define _countof(array) (sizeof(array)/sizeof(array[0]))
+
+/// \typedef EFrameworkunifiedStatus
+/// \brief Status and return types
+typedef enum eFrameworkunifiedStatus {
+ eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+ eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+ eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+ eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+ eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+ eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+ eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+ eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+ eFrameworkunifiedStatusFail = -2, ///< Failed
+ eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+ eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+ eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+ eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+ eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+ eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+ eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+ eFrameworkunifiedStatusInvldNotification = 6, ///< The Notification event not present
+ eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+ eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+ eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+ eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+ eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+ eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+ eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+ eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+ eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+ eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+ eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+ eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+ eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+ eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+ eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+ eFrameworkunifiedStatusNullPointer = 22,
+ eFrameworkunifiedStatusMsgNotProcessed = 23,
+ eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+ eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+ eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+ eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+ eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+ eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+ eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+ eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+ eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+ eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+ eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+ eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+} EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+
+/// \typedef EFrameworkunifiedNotificationType
+/// \brief Notification types
+typedef enum _EFrameworkunifiedNotificationType {
+ eFrameworkunifiedNotificationVar = 0, ///< Non Persistent. Not stored locally by NPS
+ eFrameworkunifiedStateVar, ///< Non Persistent. stored locally by NPS
+ eFrameworkunifiedPersistedStateVar, ///< Persistent. Also stored locally by NPS
+ eFrameworkunifiedPersistedStateUserVar, ///< User specific Persistent. Also stored locally by NPS
+ eFrameworkunifiedImmediatePersistedStateVar, ///< Not to be used. See \ref FrameworkunifiedNPRegisterImmediatePersistNotification
+ eFrameworkunifiedUnknown ///< This is not a type of notification and should not be used while
+ ///< defining any notification.
+} EFrameworkunifiedNotificationType;
+
+/// \typedef ENS_ApplicationState
+/// \brief Application States that all module must handle
+/// this should be handle by Publishing a "ModuleName/State"
+/// with the parameter being one of these state values.
+typedef enum _EApplicationStates {
+ eAppInital = 0, ///< Initial: state value
+ eAppIdle, ///< Idle: application shouldn't be processing anything
+ eAppReady, ///< Ready: application is ready to do work
+ eAppConnecting, ///< Connecting: Service is connecting
+ eAppDisconnecting ///< Disconnecting: Service is disconnecting
+} EApplicationStates;
+
+
+typedef enum _EFrameworkunifiedMessagePriorties {
+ eFrameworkunifiedMsgPrioVeryLow = 1,
+ eFrameworkunifiedMsgPrioLow = 8,
+ eFrameworkunifiedMsgPrioNormal = 16,
+ eFrameworkunifiedMsgPrioEmergency = 30,
+} EFrameworkunifiedMessagePriorties;
+
+// defines what data to delete from persistent memory
+typedef enum _EFrameworkunifiedClearPersistence {
+ eFrameworkunifiedClearAllData = 0, ///< clears all the data in persistence memory for all users
+ ///< (currently only this enum value is supported.)
+ eFrameworkunifiedClearAllApplicationData, ///< clears all the data(files, folders) related to all application for all users
+ eFrameworkunifiedClearAllNotificationData, ///< clears all the notification data related to all application for all users
+ eFrameworkunifiedClearCurrentUserData, ///< clears all the data in persistence memory for current users
+ eFrameworkunifiedClearCurrentUserApplicationData, ///< clears all the data(files, folders)
+ ///< related to all application for current users
+ eFrameworkunifiedClearCurrentUserNotificationData ///< clears all the notification data
+ ///< related to all application for current users
+} EFrameworkunifiedClearPersistence;
+
+/// Enum defining category of persistent data
+typedef enum _EFrameworkunifiedPersistCategory {
+ eFrameworkunifiedUserData = 0x0001,
+ eFrameworkunifiedFactoryData = 0x0010,
+ eFrameworkunifiedFactoryCustomerData = 0x0100,
+ eFrameworkunifiedDealerData = 0x1000
+} EFrameworkunifiedPersistCategory;
+
+// defines the type of system error
+typedef enum _EFrameworkunifiedSystemError {
+ // TODO(framework_unified): add generic system errors
+ eFrameworkunifiedSystemErrorNone = 0,
+ eFrameworkunifiedDSPHardwareReset = 1 // system error is DSP hardware reset.
+ // It was commented, because this is product
+ // specific error. Must handle by SystemServices only.
+ // Uncommented per system services request.
+} EFrameworkunifiedSystemError;
+
+/// defines the shutdown types
+typedef enum _EFrameworkunifiedShutdownType {
+ eFrameworkunifiedNormalShutdown = 0,
+ eFrameworkunifiedQuickShutdown,
+ eFrameworkunifiedDataResetShutdown
+} EFrameworkunifiedShutdownType;
+
+/// defines the Release types
+typedef enum _EFrameworkunifiedReleaseType {
+ eFrameworkunifiedNotOnRelease = 0, ///< 0:not on release
+ eFrameworkunifiedPersistOnShutdown, ///< 1:persist on shutdown
+ eFrameworkunifiedPersistInstantly, ///< 2:persist instantly
+} EFrameworkunifiedReleaseType;
+
+#endif // FRAMEWORKUNIFIED_TYPES_H_ // NOLINT (build/header_guard))
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns__CWORD77__common.h b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__common.h
new file mode 100644
index 00000000..e472b303
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__common.h
@@ -0,0 +1,129 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns__CWORD77__common.h
+ * @brief \~english This file has templet class declaration of CCallback and CResCallback
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup _CWORD77_
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef _NS__CWORD77_COMMON_H_ // NOLINT (build/header_guard)
+#define _NS__CWORD77_COMMON_H_
+
+#include <native_service/frameworkunified_service_protocol.h>
+#include <native_service/frameworkunified_framework_types.h>
+#include <native_service/frameworkunified_framework_if.h>
+#include <native_service/ns__CWORD77__types.h>
+
+#include <cstdlib>
+#include <iostream>
+#include <string>
+
+#define MAX_DATA_SIZE 512;
+// using namespace std;
+
+
+// typedef string ServiceName;
+
+
+#define DELETEPTR(p) {if (p != NULL) {delete p; p = NULL;}}
+
+typedef EFrameworkunifiedStatus(*_CWORD77_FuncPtr)(HANDLE hApp, BOOL bTImerExpiry);
+typedef EFrameworkunifiedStatus(*ResponseServiceTo_CWORD77_)(HANDLE hApp, E_CWORD77_ResponseType ResponseType, std::string ServiceName);
+typedef boost::function< EFrameworkunifiedStatus(HANDLE, std::string, std::string, UI_32, EFrameworkunifiedStatus) > SessionAckTo_CWORD77_;
+
+// typedef EFrameworkunifiedStatus (*_CWORD77_TimeoutFuncPtr)(HANDLE hApp,UI_32 uiCmdId, E_CWORD77_MessageType MessageType);
+
+template <typename C, EFrameworkunifiedStatus(C::*M)(HANDLE)>
+class CCallback {
+ public:
+ static CallbackFunctionPtr set(void *pInst) {
+ if (pInst == NULL) {
+ throw;
+ }
+ if (ms_pInst != NULL) {
+ // TODO(framework_unified): FRAMEWORKUNIFIEDLOG some warning, preferably outside the template (i.e. use a global),
+ // to limit executable size, as this code will be replicated many times over
+ }
+ ms_pInst = pInst;
+ return &CCallback::call;
+ }
+ static EFrameworkunifiedStatus call(HANDLE y) {
+ if (ms_pInst == NULL) {
+ return eFrameworkunifiedStatusFault; // can't throw here
+ }
+ C *c = static_cast<C *>(ms_pInst);
+ return (c->*M)(y);
+ }
+ private:
+ static void *ms_pInst;
+};
+
+
+
+template <typename C, EFrameworkunifiedStatus(C::*M)(HANDLE)>
+void *CCallback<C, M>::ms_pInst = NULL;
+
+
+
+template <typename C, EFrameworkunifiedStatus(C::*M)(HANDLE, E_CWORD77_ResponseType, std::string)>
+class CResCallback {
+ public:
+ static ResponseServiceTo_CWORD77_ set(void *pInst) {
+ if (pInst == NULL) {
+ throw;
+ }
+ if (ms_pInst != NULL) {
+ // TODO(framework_unified): FRAMEWORKUNIFIEDLOG some warning, preferably outside the template (i.e. use a global),
+ // to limit executable size, as this code will be replicated many times over
+ }
+ ms_pInst = pInst;
+ return &CResCallback::call;
+ }
+ static EFrameworkunifiedStatus call(HANDLE y, E_CWORD77_ResponseType ResponseType, std::string ServiceName) {
+ if (ms_pInst == NULL) {
+ return eFrameworkunifiedStatusFault; // can't throw here
+ }
+ C *c = static_cast<C *>(ms_pInst);
+ return (c->*M)(y, ResponseType, ServiceName);
+ }
+ private:
+ static void *ms_pInst;
+};
+
+template <typename C, EFrameworkunifiedStatus(C::*M)(HANDLE, E_CWORD77_ResponseType, std::string)>
+void *CResCallback<C, M>::ms_pInst = NULL;
+
+
+#endif // _NS__CWORD77_COMMON_H_ NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_if.h b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_if.h
new file mode 100644
index 00000000..0fab83bf
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_if.h
@@ -0,0 +1,183 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns__CWORD77__data_pool_if.h
+ * @brief \~english This file provides api to operating _CWORD77_DataPool
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup _CWORD77_
+ * @ingroup framework_unified
+ * @{
+ */
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_HMI_CWORD77_Controller
+/// \brief
+///
+////////////////////////////////////////////////////////////////////////////////
+//@{
+#ifndef _C_CWORD77_DATAPOOLIF_H_ // NOLINT (build/header_guard)
+#define _C_CWORD77_DATAPOOLIF_H_
+
+#include <native_service/ns__CWORD77__types.h>
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_HMI_CWORD77_Controller
+ /// \~english @par Brief
+ /// API to set data associated with request into _CWORD77_ Data Pool
+ /// \~english @param [in] f_DataPoolKey
+ /// _CWORD77_DataPoolKey - Data pool key
+ /// \~english @param [in] f_uiSize
+ /// UI_32 - size of the data
+ /// \~english @param [in] f_pData
+ /// PVOID - void pointer to data
+ /// \~english @retval none
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - None.
+ /// \~english @par Detail
+ /// API to set data associated with request into _CWORD77_ Data Pool
+ /// \~english @par
+ /// It is maintained by executing C_CWORD77_Data::SetRespoData().
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Set Get
+ /// \~english @see GetRespDataFrom_CWORD77_DataPool, C_CWORD77_Data::SetRespoData
+ ////////////////////////////////////////////////////////////////////////////////////////////
+VOID SetReqDataIn_CWORD77_DataPool(const _CWORD77_DataPoolKey &f_DataPoolKey, UI_32 f_uiSize, PVOID f_pData);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_HMI_CWORD77_Controller
+ /// \~english @par Brief
+ /// API to get data associated with response from _CWORD77_ Data Pool
+ /// \~english @param [in] f_DataPoolKey
+ /// _CWORD77_DataPoolKey - Data pool key
+ /// \~english @param [out] f_uiSize
+ /// UI_32 - size of the data
+ /// \~english @param [out] f_pData
+ /// PVOID - void pointer to data
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusFail Error
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - C_CWORD77_Data Class instance fail or create fail [eFrameworkunifiedStatusFail]
+ /// - f_DataPoolKey is not registered [eFrameworkunifiedStatusFail]
+ /// - f_pData is NULL [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// API to get data associated with response from _CWORD77_ Data Pool
+ /// \~english @par
+ /// Use SetRespNotfnDataFrom_CWORD77_DataPool() to keep the data.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Set Get
+ /// \~english @see SetRespNotfnDataFrom_CWORD77_DataPool, C_CWORD77_Data::GetRespoData
+ ////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus GetRespDataFrom_CWORD77_DataPool(const _CWORD77_DataPoolKey &f_DataPoolKey, // NOLINT (readability/nolint)
+ UI_32 &f_uiSize, // NOLINT (readability/nolint)
+ PVOID &f_pData); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_HMI_CWORD77_Controller
+ /// \~english @par Brief
+ /// API to set data associated with notification response into _CWORD77_ Data Pool
+ /// \~english @param[in] f_cNotificationName
+ /// const std::string& - Name of the notification
+ /// \~english @param[in] f_uiSize
+ /// UI_32 - size of the data
+ /// \~english @param[in] f_pData
+ /// const PVOID - void pointer to data
+ /// \~english @retval none
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - None.
+ /// \~english @par Detail
+ /// API to set data associated with notification response into _CWORD77_ Data Pool
+ /// \~english @par
+ /// Use GetRespNotfnDataFrom_CWORD77_DataPool() to get the held data.
+ /// \~english @par
+ /// It is maintained by executing C_CWORD77_Data::SetRespoData().
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Set Get
+ /// \~english @see GetRespNotfnDataFrom_CWORD77_DataPool, C_CWORD77_Data::SetRespoData
+ ////////////////////////////////////////////////////////////////////////////////////////////
+VOID SetRespNotfnDataIn_CWORD77_DataPool(const std::string &f_cNotificationName, UI_32 f_uiSize, const PVOID f_pData);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup tag_HMI_CWORD77_Controller
+ /// \~english @par Brief
+ /// API to set data associated with notification response into _CWORD77_ Data Pool
+ /// \~english @param[in] f_cNotificationName
+ /// const std::string& - Name of the notification
+ /// \~english @param[out] f_uiSize
+ /// UI_32& - size of the data
+ /// \~english @param[out] f_pData
+ /// PVOID& - void pointer to data
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusFail Fail
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - C_CWORD77_Data Class instance fail or create fail [eFrameworkunifiedStatusFail]
+ /// - f_cNotificationName is not registered [eFrameworkunifiedStatusFail]
+ /// - f_pData is NULL [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// API to set data associated with notification response into _CWORD77_ Data Pool
+ /// \~english @par
+ /// Use SetRespNotfnDataFrom_CWORD77_DataPool() to keep the data.
+ /// \~english @par
+ /// Get by executing C_CWORD77_Data::GetRespoData().
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Set Get
+ /// \~english @see SetRespNotfnDataFrom_CWORD77_DataPool, C_CWORD77_Data::GetRespoData
+ ////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus GetRespNotfnDataFrom_CWORD77_DataPool(const std::string &f_cNotificationName, // NOLINT (readability/nolint)
+ UI_32 &f_uiSize, // NOLINT (readability/nolint)
+ PVOID &f_pData); // NOLINT (readability/nolint)
+
+#endif // _C_CWORD77_DATAPOOLIF_H_ NOLINT (build/header_guard)
+//@}
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_key.h b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_key.h
new file mode 100644
index 00000000..6e3fbc19
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_key.h
@@ -0,0 +1,53 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns__CWORD77__data_pool_key.h
+ * @brief \~english Provide function _CWORD77__DATA_POOL_KEY of make_pair
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup _CWORD77_
+ * @ingroup framework_unified
+ * @{
+ */
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_HMI_CWORD77_Controller
+/// \brief
+///
+////////////////////////////////////////////////////////////////////////////////
+//@{
+#ifndef NS__CWORD77__DATA_POOL_KEY_H_ // NOLINT (build/header_guard)
+#define NS__CWORD77__DATA_POOL_KEY_H_
+
+#define _CWORD77__DATA_POOL_KEY(ProtocolId) (std::make_pair(ProtocolId, g_c_CWORD77_ServiceName))
+
+#endif /* NS__CWORD77__DATA_POOL_KEY_H_ */ // NOLINT (build/header_guard)
+//@}
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_table.h b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_table.h
new file mode 100644
index 00000000..73f6a203
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__data_pool_table.h
@@ -0,0 +1,1217 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_HMI_CWORD77_Controller
+/// \brief
+///
+////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns__CWORD77__data_pool_table.h
+ * @brief \~english This file provides API for convert and C_CWORD77_DataPool class
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup _CWORD77_
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef _CWORD77__DATA_POOL_TABLE_H_ // NOLINT (build/header_guard)
+#define _CWORD77__DATA_POOL_TABLE_H_
+
+#include <native_service/ns__CWORD77__common.h>
+#include <sstream>
+#include <map>
+#include <string>
+#include <vector>
+
+/// Enumeration for Type of Table
+typedef enum _ETableType {
+ REQUEST_TABLE = 1,
+ RESPONSE_TABLE
+} ETableType, *PETableType;
+
+/// Enumeration for Data Type
+typedef enum _EDataType {
+ UNKNOWNTYPE = -1,
+ SIGNEDINT,
+ UNSIGNEDINT,
+ FLOAT,
+ DOUBLE,
+ CHARACTER,
+ BOOLEAN,
+ STRING,
+} EDataType, *PEDataType;
+
+/// _CWORD77_ Data structure
+typedef struct __CWORD77_Data {
+ EDataType DataType;
+ std::string DataValue;
+} _CWORD77_Data, *P_CWORD77_Data;
+
+typedef std::map< _CWORD77_DataPoolKey, std::vector< CHAR > > T_CWORD77_DataPool;
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// NoOfElementsinData
+/// Function to get number of elements for given string
+///
+/// \param [in] Input
+/// string - string
+///
+/// \return UI_32 - Number of elements
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 NoOfElementsinData(std::string Input);
+
+/// Template to Convert Number to String
+
+template <typename T>
+std::string NumberToString(T Number) {
+ std::ostringstream ss;
+ ss << Number;
+ return ss.str();
+}
+
+/// Template to convert String to Number
+
+template <typename T>
+T StringToNumber(const std::string &Text) {
+ std::istringstream ss(Text);
+ T result;
+ ss >> result;
+ return result;
+}
+
+/// Template to Convert an Array To String
+
+template<class T>
+std::string ConvertArrayToString(T *Array, int Arraysize) {
+ int length = 0;
+ std::string Result = "";
+ while (length < Arraysize) {
+ Result.append(NumberToString<T>(Array[length]));
+ Result.append(",");
+ length++;
+ }
+ Result.append("");
+ return Result;
+}
+
+/// Template to Convert String To Array
+template<class T>
+void ConvertStringToArray(std::string Input, std::vector<T> &Array, UI_32 &Arraysize) { // NOLINT (readability/nolint)
+ int i = 0;
+ std::string first = "";
+ std::istringstream ss(Input);
+ int Size = NoOfElementsinData(Input);
+ // T Arr[Size];
+ while (!ss.eof()) {
+ getline(ss, first, ',');
+ if (first != "") {
+ Array[i] = StringToNumber<T>(first);
+ i++;
+ }
+ }
+ Arraysize = i;
+ // memcpy(Array,(void *)Arr,Arraysize*sizeof(T));
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// ConvertArrayStringsToString
+/// Function to convert array of strings to string
+///
+/// \param [in] strArr
+/// string * - pointer to array of strings
+/// \param [in] Size
+/// SI_32 - Number of strings
+///
+/// \return string
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+std::string ConvertArrayStringsToString(std::string *strArr, SI_32 Size);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// ConvertArrayStringsToString
+/// Function to convert string to array of strings
+///
+/// \param [in] Input
+/// string - string contains array of strings
+/// \param [out] strArr
+/// string * - Pointer to Array of strings
+/// \param [out] ArraySize
+/// UI_32 - No of elements in Array
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+void ConvertStringToArrString(std::string Input, std::string *strArr, UI_32 &ArraySize); // NOLINT (readability/nolint)
+
+///////////////////////////////////////////////////////////////////////////
+/// class: C_CWORD77_DataPool
+/// Description: This is interface class to _CWORD77_ Data base.
+/// It provides APIs to set and get data from _CWORD77_ Data base
+///
+////////////////////////////////////////////////////////////////////////////
+class C_CWORD77_DataPool {
+ private:
+ std::map<UI_32, _CWORD77_Data> m__CWORD77_DataRequestTable; ///< Request Data Table
+ std::map<UI_32, _CWORD77_Data> m__CWORD77_DataResponseTable; ///< Response Data Table
+
+ static C_CWORD77_DataPool *m_p_CWORD77_DataPoolInstance; ///< Static instance to C_CWORD77_DataPool
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetData
+ /// Templatized Function to get data from _CWORD77_ Data base
+ ///
+ /// \param [in] TableType
+ /// ETableType - Table Type (Request or Response)
+ /// \param [in] VarName
+ /// string - Variable Name or key value
+ /// \param [out] Array
+ /// T * - Pointer to an array of given type
+ /// \param [out] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ template<class T>
+ void GetData(ETableType TableType, UI_32 VarName, T *Array, UI_32 &ArraySize) { // NOLINT (readability/nolint)
+ EDataType DataType = SIGNEDINT;
+ std::string DataValue;
+ GetValueFromMap(TableType, VarName, DataType, DataValue);
+ UI_32 Num = NoOfElementsinData(DataValue);
+ std::vector<T> Temp;
+ Temp.resize(Num);
+ ConvertStringToArray<T>(DataValue, Temp, ArraySize);
+ for (unsigned int i = 0; i < Num; i++) {
+ Array[i] = Temp[i];
+ }
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetData
+ /// Templatized Function to set data into _CWORD77_ Data base
+ ///
+ /// \param [in] TableType
+ /// ETableType - Table Type (Request or Response)
+ /// \param [in] VarName
+ /// string - Variable Name or key value
+ /// \param [in] DataType
+ /// EDataType - Data Type of key
+ /// \param [in] Array
+ /// T * - Pointer to an array of given type
+ /// \param [in] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ void SetData(ETableType TableType, UI_32 VarName, EDataType DataType, T *Array, UI_32 ArraySize) {
+ std::string Result = ConvertArrayToString(Array, ArraySize);
+ SetValueinMap(TableType, VarName, DataType, Result);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetValueFromMap
+ /// Function to get data from _CWORD77_ map
+ ///
+ /// \param [in] TableType
+ /// ETableType - Table Type (Request or Response)
+ /// \param [in] VarName
+ /// string - Variable Name or key value
+ /// \param [out] DataType
+ /// EDataType - Data Type of key
+ /// \param [out] Strvalue
+ /// string - Output in the form of string
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void GetValueFromMap(ETableType TableType, UI_32 VarName, EDataType &DataType, std::string &Strvalue); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetValueinMap
+ /// Function to set data in _CWORD77_ map
+ ///
+ /// \param [in] TableType
+ /// ETableType - Table Type (Request or Response)
+ /// \param [in] VarName
+ /// string - Variable Name or key value
+ /// \param [in] VarType
+ /// EDataType - Data Type of key
+ /// \param [in] Result
+ /// string - input in the form of string
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SetValueinMap(ETableType TableType, UI_32 VarName, EDataType VarType, std::string Result);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetArrayStringData
+ /// Function to set string data in _CWORD77_ map
+ ///
+ /// \param [in] TableType
+ /// ETableType - Table Type (Request or Response)
+ /// \param [in] VarName
+ /// string - Variable Name or key value
+ /// \param [in] VarType
+ /// EDataType - Data Type of key
+ /// \param [in] DataValue
+ /// string [] - Array of strings
+ /// \param [in] Size
+ /// UI_32 - No of elements in Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SetArrayStringData(ETableType TableType,
+ UI_32 VarName,
+ EDataType VarType,
+ std::string DataValue[],
+ UI_32 size);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetArrayStringData
+ /// Function to get string data in _CWORD77_ map
+ ///
+ /// \param [in] TableType
+ /// ETableType - Table Type (Request or Response)
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [out] DataValue
+ /// string [] - Array of strings
+ /// \param [out] Size
+ /// UI_32 - No of elements in Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void GetArrayStringData(ETableType TableType, UI_32 VarName, std::string DataValue[], UI_32 &size); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetNoofElementsofData
+ /// Function to get Number of elements in data item
+ ///
+ /// \param [in] TableType
+ /// ETableType - Table Type (Request or Response)
+ /// \param [in] VarName
+ /// UI_32 - key
+
+ ///
+ /// \return UI_32 - Number of elements
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ UI_32 GetNoofElementsofData(ETableType TableType, UI_32 Key);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetDataType
+ /// Function to get data type of given key Name
+ ///
+ /// \param [in] TableType
+ /// ETableType - Table Type (Request or Response)
+ /// \param [in] VarName
+ /// UI_32 - key
+
+ ///
+ /// \return EDataType - Data type of variable
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ EDataType GetDataType(ETableType TableType, UI_32 Key);
+
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// C_CWORD77_DataPool
+ /// Constructor for C_CWORD77_DataPool
+ /// \param None
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ C_CWORD77_DataPool();
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// ~C_CWORD77_DataPool
+ /// Destructor for C_CWORD77_DataPool
+ /// \param None
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ ~C_CWORD77_DataPool();
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetInstance
+ /// API to get single instance of C_CWORD77_DataPool
+ /// \param None
+ /// \return Pointer to single instance of C_CWORD77_Controller
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ static C_CWORD77_DataPool *GetInstance();
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// DeleteInstance
+ /// API to delete single instance of C_CWORD77_DataPool
+ /// \param None
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ static void DeleteInstance();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetRequestArrayData
+ /// Templatized Function to set array data into Request _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [in] DataType
+ /// EDataType - Data Type of key
+ /// \param [in] Array
+ /// T * - Pointer to an array of given type
+ /// \param [in] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ void SetReqArrayData(UI_32 VarName, EDataType DataType, T *Array, UI_32 ArraySize) {
+ SetData<T>(REQUEST_TABLE, VarName, DataType, Array, ArraySize);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetRequestArrayData
+ /// Templatized Function to set array data into Response _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [in] DataType
+ /// EDataType - Data Type of key
+ /// \param [in] Array
+ /// T * - Pointer to an array of given type
+ /// \param [in] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ void SetRespArrayData(UI_32 VarName, EDataType DataType, T *Array, UI_32 ArraySize) {
+ SetData<T>(RESPONSE_TABLE, VarName, DataType, Array, ArraySize);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetRequestArrayData
+ /// Templatized Function to get array data from Request _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [out] Array
+ /// T * - Pointer to an array of given type
+ /// \param [out] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ void GetReqArrayData(UI_32 VarName, T *Array, UI_32 &ArraySize) { // NOLINT (readability/nolint)
+ GetData<T>(REQUEST_TABLE, VarName, Array, ArraySize);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetRequestArrayData
+ /// Templatized Function to get array data from Response _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [out] Array
+ /// T * - Pointer to an array of given type
+ /// \param [out] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ void GetRespArrayData(UI_32 VarName, T *Array, UI_32 &ArraySize) { // NOLINT (readability/nolint)
+ GetData<T>(RESPONSE_TABLE, VarName, Array, ArraySize);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetRequestData
+ /// Templatized Function to set data into Request _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [in] DataType
+ /// EDataType - Data Type of key
+ /// \param [in] Array
+ /// T - Data type of key
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ void SetReqData(UI_32 VarName, EDataType DataType, T Array) {
+ SetData<T>(REQUEST_TABLE, VarName, DataType, &Array, 1);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetRequestData
+ /// Templatized Function to set data into Response _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [in] DataType
+ /// EDataType - Data Type of key
+ /// \param [in] Array
+ /// T - Data type of key
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ void SetRespData(UI_32 VarName, EDataType DataType, T Array) {
+ SetData<T>(RESPONSE_TABLE, VarName, DataType, &Array, 1);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetRequestData
+ /// Templatized Function to get data from Resquest _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ ///
+ /// \return T - value belong to type T
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ T GetReqData(UI_32 VarName) {
+ T Data;
+ UI_32 ArraySize = 0;
+ GetData<T>(REQUEST_TABLE, VarName, &Data, ArraySize);
+ return Data;
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetResponseData
+ /// Templatized Function to get data from Response _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ ///
+ /// \return T - value belong to type T
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ T GetRespData(UI_32 VarName) {
+ T Data;
+ UI_32 ArraySize = 0;
+ GetData<T>(RESPONSE_TABLE, VarName, &Data, ArraySize);
+ return Data;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetRequestArrayStringData
+ /// API to set array of string data into Request _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [in] DataType
+ /// EDataType - Data Type of key
+ /// \param [in] DataValue
+ /// string [] - array of strings
+ /// \param [in] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ void SetReqArrayStringData(UI_32 VarName, EDataType VarType, std::string DataValue[], UI_32 size) {
+ SetArrayStringData(REQUEST_TABLE, VarName, VarType, DataValue, size);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetRequestArrayStringData
+ /// API to set array of string data into Response _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [in] DataType
+ /// EDataType - Data Type of key
+ /// \param [in] DataValue
+ /// string [] - array of strings
+ /// \param [in] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SetRespArrayStringData(UI_32 VarName, EDataType VarType, std::string DataValue[], UI_32 size) {
+ SetArrayStringData(RESPONSE_TABLE, VarName, VarType, DataValue, size);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetRequestArrayStringData
+ /// API to get array of string data from Request _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [out] DataValue
+ /// string [] - array of strings
+ /// \param [out] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ void GetReqArrayStringData(UI_32 VarName, std::string DataValue[], UI_32 &size) { // NOLINT (readability/nolint)
+ GetArrayStringData(REQUEST_TABLE, VarName, DataValue, size);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetResponseArrayStringData
+ /// API to get array of string data from Response _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [out] DataValue
+ /// string [] - array of strings
+ /// \param [out] ArraySize
+ /// UI_32 - No of elements of Array
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void GetRespArrayStringData(UI_32 VarName, std::string DataValue[], UI_32 &size) { // NOLINT (readability/nolint)
+ GetArrayStringData(RESPONSE_TABLE, VarName, DataValue, size);
+ }
+
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetRequestStringData
+ /// API to set string data into Request _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [in] DataType
+ /// EDataType - Data Type of key
+ /// \param [in] DataValue
+ /// string [] - array of strings
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SetReqStringData(UI_32 VarName, EDataType VarType, std::string DataValue) {
+ UI_32 size = 1;
+ SetArrayStringData(REQUEST_TABLE, VarName, VarType, &DataValue, size);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetResponseStringData
+ /// API to set string data into Response _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ /// \param [in] DataType
+ /// EDataType - Data Type of key
+ /// \param [in] DataValue
+ /// string [] - array of strings
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ void SetRespStringData(UI_32 VarName, EDataType VarType, std::string DataValue) {
+ UI_32 size = 1;
+ SetArrayStringData(RESPONSE_TABLE, VarName, VarType, &DataValue, size);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetRequestStringData
+ /// API to get string data from Request _CWORD77_ Data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ ///
+ /// \return string - value of data
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ std::string GetReqStringData(UI_32 VarName) {
+ UI_32 size = 0;
+ std::string DataValue = "";
+ GetArrayStringData(REQUEST_TABLE, VarName, &DataValue, size);
+ return DataValue;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetNoofElementsFromRequestTable
+ /// API to get No of elements in a key from request data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ ///
+ /// \return UI_32 - No of elements
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ UI_32 GetReqDataSize(UI_32 Key) {
+ return GetNoofElementsofData(REQUEST_TABLE, Key);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetNoofElementsFromResponseTable
+ /// API to get No of elements in a key from response data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ ///
+ /// \return UI_32 - No of elements
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ UI_32 GetRespDataSize(UI_32 Key) {
+ return GetNoofElementsofData(RESPONSE_TABLE, Key);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetDataTypeFromRequestTable
+ /// API to get data type of key from request data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ ///
+ /// \return EDataType - Data type of key
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+
+ EDataType GetReqDataType(UI_32 Key) {
+ return GetDataType(REQUEST_TABLE, Key);
+ }
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetDataTypeFromResponseTable
+ /// API to get data type of key from response data base
+ ///
+ /// \param [in] VarName
+ /// UI_32 - key
+ ///
+ /// \return EDataType - Data type of key
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EDataType GetRespDataType(UI_32 Key) {
+ return GetDataType(RESPONSE_TABLE, Key);
+ }
+};
+
+extern C_CWORD77_DataPool g__CWORD77_DataPool;
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SetRequestArrayData
+/// Templatized Function to set array data into Response _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [in] DataType
+/// EDataType - Data Type of key
+/// \param [in] Array
+/// T * - Pointer to an array of given type
+/// \param [in] ArraySize
+/// UI_32 - No of elements of Array
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+template<class T>
+void SetRequestArrayData(UI_32 VarName, EDataType DataType, T *Array, UI_32 ArraySize) {
+ g__CWORD77_DataPool.SetReqArrayData(VarName, DataType, Array, ArraySize);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SetRequestArrayData
+/// Templatized Function to set array data into Response _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [in] DataType
+/// EDataType - Data Type of key
+/// \param [in] Array
+/// T * - Pointer to an array of given type
+/// \param [in] ArraySize
+/// UI_32 - No of elements of Array
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+template<class T>
+void SetResponseArrayData(UI_32 VarName, EDataType DataType, T *Array, UI_32 ArraySize) {
+ g__CWORD77_DataPool.SetRespArrayData<T>(VarName, DataType, Array, ArraySize);
+}
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetRequestArrayData
+/// Templatized Function to get array data from Request _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [out] Array
+/// T * - Pointer to an array of given type
+/// \param [out] ArraySize
+/// UI_32 - No of elements of Array
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+template<class T>
+void GetRequestArrayData(UI_32 VarName, T *Array, UI_32 &ArraySize) { // NOLINT (readability/nolint)
+ g__CWORD77_DataPool.GetReqArrayData<T>(VarName, Array, ArraySize);
+}
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetRequestArrayData
+/// Templatized Function to get array data from Response _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [out] Array
+/// T * - Pointer to an array of given type
+/// \param [out] ArraySize
+/// UI_32 - No of elements of Array
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+template<class T>
+void GetResponseArrayData(UI_32 VarName, T *Array, UI_32 &ArraySize) { // NOLINT (readability/nolint)
+ g__CWORD77_DataPool.GetRespArrayData<T>(VarName, Array, ArraySize);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SetRequestData
+/// Templatized Function to set data into Request _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [in] DataType
+/// EDataType - Data Type of key
+/// \param [in] Array
+/// T - Data type of key
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+template<class T>
+void SetRequestData(UI_32 VarName, EDataType DataType, T Array) {
+ g__CWORD77_DataPool.SetReqData<T>(VarName, DataType, Array);
+}
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SetRequestData
+/// Templatized Function to set data into Response _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [in] DataType
+/// EDataType - Data Type of key
+/// \param [in] Array
+/// T - Data type of key
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+template<class T>
+void SetResponseData(UI_32 VarName, EDataType DataType, T Array) {
+ g__CWORD77_DataPool.SetRespData<T>(VarName, DataType, Array);
+}
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetRequestData
+/// Templatized Function to get data from Resquest _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+///
+/// \return T - value belong to type T
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+template<class T>
+T GetRequestData(UI_32 VarName) {
+ return g__CWORD77_DataPool.GetReqData<T>(VarName);
+}
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetResponseData
+/// Templatized Function to get data from Response _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+///
+/// \return T - value belong to type T
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+template<class T>
+T GetResponseData(UI_32 VarName) {
+ return g__CWORD77_DataPool.GetRespData<T>(VarName);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SetRequestArrayStringData
+/// API to set array of string data into Request _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [in] DataType
+/// EDataType - Data Type of key
+/// \param [in] DataValue
+/// string [] - array of strings
+/// \param [in] ArraySize
+/// UI_32 - No of elements of Array
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+
+void SetRequestArrayStringData(UI_32 VarName, EDataType VarType, std::string DataValue[], UI_32 size);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SetRequestArrayStringData
+/// API to set array of string data into Response _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [in] DataType
+/// EDataType - Data Type of key
+/// \param [in] DataValue
+/// string [] - array of strings
+/// \param [in] ArraySize
+/// UI_32 - No of elements of Array
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+void SetResponseArrayStringData(UI_32 VarName, EDataType VarType, std::string DataValue[], UI_32 size);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetRequestArrayStringData
+/// API to get array of string data from Request _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [out] DataValue
+/// string [] - array of strings
+/// \param [out] ArraySize
+/// UI_32 - No of elements of Array
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+
+void GetRequestArrayStringData(UI_32 VarName, std::string DataValue[], UI_32 &size); // NOLINT (readability/nolint)
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetResponseArrayStringData
+/// API to get array of string data from Response _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [out] DataValue
+/// string [] - array of strings
+/// \param [out] ArraySize
+/// UI_32 - No of elements of Array
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+void GetResponseArrayStringData(UI_32 VarName, std::string DataValue[], UI_32 &size); // NOLINT (readability/nolint)
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SetRequestStringData
+/// API to set string data into Request _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [in] DataType
+/// EDataType - Data Type of key
+/// \param [in] DataValue
+/// string [] - array of strings
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+void SetRequestStringData(UI_32 VarName, EDataType VarType, std::string DataValue);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SetResponseStringData
+/// API to set string data into Response _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+/// \param [in] DataType
+/// EDataType - Data Type of key
+/// \param [in] DataValue
+/// string [] - array of strings
+///
+/// \return None
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+void SetResponseStringData(UI_32 VarName, EDataType VarType, std::string DataValue);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetRequestStringData
+/// API to get string data from Request _CWORD77_ Data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+///
+/// \return string - value of data
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+std::string GetRequestStringData(UI_32 VarName);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetRequestDataLength
+/// API to get No of elements in a key from request data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+///
+/// \return UI_32 - No of elements
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 GetRequestDataLength(UI_32 Key);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetResponseDataLength
+/// API to get No of elements in a key from response data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+///
+/// \return UI_32 - No of elements
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+
+UI_32 GetResponseDataLength(UI_32 Key);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetDataTypeFromRequestTable
+/// API to get data type of key from request data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+///
+/// \return EDataType - Data type of key
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+
+EDataType GetRequestDataType(UI_32 Key);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// GetDataTypeFromResponseTable
+/// API to get data type of key from response data base
+///
+/// \param [in] VarName
+/// UI_32 - key
+///
+/// \return EDataType - Data type of key
+///
+////////////////////////////////////////////////////////////////////////////////////////////
+EDataType GetResponseDataType(UI_32 Key);
+
+
+
+class C_CWORD77_Data {
+ private:
+ T_CWORD77_DataPool m__CWORD77_RequestDataTable; ///< Request Data Table
+ T_CWORD77_DataPool m__CWORD77_ResponseDataTable; ///< Response Data Table
+
+ // Original data pool
+ // Depricated. Remove once all modules migrates to new API's for accessing data pool
+ std::map< UI_32, std::vector<CHAR> > m__CWORD77_RequestDataTableOrig; ///< Request Data Table
+ std::map< UI_32, std::vector<CHAR> > m__CWORD77_ResponseDataTableOrig; ///< Response Data Table
+
+ static C_CWORD77_Data *m_p_CWORD77_DataInstance; /// instance to C_CWORD77_Data
+
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// C_CWORD77_Data
+ /// Constructor for C_CWORD77_Data
+ /// \param None
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ C_CWORD77_Data();
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// C_CWORD77_Data
+ /// Destructor for C_CWORD77_Data
+ /// \param None
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ ~C_CWORD77_Data();
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetInstance
+ /// API to get single instance of C_CWORD77_Data
+ /// \param None
+ /// \return Pointer to single instance of C_CWORD77_Data
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ static C_CWORD77_Data *GetInstance();
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// DeleteInstance
+ /// API to delete single instance of C_CWORD77_DataPool
+ /// \param None
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ static void DeleteInstance();
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetReqDataIn_CWORD77_DataPool
+ /// API to set data associated with request into _CWORD77_ Data Pool
+ ///
+ /// \param [in] f_DataPoolKey
+ /// _CWORD77_DataPoolKey - Data pool key
+ /// \param [in] f_uiSize
+ /// UI_32 - size of the data
+ /// \param [in] f_pData
+ /// PVOID - void pointer to data
+ ///
+ /// \return VOID - None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ VOID SetRequData(const _CWORD77_DataPoolKey &f_DataPoolKey, UI_32 f_uiSize, PVOID f_pData); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetReqDataIn_CWORD77_DataPool
+ /// API to set data associated with request into _CWORD77_ Data Pool
+ /// Depricated. Do not use.
+ ///
+ /// \param [in] f_uiMsgId
+ /// UI_32 - MsgId
+ /// \param [in] f_uiSize
+ /// UI_32 - size of the data
+ /// \param [in] f_pData
+ /// PVOID - void pointer to data
+ ///
+ /// \return VOID - None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ VOID SetRequData(UI_32 f_uiMsgId, UI_32 f_uiSize, PVOID f_pData);
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetRespDataIn_CWORD77_DataPool
+ /// API to set data associated with response into _CWORD77_ Data Pool
+ ///
+ /// \param [in] f_DataPoolKey
+ /// _CWORD77_DataPoolKey - Data pool key
+ /// \param [in] f_uiSize
+ /// UI_32 - size of the data
+ /// \param [in] f_pData
+ /// PVOID - void pointer to data
+ ///
+ /// \return VOID - None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ VOID SetRespoData(const _CWORD77_DataPoolKey &f_DataPoolKey, // NOLINT (readability/nolint)
+ UI_32 f_uiSize, const PVOID f_pData);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetRespDataIn_CWORD77_DataPool
+ /// API to set data associated with response into _CWORD77_ Data Pool
+ /// Depricated. Do not use.
+ ///
+ /// \param [in] f_uiMsgId
+ /// UI_32 - MsgId
+ /// \param [in] f_uiSize
+ /// UI_32 - size of the data
+ /// \param [in] f_pData
+ /// PVOID - void pointer to data
+ ///
+ /// \return VOID - None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ VOID SetRespoData(UI_32 f_uiMsgId, UI_32 f_uiSize, const PVOID f_pData); // NOLINT (readability/nolint)
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetReqDataIn_CWORD77_DataPool
+ /// API to get data associated with request from _CWORD77_ Data Pool
+ ///
+ /// \param [in] f_DataPoolKey
+ /// _CWORD77_DataPoolKey - Data pool key
+ /// \param [in] f_uiSize
+ /// UI_32 - size of the data
+ /// \param [in] f_pData
+ /// PVOID - void pointer to data
+ ///
+ /// \return EFrameworkunifiedStatus - Succes or Error
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetRequData(const _CWORD77_DataPoolKey &f_DataPoolKey, UI_32 &f_uiSize, // NOLINT (readability/nolint)
+ PVOID &f_pData); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetReqDataIn_CWORD77_DataPool
+ /// API to get data associated with request from _CWORD77_ Data Pool
+ /// Depricated. Do not use.
+ ///
+ /// \param [in] f_uiMsgId
+ /// UI_32 - MsgId
+ /// \param [in] f_uiSize
+ /// UI_32 - size of the data
+ /// \param [in] f_pData
+ /// PVOID - void pointer to data
+ ///
+ /// \return EFrameworkunifiedStatus - Succes or Error
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetRequData(UI_32 f_uiMsgId, UI_32 &f_uiSize, PVOID &f_pData); // NOLINT (readability/nolint)
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetRespDataFrom_CWORD77_DataPool
+ /// API to get data associated with response from _CWORD77_ Data Pool
+ ///
+ /// \param [in] f_DataPoolKey
+ /// _CWORD77_DataPoolKey - Data pool key
+ /// \param [in] f_uiSize
+ /// UI_32 - size of the data
+ /// \param [in] f_pData
+ /// PVOID - void pointer to data
+ ///
+ /// \return EFrameworkunifiedStatus - Succes or Error
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetRespoData(const _CWORD77_DataPoolKey &f_DataPoolKey, // NOLINT (readability/nolint)
+ UI_32 &f_uiSize, // NOLINT (readability/nolint)
+ PVOID &f_pData); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetRespDataFrom_CWORD77_DataPool
+ /// API to get data associated with response from _CWORD77_ Data Pool
+ /// Depricated. Do not use.
+ ///
+ /// \param [in] f_uiMsgId
+ /// UI_32 - MsgId
+ /// \param [in] f_uiSize
+ /// UI_32 - size of the data
+ /// \param [in] f_pData
+ /// PVOID - void pointer to data
+ ///
+ /// \return EFrameworkunifiedStatus - Succes or Error
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetRespoData(UI_32 f_uiMsgId, UI_32 &f_uiSize, PVOID &f_pData); // NOLINT (readability/nolint)
+};
+
+#endif /* _CWORD77__DATA_POOL_TABLE_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns__CWORD77__notifications.h b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__notifications.h
new file mode 100644
index 00000000..5d7e3999
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__notifications.h
@@ -0,0 +1,53 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_HMI_CWORD77_Controller
+/// \brief
+///
+////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns__CWORD77__notifications.h
+ * @brief \~english This file defines _CWORD77_ Service Availability Notification.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup _CWORD77_
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef NS__CWORD77__NOTIFICATIONS_H_ // NOLINT (build/header_guard)
+#define NS__CWORD77__NOTIFICATIONS_H_
+
+#define NTFY_REG__CWORD77__Available "_CWORD77_/Available" ///< _CWORD77_ Service Availability Notification
+
+#endif /* NS__CWORD77__NOTIFICATIONS_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns__CWORD77__types.h b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__types.h
new file mode 100644
index 00000000..ae6ce838
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns__CWORD77__types.h
@@ -0,0 +1,68 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_HMI_CWORD77_Controller
+/// \brief
+///
+////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file
+ * @brief \~english This file contains enum of PE_CWORD77_ResponseType
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup _CWORD77_
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef _NS__CWORD77__TYPES_H_ // NOLINT (build/header_guard)
+#define _NS__CWORD77__TYPES_H_
+
+#include <native_service/frameworkunified_types.h>
+#include <sstream>
+#include <utility>
+#include <string>
+// using namespace std;
+
+typedef enum _E_CWORD77_ResponseType {
+ RESPONSE = 0,
+ NOTIFICATION,
+ EVENT
+} E_CWORD77_ResponseType, *PE_CWORD77_ResponseType;
+
+// Pair to uniquely identify protocol commands and notifications for different services
+// pair of protocol id and service name in case of protocol interfaces
+// pair of 0 and notification name in case of notifications, as notification name will always be unique
+typedef std::pair<UI_32, std::string> _CWORD77_DataPoolKey;
+
+#endif /* _NS__CWORD77__TYPES_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_buildversioncheck.hpp b/nsframework/framework_unified/client/include/native_service/ns_buildversioncheck.hpp
new file mode 100644
index 00000000..d7f702c8
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_buildversioncheck.hpp
@@ -0,0 +1,227 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns_buildversioncheck.hpp
+ * @brief \~english Provide the APIs to check/get version
+ */
+
+#ifndef FRAMEWORK_UNIFIED_CLIENT_NS_UTILITY_BUILDVERSIONCHECK_LIBRARY_INCLUDE_NATIVE_SERVICE_NS_BUILDVERSIONCHECK_HPP_ // NOLINT (build/header_guard)
+#define FRAMEWORK_UNIFIED_CLIENT_NS_UTILITY_BUILDVERSIONCHECK_LIBRARY_INCLUDE_NATIVE_SERVICE_NS_BUILDVERSIONCHECK_HPP_
+
+#include <native_service/frameworkunified_types.h>
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+
+/**
+ * \~english the namespace frameworkunified
+ */
+namespace frameworkunified {
+/**
+ * \~english the namespace ns
+ */
+namespace ns {
+/**
+ * \~english the namespace utility
+ */
+namespace utility {
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_BuildVersionCheck
+/// \~english @par Brief
+/// Check whether the input param build_version is matched or not.
+/// \~english @param [in] build_version
+/// PCSTR - The version to be checked
+/// \~english @retval TRUE: match; FALSE: does not match
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// If the input param version string build_version is empty, the function returns FALSE. \n
+/// If the input param version string build_version is equal to the environment build version \n
+/// and library build version, the function returns TRUE.
+/// \~english @see getEnvironmentBuildVersion getLibraryBuildVersion
+////////////////////////////////////////////////////////////////////////////////////////////////
+BOOL buildVersionsMatch(PCSTR build_version); // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_BuildVersionCheck
+/// \~english @par Brief
+/// Get the build version from environment variable.
+/// \~english @retval the build version string
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The funcion returns the value of the system environment variable "BUILD_VERSION". If \n
+/// the environment variable does not exist, the function returns "".
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR getEnvironmentBuildVersion(); // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_BuildVersionCheck
+/// \~english @par Brief
+/// Get the library build version string
+/// \~english @retval the library buidling version string
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function returns the string as macro _BUILD_VERSION.
+/// \~english @see _BUILD_VERSION
+////////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR getLibraryBuildVersion(); // NOLINT (readability/nolint)
+
+/**
+ * \~english the namespace utility_private
+ */
+namespace utility_private {
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_BuildVersionCheck
+/// \~english @par Brief
+/// Check whether the input param is empty or not.
+/// \~english @param [in] build_version
+/// PCSTR - the build version
+/// \~english @retval the input param build_version or "<Not defined>"
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// If the input param build_version is not empty, the function returns build_version, \n
+/// or the function returns "<Not defined>".
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR niceBuildVersion(PCSTR build_version); // NOLINT (readability/nolint)
+
+/**
+ * \~english the end of namespace utility_private
+ */
+}
+/**
+ * \~english the end of namespace utility
+ */
+}
+/**
+ * \~english the end of namespace ns
+ */
+}
+/**
+ * \~english the end of namespace frameworkunified
+ */
+}
+
+/**
+ * \~english define the macro _BUILD_VERSION
+ */
+#ifndef BUILD_VERSION
+#define _BUILD_VERSION ""
+#else
+#define QUOTE( ___str___ ) #___str___
+#define EXPAND_AND_QUOTE( ___str___ ) QUOTE( ___str___ )
+#define _BUILD_VERSION EXPAND_AND_QUOTE( BUILD_VERSION )
+#endif
+
+/**
+ * \~english define the macro WARNING_STRING to print the warning
+ */
+#define WARNING_STRING "\n\
+!!! WARNING - Build Versions do not match !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\
+project build: %s\n\
+library build: %s\n\
+environment build: %s\n\
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+
+/**
+ * \~english define the macro _BUILD_VERSION
+ */
+#if defined STDOUT_LOGGING
+#include <cstdio>
+#define BUILDVERSIONLOG( ___log_string___, ...) std::printf( ___log_string___ "\n", __VA_ARGS__)
+#define BUILDVERSION_NULL_STATEMENT (0)
+#elif defined NO_LOGGING
+#define BUILDVERSIONLOG(...) ((void)0)
+#define BUILDVERSION_NULL_STATEMENT ((void)0)
+#else
+#include <native_service/ns_logger_if.h>
+#define BUILDVERSIONLOG( ___log_string___, ...) TEXT( __PRETTY_FUNCTION__, ___log_string___, __VA_ARGS__)
+/**
+ * \~english define the macro BUILDVERSION_NULL_STATEMENT
+ */
+#define BUILDVERSION_NULL_STATEMENT ((void)0)
+#endif
+
+/**
+ * \~english define the macro CHECK_BUILD_VERSION to check the version
+ */
+#define CHECK_BUILD_VERSION() \
+ (!framework_unified::ns::utility::buildVersionsMatch( _BUILD_VERSION )) ? \
+ BUILDVERSIONLOG( WARNING_STRING, \
+ framework_unified::ns::utility::utility_private::niceBuildVersion( _BUILD_VERSION ), \
+ framework_unified::ns::utility::utility_private::niceBuildVersion( framework_unified::ns::utility::getLibraryBuildVersion() ), \
+ framework_unified::ns::utility::utility_private::niceBuildVersion( framework_unified::ns::utility::getEnvironmentBuildVersion() ) ) :\
+ BUILDVERSION_NULL_STATEMENT
+
+/** @}*/ // end of framework_unified
+
+/** @}*/ // end of native_service
+
+/** @}*/ // end of BaseSystem
+
+#endif // FRAMEWORK_UNIFIED_CLIENT_NS_UTILITY_BUILDVERSIONCHECK_LIBRARY_INCLUDE_NATIVE_SERVICE_NS_BUILDVERSIONCHECK_HPP_ // NOLINT (build/header_guard)
diff --git a/nsframework/framework_unified/client/include/native_service/ns_config_parser_if.h b/nsframework/framework_unified/client/include/native_service/ns_config_parser_if.h
new file mode 100644
index 00000000..b40c01eb
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_config_parser_if.h
@@ -0,0 +1,1038 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns_config_parser_if.h
+ * @brief \~english This file contains declaration of class CNSConfigReader, CNSConfigWriter and CNSConfigParser. -- API
+ * define head file
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup Native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef NS_NATIVESERVICES_INC_NATIVE_NS_CONFIG_PARSER_IF_H_ // NOLINT (build/header_guard)
+#define NS_NATIVESERVICES_INC_NATIVE_NS_CONFIG_PARSER_IF_H_
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <native_service/frameworkunified_types.h>
+#include <string>
+
+// forward declaration of classes
+class IConfigReader;
+class IConfigWriter;
+
+/**
+ * @class CNSConfigReader
+ * @brief \~english Configuration File Read Service Class
+ * @par \~english Brief Introduction
+ * \~english This class provides API's to application to read from configuration files.
+ *
+ */
+class CNSConfigReader {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSConfigReader
+ /// \~english @par Brief
+ /// Constructor of CNSConfigReader class
+ /// This constructor can only be called by derived class. Application cannot use this constructor
+ /// to create object of CNSConfigReader class.
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// It is called when generating the instance of CNSConfigParser class.
+ /// \~english @see CNSConfigReader::~CNSConfigReader
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSConfigReader();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSConfigReader
+ /// \~english @par Brief
+ /// Constructor of CNSConfigReader class
+ /// This is depricated. Use parameterless constructor instead to create object and
+ /// Parse(filepath) to parse the file using reader object.
+ /// \~english @param [in] f_c_filepath
+ /// const std::string& - Name of the configuration file
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// It doesn't need to call Parse() function to execute parse process of configuration file,
+ /// when using the constructor with file path. However, because we don't execute error process,
+ /// if it needs to reply error about parse process, we must to use the constructor without parameter
+ /// and call Parse() function.
+ /// \~english @see CNSConfigReader::~CNSConfigReader
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ explicit CNSConfigReader(const std::string &f_c_filepath);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Parse
+ /// \~english @par Brief
+ /// This function is used to parse configuration file
+ /// \~english @param [in] f_c_filepath
+ /// const std::string& - Name of the configuration file
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - if memory allocation failed or document is not proper
+ /// \~english @retval eFrameworkunifiedStatusFail - invalid file type
+ /// \~english @retval eFrameworkunifiedStatusInvldParam invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusErrOther - file data error
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - File(f_c_filepath) designated by parameter is not proper [eFrameworkunifiedStatusNullPointer]
+ /// - Data of file(f_c_filepath) designated by parameter is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - Expansion name of file(f_c_filepath) designated by parameter is not cfg [eFrameworkunifiedStatusFail]
+ /// - Failed to open file(f_c_filepath) designated by parameter [eFrameworkunifiedStatusFail]
+ /// - Path of file designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Data of file designated by parameter has error [eFrameworkunifiedStatusErrOther]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Parse designated configuration file. If the data format is correct, get memory to store the parsed result,
+ /// and store the parsed contents in it.
+ /// \~english @see CNSConfigWriter::Parse, CNSConfigParser::Parse
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Parse(const std::string &f_c_filepath);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ~CNSConfigReader
+ /// \~english @par Brief
+ /// Destructor of CNSConfigReader class.
+ /// It is used when release the instance.
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Release the used memory and the parsed result of configuration file.
+ /// \~english @see CNSConfigReader::CNSConfigReader
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CNSConfigReader();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetBool
+ /// \~english @par Brief
+ /// This function is used to get the bool value associated with key.
+ /// If there are multiple values associated with the same key, then the first value is returned.
+ /// This API has been depricated, use GetBool(key, ref_value)
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key to search
+ /// \~english @retval TRUE - value associated with key
+ /// \~english @retval FALSE - Failed to get value associated with key
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [FALSE]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [FALSE]
+ /// - Can not find search key(f_c_key) designated by parameter [FALSE]
+ /// - Value getted from configuration file is not true or false [FALSE]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(TRUE/FALSE) associated with key.
+ /// If there are multiple values associated with the same key, return the first value.
+ /// This API has been depricated, please use GetBool(const std::string& f_c_key, BOOL& f_bValue).
+ /// \~english @see CNSConfigWriter::SetBool
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ BOOL GetBool(const std::string &f_c_key);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetDouble
+ /// \~english @par Brief
+ /// This function is used to get the double value associated with key.
+ /// If there are multiple values associated with the same key, then the first value is returned.
+ /// This API has been depricated, use GetDouble(key, ref_value)
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key to search
+ /// \~english @param [out] - none
+ /// \~english @retval F_64 - value associated with key
+ /// \~english @retval 0 - Failed to get value associated with key(64bit)
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [0]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [0]
+ /// - Can not find search key(f_c_key) designated by parameter [0]
+ /// - Failed to change data getted from configuration file from string type to double type [0]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// Please pay attention to the following points when you use this API.\n
+ /// - We can take the value in specification only if it is in the range of
+ /// [1.17549435082228750797e-38F, 3.40282346638528859812e+38F](min value of double, max value of double).
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(64bit) associated with key.
+ /// If there are multiple values associated with the same key, return the first value.
+ /// This API has been depricated, please use GetDouble(const std::string& f_c_key, F_64& f_f_value).
+ /// \~english @see CNSConfigWriter::Set
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ F_64 GetDouble(const std::string &f_c_key);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetFloat
+ /// \~english @par Brief
+ /// This function is used to get the float value associated with key
+ /// If there are multiple values associated with the same key, then the first value is returned.
+ /// This API has been depricated, use GetFloat(key, ref_value)
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key to search
+ /// \~english @retval F_32 value associated with key
+ /// \~english @retval 0 - Failed to get value associated with key(32bit)
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [0]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [0]
+ /// - Can not find search key(f_c_key) designated by parameter [0]
+ /// - Can not change the data string, because that data string getted
+ /// from configuration file is over range [9.8765436e+12]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(32bit) associated with key.
+ /// If there are multiple values associated with the same key, return the first value.
+ /// This API has been depricated, please use GetFloat(const std::string& f_c_key, F_32& f_f_value).
+ /// \~english @see CNSConfigWriter::Set
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ F_32 GetFloat(const std::string &f_c_key);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetInt
+ /// \~english @par Brief
+ /// This function is used to get the integer value associated with key
+ /// If there are multiple values associated with the same key, then the first value is returned.
+ /// This API has been depricated, use GetInt(key, ref_value)
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key to search
+ /// \~english @retval SI_32 - value associated with key
+ /// \~english @retval 0.0f - Failed to get value associated with key(32bit)
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [0]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [0]
+ /// - Can not find search key(f_c_key) designated by parameter [0]
+ /// - Failed to change data getted from Configuration file from string type to Int type [0]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(32bit) associated with key.
+ /// If there are multiple values associated with the same key, return the first value.
+ /// This API has been depricated, please use GetInt(const std::string& f_c_key, SI_32& f_si_value).
+ /// \~english @par
+ /// Please pay attention to the following points when you use this API.\n
+ /// - If data string getted from file is larger than INT_MAX(2147483648), return -1.
+ /// \~english @see CNSConfigWriter::Set
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 GetInt(const std::string &f_c_key);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetString
+ /// \~english @par Brief
+ /// This function is used to get the string value associated with key
+ /// If there are multiple values associated with the same key, all the values separated by
+ /// delimiter "\n" are returned.
+ /// This API has been depricated, use GetString(key, ref_value)
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key to search
+ /// \~english @retval std::string value(string) associated with key
+ /// \~english @retval nullbuffer - Failed to get value associated with key
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [null buffer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [null buffer]
+ /// - Can not find search key(f_c_key) designated by parameter [null buffer]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(string) associated with key.
+ /// If there are multiple values associated with the same key,
+ /// return all the values separated by delimiter "\n".
+ /// This API has been depricated, please use GetString(
+ /// const std::string& f_c_key, std::string& f_cValue).
+ /// \~english @see CNSConfigWriter::Set
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ std::string GetString(const std::string &f_c_key);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetBool
+ /// \~english @par Brief
+ /// This function is used to get the bool value associated with key
+ /// If there are multiple values associated with the same key, then the first value is returned.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key string
+ /// \~english @param [in] f_b_value
+ /// BOOL& - value associated with key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @retval eFrameworkunifiedStatusErrOther - value is not bool type
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// - Value getted from configuration file is not true or false [eFrameworkunifiedStatusErrOther]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(TRUE/FALSE) associated with key.
+ /// If there are multiple values associated with the same key, return the first value.
+ /// \~english @see CNSConfigWriter::SetBool
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetBool(const std::string &f_c_key, BOOL &f_b_value); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetDouble
+ /// \~english @par Brief
+ /// This function is used to get the double value associated with key.
+ /// If there are multiple values associated with the same key, then the first value is returned.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key to search
+ /// \~english @param [in] f_f_value
+ /// F_64& - value associated with key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @retval eFrameworkunifiedStatusInvldBuf - change error
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// - Changed result of data string getted from configuration file is overflow or underflow [eFrameworkunifiedStatusInvldBuf]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// Please pay attention to the following points when you use this API.\n
+ /// - Return eFrameworkunifiedStatusOK if we didn't excute the changing operation
+ /// - We can take the value in specification only if it is in the range of
+ /// [1.17549435082228750797e-38F, 3.40282346638528859812e+38F](min value of double, max value of double).
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(64bit) associated with key.
+ /// If there are multiple values associated with the same key, return the first value.
+ /// \~english @see CNSConfigWriter::Set
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetDouble(const std::string &f_c_key, F_64 &f_f_value); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetFloat
+ /// \~english @par Brief
+ /// This function is used to get the float value associated with key
+ /// If there are multiple values associated with the same key, then the first value is returned.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key to search
+ /// \~english @param [in] f_f_value
+ /// F_32& - value associated with key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @retval eFrameworkunifiedStatusInvldBuf - change error
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// - Can not change the data string, because that data string getted
+ /// from configuration file is over range [9.8765436e+12]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(32bit) associated with key.
+ /// If there are multiple values associated with the same key, return the first value.
+ /// \~english @see CNSConfigWriter::Set
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetFloat(const std::string &f_c_key, F_32 &f_f_value); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetInt
+ /// \~english @par Brief
+ /// This function is used to get the integer value associated with key
+ /// If there are multiple values associated with the same key, then the first value is returned.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key to search
+ /// \~english @param [out] f_si_value
+ /// SI_32& - value associated with key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @retval eFrameworkunifiedStatusInvldBuf - change error
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// - Failed to change data getted from Configuration file from string type to Int type [eFrameworkunifiedStatusInvldBuf]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(32bit) associated with key.
+ /// If there are multiple values associated with the same key, return all the values separated by delimiter "\n".
+ /// \~english @see CNSConfigWriter::Set
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetInt(const std::string &f_c_key, SI_32 &f_si_value); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetString
+ /// \~english @par Brief
+ /// This function is used to get the string value associated with key
+ /// If there are multiple values associated with the same key, all the values separated by
+ /// delimiter "\n" are returned.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key to search
+ /// \~english @param [in] f_c_value
+ /// std::string& - value(string) associated with key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigReader
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(string) associated with key.
+ /// If there are multiple values associated with the same key,
+ /// return all the values separated by delimiter "\n".
+ /// \~english @see CNSConfigWriter::Set
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetString(const std::string &f_c_key, std::string &f_c_value); // NOLINT (readability/nolint)
+
+ protected:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetDataPtr
+ /// This function is used to get the data pointer. This pointer is then set in config writer.
+ /// This is needed to avoid recreation of same data structure object in both reader and writer
+ /// when we create object of NSConfigParser.
+ ///
+ /// \return PVOID - pointer of data structure
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ PVOID GetDataPtr();
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// FormatValue
+ /// This function is used to remove the line feed or carriage return from string
+ ///
+ /// \param [in] f_cValue
+ /// std::string - value
+ ///
+ /// \return std::string - formated data
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ std::string FormatValue(const std::string &f_c_value);
+
+ // config reader pointer
+ IConfigReader *m_pReader;
+ static HANDLE m_hNSXMLLibHandle; // NOLINT (readability/nolint)
+};
+
+
+/**
+ * @class CNSConfigWriter
+ * @brief \~english File Write Service Class
+ * @par \~english Brief Introduction
+ * \~english This class provides API's to application to write to configuration files.
+ *
+ */
+class CNSConfigWriter {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSConfigWriter
+ /// \~english @par Brief
+ /// Constructor of CNSConfigWriter class
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// It is called when generating the instance of CNSConfigWriter class.
+ /// \~english @see CNSConfigWriter::~CNSConfigWriter
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSConfigWriter();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSConfigWriter
+ /// \~english @par Brief
+ /// Constructor of CNSConfigWriter class
+ /// This is depricated. Use parameterless constructor instead to create object and
+ /// Parse(filepath) to parse the file using writer object.
+ /// \~english @param [in] f_c_filepath
+ /// const std::string& - Full path of the configuration file
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// It doesn't need to call Parse() function to execute parse process of configuration File,
+ /// when using the constructor with file path. However, because we don't execute error process,
+ /// if it needs to reply error about parse process, we must to use the constructor without parameter
+ /// and call Parse() function.
+ /// \~english @see CNSConfigWriter::~CNSConfigWriter
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ explicit CNSConfigWriter(const std::string &f_c_filepath);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ~CNSConfigWriter
+ /// \~english @par Brief
+ /// Destructor of CNSConfigWriter class
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigWriter
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Release the used memory and the parsed result of Configuration File.
+ /// \~english @see CNSConfigWriter::CNSConfigWriter
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CNSConfigWriter();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Parse
+ /// \~english @par Brief
+ /// This function is used to parse the configuration file
+ /// \~english @param [in] f_c_filepath
+ /// const std::string& - Name of the configuration file
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - if memory allocation failed or document not proper
+ /// \~english @retval eFrameworkunifiedStatusFail - invalid file type
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusErrOther - file data error
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigWriter
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - File(f_c_filepath) designated by parameter is not proper [eFrameworkunifiedStatusNullPointer]
+ /// - Data of file(f_c_filepath) designated by parameter is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - Expansion name of file(f_c_filepath) designated by parameter is not cfg [eFrameworkunifiedStatusFail]
+ /// - Failed to open file(f_c_filepath) designated by parameter [eFrameworkunifiedStatusFail]
+ /// - Path of file designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Data of file designated by parameter has error [eFrameworkunifiedStatusErrOther]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Parse designated configuration file. If the data format is correct, get memory to store the parsed result,
+ /// and store the parsed contents in it.
+ /// \~english @see CNSConfigParser::Parse, CNSConfigWriter::Parse
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Parse(const std::string &f_c_filepath);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Save
+ /// \~english @par Brief
+ /// This function is used to save the configuration settings to config file
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusFail - file access fail
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigWriter
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - File data is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - File doesn't exit [eFrameworkunifiedStatusFail]
+ /// - File access error [eFrameworkunifiedStatusFail]
+ /// - Can't open file [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Save the data stored in memory to configuration file.
+ /// \~english @see CNSConfigWriter::SetBool, CNSConfigWriter::Set
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Save();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetBool
+ /// \~english @par Brief
+ /// This function is used to set the bool value corresponding to key
+ /// This function is not overloaded with other Set() API's of this class because
+ /// BOOL is typedef of UI_32 so when we pass integer or BOOL to Set API it would have
+ /// called the same API.
+ /// If multiple identical keys are found it sets the value for all the keys.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key
+ /// \~english @param [in] f_b_value
+ /// BOOL - bool value to set for key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @retval eFrameworkunifiedStatusErrOther - if passsed value is invalid
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigWriter
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - File data is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// - Data(f_bValue) of search key designated by parameter is not bool [eFrameworkunifiedStatusInvldParam]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// Please pay attention to the following points when you use this API.\n
+ /// - Valid condition of search key string: there is no separator and line feed in config tag
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set the value(bool type) associated with key to data stored in memory.
+ /// If there are multiple keys, set the values associated with all keys.
+ /// \~english @see CNSConfigReader::GetBool
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetBool(const std::string &f_c_key, BOOL f_b_value);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Set
+ /// \~english @par Brief
+ /// This function is used to set the double value corresponding to key.
+ /// If multiple identical keys are found it sets the value for all the keys.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key
+ /// \~english @param [in] f_f_value
+ /// F_64 - double value to set for key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigWriter
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - File data is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// Please pay attention to the following points when you use this API.\n
+ /// - We can take the value in specification only if it is in the range of
+ /// [2.22507385850720138309e-308L, 1.7976931348623157e+308L](min value of double, max value of double).
+ /// - Valid condition of search key string: there is no separator and line feed in config tag
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set the bool type value(64bit) associated with key to data stored in memory.
+ /// If there are multiple keys, set the values associated with all keys.
+ /// \~english @see CNSConfigReader::GetDouble
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Set(const std::string &f_c_key, F_64 f_f_value);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Set
+ /// \~english @par Brief
+ /// This function is used to set the float value corresponding to key.
+ /// If multiple identical keys are found it sets the value for all the keys.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key
+ /// \~english @param [in] f_f_value
+ /// F_32 - float value to set for key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigWriter
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - File data is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// Please pay attention to the following points when you use this API.\n
+ /// - We can take the value in specification only if it is in the range of
+ /// [1.17549435082228750797e-38F, 3.40282346638528859812e+38F](min value of double, max value of double).
+ /// - Valid condition of search key string: there is no separator and line feed in config tag
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set the float type value(32bit) associated with key to data stored in memory.
+ /// If there are multiple keys, set the values associated with all keys.
+ /// \~english @see CNSConfigReader::GetFloat
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Set(const std::string &f_c_key, F_32 f_f_value);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Set
+ /// \~english @par Brief
+ /// This function is used to set the integer value corresponding to key.
+ /// If multiple identical keys are found it sets the value for all the keys.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key
+ /// \~english @param [in] f_si_value
+ /// SI_32 - integer value to set for key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigWriter
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - File data is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// Please pay attention to the following points when you use this API.\n
+ /// - Valid condition of search key string: there is no separator and line feed in config tag
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set the int type value(32bit) associated with key to data stored in memory.
+ /// If there are multiple keys, set the values associated with all keys.
+ /// \~english @see CNSConfigReader::GetInt
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Set(const std::string &f_c_key, SI_32 f_si_value);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Set
+ /// \~english @par Brief
+ /// This function is used to set the string value corresponding to key.
+ /// If multiple identical keys are found it sets the value for all the keys.
+ /// \~english @param [in] f_c_key
+ /// const std::string& - key
+ /// \~english @param [in] f_s_value
+ /// const std::string& - string value to set for key
+ /// \~english @retval eFrameworkunifiedStatusOK - success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - can not find key
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigWriter
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - File data is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par
+ /// Please pay attention to the following points when you use this API.\n
+ /// - Valid condition of search key string: there is no separator and line feed in config tag
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set the string type value associated with key to data stored in memory.
+ /// If there are multiple keys, set the values associated with all keys.
+ /// \~english @see CNSConfigReader::GetString
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Set(const std::string &f_c_key, const std::string &f_s_value);
+
+ protected:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CNSConfigWriter
+ /// Constructor of CNSConfigWriter class
+ ///
+ /// \param [in] f_c_filepath
+ /// const std::string& - Full path of the configuration file
+ /// \param [in] f_b_noload
+ /// BOOL - load writer with no data
+ ///
+ /// \return
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSConfigWriter(const std::string &f_c_filepath, BOOL f_b_noload);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetDataPtr
+ /// This function is used to set the data pointer in writer class with data pointer
+ /// created in config reader class.
+ /// This is needed to avoid recreation of same data structure object in both reader and writer
+ /// when we create object of NSConfigParser
+ ///
+ /// \param [in] f_p_data
+ /// PVOID - Pointer to data structure
+ ///
+ /// \return VOID
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ VOID SetDataPtr(PVOID f_p_data);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// Create
+ /// This function is used to create config object
+ ///
+ /// \param [in] f_c_filepath
+ /// const std::string& - Name of the configuration file
+ ///
+ /// \return EFrameworkunifiedStatus - success or failure
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Create(const std::string &f_c_filepath);
+
+ private:
+ // config writer pointer
+ IConfigWriter *m_pWriter;
+ static HANDLE m_hNSXMLLibHandle; // NOLINT (readability/nolint)
+};
+
+
+/**
+ * @class CNSConfigParser
+ * @brief \~english File both Reade and Write Service Class
+ * @par \~english Brief Introduction
+ * \~english This class provides API's to application for both reading and writing into configuration files.
+ *
+ */
+class CNSConfigParser: public CNSConfigReader, public CNSConfigWriter {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSConfigParser
+ /// \~english @par Brief
+ /// Constructor of CNSConfigParser class
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// It is called when generating the instance of CNSConfigParser class.
+ /// \~english @see CNSConfigParser::~CNSConfigParser
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSConfigParser();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSConfigParser
+ /// \~english @par Brief
+ /// Constructor of CNSConfigParser class
+ /// This is depricated. Use parameterless constructor instead to create object and
+ /// Parse(filepath) to parse the file using parser object.
+ /// \~english @param [in] f_c_filepath
+ /// const std::string& - Full path of the configuration file
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// It doesn't need to call Parse() function to execute parse process of configuration File,
+ /// when using the constructor with file path. However, because we don't execute error process,
+ /// if it needs to reply error about parse process, we must to use the constructor without parameter
+ /// and call Parse() function.
+ /// \~english @see CNSConfigParser::~CNSConfigParser
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ explicit CNSConfigParser(const std::string &f_c_filepath);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ~CNSConfigParser
+ /// \~english @par Brief
+ /// Destructor of CNSConfigParser class
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigParser
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Release the used memory and the parsed result of Configuration File.
+ /// \~english @see CNSConfigParser::CNSConfigParser
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CNSConfigParser();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Parse
+ /// \~english @par Brief
+ /// This function is used to create config reader object and config writer object
+ /// which then parses the configuration file.
+ /// \~english @param [in] f_c_filepath
+ /// const std::string& - Name of the configuration file
+ /// \~english @retval eFrameworkunifiedStatusOK on success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer - if memory allocation failed or document not proper
+ /// \~english @retval eFrameworkunifiedStatusFail - invalid file type
+ /// \~english @retval eFrameworkunifiedStatusInvldParam invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusErrOther file data error
+ /// \~english @par Prerequisite
+ /// - Call the construct of CNSConfigParser
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
+ /// - File(f_c_filepath) designated by parameter is not proper [eFrameworkunifiedStatusNullPointer]
+ /// - Data of file(f_c_filepath) designated by parameter is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - Expansion name of file(f_c_filepath) designated by parameter is not cfg [eFrameworkunifiedStatusFail]
+ /// - Failed to open file(f_c_filepath) designated by parameter [eFrameworkunifiedStatusFail]
+ /// - Path of file designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Data of file designated by parameter has error [eFrameworkunifiedStatusErrOther]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Parse designated configuration file. If the data format is correct, get memory to store the parsed result,
+ /// and store the parsed contents in it.
+ /// \~english @see CNSConfigReader::Parse, CNSConfigWriter::Parse
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Parse(const std::string &f_c_filepath);
+};
+
+#endif // NS_NATIVESERVICES_INC_NATIVE_NS_CONFIG_PARSER_IF_H_ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_endianess.h b/nsframework/framework_unified/client/include/native_service/ns_endianess.h
new file mode 100644
index 00000000..33fa8582
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_endianess.h
@@ -0,0 +1,192 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns_endianess.h
+ * @brief \~english Provide api for convert value
+ */
+
+#ifndef NS_NATIVESERVICES_INC_UTILITY_NS_ENDIANESS_H_ // NOLINT (build/header_guard)
+#define NS_NATIVESERVICES_INC_UTILITY_NS_ENDIANESS_H_
+
+#include <native_service/frameworkunified_types.h>
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup utility
+ * @ingroup framework_unified
+ * @{
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Convert the UI_16(unsigned 16bit) value to big-endian.
+/// \~english @param [in] f_value
+/// UI_16 - The value to be converted
+/// \~english @retval the big-endian value of the input param f_value
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function converts the UI_16(unsigned 16bit) value to big-endian.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+UI_16 ConvertEndian_UI16(UI_16 f_value); // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Convert the SI_16(signed 16bit) value to big-endian.
+/// \~english @param [in] f_value
+/// SI_16 - The value to be converted
+/// \~english @retval the big-endian value of the input param f_value
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function converts the SI_16(signed 16bit) value to big-endian.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+SI_16 ConvertEndian_SI16(SI_16 f_value); // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Convert the UI_32(unsigned 32bit) value to big-endian.
+/// \~english @param [in] f_value
+/// UI_32 - The value to be converted
+/// \~english @retval the big-endian value of the input param f_value
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function convers the UI_32(unsigned 32bit) value to big-endian.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 ConvertEndian_UI32(UI_32 f_value); // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Convert the SI_32(signed 32bit) value to big-endian.
+/// \~english @param [in] f_value
+/// SI_32 - The value to be converted
+/// \~english @retval the big-endian value of the input param f_value
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function convers the SI_32(signed 32bit) value to big-endian.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+SI_32 ConvertEndian_SI32(SI_32 f_value); // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Convert the UI_64(unsigned 64bit) value to big-endian.
+/// \~english @param [in] f_value
+/// UI_64 - The value to be converted
+/// \~english @retval the big-endian value of the input param f_value
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function convers the UI_64(unsigned 64bit) value to big-endian.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+UI_64 ConvertEndian_UI64(UI_64 f_value); // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Convert the SI_64(signed 64bit) value to big-endian.
+/// \~english @param [in] f_value
+/// SI_64 - The value to be converted
+/// \~english @retval the big-endian value of the input param f_value
+///
+/// \~english @par Prerequisite
+/// - NULL
+/// \~english @par Change of internal state
+/// - NULL
+/// \~english @par Conditions of processing failure
+/// - NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function convers the SI_64(signed 64bit) value to big-endian.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+SI_64 ConvertEndian_SI64(SI_64 f_value); // NOLINT (readability/nolint)
+
+#endif // NS_NATIVESERVICES_INC_UTILITY_NS_ENDIANESS_H_ // NOLINT (build/header_guard)
+
+/** @}*/ // end of utility
+/** @}*/ // end of framework_unified
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/ns_eventlogger.h b/nsframework/framework_unified/client/include/native_service/ns_eventlogger.h
new file mode 100644
index 00000000..ab96e115
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_eventlogger.h
@@ -0,0 +1,103 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief structures used by ns_logger.cpp for event and counter logging
+///
+///
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @file
+ * @brief \~english structures used by ns_logger.cpp for event and counter logging
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup Native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_EVENTLOGGER_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_EVENTLOGGER_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// event log messageQ name
+#define EVENTLOG_MSGQ_NAME "/EvntLogQue"
+
+typedef enum _Datatype_ {
+ COMMON,
+ EVENT_SPECIFIC
+} Datatype;
+
+typedef enum _SystemPhase_ {
+ STARTUP = 0x21,
+ NORMAL = 0x22,
+ SHUTDOWN = 0x23,
+} SystemPhase;
+
+typedef enum _NStoSS_LOGGERSERVICEPROTOCOL {
+ SS_MSG_EVTLOG = 6463, // NS to Event Logger Thread
+ SS_MSG_LOGGERCNT, // NS to Event logger Thread
+ SS_MSG_LOGGER_CNT_EVTLOG // NS to event logger thread
+} NStoSS_loggerserviceprotocol;
+
+// Note: Don't remove #paragma pack(1) this is required for the
+// ARM processor, forces data structures to be on a byte boundary
+// all messages should be place in between #pragma pack(1) and #pragma pack()
+#pragma pack(1)
+typedef struct _stLogEvent_ {
+ UI_32 ts;
+ UI_8 grp_ID;
+ UI_8 event_id;
+ UI_8 data[4];
+ SystemPhase phase;
+ UI_16 cnt_ID;
+ Datatype typeofdata;
+} st_LogEvent;
+#pragma pack(0)
+
+#pragma pack(1)
+typedef struct _stLogCount_ {
+ SystemPhase phase;
+ UI_16 cnt_id;
+} st_LogCount;
+#pragma pack(0)
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NATIVESERVICES_EVENTLOGGER_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_logger_if.h b/nsframework/framework_unified/client/include/native_service/ns_logger_if.h
new file mode 100644
index 00000000..a1ca9ef7
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_logger_if.h
@@ -0,0 +1,1646 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \file
+/// Declares the external APIs to Logger.
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @file
+ * @brief \~english Declares the external APIs to Logger.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup Native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_LOGGER_IF_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_LOGGER_IF_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define FRAMEWORKUNIFIEDLOG_MSGQ_NAME "/NSLog"
+#define FRAMEWORKUNIFIEDLOG_SHAREDMEM_NAME "/frameworkunified_debug.log.1"
+#define FRAMEWORKUNIFIEDLOG_SHAREDMEM_SIZE 5242880 // 5MB
+
+#define MASTER_ZONE_COUNT 16U
+
+#include <native_service/loglibrarylog_if.h>
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief typedef of ZONE
+///////////////////////////////////////////////////////////////////////////////
+typedef UI_32 TFrameworkunifiedZone;
+// Note: if the BITS_IN_TZONE macro is getting modified do the corresponding changes
+// in GET_ZONE_INDEX and GET_ZONE_BIT_MASK
+#define BITS_IN_BYTE (8U)
+#define BITS_IN_TZONE ((UI_32 )(sizeof( TFrameworkunifiedZone ) * BITS_IN_BYTE))
+#define TZONE_COUNT ((UI_32)MASTER_ZONE_COUNT)
+#define BITS_IN_ZONE_MASK ((UI_32)(BITS_IN_TZONE * TZONE_COUNT))
+#define DEBUG_ZONE_COUNT BITS_IN_ZONE_MASK
+
+#define ZONE_MASK_ARRAY_ELTS ((UI_32)TZONE_COUNT)
+
+#define USER_ZONES_COUNT BITS_IN_ZONE_MASK -10
+
+#define ZONE_TEXT_SIZE 24
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief Array of mask options
+///////////////////////////////////////////////////////////////////////////////
+typedef TFrameworkunifiedZone TFrameworkunifiedZoneMask[ZONE_MASK_ARRAY_ELTS];
+
+typedef enum _TFrameworkunifiedLoggerSeverity {
+ FRAMEWORKUNIFIED_SEVERITY_LOW = 0x0, /// <all enable(default)
+ FRAMEWORKUNIFIED_SEVERITY_DEBUG2, /// <enable FRAMEWORKUNIFIEDLOG_DEBUG() and FRAMEWORKUNIFIEDLOG_DEBUG2() and all the follows
+ FRAMEWORKUNIFIED_SEVERITY_DEBUG1, /// <enable FRAMEWORKUNIFIEDLOG_DEBUG1() and all the follows
+ FRAMEWORKUNIFIED_SEVERITY_INFO, /// <enable FRAMEWORKUNIFIEDLOG_INFO() and all the follows
+ FRAMEWORKUNIFIED_SEVERITY_WARN, /// <enable FRAMEWORKUNIFIEDLOG_WARN() and all the follows
+ FRAMEWORKUNIFIED_SEVERITY_ERROR, /// <enable FRAMEWORKUNIFIEDLOG_ERROR() and all the follows
+ FRAMEWORKUNIFIED_SEVERITY_FATAL, /// <enable FRAMEWORKUNIFIEDLOG_FATAL() and FRAMEWORKUNIFIEDLOG_ALWAYS()
+ FRAMEWORKUNIFIED_SEVERITY_ALWAYS /// <enable FRAMEWORKUNIFIEDLOG_ALWAYS()
+} TFrameworkunifiedLoggerSeverity;
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief FRAMEWORKUNIFIEDLOG parameter
+///////////////////////////////////////////////////////////////////////////////
+typedef struct _FRAMEWORKUNIFIEDLOGPARAM {
+ UI_8 uiLogOptions; /// <output options (ref. NS_LoggingMethod_t )
+ CHAR cZones[USER_ZONES_COUNT][ZONE_TEXT_SIZE]; /// <mask text ZONE_TEXT_10 ... ZONE_TEXT_n
+ TFrameworkunifiedZoneMask uiZoneMask; /// <mask options ZONEMASK(10)...ZONEMASK(n) (ref. TFrameworkunifiedZone)
+ TFrameworkunifiedLoggerSeverity eSeverity; /// <severity level(ref. TFrameworkunifiedLoggerSeverity)
+} FRAMEWORKUNIFIEDLOGPARAM, *LPFRAMEWORKUNIFIEDLOGPARAM;
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief FRAMEWORKUNIFIEDLOG output direction
+/// \note LMSGQ and LSLOGGER are disabled
+///////////////////////////////////////////////////////////////////////////////
+typedef enum _NS_LOGGER_METHODS {
+ LPRINT = 0x01, /// <Print to the console(similar to printf)
+ LMSGQ = 0x02, /// <Disabled
+ LSLOGGER = 0x04, /// <Disabled
+ LSHAREDMEM = 0x08 /// <Output to shared memory. this is the default logging method.
+} NS_LoggingMethod_t;
+// Note: Don't remove #paragma pack(1) this is required for the
+// ARM processor, forces data structures to be on a byte boundary
+// all messages should be place in between #pragma pack(1) and #pragma pack()
+#pragma pack(1) // *** DO NOT REMOVE ***
+
+typedef struct tag_Change_Log_Parameters {
+ TFrameworkunifiedZoneMask uiZoneMask;
+ UI_8 uiLogOptions;
+ TFrameworkunifiedLoggerSeverity eSeverity;
+} CHANGELOGPARAMS;
+
+#pragma pack(0) // *** DO NOT REMOVE ***
+
+// RCS related
+#define NS_RCS_LOGGER_PLUGIN_Q "/NsRcsLoggerPlugin"
+
+typedef enum _NS_RCS_LOGGER_SETTINGS {
+ NS_RCS_LOGGER_PLUGIN_ADD_APPNAME = 0x500,
+} NS_RCS_LOGGER_SETTINGS;
+
+typedef struct _TNS_EnableRcsLogging {
+ CHAR m_cAppName[MAX_NAME_SIZE_APP];
+ BOOL m_bEnable;
+} TNS_EnableRcsLogging;
+
+// End RCS related
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLog
+/// \~english @par Brief
+/// Writes a log to the Native Services logging mechanism
+/// \~english @param [in] p_lLine_i
+/// const UI_16 - Line number(0 to 65535) that this log was was written on
+/// \~english @param [in] f_uiZoneIndex
+/// const UI_64 - Mask value(0 to 511) to check against
+/// \~english @param [in] p_pstrClassName_i
+/// PCSTR - Name of the class or method where the log was written
+/// \~english @param [in] lpszFormat
+/// PCSTR - string similar to that of a printf statement
+/// \~english @param [in] arg list
+/// ... - Data arguments(option)
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// FRAMEWORKUNIFIEDLOG parameter is set throuth NsLogSetFrameworkunifiedLogParams
+/// \~english @par Change of internal state
+/// None
+/// \~english @par Conditions of processing failure
+/// - Real-time log output switch can be turn on by NsLogSetRealtimeLog() generally.
+/// But in case of FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_FREEZE real-time log and/ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog /will not print out
+/// \~~english @par
+/// - in the following conditions,real-time log will not print out:
+/// - log output way is LPRINT but f_uiZoneIndex parameter is in [96 to 127]
+/// - log output way is LPRINT but real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_OFF
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB and mq_open system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB and mq_send system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and socket system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and setsockopt system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and bind system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and inet_addr system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and sendto system call failed(retry 5 times)
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB_DISABLE
+/// \~english @par
+/// in the following conditions /ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog/ log can not be print out
+/// - log file for parameter f_uiZoneIndex and
+/// log file for parameter FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter can not be found
+/// - the ring_buffer of log file(log file for FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter when
+/// log file is not exited) for parameter f_uiZoneIndex is not opened (CNSRingBuffer::IsOpen())
+/// - the write-in operation to ring_buffer of log file for parameter f_uiZoneIndex
+/// (log file for FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter when file is not exited) is failed
+/// \~english @par Detail
+/// Writes a log to the Native Services logging mechanism
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLog(const UI_16 p_lLine_i, // Line number where message was generated
+ const UI_16 f_uiZoneIndex,
+ PCSTR p_pstrClassName_i,
+ PCSTR lpszFormat,
+ ...)
+#ifdef __GNUC__
+__attribute__((format(printf, 4, 5)))
+#endif
+; // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLog0
+/// \~english @par Brief
+/// Writes a log to the Native Services logging mechanism
+/// \~english @param [in] p_lLine_i
+/// const UI_16 - Line number(0 to 65535) that this log was was written on
+/// \~english @param [in] f_uiZoneIndex
+/// const UI_64 - Mask value(0 to 511) to check against
+/// \~english @param [in] p_pstrClassName_i
+/// PCSTR - Name of the class or method where the log was written
+/// \~english @param [in] lpszFormat
+/// PCSTR - string similar to that of a printf statement
+/// \~english @param [in] arg list
+/// ... - Data arguments(option)
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// FRAMEWORKUNIFIEDLOG parameter is set throuth NsLogSetFrameworkunifiedLogParams
+/// \~english @par Change of internal state
+/// None
+/// \~english @par Conditions of processing failure
+/// - Real-time log output switch can be turn on by NsLogSetRealtimeLog() generally.
+/// But in case of FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_FREEZE real-time log and/ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog /will not print out
+/// \~~english @par
+/// - in the following conditions,real-time log will not print out:
+/// - log output way is LPRINT but f_uiZoneIndex parameter is in [96 to 127]
+/// - log output way is LPRINT but real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_OFF
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB and mq_open system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB and mq_send system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and socket system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and setsockopt system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and bind system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and inet_addr system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and sendto system call failed(retry 5 times)
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB_DISABLE
+/// \~english @par
+/// in the following conditions /ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog/ log can not be print out
+/// - log file for parameter f_uiZoneIndex and
+/// log file for parameter FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter can not be found
+/// - the ring_buffer of log file(log file for FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter when
+/// log file is not exited) for parameter f_uiZoneIndex is not opened (CNSRingBuffer::IsOpen())
+/// - the write-in operation to ring_buffer of log file for parameter f_uiZoneIndex
+/// (log file for FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter when file is not exited) is failed
+/// \~english @par Detail
+/// Writes a log to the Native Services logging mechanism
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLog0(const UI_16 p_lLine_i, // Line number where message was generated
+ const UI_16 f_uiZoneIndex,
+ PCSTR p_pstrClassName_i,
+ PCSTR lpszFormat);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogTime
+/// \~english @par Brief
+/// Print out real-time in log using Native Service mechanism
+/// \~english @param [in] f_uiZoneIndex
+/// const UI_64 - Mask value(0 to 511) to check against
+/// \~english @param [in] lpszFormat
+/// PCSTR - string similar to that of a printf statement
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// parameter FRAMEWORKUNIFIEDLOG has already set using NsLogSetFrameworkunifiedLogParams
+/// \~english @par Change of internal state
+/// None
+/// \~english @par Conditions of processing failure
+/// - Real-time log output switch can be turn on by NsLogSetRealtimeLog() generally.
+/// But in case of FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_FREEZE real-time log and/ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog /will not print out
+/// \~~english @par
+/// - in the following conditions,real-time log will not print out:
+/// - log output way is LPRINT but f_uiZoneIndex parameter is in [96 to 127]
+/// - log output way is LPRINT but real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_OFF
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB and mq_open system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB and mq_send system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and socket system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and setsockopt system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and bind system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and inet_addr system call failed
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER and sendto system call failed(retry 5 times)
+/// - log output way is LPRINT,real-time log output setting is
+/// FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB_DISABLE
+/// \~english @par
+/// in the following conditions /ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog/ log can not be print out
+/// - log file for parameter f_uiZoneIndex and
+/// log file for parameter FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter can not be found
+/// - the ring_buffer of log file(log file for FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter when
+/// log file is not exited) for parameter f_uiZoneIndex is not opened (CNSRingBuffer::IsOpen())
+/// - the write-in operation to ring_buffer of log file for parameter f_uiZoneIndex
+/// (log file for FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter when file is not exited) is failed
+/// \~english @par Detail
+/// Print out real-time in log using Native Service mechanism
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogTime(const UI_16 f_uiZoneIndex,
+ PCSTR lpszFormat);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogData
+/// \~english @par Brief
+/// log print-out function
+/// \~english @param [in] f_uiZoneIndex
+/// const UI_64 - Mask value(0 to 511) to check against
+/// \~english @param [in] data
+/// PCSTR -log print-out data
+/// \~english @param [in] size (0 to ULONG_MAX)
+/// UI_32 - data size (0 to ULONG_MAX)
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// FRAMEWORKUNIFIEDLOG has already set by NsLogSetFrameworkunifiedLogParams
+/// \~english @par Change of internal state
+/// None
+/// \~english @par Conditions of processing failure
+/// -Process will failed under following conditions:
+/// -Real-time log output switch can be turn on by NsLogSetRealtimeLog() generally.
+/// But the set value is FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_FREEZE
+/// -the log file for f_uiZoneIndex and log file for FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG parameter
+/// are both not found
+/// - the ring_buffer of log file for f_uiZoneIndex(using log file for FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG
+/// if file is not exited)is not opened (CNSRingBuffer::IsOpen())
+/// - write operation on ring_buffer of log file for f_uiZoneIndex
+/// (using log file for FrameworkunifiedLogFlagId which is set by FRAMEWORKUNIFIEDLOG if file is not exited)is failed
+/// \~english @par Detail
+/// the difference bewteen NsLog and NsLogData:
+/// - NsLog()will print out real-time log
+/// NsLogData() will not print out real-time log but noly print out logs under /ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog/
+/// - NsLog() will add ZoneIndex, process name, real-time info to log but
+/// NsLogData() only print out log
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogData(const UI_16 f_uiZoneIndex,
+ PCSTR data,
+ UI_32 size);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogSetFrameworkunifiedLogParams
+/// \~english @par Brief
+/// Sets the FRAMEWORKUNIFIEDLOG parameter of your application\process based on
+/// the value passed in.
+/// \~english @param [in] p_FrameworkunifiedLogParams
+/// FRAMEWORKUNIFIEDLOGPARAM * - FRAMEWORKUNIFIEDLOG parameter in process
+/// \~english @par
+/// FRAMEWORKUNIFIEDLOGPARAM Structure
+/// \~english @code
+/// typedef struct _FRAMEWORKUNIFIEDLOGPARAM {
+/// UI_8 uiLogOptions; // output options (ref. NS_LoggingMethod_t )
+/// CHAR cZones[USER_ZONES_COUNT][ZONE_TEXT_SIZE]; // mask text ZONE_TEXT_10 ... ZONE_TEXT_n
+/// // mask options ZONEMASK(10)...ZONEMASK(n) (ref. TFrameworkunifiedZone)
+/// TFrameworkunifiedZoneMask uiZoneMask;
+/// TFrameworkunifiedLoggerSeverity eSeverity; // severity level(ref. TFrameworkunifiedLoggerSeverity)
+/// } FRAMEWORKUNIFIEDLOGPARAM, *LPFRAMEWORKUNIFIEDLOGPARAM;
+/// @endcode
+/// \~english @par
+/// TFrameworkunifiedZoneMask Array
+/// \~english @code
+/// typedef TFrameworkunifiedZone TFrameworkunifiedZoneMask[ZONE_MASK_ARRAY_ELTS];
+/// @endcode
+/// \~english @par
+/// TFrameworkunifiedZone typedef
+/// \~english @code
+/// UI_32 TFrameworkunifiedZone; // 32bit
+/// @endcode
+/// \~english @par
+/// TFrameworkunifiedLoggerSeverity Enum
+/// \~english @code
+/// typedef enum _TFrameworkunifiedLoggerSeverity {
+/// FRAMEWORKUNIFIED_SEVERITY_LOW = 0x0, // all enable(default)
+/// FRAMEWORKUNIFIED_SEVERITY_DEBUG2, // enable FRAMEWORKUNIFIEDLOG_DEBUG() and FRAMEWORKUNIFIEDLOG_DEBUG2() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_DEBUG1, // enable FRAMEWORKUNIFIEDLOG_DEBUG1() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_INFO, // enable FRAMEWORKUNIFIEDLOG_INFO() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_WARN, // enable FRAMEWORKUNIFIEDLOG_WARN() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_ERROR, // enable FRAMEWORKUNIFIEDLOG_ERROR() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_FATAL, // enable FRAMEWORKUNIFIEDLOG_FATAL() and FRAMEWORKUNIFIEDLOG_ALWAYS()
+/// FRAMEWORKUNIFIED_SEVERITY_ALWAYS // enable FRAMEWORKUNIFIEDLOG_ALWAYS()
+/// } TFrameworkunifiedLoggerSeverity;
+/// @endcode
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// - process will not conducted when p_FrameworkunifiedLogParams is NULL.
+/// \~english @par Detail
+/// set the FRAMEWORKUNIFIEDLOG of Application using the parameter set in parameter\n
+/// ZONE_NS_WAR(8), ZONE_NS_ERR(9) will be put-out forcely in the function\n
+/// log will be print out when ForceOutput is set.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogSetFrameworkunifiedLogParams(FRAMEWORKUNIFIEDLOGPARAM *p_FrameworkunifiedLogParams);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogSetProcessName
+/// \~english @par Brief
+/// Sets the name of your application\process based on
+/// the value passed in.
+/// \~english @param [in] p_strProcessName_i
+/// PCSTR - name of your application process.(string array ended by NULL below 20byte)
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// The specified Aplication names are not set in the following cases:
+/// - When the Application name specified in the arguments (p_strProcessName_i) is NULL
+/// - When the Application name specified in the arguments (p_strProcessName_i) is a NULL termination character string of 21 bytes or more
+/// \~english @par Detail
+/// -name in prarameter should be string array(less than 20byte) ended by NULL
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogSetProcessName(PCSTR p_strProcessName_i);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogSetControlMask
+/// \~english @par Brief
+/// Sets the control word that should be logged
+/// \~english @param [in] p_ulNSLogControl_i
+/// TFrameworkunifiedZoneMask - Set mask to the new value.
+/// \~english @par
+/// TFrameworkunifiedZoneMask Array
+/// \~english @code
+/// typedef TFrameworkunifiedZone TFrameworkunifiedZoneMask[ZONE_MASK_ARRAY_ELTS];
+/// @endcode
+/// \~english @par
+/// TFrameworkunifiedZone typedef
+/// \~english @code
+/// UI_32 TFrameworkunifiedZone; // 32bit
+/// @endcode
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// -process will not be conducted when p_ulNSLogControl_i is none
+/// \~english @par Detail
+/// -Sets the control word that should be logged
+/// zone mask(16) will be rewrited using parameter value
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// NsLogGetControlMask
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogSetControlMask(TFrameworkunifiedZoneMask p_ulNSLogControl_i);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogIsZoneSet
+/// \~english @par Brief
+/// check wheather the FRAMEWORKUNIFIEDLOG ZONE is set by your application process.
+/// \~english @param [in] set_zone
+/// UI_32 - checking zone_index
+/// \~english @retval TRUE zone is enable
+/// \~english @retval FALSE zone is disable
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// If the parameter of set_zone is outside(set_zone < 0 or 511 > set_zone), it will return FALSE.
+/// \~english @par Detail
+/// check wheather the FRAMEWORKUNIFIEDLOG ZONE is set by your application process.\n
+/// zone parameter first 4bit(0 to 15)is the index of zone mask array\n
+/// second 5bit(0 to 31) is showing bit position of mask(9bit,511 for the most)\n
+/// True will be returned when bit for zone mask is set as 1
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+BOOL NsLogIsZoneSet(UI_32 set_zone);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogGetControlMask
+/// \~english @par Brief
+/// Get the control word that you currently have set.
+/// \~english @param [out] p_Zonemask_i
+/// TFrameworkunifiedZoneMask - current mask value.
+/// \~english @par
+/// TFrameworkunifiedZoneMask Array
+/// \~english @code
+/// typedef TFrameworkunifiedZone TFrameworkunifiedZoneMask[ZONE_MASK_ARRAY_ELTS];
+/// @endcode
+/// \~english @par
+/// TFrameworkunifiedZone typedef
+/// \~english @code
+/// UI_32 TFrameworkunifiedZone; // 32bit
+/// @endcode
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// - If p_Zonemask_i is NULL, no operation is performed.
+/// \~english @par Detail
+/// Get all 16 zone mask.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// NsLogSetControlMask
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogGetControlMask(TFrameworkunifiedZoneMask p_Zonemask_i);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogSetLogMethod
+/// \~english @par Brief
+/// Sets the logging place, LPRINT, LSHAREDMEM or any combination of these.
+/// If this is never called the default is LSHAREDMEM.
+/// \~english @param [in] p_eMethod_i
+/// UI_8 - Where you would like to log your data.
+/// \~english @par
+/// NS_LoggingMethod_t Enum
+/// \~english @code
+/// typedef enum _NS_LOGGER_METHODS {
+/// LPRINT = 0x01, // Print to the console(similar to printf)
+/// LMSGQ = 0x02, // Disabled
+/// LSLOGGER = 0x04, // Disabled
+/// LSHAREDMEM = 0x08 // Output to shared memory. this is the default logging method.
+/// } NS_LoggingMethod_t;
+/// @endcode
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// -switch the out-put place for NsLog API
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// Sets the logging place, LPRINT, LSHAREDMEM or any combination of these.
+/// If this is never called the default is LSHAREDMEM.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// NsLogGetLogMethod
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogSetLogMethod(UI_8 p_eMethod_i);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogGetLogMethod
+/// \~english @par Brief
+/// Get the logging method.
+/// \~english @param None
+/// \~english @retval - return the way you log your data.
+/// UI_8 - Log data type(NS_LoggingMethod_t Enum).
+/// \~english @par
+/// NS_LoggingMethod_t Enum
+/// \~english @code
+/// typedef enum _NS_LOGGER_METHODS {
+/// LPRINT = 0x01, // Print to the console(similar to printf)
+/// LMSGQ = 0x02, // Disabled
+/// LSLOGGER = 0x04, // Disabled
+/// LSHAREDMEM = 0x08 // Output to shared memory. this is the default logging method.
+/// } NS_LoggingMethod_t;
+/// @endcode
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// Invoke callback function to get the logging method.\n
+/// If callback function is null and expectedCalls is '0',
+/// using default SetSeparator function to get the logging method. \n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// NsLogSetLogMethod
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_8 NsLogGetLogMethod(void);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogInitialize
+/// \~english @par Brief
+/// Initialize the log level and real-time log out-put setting
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// if the getting process of FRAMEWORKUNIFIEDLOG CONFIG file data is failed
+/// \~english @par Detail
+/// Initialize the log level and real-time log out-put setting
+/// if the getting process of FRAMEWORKUNIFIEDLOG CONFIG file data is failed,log
+/// level and real-time log out-put setting will not be initialized
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogInitialize(void);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogSetFrameworkunifiedLogFlag
+/// \~english @par Brief
+/// set LogLevel of FRAMEWORKUNIFIEDLOG flag
+/// \~english @param [in] flag_id
+/// UI_8 - index for FRAMEWORKUNIFIEDLOG flag(0 to FLAG_LIST(declared in FRAMEWORKUNIFIEDLOG CONFIG file)
+/// \~english @param [in] mode
+/// UI_8 - LogLevel
+/// \~english @par
+/// avaliable LogLevel
+/// - FRAMEWORKUNIFIEDLOG_FLAG_MODE_RELEASE
+/// - FRAMEWORKUNIFIEDLOG_FLAG_MODE_DEBUG
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// in the following conditions FRAMEWORKUNIFIEDLOG flag will not be set
+/// - mode is not FRAMEWORKUNIFIEDLOG_FLAG_MODE_RELEASE, FRAMEWORKUNIFIEDLOG_FLAG_MODE_DEBUG
+/// - the getting process of FRAMEWORKUNIFIEDLOG CONFIG file is failed(ns_logger_frameworkunifiedlog_xxx.cfg)
+/// - flag_id is not declared in FRAMEWORKUNIFIEDLOG CONFIG file
+/// \~english @par Detail
+/// set loglevel for specific FRAMEWORKUNIFIEDLOG flag
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// NsLogGetFrameworkunifiedLogFlag
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogSetFrameworkunifiedLogFlag(UI_8 flag_id, UI_8 mode);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogGetFrameworkunifiedLogFlag
+/// \~english @par Brief
+/// get LogLevel of FRAMEWORKUNIFIEDLOG flag
+/// \~english @param [in] flag_id
+/// UI_8 - index for FRAMEWORKUNIFIEDLOG flag(0 to FLAG_LIST(declared in FRAMEWORKUNIFIEDLOG CONFIG file)
+/// \~english @param [out]mode
+/// UI_8 - LogLevel value
+/// \return none
+/// void - there is no return.
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusFail any sort of error occurred
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// -parameter mode is NULL[eFrameworkunifiedStatusFail]
+/// -flag_id is not declared in FRAMEWORKUNIFIEDLOG CONFIG file [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// get FRAMEWORKUNIFIEDLOG flage for specific flag_id
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// NsLogSetFrameworkunifiedLogFlag
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NsLogGetFrameworkunifiedLogFlag(UI_8 flag_id, UI_8 *mode);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogSetRealtimeLog
+/// \~english @par Brief
+/// real-time log output setting
+/// \~english @param [in] mode
+/// UI_8 - set mode for Real time log
+/// \~english @par
+/// available setting for real-time log output
+/// default value is REALTIME_LOG in FRAMEWORKUNIFIEDLOG CFG file
+/// (FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_OFF when FRAMEWORKUNIFIEDLOG CFG file get failed)
+/// \~english @code
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_UART 1 // : UARTOUT
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB 2 // : USB OUT
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB_DISABLE 0x82 // : USB OFF
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER 3 // : Ether OUT
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_OFF 0 // : ALL OFF
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_FREEZE 0xFF // : FREEZE
+/// @endcode
+/// \~english @retval none
+/// void - there is no return
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// -mode is not in FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_XXX above
+/// \~english @par Detail
+/// set the real-time log output using the setting value.\n
+/// need to reboot during ROM start in order to switch to Ethernet output\n
+/// /nv/BS/ns/framework_unified/rwdata/frameworkunifiedlog.ether file will be generated
+/// when mode FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER /nv/BS/ns/framework_unified/rwdata/frameworkunifiedlog.ether\n
+/// and /nv/BS/ns/framework_unified/rwdata/frameworkunifiedlog.ether file will be delated when mode is not FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// NsLogGetRealtimeLog
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogSetRealtimeLog(UI_8 mode);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogGetRealtimeLog
+/// \~english @par Brief
+/// get the setting of real-time log output
+/// \~english @param [out] mode
+/// UI_8 * -the setting of real-time log output
+/// \~english @par
+/// available settings of real-time log output
+/// default value is REALTIME_LOG in FRAMEWORKUNIFIEDLOG CFG file
+/// (FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_OFF when FRAMEWORKUNIFIEDLOG CFG file get failed)
+/// \~english @code
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_UART 1 // : UARTOUT
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB 2 // : USB OUT
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_USB_DISABLE 0x82 // : USB OFF
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_ETHER 3 // : Ether OUT
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_OFF 0 // : ALL OFF
+/// #define FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_FREEZE 0xFF // : FREEZE
+/// @endcode
+/// \~english @retval none
+/// void - there is no return
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// - cannot get when mode is NULL
+/// -FRAMEWORKUNIFIEDLOG_REALTIMELOG_MODE_OFF will be returned when the approach
+/// of FRAMEWORKUNIFIEDLOG CONFIG file (ns_logger_frameworkunifiedlog_xxx.cfg)is failed
+/// \~english @par Detail
+/// get the setting of real-time log output
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// NsLogSetRealtimeLog
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogGetRealtimeLog(UI_8 *mode);
+
+// Deprecated API: Not use.
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogSetSeverity
+/// \~english @par Brief
+/// Set log severity level
+/// \~english @param [in] p_eLogSeverity_i
+/// TFrameworkunifiedLoggerSeverity - Log severity
+/// \~english @par
+/// TFrameworkunifiedLoggerSeverity Enum
+/// \~english @code
+/// typedef enum _TFrameworkunifiedLoggerSeverity {
+/// FRAMEWORKUNIFIED_SEVERITY_LOW = 0x0, /// <all enable(default)
+/// FRAMEWORKUNIFIED_SEVERITY_DEBUG2, /// <enable FRAMEWORKUNIFIEDLOG_DEBUG() and FRAMEWORKUNIFIEDLOG_DEBUG2() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_DEBUG1, /// <enable FRAMEWORKUNIFIEDLOG_DEBUG1() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_INFO, /// <enable FRAMEWORKUNIFIEDLOG_INFO() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_WARN, /// <enable FRAMEWORKUNIFIEDLOG_WARN() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_ERROR, /// <enable FRAMEWORKUNIFIEDLOG_ERROR() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_FATAL, /// <enable FRAMEWORKUNIFIEDLOG_FATAL() and FRAMEWORKUNIFIEDLOG_ALWAYS()
+/// FRAMEWORKUNIFIED_SEVERITY_ALWAYS /// <enable FRAMEWORKUNIFIEDLOG_ALWAYS()
+/// } TFrameworkunifiedLoggerSeverity;
+/// @endcode
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(p_eLogSeverity_i).
+/// \~english @par Detail
+/// Invoke callback function to set log severity.\n
+/// If callback function is null and expectedCalls is '0', using default function to set log severity.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// NsLogGetSeverity
+////////////////////////////////////////////////////////////////////////////////////////////
+void NsLogSetSeverity(TFrameworkunifiedLoggerSeverity p_eLogSeverity_i);
+
+// Deprecated API: Not use.
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogGetSeverity
+/// \~english @par Brief
+/// Get the log severity.
+/// \~english @param none
+/// \~english @retval Log Severity
+/// TFrameworkunifiedLoggerSeverity - Log severity.
+/// \~english @par
+/// TFrameworkunifiedLoggerSeverity Enum
+/// \~english @code
+/// typedef enum _TFrameworkunifiedLoggerSeverity {
+/// FRAMEWORKUNIFIED_SEVERITY_LOW = 0x0, /// <all enable(default)
+/// FRAMEWORKUNIFIED_SEVERITY_DEBUG2, /// <enable FRAMEWORKUNIFIEDLOG_DEBUG() and FRAMEWORKUNIFIEDLOG_DEBUG2() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_DEBUG1, /// <enable FRAMEWORKUNIFIEDLOG_DEBUG1() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_INFO, /// <enable FRAMEWORKUNIFIEDLOG_INFO() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_WARN, /// <enable FRAMEWORKUNIFIEDLOG_WARN() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_ERROR, /// <enable FRAMEWORKUNIFIEDLOG_ERROR() and all the follows
+/// FRAMEWORKUNIFIED_SEVERITY_FATAL, /// <enable FRAMEWORKUNIFIEDLOG_FATAL() and FRAMEWORKUNIFIEDLOG_ALWAYS()
+/// FRAMEWORKUNIFIED_SEVERITY_ALWAYS /// <enable FRAMEWORKUNIFIEDLOG_ALWAYS()
+/// } TFrameworkunifiedLoggerSeverity;
+/// @endcode
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// none
+/// \~english @par Detail
+/// Invoke callback function to get log severity.\n
+/// If callback function is null and expectedCalls is '0', using default function to get log severity.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// NsLogSetSeverity
+////////////////////////////////////////////////////////////////////////////////////////////
+TFrameworkunifiedLoggerSeverity NsLogGetSeverity(void);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLog_EvtCnt
+/// \~english @par Brief
+/// Event and count logger.
+/// \~english @param [in] @param [in] Cnt_Id
+/// UI_16 - ID of counter from comm layer
+/// \~english @param [in] Evt_Id
+/// UI_16 - ID of Event from comm layer
+/// \~english @param [in] n
+/// UI_8 - number of variable arguments inputted
+/// \~english @param [in] arg list
+/// ... - Data arguments(option)
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(Cnt_Id).
+/// - It is an incorrect value(Evt_Id).
+/// - It is an incorrect value(n).
+/// \~english @par Detail
+/// Invoke callback function with argument 'Cnt_Id', 'Evt_Id', 'n' to log.\n
+/// If callback function is null and expectedCalls is '0', using default SetSeparator function to log. \n
+/// In other situation, match and log 'Cnt_Id', 'Evt_Id', 'n'.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+// Deprecated API: Not use.
+void NsLog_EvtCnt( // Line number where message was generated
+ UI_16 Cnt_Id,
+ UI_16 Evt_Id, UI_8 n,
+ ...);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLog_Evt
+/// \~english @par Brief
+/// Event logger mechanism.(Send data to SS event logger Queue)
+/// \~english @param [in] Evt_Id
+/// UI_16 - ID of Event from comm layer
+/// \~english @param [in] nu
+/// UI_8 - number of variable arguments inputted
+/// \~english @param [in] ...
+/// ... - Data arguments
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// - process nothing when Evt_id is in [0 to 0xFF]
+/// - process nothing when nu is not 1 or 4
+/// \~english @par Detail
+/// -send the log event queue to SS(logger mechanism Event)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Fire and Forget
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+// Deprecated API: Not use.
+void NsLog_Evt(UI_16 Evt_Id, UI_8 nu, ...);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLog_Cnt
+/// \~english @par Brief
+/// Counter logger mechanism.(Send data to SS event logger Queue)
+/// \~english @param [in] Cnt_Id
+/// UI_16 - ID of Counter from comm layer
+/// \~english @param [in] nu
+/// UI_8 - number of variable arguments inputted
+/// \~english @param [in] ...
+/// ... - Data arguments
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// - process nothing when Cnt_Id is 0
+/// - process nothing when nu is not 0 or 1
+/// \~english @par Detail
+/// send the log event queue to SS(logger mechanism counter)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Fire and Forget
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+// Deprecated API: Not use.
+void NsLog_Cnt(UI_16 Cnt_Id, UI_8 nu, ...); // Not to use.
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogDetermineLogMethod
+/// \~english @par Brief
+/// Determines the control log method based on the string passed.
+/// If the string passed doesn't match any of the key words:
+/// slogger or msgr or console the method will return a value of
+/// zero. This string may be in the form of the following:
+/// "msgq|console" would cause the output to go to both the NSLog
+/// message queue and the console.
+/// \~english @param [in] output_type
+/// PCSTR - The key words:
+/// \~english @retval 1 ... 0xF Success
+/// \~english @retval 0 the string passed doesn't match any of the key words
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// the string passed doesn't match any of the key words
+/// \~english @par Detail
+/// mask value retruned from application can be used as parameter in NsLogSetLogMethod()
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_8 NsLogDetermineLogMethod(PCSTR output_type);
+
+// Unused API.
+// VOID NsLogEnableRcsLogging(BOOL f_bRCSEnableLogging);
+
+// Private API.
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogGetZoneTextList
+/// \~english @par Brief
+/// Get the zone data list.
+/// \~english @param [out] f_cZoneList
+/// CHAR [][ZONE_TEXT_SIZE] - zone text list(0 ... 511)
+/// \~english @par
+/// PUI_32 - Pointer to preallocated array of CHAR cZones[USER_ZONES_COUNT][ZONE_TEXT_SIZE];
+/// \~english @retval none
+/// VOID - There is no return
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(f_cZoneList) or f_cZoneList is empty.
+/// - Some error occur when get value from f_cZoneList
+/// \~english @par Detail
+/// Invoke callback function to get zone text list.\n
+/// If callback function is null and expectedCalls is '0', using default function to get zone text list.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// NsLogSetZones
+////////////////////////////////////////////////////////////////////////////////////////////
+VOID NsLogGetZoneTextList(CHAR f_cZoneList[][ZONE_TEXT_SIZE]);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogSetZones
+/// \~english @par Brief
+/// set FRAMEWORKUNIFIEDLOG ZONE
+/// \~english @param [in] f_uiZoneCount
+/// UI_32 - number of zone
+/// \~english @param [in] ...
+/// arg_list - zone list (0 ... 511)
+/// \~english @retval none
+/// void - there is no return.
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// - zone value will not over 512
+/// \~english @par Detail
+/// set the specific bit to existed zone mask\n
+/// first 4bit(0 to 15) in zone is the index of zone mask array\n
+/// second 5bit(0 to 31)set the 9bit which shows the bit position of mask(blew 511)\n
+/// eg:in the case of setting three zones=31,30,29, function should be called like NsLogSetZones(3,31,30,29) \n
+/// operation may not be right when parameter shows in arg_list differs with array num in f_uiZoneCount
+///
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Set Get
+/// \~english @see
+/// none
+/////////////////////////////////////////////////////////////////////////////////////
+void NsLogSetZones(UI_32 f_uiZoneCount, ...);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogParseZones
+/// \~english @par Brief
+/// Parse the FRAMEWORKUNIFIEDLOG ZONE.
+/// \~english @param [out] p_FrameworkunifiedLogParams
+/// FRAMEWORKUNIFIEDLOGPARAM * - Input/output FRAMEWORKUNIFIEDLOG parameter
+/// \~english @param [in] f_uiZoneCount
+/// UI_32 - Zone setting
+/// \~english @param [in] ...
+/// arg_list - Zone lists (zone values are 0 to 511)
+/// \~english @par
+/// FRAMEWORKUNIFIEDLOGPARAM structures
+/// \~english @code
+/// typedef struct _FRAMEWORKUNIFIEDLOGPARAM {
+/// UI_8 uiLogOptions; // Log output location (ref NS_LoggingMethod_t)
+/// CHAR cZones[USER_ZONES_COUNT][ZONE_TEXT_SIZE]; // ZONE_TEXT_10 ... ZONE_TEXT_n
+/// TFrameworkunifiedZoneMask uiZoneMask; // ZONEMASK(10)...ZONEMASK(n) (ref TFrameworkunifiedZone)
+/// TFrameworkunifiedLoggerSeverity eSeverity; // Logging level (ref TFrameworkunifiedLoggerSeverity)
+/// } FRAMEWORKUNIFIEDLOGPARAM, *LPFRAMEWORKUNIFIEDLOGPARAM;
+/// @endcode
+/// \~english @retval none
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// In the FRAMEWORKUNIFIEDLOG parameter (p_FrameworkunifiedLogParams) specified in the arguments,\n
+/// add (or) all masked values of the zone lists specified by the arguments.
+/// \~english @par Classification
+/// Public
+/// \~english @see
+/// none
+/////////////////////////////////////////////////////////////////////////////////////
+void NsLogParseZones(FRAMEWORKUNIFIEDLOGPARAM *p_FrameworkunifiedLogParams, UI_32 f_uiZoneCount, ...);
+
+// Unused API.
+// VOID NsRcsSendTraceData(PCHAR f_pData, UI_32 f_len);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSLogGetFrameworkunifiedlogFileTotalNum
+/// \~english @par Brief
+/// get total number of log file
+/// \~english @retval num
+/// UI_32 - Total numger of frameworkunifiedlog files.
+/// \~english @par Prerequisite
+/// set log file using NsLogSetFrameworkunifiedLogParams
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// get total number of log file
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 NSLogGetFrameworkunifiedlogFileTotalNum(void);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSLogGetFrameworkunifiedlogFileName
+/// \~english @par Brief
+/// get the name of log file
+/// \~english @param [in] index
+/// UI_32 - Index of a list of frameworkunifiedlog file names.(0 to NSLogGetFrameworkunifiedlogFileTotalNum()-1)
+/// \~english @retval file name -file with specific index is exsisted
+/// \~english @retval NULL -file with specific index is not exsisted
+/// \~english @par Prerequisite
+/// set log file using NsLogSetFrameworkunifiedLogParams
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// file with specific index is not exsisted
+/// \~english @par Detail
+/// get the file name with specific index is not exsisted
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No macth
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR NSLogGetFrameworkunifiedlogFileName(UI_32 index);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSLogGetFrameworkunifiedlogFileName
+/// \~english @par Brief
+/// get index of log file
+/// \~english @param [in] filename
+/// PCSTR - Name of frameworkunifiedlog file.
+/// \~english @retval 0 log file specific logfile is not exsisted
+/// \~english @retval index of log file specific logfile is exsisted
+/// \~english @par Prerequisite
+/// set log file using NsLogSetFrameworkunifiedLogParams
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// process nothing when file name is NULL
+/// process nothing when file name is not exsisted
+/// \~english @par Detail
+/// get index of log file
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+int NSLogGetFrameworkunifiedlogIndex(PCSTR filename);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsForceClose
+/// \~english @par Brief
+/// clear log forcely.
+/// \~english @retval none
+/// return void
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// -clear log forcely.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////
+VOID NsForceClose(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief extern FRAMEWORKUNIFIEDLOG parameter
+///////////////////////////////////////////////////////////////////////////////
+/// Global variable that's used by the Native Services Logger.
+/// An application will setup this variable in their main,
+/// values are user defined and provide user control of what
+/// should and shouldn't get logged.
+/// \code
+/// FRAMEWORKUNIFIEDLOGPARAM g_FrameworkunifiedLogParams =
+/// {
+/// FRAMEWORKUNIFIEDLOGOPTIONS,
+/// {
+/// ZONE_TEXT_10, ZONE_TEXT_11, ZONE_TEXT_12,
+/// ZONE_TEXT_13, ZONE_TEXT_14, ZONE_TEXT_15,
+/// ZONE_TEXT_16, ZONE_TEXT_17, ZONE_TEXT_18,
+/// ZONE_TEXT_19, ZONE_TEXT_20, ZONE_TEXT_21,
+/// ZONE_TEXT_22, ZONE_TEXT_23, ZONE_TEXT_24,
+/// ZONE_TEXT_25, ZONE_TEXT_26, ZONE_TEXT_27,
+/// ZONE_TEXT_28, ZONE_TEXT_29, ZONE_TEXT_30,
+/// ZONE_TEXT_31, ZONE_TEXT_32, ZONE_TEXT_33,
+/// ZONE_TEXT_34, ZONE_TEXT_35, ZONE_TEXT_36,
+/// ZONE_TEXT_37, ZONE_TEXT_38, ZONE_TEXT_39,
+/// ZONE_TEXT_40, ZONE_TEXT_41, ZONE_TEXT_42,
+/// ZONE_TEXT_43, ZONE_TEXT_44, ZONE_TEXT_45,
+/// ZONE_TEXT_46, ZONE_TEXT_47, ZONE_TEXT_48,
+/// ZONE_TEXT_49, ZONE_TEXT_50, ZONE_TEXT_51,
+/// ZONE_TEXT_52, ZONE_TEXT_53, ZONE_TEXT_54,
+/// ZONE_TEXT_55
+/// },
+/// FRAMEWORKUNIFIEDLOGZONES
+/// };
+/// \endcode
+///
+
+/// if FRAMEWORKUNIFIEDLOGZONES not defined in makefile
+#ifndef FRAMEWORKUNIFIEDLOGZONES
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief g_FrameworkunifiedLogParams
+/// if FRAMEWORKUNIFIEDLOGZONES not defined in makefile
+///////////////////////////////////////////////////////////////////////////////
+#define FRAMEWORKUNIFIEDLOGZONES {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup FRAMEWORKUNIFIED_SET_ZONES
+/// \~english @par Brief
+/// This macro API register FRAMEWORKUNIFIEDLOGAPPZONES.
+/// \~english @retval none
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// in main() function use macro FRAMEWORKUNIFIED_SET_ZONES() before FrameworkunifiedDispatcher()
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// NsLogSetFrameworkunifiedLogParams
+///////////////////////////////////////////////////////////////////////////////
+#define FRAMEWORKUNIFIED_SET_ZONES() {UI_32 LogArr[] = {FRAMEWORKUNIFIEDLOGAPPZONES}; \
+ NsLogParseZones(&g_FrameworkunifiedLogParams, (UI_32)_countof(LogArr), FRAMEWORKUNIFIEDLOGAPPZONES); \
+ NsLogSetFrameworkunifiedLogParams(&g_FrameworkunifiedLogParams);}
+#else
+#warning "Zones defined by FRAMEWORKUNIFIEDLOGAPPZONES are overridden by FRAMEWORKUNIFIEDLOGZONES"
+#define FRAMEWORKUNIFIED_SET_ZONES() NsLogSetFrameworkunifiedLogParams(&g_FrameworkunifiedLogParams)
+#endif
+
+#define ZONE_END UINT_MAX
+// Unused API
+// #define CHECK_SEVERITY_LEVEL(sev_level) ((sev_level) >= NsLogGetSeverity())
+// If value of BITS_IN_TZONE changes in future then need to consider changes in the values 5 and 0x1F in below macros
+// here 5 represents (sizeof(TFrameworkunifiedZone)+1) and 0x1F represents (BITS_IN_TZONE-1)
+#define GET_ZONE_INDEX(zone) (((UI_32)zone) >> 5)
+#define GET_ZONE_BIT_MASK(zone) ((TFrameworkunifiedZone)(1U << (((UI_32)zone) & 0x1F)))
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup ZONEMASK
+/// \~english @par Brief
+/// the Macro for zone index mask
+/// \~english @param [in] n
+/// zone index
+/// \~english @retval num
+/// UI_32 - zone index
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - none
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// mask the zone index
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////////
+#define ZONEMASK( n ) ((TFrameworkunifiedZone)( n ))
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup IS_ZONE_SET
+/// \~english @par Brief
+/// check wheather the FRAMEWORKUNIFIEDLOG ZONE is set by your application process.
+/// \~english @param [in] set_zone
+/// UI_32 - checking zone_index
+/// \~english @retval TRUE zone is enable
+/// \~english @retval FALSE zone is disable
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// Checks if the FRAMEWORKUNIFIEDLOG ZONE can be configured by Application processes.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// NsLogIsZoneSet
+////////////////////////////////////////////////////////////////////////////////////////////////
+#define IS_ZONE_SET(set_zone) (NsLogIsZoneSet(set_zone) == TRUE)
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup FRAMEWORKUNIFIEDLOG
+/// \~english @par Brief
+/// Developers should use the FRAMEWORKUNIFIEDLOG for logging.
+/// \~english @param [in] zone
+/// Defined zone in a process (e.g. ZONE_FUNC)
+/// \~english @param [in] funcname
+/// Name of the class or method where the log was written (e.g. "main")
+/// \~english @param [in] print_fmt
+/// string similar to that of a printf statement
+/// \~english @param [in] args
+/// Data arguments(option)
+/// \~english @retval none
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If print_fmt is NULL, no operation is performed.
+/// \~english @par Detail
+/// FRAMEWORKUNIFIEDLOG is simple macro to make it easy to log messages from any point in your code.
+/// This macro has smarts that does fast checks to determine if your log should or shouldn't be printed.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// ZONEMASK, IS_ZONE_SET, NsLog, NsLog0
+///////////////////////////////////////////////////////////////////////////////
+#ifndef _FRAMEWORKUNIFIEDLOG_ZONE_FUNC_ENABLE_
+#define FRAMEWORKUNIFIEDLOG(zone, funcname, print_fmt, args...)\
+ (zone != ZONEMASK(11))?((IS_ZONE_SET(zone))?TEXT_ZONE(zone, funcname, print_fmt, ## args):((void)0)):((void)(0))
+#else // _FRAMEWORKUNIFIEDLOG_ZONE_FUNC_ENABLE_
+#define FRAMEWORKUNIFIEDLOG(zone, funcname, print_fmt, args...)\
+ ((IS_ZONE_SET(zone)) ? TEXT_ZONE(zone, funcname, print_fmt, ## args) : ((void)0))
+#endif // _FRAMEWORKUNIFIEDLOG_ZONE_FUNC_ENABLE_
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \~english @par Brief
+/// This is the log output macro for clock display in milliseconds.
+/// \~english @param [in] zone
+/// Zone indexes to be checked
+/// \~english @param [in] str
+/// Log output string
+/// \~english @retval none
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// A simple macro for logging messages in milliseconds from any point in the source code.\n
+/// The log is output in the following format. "Hours:Minutes:Seconds.Milliseconds/=log-output-string"
+/// \~english @par Classification
+/// Public
+/// \~english @see
+/// IS_ZONE_SET
+///
+////////////////////////////////////////////////////////////////////////////////////////////////
+#define FRAMEWORKUNIFIEDLOG_TIME(zone, str)\
+ ((IS_ZONE_SET(zone))?NsLogTime(zone, str):((void)(0)))
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \~english @par Brief
+/// This is a simplified version of the log output macro.
+/// \~english @param [in] zone
+/// Zone indexes to be checked
+/// \~english @param [in] data
+/// Log output data
+/// \~english @param [in] size
+/// Size of the log output data
+/// \~english @retval none
+/// \~english @par Prerequisite
+/// - none
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// A simple macro for logging messages from any point in the source code.\n
+/// \ref The macro FRAMEWORKUNIFIEDLOG can specify variable argument lists for log output data,
+/// but the macro is a macro that specifies only data character strings.
+/// \~english @par Classification
+/// Public
+/// \~english @see
+/// IS_ZONE_SET, NsLogData
+///
+////////////////////////////////////////////////////////////////////////////////////////////////
+#define FRAMEWORKUNIFIEDLOG_DATA(zone, data, size)\
+ ((IS_ZONE_SET(zone))?NsLogData(zone, data, size):((void)(0)))
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief FRAMEWORKUNIFIEDLOG_EVTCNT
+///////////////////////////////////////////////////////////////////////////////
+/// Deprecated API. Not use.
+#define FRAMEWORKUNIFIEDLOG_EVTCNT(zone, CntId, EvtId, n...) NsLog_EvtCnt(CntId, EvtId, ##n)
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief FRAMEWORKUNIFIEDLOG_EVT
+///////////////////////////////////////////////////////////////////////////////
+/// Event logger mechanism.(Send data to SS event logger Queue)
+/// \note The ZONE is not used.
+///
+/// \param [in] zone
+/// Defined zone in a process (e.g. ZONE_FUNC)
+/// \param [in] EvtId
+/// UI_16 - ID of Event from comm layer
+/// \param [in] n
+/// UI_8 - number of variable arguments inputted
+///////////////////////////////////////////////////////////////////////////////
+/// Deprecated API. Not use.
+#define FRAMEWORKUNIFIEDLOG_EVT(zone, EvtId, n...) NsLog_Evt(EvtId, ##n)
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief FRAMEWORKUNIFIEDLOG_CNT
+///////////////////////////////////////////////////////////////////////////////
+/// Counter logger mechanism.(Send data to SS event logger Queue)
+/// \note The ZONE is not used.
+///
+/// \param [in] zone
+/// Defined zone in a process (e.g. ZONE_FUNC)
+/// \param [in] CntId
+/// UI_16 - ID of Event from comm layer
+/// \param [in] n
+/// UI_8 - number of variable arguments inputted
+////////////////////////////////////////////////////////////////////////////////////////////
+/// Deprecated API. Not use.
+#define FRAMEWORKUNIFIEDLOG_CNT(zone, CntId, n...) NsLog_Cnt(CntId, ##n) // Not to use
+
+/// Deprecated API. Not use.
+#define TEXT(funcname, args...) TEXT_ZONE(BITS_IN_ZONE_MASK, funcname, ## args)
+
+// Unused API
+// #define TEXT0(funcname, print_fmt ) NsLog(__LINE__, BITS_IN_ZONE_MASK, funcname, print_fmt)
+
+#define GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \
+ _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, \
+ _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, \
+ _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, \
+ _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, \
+ _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, \
+ _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, \
+ _71, _72, _73, _74, _75, _76, _77, _78, NAME, ...) NAME
+#define NsLogFunc(...)\
+ GET_MACRO(__VA_ARGS__, \
+ NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, \
+ NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, \
+ NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, \
+ NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, \
+ NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, \
+ NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, \
+ NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, \
+ NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog, NsLog0)
+#define TEXT_ZONE(zone_index, funcname, ...)\
+ NsLogFunc(__VA_ARGS__)(__LINE__, zone_index, funcname, __VA_ARGS__)
+
+/// Deprecated API. Not use.
+#define TEXT_EVTCNT(CntId, EvtId, n...) NsLog_EvtCnt(CntId, EvtId, ##n)
+/// Deprecated API. Not use
+#define TEXT_EVT(EvtID, n...) NsLog_Evt(EvtID, ##n)
+/// Deprecated API. Not use.
+#define TEXT_CNT(CntId, n...) NsLog_Cnt(CntId, ##n)
+/// Used to log data that contains trailing arguments \n
+/// Example: FRAMEWORKUNIFIEDLOG0(ZONE_INFO, __FUNCTION__, "testers return value is [%d]!", rtnValue);
+
+
+/// Deprecated API. Use FRAMEWORKUNIFIEDLOG instead.
+#define FRAMEWORKUNIFIEDLOG0 FRAMEWORKUNIFIEDLOG
+
+
+/// Note: These bits are reserved for Framework logging and debugging
+#define ZONE_NS_FUNC ZONEMASK(0)
+#define ZONE_NS_DIS ZONEMASK(1)
+#define ZONE_NS__CWORD77_ ZONEMASK(2)
+#define ZONE_NS_IMP_INFO ZONEMASK(3)
+#define ZONE_NS_SM_DEV_INFO ZONEMASK(4)
+#define ZONE_NS_SM_USR_INFO ZONEMASK(5)
+#define ZONE_NS_INFO ZONEMASK(6)
+#define ZONE_NS_DEBUG_DUMP ZONEMASK(7)
+#define ZONE_NS_WAR ZONEMASK(8)
+#define ZONE_NS_ERR ZONEMASK(9)
+#define ZONE_DEBUG_DUMP ZONE_NS_DEBUG_DUMP
+
+#define ZONE_TEXT_0 "NS_Func"
+#define ZONE_TEXT_1 "NS_Dispatcher"
+#define ZONE_TEXT_2 "NS__CWORD77_"
+#define ZONE_TEXT_3 "NS_Reserved"
+#define ZONE_TEXT_4 "NS_StateMachine_Dev"
+#define ZONE_TEXT_5 "NS_StateMachine_Usr"
+#define ZONE_TEXT_6 "NS_Info"
+#define ZONE_TEXT_7 "NS_Debug_Dump"
+#define ZONE_TEXT_8 "NS_Warning"
+#define ZONE_TEXT_9 "NS_Error"
+
+////
+// Following is old definitions. Only for compile.
+// Specific ZONE to use the ns_logger_frameworkunifiedlog.cfg
+// If possible, following Specific ZONE difinitions shall be delete.
+////
+// Special ZONE(64)-(95)
+/// Note: These bits are reserved for special ZONE
+#define ZONE_PERFORMANCE ZONEMASK(64)
+#define ZONE_SCREEN_TRANS ZONEMASK(65)
+#define ZONE_SWDL ZONEMASK(66)
+#define ZONE_SYSTEMDATA ZONEMASK(67)
+#define ZONE_LOG_SH ZONEMASK(68)
+#define ZONE_LOG_SYS ZONEMASK(69)
+#define ZONE_LOG__CWORD52_ ZONEMASK(70)
+#define ZONE_SECURE ZONEMASK(71)
+#define ZONE_CAN_FILTER ZONEMASK(72)
+#define ZONE_COMM_PROCESS ZONEMASK(73)
+#define ZONE_CONNECT_DEVICE ZONEMASK(74)
+#define ZONE_SP_ZONE_75 ZONEMASK(75)
+#define ZONE_SP_ZONE_76 ZONEMASK(76)
+#define ZONE_SP_ZONE_77 ZONEMASK(77)
+#define ZONE_SP_ZONE_78 ZONEMASK(78)
+#define ZONE_SP_ZONE_79 ZONEMASK(79)
+#define ZONE_SP_ZONE_80 ZONEMASK(80)
+#define ZONE_SP_ZONE_81 ZONEMASK(81)
+#define ZONE_SP_ZONE_82 ZONEMASK(82)
+#define ZONE_SP_ZONE_83 ZONEMASK(83)
+#define ZONE_SP_ZONE_84 ZONEMASK(84)
+#define ZONE_SP_ZONE_85 ZONEMASK(85)
+#define ZONE_SP_ZONE_86 ZONEMASK(86)
+#define ZONE_SP_ZONE_87 ZONEMASK(87)
+#define ZONE_SP_ZONE_88 ZONEMASK(88)
+#define ZONE_SP_ZONE_89 ZONEMASK(89)
+#define ZONE_SP_ZONE_90 ZONEMASK(90)
+#define ZONE_SP_ZONE_91 ZONEMASK(91)
+#define ZONE_SP_ZONE_92 ZONEMASK(92)
+#define ZONE_SP_ZONE_93 ZONEMASK(93)
+#define ZONE_SP_ZONE_94 ZONEMASK(94)
+#define ZONE_SP_ZONE_95 ZONEMASK(95)
+
+// Special ZONE(96)-(127) (console off)
+/// Note: These bits are reserved for special ZONE
+#define ZONE_COMM_SYS ZONEMASK(96)
+#define ZONE_COMM_SH ZONEMASK(97)
+#define ZONE_COMM_USB ZONEMASK(98)
+#define ZONE_SP_ZONE_99 ZONEMASK(99)
+#define ZONE_SP_ZONE_100 ZONEMASK(100)
+#define ZONE_SP_ZONE_101 ZONEMASK(101)
+#define ZONE_SP_ZONE_102 ZONEMASK(102)
+#define ZONE_SP_ZONE_103 ZONEMASK(103)
+#define ZONE_SP_ZONE_104 ZONEMASK(104)
+#define ZONE_SP_ZONE_105 ZONEMASK(105)
+#define ZONE_SP_ZONE_106 ZONEMASK(106)
+#define ZONE_SP_ZONE_107 ZONEMASK(107)
+#define ZONE_SP_ZONE_108 ZONEMASK(108)
+#define ZONE_SP_ZONE_109 ZONEMASK(109)
+#define ZONE_SP_ZONE_110 ZONEMASK(110)
+#define ZONE_SP_ZONE_111 ZONEMASK(111)
+#define ZONE_SP_ZONE_112 ZONEMASK(112)
+#define ZONE_SP_ZONE_113 ZONEMASK(113)
+#define ZONE_SP_ZONE_114 ZONEMASK(114)
+#define ZONE_SP_ZONE_115 ZONEMASK(115)
+#define ZONE_SP_ZONE_116 ZONEMASK(116)
+#define ZONE_SP_ZONE_117 ZONEMASK(117)
+#define ZONE_SP_ZONE_118 ZONEMASK(118)
+#define ZONE_SP_ZONE_119 ZONEMASK(119)
+#define ZONE_SP_ZONE_120 ZONEMASK(120)
+#define ZONE_SP_ZONE_121 ZONEMASK(121)
+#define ZONE_SP_ZONE_122 ZONEMASK(122)
+#define ZONE_SP_ZONE_123 ZONEMASK(123)
+#define ZONE_SP_ZONE_124 ZONEMASK(124)
+#define ZONE_SP_ZONE_125 ZONEMASK(125)
+#define ZONE_SP_ZONE_126 ZONEMASK(126)
+#define ZONE_SP_ZONE_127 ZONEMASK(127)
+
+#endif /* __NATIVESERVICES_LOGGER_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_mc_system_info.h b/nsframework/framework_unified/client/include/native_service/ns_mc_system_info.h
new file mode 100644
index 00000000..b61268aa
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_mc_system_info.h
@@ -0,0 +1,103 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSMessageCenter
+/// \brief Native Services Special Interfaces
+///
+///
+///
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NS_MC_SYSTEM_INFO_H_
+#define FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NS_MC_SYSTEM_INFO_H_
+
+
+#include <native_service/ns_msgs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSMessageCenter
+/// McSendWithSysInfo
+/// Sends data to a message queue, user defined system info.
+///
+/// \param [in] hMessage
+/// HANDLE - handle to the send message queue, McOpenSender
+/// \param [in] source
+/// LPCSTR - app (You) the sender
+/// \param [in] cmd
+/// UI_32 - command id aka the message that's being sent
+/// \param [in] sysInfo
+/// PCHAR - pointer to sysInfo data that will be placed in the header of the message.
+/// \param [in] length
+/// UI_32 - length of the data buffer provided
+/// \param [in] data
+/// void* - pointer to the data to be sent
+///
+/// \return EFrameworkunifiedStatus
+/// status -
+/// indicates if the message was sent successfully
+/// success >> (eFrameworkunifiedStatusOK)
+/// failure >> (anything else)
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McSendWithSysInfo(HANDLE hMessage, PCSTR source, UI_32 cmd, PCHAR sysInfo, UI_32 length, PCVOID data,
+ UI_32 sessionid);
+
+// EFrameworkunifiedStatus McSendWithSysInfoWithSession(HANDLE hMessage, PCSTR source,
+// UI_32 cmd, PCHAR sysInfo, UI_32 length, PCVOID data, UI_32 sessionid);
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSMessageCenter
+/// McSendWithSysInfo
+/// Sends data to a message queue, user defined system info.
+///
+/// \param [in] hMessage
+/// HANDLE - handle to the send message queue, McOpenSender
+/// \param [in] source
+/// LPCSTR - app (You) the sender
+/// \param [in] cmd
+/// UI_32 - command id aka the message that's being sent
+/// \param [in] sysInfo
+/// PCHAR - pointer to sysInfo data that will be placed in the header of the message.
+/// \param [in] length
+/// UI_32 - length of the data buffer provided
+/// \param [in] data
+/// void* - pointer to the data to be sent
+/// \param [in] priority
+/// EFrameworkunifiedMessagePriorties - various Message Priorities that a process can assign.
+///
+/// \return EFrameworkunifiedStatus
+/// status -
+/// indicates if the message was sent successfully
+/// success >> (eFrameworkunifiedStatusOK)
+/// failure >> (anything else)
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McSendPrioWithSysInfo(HANDLE hMessage, PCSTR source, UI_32 cmd, PCSTR sysInfo, UI_32 length, PCVOID data,
+ EFrameworkunifiedMessagePriorties priority, UI_32 sessionid);
+
+// EFrameworkunifiedStatus McSendPrioWithSysInfoWithSession(HANDLE hMessage, PCSTR source,
+// UI_32 cmd, PCSTR sysInfo, UI_32 length, PCVOID data, EFrameworkunifiedMessagePriorties priority, UI_32 sessionid);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NS_MC_SYSTEM_INFO_H_
diff --git a/nsframework/framework_unified/client/include/native_service/ns_message_center_if.h b/nsframework/framework_unified/client/include/native_service/ns_message_center_if.h
new file mode 100644
index 00000000..cfd350f6
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_message_center_if.h
@@ -0,0 +1,1536 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file
+ * @brief \~english APIs to Open/Close and Send/Receive on message queues and shared memory.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_MESSAGE_CENTER_IF_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_MESSAGE_CENTER_IF_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_shared_mem_if.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McOpenReceiver
+/// \~english @par Brief
+/// Opens a handle to a Receiver message queue.
+/// \~english @param[in] name
+/// PCSTR - name of the message queue you want to receiver messages on
+/// \~english @retval Handle to a recevier's message queue (If INVALID_HANDLE is returned its an error)
+/// \~english @par Preconditons
+/// - none
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Size of message queue name string specified by argument(name) is larger then 20byte. [NULL]
+/// - Message queue name specified by argument(name) is NULL. [NULL]
+/// - Size of name normalised from argument(name) for message queue is larger then 15byte[16byte when starts with
+/// "/"]. [NULL]
+/// - Failed to create(malloc) buffer to storage name normalised from argument(name) for message queue. [NULL]
+/// - Failed to get(mq_open) message queue. [NULL]
+/// - Failed to create(malloc) buffer to storage management information of message queue. [NULL]
+/// \~english @par Detail
+/// Create a message queue whose name is specified by argument, and return a handle for receiving message. \n
+/// The message queue created in this API is used to receive message, but not to send message. \n
+/// You can use message queue in McOpenSender to send message.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenSender, McReceive, McClose
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE McOpenReceiver(PCSTR name);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McOpenReceiverNotBlocked
+/// \~english @par Brief
+/// Opens a handle to a Receiver message queue. Operations on this queue are
+/// non-blocking if queue is empty or full.
+/// \~english @param[in] name
+/// PCSTR - name of the message queue you want to receiver messages on
+/// \~english @retval Handle to a recevier's message queue (If INVALID_HANDLE is returned its an error)
+/// \~english @par Preconditons
+/// - none
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Size of message queue name string specified by argument(name) is larger then 20byte. [NULL]
+/// - Message queue name specified by argument(name) is NULL. [NULL]
+/// - Size of name normalised from argument(name) for message queue is larger then 15byte[16byte when starts with
+/// "/"]. [NULL]
+/// - Failed to create(malloc) buffer to storage name normalised from argument(name) for message queue. [NULL]
+/// - Failed to get(mq_open) message queue. [NULL]
+/// - Failed to create(malloc) buffer to storage management information of message queue. [NULL]
+/// \~english @par Detail
+/// Create a message queue whose name is specified by argument, and return a handle for receiving message. \n
+/// The message queue created in this API is used to receive message, but not to send message. \n
+/// You can use message queue in McOpenSender to send message.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenSender, McReceive, McClose, McOpenSenderNotBlocked
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE McOpenReceiverNotBlocked(PCSTR name);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McOpenSyncReceiver
+/// \~english @par Brief
+/// Opens a handle to a response Receiver message queue.
+/// \~english @param[in] name
+/// PCSTR - name of the message queue you want to receiver messages on
+/// \~english @retval Handle to a recevier's message queue (If INVALID_HANDLE is returned its an error)
+/// \~english @par Preconditons
+/// - none
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Size of message queue name string specified by argument(name) is larger then 20byte. [NULL]
+/// - Message queue name specified by argument(name) is NULL. [NULL]
+/// - Size of name normalised from argument(name) for message queue(don't start with "/") is larger then 19byte.
+/// [NULL]
+/// - Size of name normalised from argument(name) for message queue(start with "/") is larger then 20byte. [NULL]
+/// - Failed to create(malloc) buffer to storage name normalised from argument(name) for message queue. [NULL]
+/// - Failed to get(mq_open) message queue. [NULL]
+/// - Failed to create(malloc) buffer to storage management information of message queue. [NULL]
+/// \~english @par Detail
+/// Create a message queue whose name is specified by argument, and return a handle for receiving message
+/// by synchronous communication.
+/// \~english @par
+/// This API provides the inter-process communication function by the message queue for the application
+/// which does not use the inter-process communication by NS Framework Dispatcher.
+/// \~english @par
+/// When the application used the message queue acquired by this API, note the following.
+/// - Use McCreateInvokerName to obtain the receive message queue handle to be passed to the parameter name.
+/// - It can not be used transmission because it is for reception.
+/// McOpenSender must be used for the message queue trasmission.
+/// - Cannot be used other than for waiting for response during synchronous communication.
+/// (because the maxmum number of messages in the queue is specified as 2)
+/// - When a message queue name (name) that has not been normalized is specified, transmission falis unless 18 byte are specified.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McCreateInvokerName, McInvokeSync, McClose
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE McOpenSyncReceiver(PCSTR name);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McOpenSender
+/// \~english @par Brief
+/// The opens a handle for sending messages to another message queue.
+/// \~english @param[in] name
+/// PCSTR - name of the message queue you want to send messages too
+/// \~english @retval Handle for sending messages to a queue (If INVALID_HANDLE is returned its an error)
+/// \~english @par Preconditons
+/// - none
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Size of message queue name string specified by argument(name) is larger then 20byte. [NULL]
+/// - Message queue name specified by argument(name) is NULL. [NULL]
+/// - Size of name normalised from argument(name) for message queue is larger then 15byte[16byte when starts with
+/// "/"]. [NULL]
+/// - Failed to create(malloc) buffer to storage name normalised from argument(name) for message queue. [NULL]
+/// - Failed to get(mq_open) message queue. [NULL]
+/// - Failed to create(malloc) buffer to storage management information of message queue. [NULL]
+/// \~english @par Detail
+/// Create a message queue whose name is specified by argument, and return a handle for sending message. \n
+/// The message queue created in this API is used to send message, but not to receive message. \n
+/// You can use message queue in McOpenReceiver to receive message.
+/// \~english @par
+/// This API provides the inter-process communication function by the message queue for the application
+/// which does not use the inter-process communication by NS Framework Dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenReceiver, McSend, McClose
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE McOpenSender(PCSTR name);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// The opens a handle for sending messages to another message queue.
+/// operations on this queue are non-blocking if queue is empty or full.
+///
+/// \param [in] name
+/// PCSTR - name of the message queue you want to send messages too
+///
+/// \return HANDLE
+/// handle - for sending messages to a queue (If INVALID_HANDLE is returned its an error)
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE McOpenSenderNotBlocked(PCSTR name);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McOpenSyncSender
+/// \~english @par Brief
+/// The opens a handle for sending responce to another message queue.
+/// \~english @param[in] name
+/// PCSTR - name of the message queue you want to send messages too
+/// \~english @retval Handle for sending response to a queue (If INVALID_HANDLE is returned its an error)
+/// \~english @par Preconditons
+/// - none
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Size of message queue name string specified by argument(name) is larger then 20byte. [NULL]
+/// - Message queue name specified by argument(name) is NULL. [NULL]
+/// - Size of name normalised from argument(name) for message queue(don't start with "/") is larger then 19byte.
+/// [NULL]
+/// - Size of name normalised from argument(name) for message queue(start with "/") is larger then 20byte. [NULL]
+/// - Failed to create(malloc) buffer to storage name normalised from argument(name) for message queue. [NULL]
+/// - Failed to get(mq_open) message queue. [NULL]
+/// - Failed to create(malloc) buffer to storage management information of message queue. [NULL]
+/// \~english @par Detail
+/// Create a message queue whose name is specified by argument, and return a handle for sending message. \n
+/// The message queue created in this API is used to send message, but not to receive message. \n
+/// You can use message queue in McOpenReceiver to receive message.
+/// \~english @par
+/// This API provides the inter-process communication function by the message queue for the application
+/// which does not use the inter-process communication by NS Framework Dispatcher.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenReceiver, McSend, McClose
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE McOpenSyncSender(PCSTR name);
+
+/////////////////////////////////////////
+#include <pthread.h>
+HANDLE McOpenSenderChild(PCSTR name, pthread_t childid);
+/////////////////////////////////////////
+
+/////////////////////////////////////////
+EFrameworkunifiedStatus McJoinChild(HANDLE hChildApp);
+/////////////////////////////////////////
+
+/////////////////////////////////////////
+EFrameworkunifiedStatus McGetChildThreadPriority(HANDLE hChildApp, PSI_32 threadPrio);
+/////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McReceive
+/// \~english @par Brief
+/// Retrieves data from a message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the recvMessage, McOpenRecevier
+/// \~english @param[out] source
+/// PSTR - app that sent this message
+/// \~english @param[out] cmd
+/// UI_32* - command message that has been received.
+/// \~english @param[in] length
+/// UI_32 - length of the data buffer provided
+/// \~english @param[out] data
+/// PVOID - pointer to the data to be received
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was sent successfully
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBuf - Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName - Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusInvldParam - Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF - Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR - An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize - Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail - Invalid handle of message queue for receiving message
+/// \~english @par Preconditons
+/// Message queue(McOpenReceiver etc.) for receiving message is created.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Data buffer specified by argument(data) for receiving message is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Size of data buffer specified by argument(length) for receiving message is 0. [eFrameworkunifiedStatusInvldBuf]
+/// - Buffer to storage application name specified by argument(source) for sending message is NULL.
+/// [eFrameworkunifiedStatusInvldQName]
+/// - Buffer to storage commond ID of protocol on the service specified by argument(cmd) is NULL.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Size of application name of sender getted from received message is lager then 20byte. [eFrameworkunifiedStatusInvldBuf]
+/// - Handle specified by argument(hMessage) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified by argument(hMessage) is not appropriate(which is invalid). [eFrameworkunifiedStatusFail]
+/// - Message queue type of handle specified by argument(hMessage) is not receiving type. [eFrameworkunifiedStatusFail]
+/// - File descriptor for receiving message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - An interrupt is generated by the system call (signal) when receiving message. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of buffer for receiving message is invalid. [eFrameworkunifiedStatusInvldBufSize]
+/// \~english @par Detail
+/// Receives data from message queue specified by argument.
+/// Sets application of sender(source), commond ID of protocol on the service(cmd), receiving data(data), and
+/// return.
+/// It will block until getting message from message queue.
+/// \~english @par
+/// This API provides the inter-process communication function by the message queue for the application
+/// which does not use the inter-process communication by NS Framework Dispatcher.
+/// \~english @par
+/// Since data is exchanged only in the message queue, the data size that can be received is up to 4096 bytes.
+/// \~english @par
+/// The caller must guarantee the allocation of the area for the receive data buffer
+/// and the consistency of the sizes set in the arguments.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenReceiver, McSend
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McReceive(HANDLE hMessage, PSTR source, UI_32 *cmd, UI_32 length, PVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McReceiveWithSession
+/// \~english @par Brief
+/// Retrieves data from a message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the recvMessage, McOpenRecevier
+/// \~english @param[out] source
+/// PSTR - app that sent this message
+/// \~english @param[out] cmd
+/// UI_32* - command message that has been received.
+/// \~english @param[out] sessionid
+/// UI_32* - Session ID
+/// \~english @param[in] length
+/// UI_32 - length of the data buffer provided
+/// \~english @param[out] data
+/// PVOID - pointer to the data to be received
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was sent successfully
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldBuf - Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldQName - Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusInvldParam - Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF - Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR - An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize - Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail - Invalid handle of message queue for receiving message
+/// \~english @par Preconditons
+/// Message queue(McOpenReceiver etc.) for receiving message is created.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Buffer to storage session ID specified by argument(sessionid) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - Buffer to storage handle of message queue specified by argument(hMessage) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Data buffer specified by argument(data) for receiving message is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Size of data buffer specified by argument(length) for receiving message is 0. [eFrameworkunifiedStatusInvldBuf]
+/// - Buffer to storage application name specified by argument(source) for sending message is NULL.
+/// [eFrameworkunifiedStatusInvldQName]
+/// - Buffer to storage commond ID of protocol on the service specified by argument(cmd) is NULL.
+/// [eFrameworkunifiedStatusInvldParam]
+/// - Size of application name of sender getted from received message is lager then 20byte. [eFrameworkunifiedStatusInvldBuf]
+/// - Handle specified by argument(hMessage) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified by argument(hMessage) is not appropriate(which is invalid). [eFrameworkunifiedStatusFail]
+/// - Message queue type of handle specified by argument(hMessage) is not receiving type. [eFrameworkunifiedStatusFail]
+/// - File descriptor for receiving message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - An interrupt is generated by the system call (signal) when receiving message. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of buffer for receiving message is invalid. [eFrameworkunifiedStatusInvldBufSize]
+/// \~english @par Detail
+/// Receives data from message queue specified by argument.Sets application of sender(source),
+/// commond ID of protocol on the service(cmd), receiving data(data), session id(sessionid), and return.
+/// It will block until getting message from message queue.
+/// \~english @par
+/// This API provides the inter-process communication function by the message queue for the application
+/// which does not use the inter-process communication by NS Framework Dispatcher.
+/// \~english @par
+/// The caller must guarantee the allocation of the area for the receive data buffer
+/// and the consistency of the sizes set in the arguments.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenReceiver, McSendWithSession
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McReceiveWithSession(HANDLE hMessage, PSTR source, UI_32 *cmd, UI_32 *sessionid,
+ UI_32 length, PVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McGetLength
+/// \~english @par Brief
+/// Get the length of data that needs to be retrieved.
+/// \~english @param[in] data
+/// PVOID - pointer to the data was received from the McReceive Call
+/// \~english @retval UI_32 indicates the number of bytes that in the message
+/// \~english @par
+/// if return is 0 or less then invalid data was passed.
+/// \~english @par Preconditons
+/// - Message is received by McReceive and so on.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Data of received message(data) is NULL. [0]
+/// \~english @par Detail
+/// Return message data length specified by the header of received message. \n
+/// Use this data length as the buffer size specified by McGetDataOfSize.
+/// \~english @par
+/// This API does not distinguish between error and no data.
+/// \~english @par
+/// The parameter data of this API must be the data obtained from the message queue by McReceive, etc.
+/// (Since the data obtained from the message queue incudes header information,
+/// this API acquires necessary iformation from the header)
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McReceive, McReceiveWithSession, McGetDataOfSize
+////////////////////////////////////////////////////////////////////////////////////////////
+UI_32 McGetLength(PVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McGetDataPointer
+/// \~english @par Brief
+/// Get header address of data from received message.
+/// \~english @param[in] data
+/// PVOID - received message data
+/// \~english @retval PVOID - data address of received message
+/// \~english @par Preconditons
+/// Message is received by McReceive and so on.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Data of received message(data) is NULL. [NULL]
+/// \~english @par Detail
+/// Get header address of data from received message excepting the header and system information.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - Since the pointer acquired by this API is part of the received message passed as an argument to this API,
+/// the pointer must not be released by specifying he address acquired by this API.
+/// - The parameter data of this API must be the data obtained from the message queue by McReceive, etc.
+/// (Since the data obtained from the message queue incudes header information,
+/// this API acquires necessary iformation from the header)
+/// - When the next message is received, the internally held data is discarded.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McReceive, McReceiveWithSession, McGetDataOfSize
+////////////////////////////////////////////////////////////////////////////////////////////
+PVOID McGetDataPointer(PVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McGetDataOfSize
+/// \~english @par Brief
+/// Get the message data, this may be from a queue or shared memory where the maximum
+/// size of the data should not exceed the maximum size passed in.
+/// And deletes the data if it is stored in shared memory.
+/// \~english @param[in] data
+/// PVOID - pointer to the data was received from the McReceive Call
+/// \~english @param[in] to
+/// PVOID - pointer to the data to be received
+/// \~english @param[in] uiSize
+/// UI_32 - maximum size of the buffer to which the received data is copied
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was sent successfully
+/// \~english @retval eFrameworkunifiedStatusOK - success
+/// \~english @retval eFrameworkunifiedStatusInvldBuf - invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType - invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize - invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusErrOther - invalid shared memory ID specified by received message
+/// \~english @par Preconditons
+/// - Message is received by McReceive and so on.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Size specified by argument(uiSize) is smaller then size of received message data(data).
+/// [eFrameworkunifiedStatusInvldBufSize]
+/// - Data of received message(data) is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Pointer to buffer(to) which is used to storage data getted from message is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Received message data specified by argument(data) is invalid. [eFrameworkunifiedStatusInvldHndlType]
+/// - Failed to access(shm_open/fstat/mmap) the shared memory of received message data(data).
+/// [eFrameworkunifiedStatusErrOther]
+/// - Shared memory ID specified by received message is invalid. [FrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Get data from received message excepting the header and system information.
+/// Delete data storaged in shared memory after getting the data successfully.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - In the case where he received message data becomes 0byte, there is no need to call this API,
+/// and be careful not to allocate the memory for the received message data by 0byte.
+/// - Error details related to shared memory access canno be detected.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McGetLength
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McGetDataOfSize(PVOID data, PVOID to, UI_32 uiSize);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McGetDataOfSizeWithSMRetain
+/// \~english @par Brief
+/// Get the message data, this may be from a queue or shared memory where the maximum
+/// size of the data should not exceed the maximum size passed in.
+/// Does not delete the data if it is stored in shared memory.
+/// \~english @param[in] data
+/// PVOID - pointer to the data was received from the McReceive Call
+/// \~english @param[in] to
+/// PVOID - pointer to the data to be received
+/// \~english @param[in] uiSize
+/// UI_32 - maximum size of the buffer to which the received data is copied
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was sent successfully
+/// \~english @retval eFrameworkunifiedStatusOK - success
+/// \~english @retval eFrameworkunifiedStatusInvldBuf - invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType - invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize - invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusErrOther - invalid shared memory ID specified by received message
+/// \~english @par Preconditons
+/// - Message is received by McReceive and so on.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Size specified by argument(uiSize) is smaller then size of received message data(data).
+/// [eFrameworkunifiedStatusInvldBufSize]
+/// - Data of received message(data) is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Pointer to buffer(to) which is used to storage data getted from message is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Received message data specified by argument(data) is invalid. [eFrameworkunifiedStatusInvldHndlType]
+/// - Failed to access(shm_open/fstat/mmap) the shared memory of received message data(data).
+/// [eFrameworkunifiedStatusErrOther]
+/// - Shared memory ID specified by received message is invalid. [FrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// Get data from received message excepting the header and system information.
+/// Does not delete data storaged in shared memory after getting the data successfully.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - In the case where he received message data becomes 0byte, there is no need to call this API,
+/// and be careful not to allocate the memory for the received message data by 0byte.
+/// - Error details related to shared memory access canno be detected.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// McReceive
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McGetDataOfSizeWithSMRetain(PVOID data, PVOID to, UI_32 uiSize);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McGetSysInfoData
+/// \~english @par Brief
+/// Gets the data from system info buffer from message header.
+/// \~english @param[in] data
+/// PVOID - pointer to the data was received from the McReceive Call
+/// \~english @param[out] to
+/// PVOID - pointer to the data to be received
+/// \~english @retval EFrameworkunifiedStatus indicates if the close was successfully
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldBuf - Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - Invalid handle
+/// \~english @par Preconditons
+/// Message is received by McReceive and so on.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Data of received message(data) is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Pointer to buffer(to) which is used to storage system info getted from message is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Received message data specified by argument(data) is invalid. [eFrameworkunifiedStatusInvldHndlType]
+/// \~english @par Detail
+/// Gets system info from received message, and set argument(to) with it. \n
+/// If there is no system info in received message,and set argument(to) with "\0".
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - The parameter data of this API must be the data obtained from the message queue by McReceive, etc.
+/// (Since the data obtained from the message queue incudes header information,
+/// this API acquires necessary iformation from the header)
+/// - Since the system information is 64 bytes (including the null character), the area of 64 byte must be allocated in the argument to fo this API.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McReceive, McReceiveWithSession
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McGetSysInfoData(PVOID data, PVOID to);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McClearData
+/// \~english @par Brief
+/// Clears the data that may be pending for the a message in shared memory.
+/// \~english @param[in] data
+/// PVOID - pointer to the data was received from the McReceive Call
+/// \~english @retval EFrameworkunifiedStatus indicates if the data was clear successfully
+/// \~english @retval eFrameworkunifiedStatusOK - success
+/// \~english @retval eFrameworkunifiedStatusInvldBuf - invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldID - invalid ID
+/// \~english @retval eFrameworkunifiedStatusFail - other errors
+/// \~english @par Preconditons
+/// - Message is received by McReceive and so on.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Data of received message(data) is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Received message data specified by argument(data) is invalid. [eFrameworkunifiedStatusInvldParam]
+/// - Shared memory ID in received message is invalid. [eFrameworkunifiedStatusInvldParam]
+/// - Shared memory specified by ID in received message does not exist. [eFrameworkunifiedStatusInvldID]
+/// - Failed to delete shared memory specified by ID in received message. [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Delete data from received message.
+/// And delete the received message data if it is stored in shared memory.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McReceive, McReceiveWithSession
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McClearData(PVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McSend
+/// \~english @par Brief
+/// Sends data to a message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the send message queue, McOpenSender
+/// \~english @param[in] source
+/// PCSTR - app (You) the sender
+/// \~english @param[in] cmd
+/// UI_32 - command id aka the message that's being sent
+/// \~english @param[in] length
+/// UI_32 - length of the data buffer provided
+/// \~english @param[in] data
+/// PCVOID - pointer to the data to be sent
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was sent successfully
+/// \~english @retval eFrameworkunifiedStatusOK - Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer - NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType - Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName - Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull - Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF I- nvalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR - An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize - Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail - Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther - other errors(Failed to open/allocate shared memory)
+/// \~english @retval eFrameworkunifiedStatusInvldParam - Invalid parameter
+/// \~english @par Preconditons
+/// - Message queue(McOpenSender) for sending message is created.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Application name of sender specified in the argument (source) is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Application name of sender specified in the argument (source) exceeds 20byte. [eFrameworkunifiedStatusInvldQName]
+/// - Sender data does not match sender data size(size is larger then 0, and data is NULL). [eFrameworkunifiedStatusInvldBuf]
+/// - Message queue type of handle specified by argument(hMessage) is not sending type. [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue is full. [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - An interrupt is generated by the system call (signal) when sending message. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of buffer for sending message is invalid. [eFrameworkunifiedStatusInvldBufSize]
+/// - Some errors occur, when sending message. [eFrameworkunifiedStatusFail]
+/// - Failed to access(shm_open/ftruncate/mmap) the shared memory for sending message data. [eFrameworkunifiedStatusErrOther]
+/// - Sending data size specified in the argument (length) is out of range. [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// It is an asynchronous API. It provides function to send message by message queue. \n
+/// Message queue name created by McOpenSender is the sender.
+/// \~english @par
+/// This API provides the inter-process communication function by the message queue for the application
+/// which does not use the inter-process communication by NS Framework Dispatcher.
+/// \~english @par
+/// Command ID must be within the range PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD(0x10) to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD(0xFFFFFFF0).
+/// Even if a command ID out of range is specified, a message is sent by the command ID (no erro occurs).
+/// Command ID out of range are resered ID used for session connection, etc.
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - The maximum transmission data size (ength) described above is a theoretical value,
+/// and the maximum actually usable data size depends on the environment requirements.\n
+/// The maximum value is the upper limit of the type (UNIT_MAX) minus the following size.\n
+/// Message header section \n
+/// - Operation cannot be guaranteed when the size of the allocated area indicated by the address
+/// of the pointer (data) to the data buffer does not match the size specified by the size of the data buffer (length).
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenSender, McSendWithSession, McReceive
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McSend(HANDLE hMessage, PCSTR source, UI_32 cmd, UI_32 length, PCVOID data);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McSendWithSession
+/// \~english @par Brief
+/// Sends data to a message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the send message queue, McOpenSender
+/// \~english @param[in] source
+/// PCSTR - app (You) the sender
+/// \~english @param[in] cmd
+/// UI_32 - command id aka the message that's being sent
+/// \~english @param[in] length
+/// UI_32 - length of the data buffer provided
+/// \~english @param[in] data
+/// PCVOID - pointer to the data to be sent
+/// \~english @param[in] sessionid
+/// UI_32 - session id
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was sent successfully
+/// \~english @retval eFrameworkunifiedStatusOK - Success
+/// \~english @retval eFrameworkunifiedStatusNullPointer - NULL pointer specified
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType - Invalid type of handle
+/// \~english @retval eFrameworkunifiedStatusInvldQName - Illegal Message Queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull - Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF - Invalid File-Descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR - An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize - Invalid buffer-size
+/// \~english @retval eFrameworkunifiedStatusFail - Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther - other errors(Failed to open/allocate shared memory)
+/// \~english @retval eFrameworkunifiedStatusInvldParam - Invalid parameter
+/// \~english @par Preconditons
+/// - Message queue(McOpenSender) for sending message is created.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Application name of sender specified in the argument (source) is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Application name of sender specified in the argument (source) exceeds 20byte. [eFrameworkunifiedStatusInvldQName]
+/// - Sender data does not match sender data size(size is larger then 0, and data is NULL). [eFrameworkunifiedStatusInvldBuf]
+/// - Message queue type of handle specified by argument(hMessage) is not sending type. [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue is full. [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor for sending message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - An interrupt is generated by the system call (signal) when sending message. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of buffer for sending message is invalid. [eFrameworkunifiedStatusInvldBufSize]
+/// - Some errors occur, when sending message. [eFrameworkunifiedStatusFail]
+/// - Failed to access(shm_open/ftruncate/mmap) the shared memory for sending message data. [eFrameworkunifiedStatusErrOther]
+/// - Sending data size specified in the argument (length) is out of range. [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// It is an asynchronous API. It provides function to send message by message queue. \n
+/// Message queue name created by McOpenSender is the sender.
+/// \~english @par
+/// This API provides the inter-process communication function by the message queue for the application
+/// which does not use the inter-process communication by NS Framework Dispatcher.
+/// \~english @par
+/// Command ID must be within the range PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD(0x10) to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD(0xFFFFFFF0).
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - McSend should be used if no sessionid is specified.
+/// - To communicate with an application that uses NS Framework Dispatcher, use FrameworkunifiedSendMsg, etc.
+/// - The maximum transmission data size (length) described above is a theoretical value,
+/// and the maximum actually usable data size depends on the environment requirements.\n
+/// - The maximum value is the upper limit of the type (UNIT_MAX) minus the following size.\n
+/// Message header section\n
+/// - Operation cannot be guaranteed when the size of the allocated area indicated by the address
+/// of the pointer (data) to the data buffer does not match the size specified by the size of the data buffer (length).
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenSender, McSend, McReceiveWithSession, FrameworkunifiedSendMsg
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McSendWithSession(HANDLE hMessage, PCSTR source, UI_32 cmd, UI_32 length, PCVOID data, UI_32 sessionid);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McSendWithPriority
+/// \~english @par Brief
+/// Sends data to a message queue, inserts based on priority given.
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the send message queue, McOpenSender
+/// \~english @param[in] source
+/// PCSTR - app (You) the sender
+/// \~english @param[in] cmd
+/// UI_32 - command id aka the message that's being sent
+/// \~english @param[in] length
+/// UI_32 - length of the data buffer provided
+/// \~english @param[in] data
+/// PCVOID - pointer to the data to be sent
+/// \~english @param[in] sessionid
+/// UI_32 - session id
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was sent successfully
+/// \~english @retval eFrameworkunifiedStatusOK(success)
+/// \~english @retval eFrameworkunifiedStatusFail(anything else)
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hMessage) or hMessage is NULL.
+/// - It is an incorrect value(source) or hMessage is NULL.
+/// - It is an incorrect value(data) or hMessage is NULL.
+/// - It is an incorrect value(priority).
+/// - It is an incorrect value(sessionid).
+/// \~english @par Detail
+/// Invoke callback function with arguments to send data to message queue based on priority given.\n
+/// If callback function is null and expectedCalls is '0', using default function 'McSendWithPriority' to send
+/// data to message queue based on priority given.
+/// \~english @par
+/// This API provides the inter-process communication function by the message queue for the application
+/// which does not use the inter-process communication by NS Framework Dispatcher.
+/// \~english @par
+/// Command ID must be within the range PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD(0x10) to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD(0xFFFFFFF0).
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - McSend should be used if no sessionid is specified.
+/// - To communicate with an application that uses NS Framework Dispatcher, use FrameworkunifiedSendMsg, etc.
+/// - The maximum transmission data size (length) described above is a theoretical value,
+/// and the maximum actually usable data size depends on the environment requirements.\n
+/// The maximum value is the upper limit of the type (UNIT_MAX) minus the following size.\n
+/// Message header section\n
+/// - Operation cannot be guaranteed when the size of the allocated area indicated by the address
+/// of the pointer (data) to the data buffer does not match the size specified by the size of the data buffer (length).
+/// \~english @par
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+// McOpenSender, McSend, McSendWithSession, FrameworkunifiedSendMsg
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McSendWithPriority(HANDLE hMessage, PCSTR source, UI_32 cmd, UI_32 length, PCVOID data,
+ EFrameworkunifiedMessagePriorties priority, UI_32 sessionid);
+
+// EFrameworkunifiedStatus McSendWithPriorityWithSession(HANDLE hMessage, PCSTR source, UI_32 cmd, UI_32 length, PCVOID data,
+// EFrameworkunifiedMessagePriorties priority, UI_32 sessionid);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McInvokeSync
+/// \~english @par Brief
+/// Synchronous Invoke. Send data to message queue, and Receive data from message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the send message queue, McOpenSender
+/// \~english @param[in] source
+/// PCSTR - app (You) the sender
+/// \~english @param[in] cmd
+/// UI_32 - command id aka the message that's being sent
+/// \~english @param[in] msgLength
+/// UI_32 - length of the data buffer provided
+/// \~english @param[in] msgData
+/// PCVOID - pointer to the data to be sent
+/// \~english @param[in] sessionid
+/// UI_32 - session ID
+/// \~english @param[in] hRcvMessage
+/// HANDLE - handle to the receive message queue, McOpenSyncReceiver
+/// \~english @param[in] responseLength
+/// UI_32 - length of the responnce receive buffer provided
+/// \~english @param[out] responseData
+/// PVOID - pointer to the data to be receive
+/// \~english @param[out] receivedLength
+/// UI_32* - length of the data to be receive
+/// \~english @retval EFrameworkunifiedStatus indicates invoke response or message sent error or response receive error
+/// \~english @retval eFrameworkunifiedStatusOK - success
+/// \~english @retval eFrameworkunifiedStatusInvldParam - Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - Invalid handle
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType - Invalid handle type
+/// \~english @retval eFrameworkunifiedStatusInvldQName - Invalid message queue name
+/// \~english @retval eFrameworkunifiedStatusMsgQFull - Message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF - Invalid file descriptor
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR - An interrupt is generated by the system call (signal)
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize - Invalid buffer size
+/// \~english @retval eFrameworkunifiedStatusInvldBuf - Invalid buffer
+/// \~english @retval eFrameworkunifiedStatusBadConnection - Can't connect with Socket
+/// \~english @retval eFrameworkunifiedStatusFail - Some sort of error occurred
+/// \~english @retval eFrameworkunifiedStatusErrOther - other errors(Failed to open/allocate shared memory)
+/// \~english @par Preconditons
+/// - Message queue specified by argument hMessage and hRcvMessage is useful.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - Message queue handle specified in the argument (hMessage) for sending message is NULL.
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue handle specified in the argument (hMessage) for sending message is not appropriate (which is
+/// invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue handle specified in the argument (hRcvMessage) for receiving message is NULL.
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Message queue handle specified in the argument (hRcvMessage) for receiving message is not appropriate (which
+/// is invalid). [eFrameworkunifiedStatusInvldHandle]
+/// - Size of buffer(responseLength) which is used to storage received message is not 0,
+/// but the pointer to this buffer(responseData) is NULL. [eFrameworkunifiedStatusInvldHandle]
+/// - Failed to create buffer to storage the response message. [eFrameworkunifiedStatusFail]
+/// - Failed to generete random number of the sequence ID for sending message. [eFrameworkunifiedStatusFail]
+/// - Data size of sending message is not 0, but the message data(msgData) is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Application name of sender specified in the argument (source) is NULL. [eFrameworkunifiedStatusInvldQName]
+/// - Application name of sender specified in the argument (source) exceeds 20byte. [eFrameworkunifiedStatusInvldQName]
+/// - Name of message queue handle specified in the argument (hMessage) for sending message is NULL.
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Name of message queue handle specified in the argument (hMessage) for sending message exceeds 20byte.
+/// [eFrameworkunifiedStatusInvldHandle]
+/// - Size of sending message specified in the argument is not 0,
+/// but the pointer to sending message is NULL. [eFrameworkunifiedStatusInvldBuf]
+/// - Message queue type of handle specified by argument(hMessage) is not sending type. [eFrameworkunifiedStatusInvldHndlType]
+/// - Message queue for sending message is full. [eFrameworkunifiedStatusMsgQFull]
+/// - File descriptor of message queue for sending message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - An interrupt is generated by the system call (signal) when sending message. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of buffer for sending message is invalid. [eFrameworkunifiedStatusInvldBufSize]
+/// - Some errors occur, when sending message. [eFrameworkunifiedStatusFail]
+/// - Failed to access the shared memory for sending message data. [eFrameworkunifiedStatusErrOther]
+/// - Failed to connect with the socket(socket/bind/connect) for checking the connection with application of
+/// sender. [eFrameworkunifiedStatusFail]
+/// - Failed to wait(epoll_create/epoll_ctl/epoll_wait) for receiving response message. [eFrameworkunifiedStatusFail]
+/// - Failed to reconnect with the socket(socket/bind/connect) for checking the connection with application of
+/// sender. [eFrameworkunifiedStatusBadConnection]
+/// - Application name of sender in response message exceeds 20byte.[eFrameworkunifiedStatusInvldBuf]
+/// - Message queue type of handle specified by argument(hMessage) is not receiving type.
+/// [eFrameworkunifiedStatusInvldHndlType]
+/// - File descriptor of message queue for receiving message is invalid. [eFrameworkunifiedStatusErrNoEBADF]
+/// - An interrupt is generated by the system call (signal) when receiving message. [eFrameworkunifiedStatusErrNoEINTR]
+/// - Size of buffer for receiving message is invalid. [eFrameworkunifiedStatusInvldBufSize]
+/// - Received message is storaged in shared memory, but data size of shared memory is 0. [eFrameworkunifiedStatusErrOther]
+/// - Failed to create buffer(calloc) to storage date getted from shared memory. [eFrameworkunifiedStatusFail]
+/// - Failed to access(shm_open/fstat/mmap) the shared memory for receiving message data. [eFrameworkunifiedStatusErrOther]
+/// - Data size of received message specified by argument(receivedLength) is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - Sending data size specified in the argument (msgLength) is out of range. [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// It provides synchronous communication for message queue between sender and receiver specified in the
+/// argument. \n
+/// As it is a synchronous function, after sending a message, the sender will wait until getting response form
+/// receiver.
+/// After receiving the response, set responseData with the received data and return.
+/// \~english @par
+/// This API provides the inter-process communication function by the message queue for the application
+/// which does not use the inter-process communication by NS Framework Dispatcher.
+/// \~english @par
+/// When data larger than the receive message storage buffer size (resposeLength) is received,
+/// the write size to the receive message storage buffer (responseData) does not exceed the specified size,
+/// but the receive size is set in the receive message data length (recievedLength) as is.
+/// \~english @par
+/// The caller must guarantee the allocation of the receive message storage buffer (resonseData) area
+/// and the consistency of the receive message stoage buffer sizes (resposeLength).
+/// \~english @par
+/// Please note the following points when using this API for application.
+/// - This API stores up to the storage buffer length (responseLength) and returs eFrameworkunifiedStatusOK even
+/// if the received reply message is larger than the storage buffer (responseData) size.\n
+/// Therefore, the application shoud compare the received message length (recievedLenght) and the storage buffer length (responseLength) even
+/// if this API returns eFrameworkunifiedStatusOK, and detect the above.
+/// - Specify 0 for the sessionid of argument.
+/// If a value other than 0 is specified, no error occurs and the value is used as is.
+/// - To communicate with an application that uses NS Framework Dispatcher, use FrameworkunifiedInvokeSync, etc.
+/// - The maximum data lenght (msgLength) of sent messages is a theoretical value,
+/// and the maximum value that can be actually used is environment-depedent.\n
+/// The maximum value is the upper limit of the type (UNIT_MAX) minus the following size.\n
+/// Message header section, System information department in messages\n
+/// - Operation cannot be guaranteed when the size of the allocated area indicated by the address
+/// of the pointer (msgData) to the data buffer does not match the size specified by the size of the data buffer (msgLength).
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenSender, McOpenSyncReceiver, FrameworkunifiedInvokeSync
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McInvokeSync(HANDLE hMessage, PCSTR source, UI_32 cmd, UI_32 msgLength, PCVOID msgData, UI_32 sessionid,
+ HANDLE hRcvMessage, UI_32 responseLength, PVOID responseData, UI_32 *receivedLength);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McSendSyncResponse
+/// \~english @par Brief
+/// Sends response to a message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the send message queue, McOpenSyncSender
+/// \~english @param[in] source
+/// PCSTR - app (You) the sender
+/// \~english @param[in] cmd
+/// UI_32 - command id aka the message that's being sent
+/// \~english @param[in] seq_id
+/// UI_32 - response sequence ID
+/// \~english @param[in] ret_val
+/// EFrameworkunifiedStatus - response status
+/// \~english @param[in] length
+/// UI_32 - length of the data buffer provided
+/// \~english @param[in] data
+/// PCVOID - pointer to the data to be sent
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - If handle is NULL or invalid
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType -if handle type is invalid
+/// \~english @retval eFrameworkunifiedStatusInvldQName - if MQ name is invalid
+/// \~english @retval eFrameworkunifiedStatusMsgQFull - if MQ is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF - if fd is invalid
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR - if system call(signal) interupt occurs
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize -if buffer size is invalid
+/// \~english @retval eFrameworkunifiedStatusInvldBuf -if buffer is invalid
+/// \~english @retval eFrameworkunifiedStatusFail - any other error
+/// \~english @retval eFrameworkunifiedStatusErrOther -other error(memory open/allocate fail)
+/// \~english @par Preconditons
+/// - The message queue specified by argument hMessage of this API must be allocated
+/// in advance by McOpenSender and McOpenSyncSender.
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - sending MQ handle(designated by parameter)is NULL[eFrameworkunifiedStatusInvldHandle]
+/// - sending MQ handle(designated by parameter)is invalid[eFrameworkunifiedStatusInvldHandle]
+/// - the type of sending MQ handle(designated by parameter)is not sending type[eFrameworkunifiedStatusInvldHndlType]
+/// - application name(source,designated by parameter)is NULL[eFrameworkunifiedStatusInvldQName]
+/// - the length of application name(designated by parameter)is over 20byte[eFrameworkunifiedStatusInvldQName]
+/// - sending data not in accordance with the size of sending data(eg:size is not 0 but data is NULL)
+/// [eFrameworkunifiedStatusInvldBuf]
+/// - sending data MQ is full [eFrameworkunifiedStatusMsgQFull]
+/// - fd of sending data MQ is invalid [eFrameworkunifiedStatusErrNoEBADF]
+/// - system call(signal) interupt occurs during MQ receiveing process[eFrameworkunifiedStatusErrNoEINTR]
+/// - the size of receiveing MQ buffer is invalid[eFrameworkunifiedStatusInvldBufSize]
+/// - error occurs during MQ receiveing process [eFrameworkunifiedStatusFail]
+/// - failed to access shared memmory for sending message[eFrameworkunifiedStatusErrOther]
+/// - failed to allocate buffer for data retriving from shared memmory[eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// set the response data to buffer and call this API
+/// when need to response to synchronous message get from synchronous communication(McInvokeSync)
+/// \~english @par
+/// This API applies communication function(using message queue)between processes to the application which do not
+/// use
+/// Dispatcher of NS Framework
+/// \~english @par
+/// cautions when using this API
+/// - Use FrameworkunifiedSetSyncResponseData if communacate with application which use the Dispatcher of NS Framework\n
+/// - the limit of size for sending data is according to system
+/// but the total size of SSystemMsgHeader and ResponseHeader shared memmory header is 48byte
+/// size limit should be(UINT_MAX-48byte)
+/// - operation is not guaranteed if the size which shown in data buffer pointer(data) is not in
+/// accordance with the length set in data buffer
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenSender, McOpenSyncReceiver, McInvokeSync, FrameworkunifiedSetSyncResponseData
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McSendSyncResponse(HANDLE hMessage, PCSTR source, UI_32 cmd, UI_32 seq_id, EFrameworkunifiedStatus ret_val, UI_32 length,
+ PCVOID data);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McCreateInvokerName
+/// \~english @par Brief
+/// Create synchronous invoke response MQ name.
+/// \~english @param[in] source
+/// PCSTR - source service name
+/// \~english @param[in] sessionid
+/// UI_32 - session id
+/// \~english @param[in] invokerName
+/// PSTR - create invoker name buffer
+/// \~english @param[in] size
+/// UI_32 - InvokerName buffer size
+/// \~english @retval EFrameworkunifiedStatus indicates if the close was successfully
+/// \~english @retval eFrameworkunifiedStatusOK
+/// \~english @retval eFrameworkunifiedStatusInvldParam -if parameter is invalid
+/// \~english @par Preconditons
+/// - none
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - sender application name(source,designated by parameter) is NULL[eFrameworkunifiedStatusInvldParam]
+/// - synchronous communication MQ name(invokerName,designated by parameter) is NULL[eFrameworkunifiedStatusInvldParam]
+/// - the size of synchronous communication MQ name buffer(designated by parameter)is NULL[eFrameworkunifiedStatusInvldParam]
+/// \~english @par Detail
+/// This API will add specific letters to the end of sender application name and return it as synchronous
+/// communication MQ name
+/// This name will be used when application create the MQ through McOpenSyncReceiver
+/// \~english @par
+/// cautions when using this API:
+/// - the synchronous communication MQ name(invokerName) buffer size should be larger than the length of source
+/// application
+/// name(at least 4byte larger)
+/// - source application name(designated by parameter) should be less than 15byte(according to NS framework
+/// spec,error occurs
+/// if message name length is over 20byte
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenSyncReceiver
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McCreateInvokerName(PCSTR source, UI_32 sessionid, PSTR invokerName, UI_32 size);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McClose
+/// \~english @par Brief
+/// Close a connection to a Receiver message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle that will be closed
+/// \~english @retval EFrameworkunifiedStatus indicates if the close was successfully
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - If hMessage is NULL or invalid
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType - if hMessage is invalid
+/// \~english @par Preconditons
+/// message queue(McOpenSender, McOpenReceiver) is created in advance
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - handle(hMessage,designated by parameter) is NULL[eFrameworkunifiedStatusInvldHandle]
+/// - handle(hMessage,designated by parameter) is invalid[eFrameworkunifiedStatusInvldHandle]
+/// - the type of handle(designated by parameter) is neither sending or receiveing[eFrameworkunifiedStatusInvldHndlType]
+/// - fail to close the message queue(mq_close)[eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// close the message sending or receiveing message queue which is designated by parameter\n
+/// Application can call this API to close the message queue which is created by McOpenSender
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenSender, McOpenReceiver, McOpenSyncReceiver
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McClose(HANDLE hMessage);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McGetDataUSID
+/// \~english @par Brief
+/// Get the USID is the Unique Shared Memory ID.e. from the message that was received.
+/// \~english @param[in] pData
+/// void* - pointer to the data was received from the McReceive Call
+/// \~english @retval TMemID Type of memory buffer identifiers(unsigned int).
+/// \~english @retval NoneZero(Success)
+/// \~english @retval Zero(Failed)
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(pData) or pData is NULL.
+/// \~english @par Detail
+/// Invoke callback function with arguments to get the USID from the message that was received.\n
+/// If callback function is null and expectedCalls is '0', using default function 'McGetDataUSID' to get the USID
+/// from the message that was received.\n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+// FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage
+//////////////////////////////////////////////////////////////////////////////////////////////
+TMemID McGetDataUSID(PVOID pData);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McGetMsgSrc
+/// \~english @par Brief
+/// Gets the constant pointer to source message queue.
+/// \~english @param[in] data
+/// PVOID - pointer to the data to be received
+/// \~english @retval PCSTR message queue's address
+/// CONST char* - constant pointer to source message queue
+/// \~english @retval NotNull(Success)
+/// \~english @retval Null(Failed)
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(data) or data is NULL.
+/// \~english @par Detail
+/// Invoke callback function with arguments to get the constant pointer to source message queue.\n
+/// If callback function is null and expectedCalls is '0', using default function 'McGetMsgSrc' to the constant
+/// pointer to source message queue.\n
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+// frameworkunifiedSendSyncResponse, frameworkunifiedProcessSyncResponse
+//////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR McGetMsgSrc(PVOID data);
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McForward
+/// \~english @par Brief
+/// Forward a Message to indicate that there is a Shared Memory
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the send message queue, McOpenSender
+/// \~english @param[in] source
+/// PCSTR - the sender of this forwarding message.
+/// \~english @param[in] iCmd
+/// UI_32 - Command Id message to forward
+/// \~english @param[in] USID
+/// UI_32 - Unique Shared memory Id
+/// \~english @retval EFrameworkunifiedStatus indicates if the close was successfully
+/// CONST char* - constant pointer to source message queue
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Failed(anything else)
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hMessage) or hMessage is NULL.
+/// - It is an incorrect value(source) or source is NULL.
+/// - It is an incorrect value(iCmd).
+/// - It is an incorrect value(USID).
+/// \~english @par Detail
+/// Invoke callback function with arguments to forward a Message.\n
+/// If callback function is null and expectedCalls is '0', using default function 'McForward' to forward a
+/// Message.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+// FrameworkunifiedForwardMessage
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McForward(HANDLE hMessage, PCSTR source, UI_32 iCmd, TMemID USID);
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McFlushReceiver
+/// \~english @par Brief
+/// Flush's all data on HANDLE's Receiver message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the recvMessage queue that will be flushed
+/// \~english @retval void
+/// \~english @par Preconditons
+/// message queue(McOpenReceiver)is created in advance
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - handle(hMessage,designated by parameter) is NULL
+/// - handle(hMessage,designated by parameter) is invalid [-1]
+/// - the type of handle(designated by parameter) is neither sending or receiveing[-1]
+/// \~english @par Detail
+/// message will not be flushed if process failed
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenSender, McOpenReceiver, McOpenSyncReceiver
+////////////////////////////////////////////////////////////////////////////////////////////
+void McFlushReceiver(HANDLE hMessage);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McGetQueueName
+/// \~english @par Brief
+/// Gets the name of the message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle of the message queue,
+/// (handle created with McOpenReceiver or McOpenSender)
+/// \~english @retval PCSTR name - name of the message queue if handle is valid else NULL
+/// \~english @par Preconditons
+/// Dispatcher for application should be created and initilized(FrameworkunifiedCreateDispatcherWithoutLoop)in advance
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - handle(hMessage,designated by parameter) is NULL
+/// - handle(hMessage,designated by parameter) is invalid [-1]
+/// - the type of handle(designated by parameter) is neither sending or receiveing[-1]
+/// \~english @par Detail
+/// return the name of specific message queue
+/// this APL is used for application to supervize message queue
+/// \~english @par
+/// This API applies communication function(using message queue)between processes to the application which do not
+/// use
+/// Dispatcher of NS Framework
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenReceiver, McOpenSender
+////////////////////////////////////////////////////////////////////////////////////////////
+PCSTR McGetQueueName(HANDLE hMessage);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McGetQueueFD
+/// \~english @par Brief
+/// Gets the fd of the message queue.
+/// \~english @param[in] hMessage
+/// HANDLE - handle of the message queue.(handle created with McOpenReceiver or McOpenSender)
+/// \~english @retval int fd - fd of the message queue if handle is valid else -1
+/// \~english @par Preconditons
+/// - Dispatcher for application is created and initialized(FrameworkunifiedCreateDispatcherWithoutLoop) in advance
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - handle(hMessage,designated by parameter) is NULL
+/// - handle(hMessage,designated by parameter) is invalid [-1]
+/// - the type of handle(designated by parameter) is neither sending or receiveing[-1]
+/// \~english @par Detail
+/// return the fd of specific message queue
+/// this APL is used for application to supervize message queue
+/// \~english @par
+/// This API applies communication function(using message queue)between processes to the application which do not
+/// use
+/// Dispatcher of NS Framework
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McOpenReceiver, McOpenSender
+////////////////////////////////////////////////////////////////////////////////////////////
+int McGetQueueFD(HANDLE hMessage);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McTranslateError
+/// \~english @par Brief
+/// Translates global error variables into FW EFrameworkunifiedStatus
+/// \~english @param[in] error
+/// int - error variable
+/// \~english @retval EFrameworkunifiedStatus indicates frameworkunified error type
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(error).
+/// \~english @par Detail
+/// Invoke callback function with arguments to translates global error variables.\n
+/// If callback function is null and expectedCalls is '0', using default function 'McTranslateError' to translates
+/// global error variables.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+// none
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McTranslateError(int error);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McZcSetParam
+/// \~english @par Brief
+/// set variable parameter to messeg-sending header
+/// \~english @param[in] handle
+/// HANDLE - handle to the send message queue, McZcOpenSender
+/// \~english @param[in] cmd
+/// UI_32 -cmd for sending(ID to identify protocol of service)
+/// \~english @param[in] length
+/// UI_32 -size of buffer for message-sending
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was set successfully
+/// \~english @retval eFrameworkunifiedStatusOK sucess
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - If hMessage is NULL or invalid
+/// \~english @retval eFrameworkunifiedStatusInvldBuf - invalid buffer
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize - invalid buffer size
+/// \~english @par Preconditons
+/// message queue is created by McZcOpenSender in advance
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - handle(designated by parameter) is NULL[NULL]
+/// - handle(designated by parameter) is invalid [NULL]
+/// - the buffer for sending in handle(designated by parameter) is NULL[NULL]
+/// - the size of data for sending(designated by parameter)(except header) is larger than the size of
+/// sending-buffer[eFrameworkunifiedStatusInvldBufSize]
+/// \~english @par Detail
+/// set the variable sending cmd and sending data length in sending buffer of message-sending handle
+/// This API will only do the initialization of message header.detail setting of data for sending will be done\n
+/// Application can use McZcGetBuf to do data setting
+/// \~english @par
+/// CMD ID should be in (PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD(0x10) to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD(0xFFFFFFF0))
+/// \~english @par
+/// cautions when using this API
+/// - detail data sending size should be in accordance with the data sending size which is set in this API
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McZcGetBuf, McZcSend
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McZcSetParam(HANDLE handle, UI_32 cmd, UI_32 length);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McZcGetBuf
+/// \~english @par Brief
+/// get the fist address of buffer for sending
+/// \~english @param[in] handle
+/// HANDLE - handle to the send message queue, McZcOpenSender
+/// \~english @retval PVOID the first address of buffer for data-sending
+/// \~english @retval NULL NULL pointer(fail to get)
+/// \~english @par Preconditons
+/// message queue is created by McZcOpenSender in advance
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - handle(designated by parameter) is NULL[NULL]
+/// - handle(designated by parameter) is invalid [NULL]
+/// - the buffer for sending in handle(designated by parameter) is NULL[NULL]
+/// \~english @par Detail
+/// get the first address of data(excpet the message-header)from sending-buffer in message-sending handle
+/// application will set the address got as sending message
+/// \~english @par
+/// cautions When using the application
+/// - result will not be guaranteed if the handle set is different from message-sending queue handle
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McZcGetBuf
+////////////////////////////////////////////////////////////////////////////////////////////
+PVOID McZcGetBuf(HANDLE handle);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McZcSend
+/// \~english @par Brief
+/// send message
+/// \~english @param[in] hMessage
+/// HANDLE - handle to the sendMessage, McZcOpenSender
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was sent successfully
+/// \~english @retval eFrameworkunifiedStatusOK success
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - If hMessage is NULL or invalid
+/// \~english @retval eFrameworkunifiedStatusInvldBuf - buffer is invalid
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType -handle type is invalid
+/// \~english @retval eFrameworkunifiedStatusMsgQFull - message queue is full
+/// \~english @retval eFrameworkunifiedStatusErrNoEBADF - file descriptor invalid
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR -system call(signal) interupt
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize -invalid buffer size
+/// \~english @par Preconditons
+/// message queuqe is created by McZcOpenSender
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - handle(hMessage,designated by parameter)is NULL[eFrameworkunifiedStatusInvldHandle]
+/// - handle(hMessage,designated by parameter)is invalid[eFrameworkunifiedStatusInvldHandle]
+/// - the sending-buffer in handle(hMessage,designated by parameter)is NULL[eFrameworkunifiedStatusInvldBuf]
+/// - the type of message queue in handle(hMessage,designated by parameter)is not sending
+/// type[eFrameworkunifiedStatusInvldHndlType]
+/// - message-sending queue is full[eFrameworkunifiedStatusMsgQFull]
+/// - file descriptor of message-sending queue is invalid[eFrameworkunifiedStatusErrNoEBADF]
+/// - system call(singal) interupts during the message sending process[eFrameworkunifiedStatusErrNoEINTR]
+/// - the size of buffer for message-sending is invalid[eFrameworkunifiedStatusInvldBufSize]
+/// \~english @par Detail
+/// send message using specific message-sending handle.\n
+/// data for sending should be set to message-sending handle(hMessage)beforhead using McZcSetParam, McZcGetBuf
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Method
+/// \~english @see McZcOpenSender, McZcSetParam, McZcGetBuf
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McZcSend(HANDLE hMessage);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McZcOpenSender
+/// \~english @par Brief
+/// create message-sending queuqe
+/// \~english @param[in] source
+/// PCSTR - app (You) the sender
+/// \~english @retval Handle for sending messages to a queue (If INVALID_HANDLE is returned its an error)
+/// \~english @retval NULL NULL pointer(fail to get)
+/// \~english @par Preconditons
+/// - none
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - message queue name(designated by parameter)is NULL[NULL]
+/// - the length of message queue name(designated by parameter)(source) is over 20byte[NULL]
+/// - fail to get memmory for restoring formated message queue name [NULL]
+/// - length of formated message queue name is over 15byte or 16byte(when initial letter is'/')[NULL]
+/// - fail to get message queue(mq_open)[NULL]
+/// - fail to get memmory for message queue info managment(malloc)[NULL]
+/// - fail to get memory for sending buffer[NULL]
+/// \~english @par Detail
+/// create message queuqe and return the handle
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McZcSetParam, McZcGetBuf, McZcSend, McZcClose
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE McZcOpenSender(PCSTR source);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup McZcClose
+/// \~english @par Brief
+/// close the handle to message queue
+/// \~english @param[in] handle
+/// HANDLE - handle to the send message queue, handle got through McZcOpenSender
+/// \~english @retval EFrameworkunifiedStatus indicates if the message was close successfully
+/// \~english @retval eFrameworkunifiedStatusOK
+/// \~english @retval eFrameworkunifiedStatusInvldHandle - If hMessage is NULL or invalid
+/// \~english @retval eFrameworkunifiedStatusInvldHndlType If handle type is invalid
+/// \~english @par Preconditons
+/// - message queue is created by McZcOpenSender in advance
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - message handle(designated by parameters) is NULL[eFrameworkunifiedStatusInvldHandle]
+/// - message handle(designated by parameters) is invalid [eFrameworkunifiedStatusInvldHandle]
+/// - message handle type(designated by parameters) is not match(neither send or receive)[eFrameworkunifiedStatusInvldHndlType]
+/// - fail to close message queue(mq_close)[eFrameworkunifiedStatusInvldHandle]
+/// \~english @par Detail
+/// Close message-sending or message-receiving handle(designated by parameters)\n
+/// application call this function to close message queue which is created by McZcOpenSender.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see McZcOpenSender
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus McZcClose(HANDLE handle);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __NATIVESERVICES_MESSAGE_CENTER_IF_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_msgs.h b/nsframework/framework_unified/client/include/native_service/ns_msgs.h
new file mode 100644
index 00000000..48c83e71
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_msgs.h
@@ -0,0 +1,64 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSMessageCenter
+/// \brief
+///
+/// Header defines the messaging IF header that will be at the start of each message.
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef FRAMEWORK_UNIFIED_CLIENT_NS_MESSAGECENTER_INCLUDE_NS_MSGS_H_
+#define FRAMEWORK_UNIFIED_CLIENT_NS_MESSAGECENTER_INCLUDE_NS_MSGS_H_
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_shared_mem_if.h>
+
+#define MC_EMSGT_VALID_TOKEN (0xC8 << 24)
+#define MC_EMSGT_VALID_MASK (0xFF << 24)
+#define MC_EMSGT_VALID(t) ((t & MC_EMSGT_VALID_MASK) == MC_EMSGT_VALID_TOKEN) // NOLINT (readability/nolint)
+
+#define MC_EMSGT_SHM_MASK (0x1 << 0)
+#define MC_EMSGT_IS_SHM(t) (t & MC_EMSGT_SHM_MASK) // NOLINT (readability/nolint)
+
+#define MC_EMSGT_SYNC_MASK (0x1 << 1)
+#define MC_EMSGT_IS_SYNC(t) (t & MC_EMSGT_SYNC_MASK) // NOLINT (readability/nolint)
+
+#define MC_EMSGT_SYSINFO_MASK (0x1 << 2)
+#define MC_EMSGT_HAS_SYSINFO(t) (t & MC_EMSGT_SYSINFO_MASK) // NOLINT (readability/nolint)
+
+#pragma pack(1)
+/// \brief brief description of Messages Header that's pass via Message Center.
+/// Note: Don't remove #paragma pack(1) this is required for the
+/// ARM processor, forces data structures to be on a byte boundary
+/// all messages should be place in between #pragma pack(1) and #pragma pack()
+typedef struct tSysMsgHeader {
+ UI_32 eType; // The type of the message
+ TMemID memId; // Unique MemID of the data stored in shared memory,
+ // this is only valid if eType == IPC_MSG_SHM_TYPE
+ struct {
+ CHAR source[MAX_QUEUE_NAME_SIZE]; // Task that's sending the message.
+ UI_32 command; // The command id of the message
+ UI_32 length; // The length of the complete message in contiguous memory
+ // including the header and data block
+ UI_32 sessionid;
+ } info;
+} SSystemMsgHeader, *PSSystemMsgHeader;
+
+#pragma pack()
+
+#endif // FRAMEWORK_UNIFIED_CLIENT_NS_MESSAGECENTER_INCLUDE_NS_MSGS_H_
diff --git a/nsframework/framework_unified/client/include/native_service/ns_np_service.h b/nsframework/framework_unified/client/include/native_service/ns_np_service.h
new file mode 100644
index 00000000..e2a2deb7
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_np_service.h
@@ -0,0 +1,271 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NPPService
+/// \brief Header for message structures for notification_persistent_service.
+///
+/// Declares the external APIs to Notification and Persistence Service.
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @file ns_np_service.h
+ */
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup notification_persistent_service
+ * @ingroup native_service
+ * @{
+ */
+
+#ifndef __NATIVESERVICES_NP_SERVICE_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_NP_SERVICE_H__
+
+#include <native_service/frameworkunified_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \~english A structure to register notification msg
+ */
+typedef struct _NC_register_notif_msg {
+ CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION]; //!< \~english notification event name string
+ UI_32 maxLength; //!< \~english Maximum possible length (bytes) of
+ // the message data
+ // UI_8 bIsPersistent; ///< Flag to indicate if data has to be persisted.
+ EFrameworkunifiedNotificationType persType; //!< \~english Specifies persitence for this notification
+ UI_8 dummy[4]; //!< \~english Packing to 32 bit boundary
+} NC_register_notif_msg;
+
+/**
+ * \~english A structure to register multiple notification msg
+ */
+typedef struct _NC_register_multiple_notif_msg {
+ UI_32 numNotifications; //!< \~english This has to be UI_32 to avoid holes.
+ NC_register_notif_msg notifierList[1]; //!< \~english variable number of structures
+} NC_register_multiple_notif_msg;
+
+/**
+ * \~english A structure to register immediate notification msg
+ */
+typedef struct _NC_register_immediate_notif_msg {
+ CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION]; //!< \~english Notification Event Name string
+ UI_32 maxLength; //!< \~english Maximum possible length (bytes) of
+ // the message data
+ EFrameworkunifiedNotificationType persType; //!< \~english Specifies persitence for this notification
+ UI_32 delay; //!< \~english Delay time for persistence
+ UI_8 dummy[4]; //!< \~english Packing to 32 bit boundary
+} NC_register_immediate_notif_msg;
+
+/**
+ * \~english A structure to register multiple immediate notification msg
+ */
+typedef struct _NC_register_multiple_immediate_notif_msg {
+ UI_32 numNotifications; //!< \~english This has to be UI_32 to avoid holes.
+ NC_register_immediate_notif_msg notifierList[1]; //!< \~english variable number of structures
+} NC_register_multiple_immediate_notif_msg;
+
+/**
+ * \~english A structure to unregister notification msg
+ */
+typedef struct _NC_unregister_notif_msg {
+ CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION]; //!< \~english Notification Event Name string
+} NC_unregister_notif_msg, NC_subscribe_msg, NC_unsubscribe_frm_notif_msg, NC_get_pers_data_msg;
+
+/**
+ * \~english A structure to unregister multiple notification msg
+ */
+typedef struct _NC_unregister_multiple_notif_msg {
+ UI_32 numNotifications; //!< \~english notification event name num
+ NC_unregister_notif_msg notificationList[1]; //!< \~english notification event name List
+} NC_unregister_multiple_notif_msg;
+
+/**
+ * \~english A structure to save pers data
+ */
+typedef struct _NC_savepersdata_ack {
+ EFrameworkunifiedStatus eStatus; //!< \~english eFrameworkunifiedStatusOK is (valid - data stored, anything else is
+} NC_savepersdata_ack;
+
+/**
+ * \~english A structure to subscribe multiple notification msg
+ */
+typedef struct _NC_subscribe_multiple_notif_msg {
+ UI_32 numNotifications; //!< \~english notification event name num
+ NC_subscribe_msg notificationList[1]; //!< \~english notification event name List
+} NC_subscribe_multiple_notif_msg;
+
+/**
+ * \~english A structure to subscribe multiple notification msg
+ */
+typedef struct _NC_unsubscribe_multiple_notif_msg {
+ UI_32 numNotifications; //!< \~english notification event name num
+ NC_unsubscribe_frm_notif_msg notificationList[1]; //!< \~english notification event name List
+} NC_unsubscribe_multiple_notif_msg;
+
+/**
+ * \~english A structure to get pers data failed
+ */
+typedef struct __NC_get_persdata_failed_ack {
+ CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION]; //!< \~english notification name
+} NC_get_persdata_failed_ack;
+
+/**
+ * \~english A structure to set personality
+ */
+typedef struct _NC_User {
+ CHAR cUsername[MAX_PATH_LENGTH]; //!< \~english name of personality
+} NC_User;
+
+/**
+ * \~english A structure to register persistent file with the notification_persistent_service
+ */
+typedef struct _NC_RegisterPersistentFileMsg {
+ CHAR cFileTag[MAX_STRING_SIZE_TAG]; //!< \~english Tag associated with the
+ // file that would be persisted
+ BOOL bIsUserFile; //!< \~english is user file
+} NC_RegisterPersistentFileMsg;
+
+/**
+ * \~english A structure to specify where to load the file associated with the Tag
+ */
+typedef struct _NC_LoadPersistedFileMsg {
+ CHAR cFileTag[MAX_STRING_SIZE_TAG]; //!< \~english Tag associated with the file
+ CHAR cFilePath[MAX_PATH_LENGTH]; //!< \~english path to which the file needs to retrieved
+ CHAR cUsername[MAX_PATH_LENGTH]; //!< \~english Name of the user for user specific file.
+} NC_LoadPersistedFileMsg;
+
+/**
+ * \~english A structure to release persistent file
+ */
+typedef struct _NC_ReleasePersistentFileMsg {
+ EFrameworkunifiedReleaseType eFrameworkunifiedReleaseType; //!< \~english should the file be persisted
+ CHAR cFilePath[MAX_PATH_LENGTH]; //!< \~english path from which the
+ // file needs to be picked up to persist
+ CHAR cFileTag[MAX_STRING_SIZE_NOTIFICATION]; //!< \~english Tag associated with the
+ // file to be persisted
+ CHAR cUsername[MAX_PATH_LENGTH]; //!< \~english Name of the user for user specific file.
+} NC_ReleasePersistentFileMsg;
+
+/**
+ * \~english A structure to register persistent folder with the notification_persistent_service
+ */
+typedef struct _NC_RegisterPersistentFolderMsg {
+ CHAR cFolderTag[MAX_STRING_SIZE_TAG]; //!< \~english Tag associated with the
+ // folder that would be persisted
+ BOOL bIsUserFolder; //!< \~english Check if the folder is of user type
+} NC_RegisterPersistentFolderMsg;
+
+/**
+ * \~english A structure to specify where to load the folder associated with the Tag
+ */
+typedef struct _NC_LoadPersistedFolderMsg {
+ CHAR cFolderTag[MAX_STRING_SIZE_TAG]; //!< \~english Tag associated with the folder
+ CHAR cFolderPath[MAX_PATH_LENGTH]; //!< \~english path to which the folder needs to retrieved
+ CHAR cUsername[MAX_PATH_LENGTH]; //!< \~english Name of the user for user specific folder.
+} NC_LoadPersistedFolderMsg;
+
+/**
+ * \~english A structure to Release Persistent Folder Msg
+ */
+typedef struct _NC_ReleasePersistentFolderMsg {
+ EFrameworkunifiedReleaseType eFrameworkunifiedReleaseType; //!< \~english should the file be persisted
+ CHAR cFolderPath[MAX_PATH_LENGTH]; //!< \~english path from which the folder
+ // needs to be picked up to persist
+ CHAR cFolderTag[MAX_STRING_SIZE_NOTIFICATION]; //!< \~english Tag associated with
+ // the folder to be persisted
+ CHAR cUsername[MAX_PATH_LENGTH]; //!< \~english Name of the user for user
+ // specific folder.
+} NC_ReleasePersistentFolderMsg;
+
+/**
+ * \~english A structure to Load Persisted Ack
+ */
+typedef struct _NC_LoadPersistedAck {
+ EFrameworkunifiedStatus eStatus; //!< \~english ack the success/failure in
+ // retrieving the file/folder from persistence
+ CHAR cTag[MAX_PATH_LENGTH]; //!< \~english tag of the file/folder for which acknowledge is made
+} NC_LoadPersistedAck, NC_ReleasePersistedAck;
+
+/**
+ * \~english A structure to Nor Persistent Data
+ */
+typedef struct _NC_NorPersistentData {
+ CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION]; //!< \~english Notification Event Name string
+ CHAR pPublisherName[MAX_NAME_SIZE_APP]; //!< \~english Publisher Event Name string
+ UI_32 dataSize; //!< \~english data size
+ UI_32 uiDelay; //!< \~english ui Delay
+ UI_32 uiMaxSize; //!< \~english ui Max Size
+} NC_NorPersistentData;
+
+/**
+ * \~english A structure to request for deleting data from persistent memory
+ */
+typedef struct _NC_ClearPersistedDataReq {
+ EFrameworkunifiedClearPersistence ePersistenceData; //!< \~english defines what
+ // data to be deleted from persistent memory
+} NC_ClearPersistedDataReq;
+
+/**
+ * \~english A structure for receiving ack of data deleted from persistent memory
+ */
+typedef struct _NC_ClearPersisteDatadAck {
+ EFrameworkunifiedStatus eStatus; //!< \~english ack status of ClearPersistedData request
+} NC_ClearPersisteDatadAck;
+
+/**
+ * \~english A structure to request stop message to notification_persistent_service.
+ */
+typedef struct _NC_StopMsgData {
+ EFrameworkunifiedShutdownType eShutdownType; //!< \~english shutdown type
+ UI_32 uiStopMsgData; //!< \~english Reason for sending stop message to NPPService
+} NC_StopMsgData;
+
+/**
+ * \~english A structure to set the persist type of file and folder
+ */
+typedef struct _NC_SetPersistType {
+ EFrameworkunifiedPersistCategory ePersistType; //!< \~english persist type
+ CHAR cTag[MAX_PATH_LENGTH]; //!< \~english tag name of the file or folder
+} NC_SetFilePersistType, NC_SetFolderPersistType;
+
+/**
+ * \~english A data received with ack sent by notification_persistent_service when immediate notification data is
+ * written in persistent memory
+ */
+typedef struct _NC_ImmediateWriteAck {
+ CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION]; //!< \~english notification Name
+ EFrameworkunifiedStatus eStatus; //!< \~english status of request
+} NC_ImmediateWriteAck;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NATIVESERVICES_NP_SERVICE_H__ */ // NOLINT (build/header_guard)
+/** @}*/ // end of notification_persistent_service
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
+// EOF
diff --git a/nsframework/framework_unified/client/include/native_service/ns_np_service_if.h b/nsframework/framework_unified/client/include/native_service/ns_np_service_if.h
new file mode 100644
index 00000000..b1889582
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_np_service_if.h
@@ -0,0 +1,2482 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns_np_service_if.h
+ * @brief \~english Declares the external APIs to Notification and Persistence Service.
+ */
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup notification_persistent_service
+ * @ingroup native_service
+ * @{
+ */
+
+#ifndef __NATIVESERVICES_NP_SERVICE_IF_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_NP_SERVICE_IF_H__
+
+///////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \~english A structure to Notification Info
+ */
+typedef struct _NotificationInfo {
+ CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION]; ///< Notification Event Name string
+ UI_32 maxLength; ///< Maximum possible length (bytes) of the message data
+ EFrameworkunifiedNotificationType persType; ///< Specifies persitence for this notification
+ UI_8 dummy[4]; ///< Packing to 32 bit boundary
+} NotificationInfo;
+
+/**
+ * \~english A structure to Immediate Notification Info
+ */
+typedef struct _ImmediateNotificationInfo {
+ CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION]; ///< Notification Event Name string
+ UI_32 maxLength; ///< Maximum possible length (bytes) of the message data
+ EFrameworkunifiedNotificationType persType; ///< Specifies persitence for this notification
+ UI_32 delay;
+ UI_8 dummy[4]; ///< Packing to 32 bit boundary
+} ImmediateNotificationInfo;
+
+/**
+ * \~english A structure to Subscribe Info
+ */
+typedef struct _SubscribeInfo {
+ CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION]; ///< Notification Event Name string
+} SubscribeInfo;
+
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPRegisterNotifications
+/// \~english @par Brief
+/// API to send message to Notification Service to register a set of notification
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of Publisher message queue
+/// \~english @param[in] numNotifications
+/// PCSTR - Name of Notification
+/// \~english @param[in] pNotificationArray
+/// NotificationInfo - Array of notifications
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(numNotifications).
+/// - It is an incorrect value(pNotificationArray) or pNotificationArray is NULL.
+/// \~english @par Detail
+/// Invoke callback function with arguments to register a set of notification.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPRegisterNotifications' to
+/// register a set of notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPRegisterNotification, NPRegisterNotification
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPRegisterNotifications(HANDLE hNPMsgQ, PCSTR pPublisherName, UI_32 numNotifications,
+ NotificationInfo *pNotificationArray);
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPRegisterImmediateNotifications
+/// \~english @par Brief
+/// API to send message to Notification Service to register a set of immediate notifications
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of Publisher message queue.
+/// \~english @param[in] numNotifications
+/// PCSTR - Name of Notification.
+/// \~english @param[in] pNotificationArray
+/// ImmediateNotificationInfo - Array of immediate notifications
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(numNotifications).
+/// - It is an incorrect value(pNotificationArray) or pNotificationArray is NULL.
+/// \~english @par Detail
+/// Invoke callback function with arguments to register a set of immediate notification.\n
+/// If callback function is null and expectedCalls is '0', using default function
+/// 'NPRegisterImmediateNotifications' to register a set\n
+/// of immediate notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPRegisterImmediatePersistNotification
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPRegisterImmediateNotifications(HANDLE hNPMsgQ, PCSTR pPublisherName, UI_32 numNotifications,
+ ImmediateNotificationInfo *pNotificationArray);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPRegisterNotification
+/// \~english @par Brief
+/// API to send message to Notification Service to register a notification
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of Publisher message queue
+/// \~english @param[in] notif_name
+/// PCSTR - Name of Notification
+/// \~english @param[in] max_length
+/// const UI_32 - Max size of the notification message
+/// \~english @param[in] perstype
+/// const EFrameworkunifiedPersistentVarType - Flag to indicate if it has to be persistent
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(notif_name) or notif_name is NULL.
+/// - It is an incorrect value(max_length).
+/// \~english @par Detail
+/// Invoke callback function with arguments to register a notification.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPRegisterNotification' to
+/// register a notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// NPRegisterNotifications, FrameworkunifiedNPRegisterNotification
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPRegisterNotification(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR notif_name,
+ const UI_32 max_length, const EFrameworkunifiedNotificationType perstype);
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPUnRegisterNotification
+/// \~english @par Brief
+/// API to send message to Notification Service to remove a notification
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of Publisher message queue
+/// \~english @param[in] pNotification
+/// PCSTR - Name of Notification
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pNotification) or pNotification is NULL.
+/// \~english @par Detail
+/// Invoke NPUnRegisterNotifications to remove one notification named 'pPublisherName'.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPUnRegisterNotification, NPUnRegisterNotifications
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPUnRegisterNotification(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pNotification);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPSetPersistentNotfnType
+/// \~english @par Brief
+/// API to send message to Notification Service to set the persist category of notification.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Service Name
+/// \~english @param[in] pNotification
+/// PCSTR - Name of Notification
+/// \~english @param[in] ePersistCategory
+/// EFrameworkunifiedPersistCategory - Persistent category
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pNotification) or pNotification is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to set the persist category of
+/// notification.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPSetPersistentNotfnType' to
+/// send\n
+/// message to Notification Service to set the persist category of notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPSetPersistentNotfnType
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPSetPersistentNotfnType(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pNotification,
+ EFrameworkunifiedPersistCategory ePersistCategory);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPSetPersistNotfnDefaultValue
+/// \~english @par Brief
+/// API to send message to Notification Service to set default value of persistent category in notification.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Service Name
+/// \~english @param[in] pNotification
+/// PCSTR - Name of Notification
+/// \~english @param[in] pData
+/// PVOID - Data buffer
+/// \~english @param[in] iLength
+/// const UI_32 - Size of data buffer
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pNotification) or pNotification is NULL.
+/// - It is an incorrect value(pData) or pData is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to set default value of persistent category
+/// in notification.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPSetPersistNotfnDefaultValue'
+/// to send message\n
+/// to Notification Service to set default value of persistent category in notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPSetPersistNotfnDefaultValue
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPSetPersistNotfnDefaultValue(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pNotification,
+ PCVOID pData, const UI_32 iLength);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPUnRegisterNotifications
+/// \~english @par Brief
+/// API to send message to Notification Service to remove a set of notification
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of Publisher message queue
+/// \~english @param[in] numNotifications
+/// UI_32 - Number of Notification
+/// \~english @param[in] pNotificationArray
+/// NotificationInfo - Array of notifications
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(numNotifications).
+/// - It is an incorrect value(pNotificationArray) or pNotificationArray is NULL.
+/// - Allocate memory for deal with original notification array failed.
+/// \~english @par Detail
+/// Copy original notification array to temp allocated memory and then remove the given notifications from the
+/// memory.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPUnRegisterNotifications
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPUnRegisterNotifications(HANDLE hNPMsgQ, PCSTR pPublisherName, UI_32 numNotifications,
+ NotificationInfo *pNotificationArray);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPPublishNotification
+/// \~english @par Brief
+/// API to send message to Notification Service to notify subscribers
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of Publisher message queue
+/// \~english @param[in] pNotification
+/// PCSTR - Name of Notification
+/// \~english @param[in] pData
+/// PVOID - Data buffer
+/// \~english @param[in] iLength
+/// const UI_32 - Size of data buffer
+/// \~english @retval eFrameworkunifiedStatusOK
+/// \~english @retval eFrameworkunifiedStatusInvldParam
+/// \~english @retval eFrameworkunifiedStatusMsgQFull
+/// \~english @retval eFrameworkunifiedStatusErrNoEBAD
+/// \~english @retval eFrameworkunifiedStatusErrNoEINTR
+/// \~english @retval eFrameworkunifiedStatusInvldBufSize
+/// \~english @retval eFrameworkunifiedStatusFail
+/// \~english @retval eFrameworkunifiedStatusErrOther
+/// \~english @par Preconditons
+/// - none
+/// \~english @par Change of internal status
+/// - none
+/// \~english @par Conditions of processing failure
+/// - queue handle(hNPMsgQ,designated by parameter)is NULL[eFrameworkunifiedStatusInvldParam]
+/// - pubulisher name(pPublisherName,designated by parameter)is NULL[eFrameworkunifiedStatusInvldParam]
+/// - Notification name(pNotification)is NULL[eFrameworkunifiedStatusInvldParam]
+/// - pubulisher name(pPublisherName,designated by parameter)is nullbuffer[eFrameworkunifiedStatusInvldParam]
+/// - Notification name(pNotification,designated by parameter)is nullbuffer[eFrameworkunifiedStatusInvldParam]
+/// - message queue is full [eFrameworkunifiedStatusMsgQFull]
+/// - wrong file discriptor for message sending [eFrameworkunifiedStatusErrNoEBAD]
+/// - system call disruput during message sending process[eFrameworkunifiedStatusErrNoEINTR]
+/// - wrong buffer size for sending message[eFrameworkunifiedStatusInvldBufSize]
+/// - message sending failed[eFrameworkunifiedStatusFail]
+/// - failed access to shared memmory for message sending[eFrameworkunifiedStatusErrOther]
+/// \~english @par Detail
+/// send system info as Notification name and command[NPS_PUBLISH_EV_REQ] through McSendWithSysInfo()
+/// NPP service wii process according to command[NPS_PUBLISH_EV_REQ]when get the message above
+/// \~english @par Classification
+/// - pubulic
+/// \~english @par Type
+/// Pub-Sub
+/// \~english @see McSendWithSysInfo
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPPublishNotification(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pNotification,
+ PCVOID pData, const UI_32 iLength);
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPSubscribeToNotification
+/// \~english @par Brief
+/// API to send message to Notification Service to add to subscription list for.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pSubscriberName
+/// PCSTR - Name of subscriber message queue
+/// \~english @param[in] notif_name
+/// PCSTR - Name of Notification
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pSubscriberName) or pSubscriberName is NULL.
+/// - It is an incorrect value(notif_name) or notif_name is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to add to subscription list for given
+/// notification.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPSubscribeToNotification' to
+/// Notification Service to add to subscription list for given notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPSubscribeToNotification
+//////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPSubscribeToNotification(HANDLE hNPMsgQ, PCSTR pSubscriberName, PCSTR notif_name);
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPSubscribeToNotifications
+/// \~english @par Brief
+/// API to send message to Notification Service to add multiple subscriptions for a set of notification.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pSubscriberName
+/// PCSTR - Name of subscriber message queue
+/// \~english @param[in] numNotifications
+/// UI_32 - Number of Notifications
+/// \~english @param[in] pSubscribeInfoArray
+/// SubscribeInfo* - Array of SubscribeInfo
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pSubscriberName) or pSubscriberName is NULL.
+/// - It is an incorrect value(numNotifications).
+/// - It is an incorrect value(pSubscribeInfoArray) or pSubscribeInfoArray is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to add multiple subscriptions for a set of
+/// notification.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPSubscribeToNotifications' to
+/// Notification Service to add multiple subscriptions for a set of notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPSubscribeToNotifications
+EFrameworkunifiedStatus NPSubscribeToNotifications(HANDLE hNPMsgQ, PCSTR pSubscriberName, UI_32 numNotifications,
+ SubscribeInfo *pSubscribeInfoArray);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPUnsubscribeFromNotification
+/// \~english @par Brief
+/// API to send message to Notification Service to remove from subscription list for given notification.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pSubscriberName
+/// PCSTR - Name of subscriber message queue
+/// \~english @param[in] pNotification
+/// PCSTR - Name of Notification
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pSubscriberName) or pSubscriberName is NULL.
+/// - It is an incorrect value(pNotification) or pNotification is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to remove from subscription list for given
+/// notification.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPUnsubscribeFromNotification'
+/// to send message to Notification Service to remove from subscription list for given notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPUnsubscribeFromNotification
+EFrameworkunifiedStatus NPUnsubscribeFromNotification(HANDLE hNPMsgQ, PCSTR pSubscriberName, PCSTR pNotification);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPUnsubscribeFromNotifications
+/// \~english @par Brief
+/// API to send message to Notification Service to unsubscribe multiple subscriptions for a set of notification.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pSubscriberName
+/// PCSTR - Name of subscriber message queue
+/// \~english @param[in] numNotifications
+/// UI_32 - Number of Notifications
+/// \~english @param[in] pUnSubscribeInfoArray
+/// SubscribeInfo - Array of notifications
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pSubscriberName) or pSubscriberName is NULL.
+/// - It is an incorrect value(numNotifications).
+/// - It is an incorrect value(pUnSubscribeInfoArray) or pUnSubscribeInfoArray is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to unsubscribe multiple subscriptions for a
+/// set of notification.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPUnsubscribeFromNotifications'
+/// to send message to Notification Service to unsubscribe multiple subscriptions for a set of notification.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPUnsubscribeFromNotifications
+EFrameworkunifiedStatus NPUnsubscribeFromNotifications(HANDLE hNPMsgQ, PCSTR pUnSubscriberName, UI_32 numNotifications,
+ SubscribeInfo *pUnSubscribeInfoArray);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPReadPersistedData
+/// \~english @par Brief
+/// API to requested the persistent data corresponding to the notification if available.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue
+/// \~english @param[in] notification
+/// PCSTR - Name of Notification
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pSubscriberName) or pSubscriberName is NULL.
+/// - It is an incorrect value(notification) or notification is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to requested the persistent data corresponding to the notification if
+/// available.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPReadPersistedData' to
+/// requested the persistent data corresponding to the notification if available.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPReadPersistedData
+EFrameworkunifiedStatus NPReadPersistedData(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR notification);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPSavePersistentData
+/// \~english @par Brief
+/// API to send message to Notification Service to save all persisted data that in Ram to the file system via a
+/// file write.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pSubscriberName) or pSubscriberName is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to save all persisted data.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPSavePersistentData' to send
+/// message to Notification Service to save all persisted data.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPSavePersistentData
+EFrameworkunifiedStatus NPSavePersistentData(HANDLE hNPMsgQ, PCSTR pPublisherName);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPRegisterPersistentFile
+/// \~english @par Brief
+/// API to send message to Notification Service to add a file path as to be persisted.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] pTag
+/// PCSTR - A unique identifier for the file path specified, this is used in retrieve/Load the file later.
+/// \~english @param[in] bIsUserFile
+/// BOOL - Set TRUE, if registering user file.
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pSubscriberName) or pSubscriberName is NULL.
+/// - It is an incorrect value(pTag) or pTag is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to add a file path as to be persisted.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPRegisterPersistentFile' to
+/// send message to Notification Service to add a file path as to be persisted.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPRegisterPersistentFile
+EFrameworkunifiedStatus NPRegisterPersistentFile(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pTag, BOOL bIsUserFile);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPSetFilePersistentType
+/// \~english @par Brief
+/// API to send message to Notification Service to add a file path as to be persisted.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] pTag
+/// PCSTR - A unique identifier for the file path specified, this is used in retrieve/Load the file later.
+/// \~english @param[in] ePersistCategory
+/// EFrameworkunifiedPersistCategory - persist category
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pSubscriberName) or pSubscriberName is NULL.
+/// - It is an incorrect value(pTag) or pTag is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to add a file path as to be persisted. \n
+/// If callback function is null and expectedCalls is '0', using default function 'NPSetFilePersistentType' to
+/// send message to Notification Service to add a file path as to be persisted.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPSetFilePersistentType
+EFrameworkunifiedStatus NPSetFilePersistentType(HANDLE hNPMsgQ, PCSTR pPublisherName,
+ PCSTR pTag, EFrameworkunifiedPersistCategory ePersistCategory);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPLoadPersistentFile
+/// \~english @par Brief
+/// API to send message to Notification Service to copy file from persistent memory to
+/// specified path. The caller recieves an acknowledgement once NPS completes file copy
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] pDstFilePath
+/// PCSTR - Complete file path to which the file should be copied from persistent area.
+/// \~english @param[in] pTag
+/// PCSTR - Tag associated with the file that needs to be copied to pDstFilePath.
+/// \~english @param[in] hUser
+/// HANDLE - Load the file for the specified user.
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pDstFilePath) or pDstFilePath is NULL.
+/// - It is an incorrect value(pTag) or pTag is NULL.
+/// - It is an incorrect value(hUser) or hUser is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to copy file from persistent memory to
+/// specified path. \n
+/// If callback function is null and expectedCalls is '0', using default function 'NPLoadPersistentFile' to send
+/// message to Notification Service to copy file from persistent memory to specified path.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPLoadPersistentFile
+EFrameworkunifiedStatus NPLoadPersistentFile(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pDstFilePath,
+ PCSTR pTag, HANDLE hUser);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPReleasePersistentFile
+/// \~english @par Brief
+/// API to send message to Notification Service to notify that the file can be persisted.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] eReleaseType
+/// EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease:not on release
+/// eFrameworkunifiedPersistOnShutdown:persist on shutdown
+/// eFrameworkunifiedPersistInstantly:persist instantly
+/// \~english @param[in] pTag
+/// PCSTR - Tag associated with the file released
+/// \~english @param[in] pFullFilePath
+/// PCSTR - Full path name of the file to be persisted
+/// \~english @param[in] hUser
+/// HANDLE - Release the file for the specified user.
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pDstFilePath) or pDstFilePath is NULL.
+/// - It is an incorrect value(pTag) or pTag is NULL.
+/// - It is an incorrect value(pFullFilePath) or pFullFilePath is NULL.
+/// - It is an incorrect value(hUser) or hUser is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to notify that the file can be persisted. \n
+/// If callback function is null and expectedCalls is '0', using default function 'NPReleasePersistentFile' to
+/// send message to Notification Service to notify that the file can be persisted.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPReleasePersistentFile
+EFrameworkunifiedStatus NPReleasePersistentFile(HANDLE hNPMsgQ, PCSTR pPublisherName, EFrameworkunifiedReleaseType eReleaseType, PCSTR pTag,
+ PCSTR pFullFilePath, HANDLE hUser);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPPersistentSync
+/// \~english @par Brief
+/// API to synchronizes by NPPService.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] eReleaseType
+/// EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease:not on release
+/// eFrameworkunifiedPersistOnShutdown:persist on shutdown
+/// eFrameworkunifiedPersistInstantly:persist instantly
+/// \~english @param[in] SrcName
+/// PCSTR - source service name.
+/// \~english @param[in] sessionid
+/// UI_32 - session ID
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(SrcName) or SrcName is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(sessionid).
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// \~english @par Detail
+/// Invoke callback function to synchronizes by NPPService. \n
+/// If callback function is null and expectedCalls is '0', using default function 'NPPersistentSync' to
+/// synchronizes by NPPService.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPPersistentSync
+EFrameworkunifiedStatus NPPersistentSync(PCSTR SrcName, HANDLE hNPMsgQ, UI_32 sessionid, PCSTR pPublisherName);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPSetPersonality
+/// \~english @par Brief
+/// API to send message to Notification Service to set the Personality.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] pUserName
+/// PCSTR - Name of new Personality
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pUserName) or pUserName is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to set the Personality. \n
+/// If callback function is null and expectedCalls is '0', using default function 'NPSetPersonality' to send
+/// message to Notification Service to set the Personality.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPSetPersonality
+EFrameworkunifiedStatus NPSetPersonality(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pUserName);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPChangePersonality
+/// \~english @par Brief
+/// API to send message to Notification Service to change the current Personality.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] pUserName
+/// PCSTR - Name of new Personality
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pUserName) or pUserName is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to change the current Personality. \n
+/// If callback function is null and expectedCalls is '0', using default function 'NPChangePersonality' to send
+/// message to Notification Service to change the current Personality.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPChangePersonality
+EFrameworkunifiedStatus NPChangePersonality(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pUserName);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPGetReadyStatusOfNPP
+/// \~english @par Brief
+/// To be used by System Manager Service only. SystemManager will use this API to get the ready status of
+/// NPPService.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pRequesterName
+/// PCSTR - Name of the requesters message queue.
+/// \~english @param[in] pUserName
+/// PCSTR - Name of new Personality
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pRequesterName) or pRequesterName is NULL.
+/// - It is an incorrect value(pUserName) or pUserName is NULL.
+/// \~english @par Detail
+/// Invoke callback function to get the ready status of NPPService. \n
+/// If callback function is null and expectedCalls is '0', using default function 'NPGetReadyStatusOfNPP' to get
+/// the ready status of NPPService.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPGetReadyStatusOfNPP
+EFrameworkunifiedStatus NPGetReadyStatusOfNPP(HANDLE hNPMsgQ, PCSTR pRequesterName);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPClearPersistedData
+/// \~english @par Brief
+/// API to delete the persisted data of NS_NPS.
+/// Note: Currently to be used by HMI service only
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pRequesterName
+/// PCSTR - Name of the requesters message queue.
+/// \~english @param[in] eFrameworkunifiedClearPersistenceScope
+/// EFrameworkunifiedClearPersistence - specifies what data to delete from persistent memory.
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pRequesterName) or pRequesterName is NULL.
+/// \~english @par Detail
+/// Invoke callback function to delete the persisted data of NS_NPS.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPClearPersistedData' to delete
+/// the persisted data of NS_NPS.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPClearPersistedData
+EFrameworkunifiedStatus NPClearPersistedData(HANDLE hNPMsgQ, PCSTR pRequesterName, EFrameworkunifiedClearPersistence eFrameworkunifiedClearPersistenceScope);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPRegisterPersistentFolder
+/// \~english @par Brief
+/// API to send message to Notification Service to add a folder path as to be persisted.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] pTag
+/// PCSTR - A unique identifier for the folder path specified, this is used in retrieve/Load the folder later.
+/// \~english @param[in] bIsUserFolder
+/// BOOL - Set TRUE, if registering user folder.
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pTag) or pTag is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to add a folder path as to be persisted.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPRegisterPersistentFolder' to
+/// send message to Notification Service to add a folder path as to be persisted.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPRegisterPersistentFolder
+EFrameworkunifiedStatus NPRegisterPersistentFolder(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pTag, BOOL bIsUserFolder);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPSetFolderPersistentType
+/// \~english @par Brief
+/// API to send message to Notification Service to set the persist category of file.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] pTag
+/// PCSTR - A unique identifier for the file path specified, this is used in retrieve/Load the file later
+/// \~english @param[in] ePersistCategory
+/// EFrameworkunifiedPersistCategory - persist category
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pTag) or pTag is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to set the persist category of file.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPSetFolderPersistentType' to
+/// send message to Notification Service to set the persist category of file.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPSetFolderPersistentType
+EFrameworkunifiedStatus NPSetFolderPersistentType(HANDLE hNPMsgQ, PCSTR pPublisherName,
+ PCSTR pTag, EFrameworkunifiedPersistCategory ePersistCategory);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPLoadPersistentFolder
+/// \~english @par Brief
+/// API to send message to Notification Service to copy folder from persistent memory to
+/// specified path. The caller recieves an acknowledgement once NPS completes folder copy.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to message queue of Notification service.
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] pDstFolderPath
+/// PCSTR - Complete folder path to which the folder should be copied from persistent area
+/// \~english @param[in] pTag
+/// PCSTR - Tag associated with the folder that needs to be copied to pDstFolderPath
+/// \~english @param[in] hUser
+/// HANDLE - Name of new Personality
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pDstFolderPath) or pDstFolderPath is NULL.
+/// - It is an incorrect value(pTag) or pTag is NULL.
+/// - It is an incorrect value(hUser) or hUser is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to copy folder from persistent memory to
+/// specified path.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPLoadPersistentFolder' to send
+/// message to Notification Service to copy folder from persistent memory to specified path.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPLoadPersistentFolder
+EFrameworkunifiedStatus NPLoadPersistentFolder(HANDLE hNPMsgQ, PCSTR pPublisherName, PCSTR pDstFolderPath,
+ PCSTR pTag, HANDLE hUser);
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NPReleasePersistentFolder
+/// \~english @par Brief
+/// API to send message to Notification Service to notify that the folder can be persisted.
+/// \~english @param[in] hNPMsgQ
+/// HANDLE - Handle to the Framework
+/// \~english @param[in] pPublisherName
+/// PCSTR - Name of publisher message queue.
+/// \~english @param[in] eFrameworkunifiedReleaseType
+/// EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease :not on release
+/// eFrameworkunifiedPersistOnShutdown:persist on shutdown
+/// eFrameworkunifiedPersistInstantly :persist instantly
+/// \~english @param[in] pTag
+/// PCSTR - Tag associated with the folder released
+/// \~english @param[in] pFullFolderPath
+/// PCSTR - Full path name of the folder to be persisted
+/// \~english @param[in] hUser
+/// HANDLE - Name of new Personality
+/// \~english @retval EFrameworkunifiedStatus indicates success or error
+/// \~english @retval Success(eFrameworkunifiedStatusOK)
+/// \~english @retval Error(anything else)
+/// \~english @par
+/// EFrameworkunifiedStatus Enum
+/// \~english @code
+/// typedef enum eFrameworkunifiedStatus {
+/// eFrameworkunifiedStatusEmptyMediaList = -10, ///< Empty media list
+/// eFrameworkunifiedStatusSessionLimitMaxedOut = -9, ///< Maximum session limit reached
+/// eFrameworkunifiedStatusDbRecNotFound = -8, ///< Database record not found
+/// eFrameworkunifiedStatusDbResultError = -7, ///< Database result error
+/// eFrameworkunifiedStatusDbExecuteFail = -6, ///< Database execute fail
+/// eFrameworkunifiedStatusSemCloseFail = -5, ///< Semaphore close failed
+/// eFrameworkunifiedStatusSemUnlockFail = -4, ///< Semaphore unlock failed
+/// eFrameworkunifiedStatusSemLockFail = -3, ///< Semaphore lock failed
+/// eFrameworkunifiedStatusFail = -2, ///< Failed
+/// eFrameworkunifiedStatusErrOther = -1, ///< Unknown error
+/// eFrameworkunifiedStatusOK = 0, ///< Success / Pass / OK
+/// eFrameworkunifiedStatusInvldBuf = 1, ///< Invalid buffer
+/// eFrameworkunifiedStatusInvldHandle = 2, ///< Invalid handle
+/// eFrameworkunifiedStatusInvldHndlType = 3, ///< Invalid handle type
+/// eFrameworkunifiedStatusInvldQName = 4, ///< Invalid messasge queue name
+/// eFrameworkunifiedStatusMsgQFull = 5, ///< Message queue full
+/// eFrameworkunifiedStatusInvldNotification = 6,///< The Notification event not present
+/// eFrameworkunifiedStatusInvldParam = 7, ///< Invalid parameter
+/// eFrameworkunifiedStatusInvldBufSize = 8, ///< Buf size too small
+/// eFrameworkunifiedStatusInvldID = 9, ///< Unrecognized ID
+/// eFrameworkunifiedStatusCannotRelease = 10, ///< Cannot release resource
+/// eFrameworkunifiedStatusBadConnection = 11, ///< Could not locate resource
+/// eFrameworkunifiedStatusExit = 12, ///< Normal application termination
+/// eFrameworkunifiedStatusNotImplemented = 13, ///< incomplete feature
+/// eFrameworkunifiedStatusThreadBusy = 14, ///< Joined thread is already being joined
+/// eFrameworkunifiedStatusThreadSelfJoin = 15, ///< Thread is joining itself
+/// eFrameworkunifiedStatusThreadInvalidVal = 16, ///< Invalid value passed
+/// eFrameworkunifiedStatusThreadNotExist = 17, ///< The thread does not exist
+/// eFrameworkunifiedStatusFault = 18, ///< A fault occurred while attempting to make call
+/// eFrameworkunifiedStatusServNotFound = 19, ///< Service not present in serv dir
+/// eFrameworkunifiedStatusServerInUse = 20, ///< Service already processing 1 client request
+/// eFrameworkunifiedStatusDbIndexing = 21, ///< Database Indexing in progress
+/// eFrameworkunifiedStatusNullPointer = 22,
+/// eFrameworkunifiedStatusMsgNotProcessed = 23,
+/// eFrameworkunifiedStatusFileLoadSuccess = 24, ///< File Load Success
+/// eFrameworkunifiedStatusFileLoadError = 25, ///< File Load Error
+/// eFrameworkunifiedStatusAccessError = 26, ///< Error when accessing resource
+/// eFrameworkunifiedStatusDuplicate = 27, ///< Duplicate entry
+/// eFrameworkunifiedStatusMsgQEmpty = 28, ///< Message queue empty
+/// eFrameworkunifiedStatusThreadAlreadyRunning = 29,
+/// eFrameworkunifiedStatusErrNoEBADF = 30, ///< Bad file descriptor
+/// eFrameworkunifiedStatusErrNoEAGAIN = 31, ///< Resource unavailable, try again
+/// eFrameworkunifiedStatusErrNoEINTR = 32, ///< Interrupted system call
+/// eFrameworkunifiedStatusSessionErr = 33, ///< Error in session handling
+/// eFrameworkunifiedStatusDBCorrupt = 34, ///< Database corrupt
+/// eFrameworkunifiedStatusDBFileNotFound = 35 ///< Database file not found
+/// } EFrameworkunifiedStatus, *PEFrameworkunifiedStatus;
+/// @endcode
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - Function pointer specified by the argument is NULL.
+/// - It is an incorrect value(hNPMsgQ) or hNPMsgQ is NULL.
+/// - It is an incorrect value(pPublisherName) or pPublisherName is NULL.
+/// - It is an incorrect value(pDstFolderPath) or pDstFolderPath is NULL.
+/// - It is an incorrect value(pTag) or pTag is NULL.
+/// - It is an incorrect value(hUser) or hUser is NULL.
+/// \~english @par Detail
+/// Invoke callback function to send message to Notification Service to notify that the folder can be persisted.\n
+/// If callback function is null and expectedCalls is '0', using default function 'NPReleasePersistentFolder' to
+/// send message to Notification Service to notify that the folder can be persisted.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync only
+/// \~english @see
+/// FrameworkunifiedNPReleasePersistentFolder
+EFrameworkunifiedStatus NPReleasePersistentFolder(HANDLE hNPMsgQ, PCSTR pPublisherName, EFrameworkunifiedReleaseType eFrameworkunifiedReleaseType, PCSTR pTag,
+ PCSTR pFullFolderPath, HANDLE hUser);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NATIVESERVICES_NP_SERVICE_IF_H__ */ // NOLINT (build/header_guard)
+/** @}*/ // end of notification_persistent_service
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
+// EOF
diff --git a/nsframework/framework_unified/client/include/native_service/ns_np_service_nor_persistence.h b/nsframework/framework_unified/client/include/native_service/ns_np_service_nor_persistence.h
new file mode 100644
index 00000000..88daef7b
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_np_service_nor_persistence.h
@@ -0,0 +1,151 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NPPService
+/// \brief This file contains the declaration for methods to retrieve and store data for NOR storage
+///
+///
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @file ns_np_service_nor_persistence.h
+ * @brief This file contains the declaration for methods to retrieve and store data for NOR storage
+ */
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup notification_persistent_service
+ * @ingroup native_service
+ * @{
+ */
+
+#ifndef __NATIVESERVICES_NP_NOR_SERVICE_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_NP_NOR_SERVICE_H__
+
+///////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NPSynchronousReadPersistentData
+ /// \~english @par Brief
+ /// API to synchronously read persistent data corresponding to a notification before NPPService is available
+ /// \~english @param[in] pAppName
+ /// PCSTR - Application/ thread name
+ /// \~english @param[in] notif_name
+ // PCSTR - Name of Notification
+ /// \~english @param[in] pData
+ /// PVOID - Pointer to the buffer where read data will be written.
+ /// \~english @param[in] uiDataSize
+ /// UI_32 - Length of the data buffer.
+ /// \~english @param[in] ePersistCategory
+ /// const EFrameworkunifiedPersistCategory - Persist Category of Notification.
+ /// \~english @retval eFrameworkunifiedStatusOK
+ /// \~english @retval eFrameworkunifiedStatusInvldParam
+ /// \~english @retval eFrameworkunifiedStatusFail
+ /// \~english @par Preconditons
+ /// none
+ /// \~english @par Change of internal status
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - NULL handle specified in the argument(pAppName).[eFrameworkunifiedStatusInvldParam]
+ /// - NULL handle specified in the argument(notif_name).[eFrameworkunifiedStatusInvldParam]
+ /// - NULL handle specified in the argument(pData).[eFrameworkunifiedStatusInvldParam]
+ /// - 0 specified in the argument(uiDataSize).[eFrameworkunifiedStatusFail]
+ /// - Handle of the application [eFrameworkunifiedStatusFail]
+ /// - If the file access process fails,.... [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// API to synchronously read persistent data corresponding to a notification before NPPService is available
+ /// \~english @par
+ /// File reading by this API is exclusive control by semaphore,
+ /// and writing to non-voatie area is to use NPSynchronousWritePersistentData().
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Set Get
+ /// \~english @see NPSynchronousWritePersistentData
+ ////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPSynchronousReadPersistentData(PCSTR pAppName,
+ PCSTR notif_name,
+ PVOID pData,
+ UI_32 uiDataSize,
+ const EFrameworkunifiedPersistCategory ePersistCategory = eFrameworkunifiedUserData);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NPSynchronousWritePersistentData
+ /// \~english @par Brief
+ /// API to synchronously write persistent data corresponding to a notification before NPPService is available
+ /// \~english @param[in] pAppName
+ /// PCSTR - Application/ thread name
+ /// \~english @param[in] notif_name
+ // PCSTR - Name of Notification
+ /// \~english @param[in] pData
+ /// PVOID - Pointer to the buffer where read data will be written.
+ /// \~english @param[in] uiDataSize
+ /// UI_32 - Length of the data buffer.
+ /// \~english @param[in] ePersistCategory
+ /// const EFrameworkunifiedPersistCategory - Persist Category of Notification.
+ /// \~english @retval eFrameworkunifiedStatusOK
+ /// \~english @retval eFrameworkunifiedStatusInvldParam
+ /// \~english @retval eFrameworkunifiedStatusFail
+ /// \~english @par Preconditons
+ /// none
+ /// \~english @par Change of internal status
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - NULL handle specified in the argument(pAppName).[eFrameworkunifiedStatusInvldParam]
+ /// - NULL handle specified in the argument(notif_name).[eFrameworkunifiedStatusInvldParam]
+ /// - NULL handle specified in the argument(pData).[eFrameworkunifiedStatusInvldParam]
+ /// - 0 specified in the argument(uiDataSize).[eFrameworkunifiedStatusFail]
+ /// - Handle of the application [eFrameworkunifiedStatusFail]
+ /// - If the file access process fails,.... [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// API to synchronously read persistent data corresponding to a notification before NPPService is available
+ /// \~english @par
+ /// File reading by this API is exclusive control by semaphore,
+ /// and writing to non-voatie area is to use NPSynchronousWritePersistentData().
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Set Get
+ /// \~english @see NPSynchronousWritePersistentData
+ ////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPSynchronousWritePersistentData(PCSTR pAppName,
+ PCSTR notif_name,
+ PVOID pData,
+ const UI_32 uiDataSize,
+ const EFrameworkunifiedPersistCategory ePersistCategory = eFrameworkunifiedUserData);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NATIVESERVICES_NP_NOR_SERVICE_H__ */ // NOLINT (build/header_guard)
+/** @}*/ // end of notification_persistent_service
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
+// EOF
diff --git a/nsframework/framework_unified/client/include/native_service/ns_np_service_nor_persistence_internal.h b/nsframework/framework_unified/client/include/native_service/ns_np_service_nor_persistence_internal.h
new file mode 100644
index 00000000..ea149c5a
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_np_service_nor_persistence_internal.h
@@ -0,0 +1,131 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NPServiceIf
+/// \brief This file contains the declaration for internal functions to retrieve and store
+/// immediate notification data from and to persistent storage.
+///
+///
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef FRAMEWORK_UNIFIED_CLIENT_NS_NPSERVICEIF_INCLUDE_NS_NP_SERVICE_NOR_PERSISTENCE_INTERNAL_H_
+#define FRAMEWORK_UNIFIED_CLIENT_NS_NPSERVICEIF_INCLUDE_NS_NP_SERVICE_NOR_PERSISTENCE_INTERNAL_H_
+
+///////////////////////////////////////////////////////////////////////////////
+// Include Files
+///////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_np_service.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// NPSynchronousGetPersistentData
+/// API to retrieve immediate storage notification data structure.
+///
+///
+/// \param [in] pAppName
+/// PCSTR - Name of application service
+/// \param [in] notif_name
+/// PCSTR - Name of notification to be written to immediate storage
+/// \param [in] pData
+/// PVOID - Notification data
+/// \param [in] uiDataSize
+/// UI_32 - Size of notification data
+/// \param [out] ptNorPersistentData
+/// NC_NorPersistentData - Immediate notification structure
+/// \param [in] ePersistCategory
+/// const EFrameworkunifiedPersistCategory - Persist Category of Notification.
+///
+/// \return status
+/// EFrameworkunifiedStatus - success or error
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPSynchronousGetPersistentData(PCSTR pAppName,
+ PCSTR notif_name,
+ PVOID pData,
+ UI_32 uiDataSize,
+ NC_NorPersistentData &ptNorPersistentData,
+ const EFrameworkunifiedPersistCategory ePersistCategory);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// NPSynchronousGetPersistentDataSize
+/// API to get immediate storage notification data size.
+///
+/// \param [in] notif_name
+/// PCSTR - Name of notification to be read from immediate storage
+/// \param [out] uiDataSize
+/// PUI_32 - notification data size
+/// \param [in] ePersistCategory
+/// const EFrameworkunifiedPersistCategory - Persist Category of Notification.
+///
+/// \return EFrameworkunifiedStatus
+/// EFrameworkunifiedStatus - success or failure
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NPSynchronousGetPersistentDataSize(PCSTR notif_name,
+ PUI_32 uiDataSize,
+ const EFrameworkunifiedPersistCategory ePersistCategory);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SynchronousGetPersistentDataSize
+/// API to write immediate persistence notification data.
+///
+/// \param [in] notif_name
+/// PCSTR - Name of notification to be read from immediate storage
+/// \param [in] ePersistCategory
+/// const EFrameworkunifiedPersistCategory - Persist Category of Notification.
+///
+/// \return UI_32
+/// UI_32 - size of the data
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus SynchronousWritePersistentData(PCSTR pAppName,
+ PCSTR notif_name,
+ PVOID pData,
+ const UI_32 uiDataSize,
+ const UI_32 uiDelay,
+ const UI_32 uiMaxSize,
+ const EFrameworkunifiedPersistCategory ePersistCategory);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// SynchronousMovePersistentData
+/// API to move all the immediate notification data from f_cSrcDir directory to
+/// f_cDestDir directory
+///
+/// \param [in] f_cSrcDir
+/// PCSTR - Source directory full path
+/// \param [in] f_cDestDir
+/// PCSTR - Dest directory full path
+///
+/// \return EFrameworkunifiedStatus
+/// EFrameworkunifiedStatus - eFrameworkunifiedStatusAccessError if source path not exists
+/// eFrameworkunifiedStatusFileLoadError if unable to access src directory
+/// eFrameworkunifiedStatusInvldParam if invalid parameter is received
+/// eFrameworkunifiedStatusFail if error occurs while copying file
+/// eFrameworkunifiedStatus on success
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus SynchronousMovePersistentData(PCSTR f_cSrcDir,
+ PCSTR f_cDestDir);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // FRAMEWORK_UNIFIED_CLIENT_NS_NPSERVICEIF_INCLUDE_NS_NP_SERVICE_NOR_PERSISTENCE_INTERNAL_H_
+
+// EOF
diff --git a/nsframework/framework_unified/client/include/native_service/ns_np_service_notification.h b/nsframework/framework_unified/client/include/native_service/ns_np_service_notification.h
new file mode 100644
index 00000000..5d389ec6
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_np_service_notification.h
@@ -0,0 +1,50 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NPPService
+/// \brief Notifications for notification service messages used by senders and receivers.
+///
+/// Declares the external Notification messages to the Notification Service.
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @file ns_np_service_notification.h
+ */
+
+
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup notification_persistent_service
+ * @ingroup native_service
+ * @{
+ */
+
+#ifndef NS_NP_SERVICE_NOTIFICATIONS_H_ // NOLINT (build/header_guard)
+#define NS_NP_SERVICE_NOTIFICATIONS_H_
+
+#define NTFY_NPPService_UserChange "NPPService/UserChange" //!< \~english notification_persistent_service server's Availability folder
+
+#endif /* NS_NP_SERVICE_NOTIFICATIONS_H_ */ // NOLINT (build/header_guard)
+/** @}*/ // end of notification_persistent_service
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/ns_np_service_protocol.h b/nsframework/framework_unified/client/include/native_service/ns_np_service_protocol.h
new file mode 100644
index 00000000..475950bb
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_np_service_protocol.h
@@ -0,0 +1,116 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NPPService
+/// \brief API Header for Notification Service messages used by senders and recievers.
+///
+/// Declares the external Protocol messages to the Notification Service.
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @file ns_np_service_protocol.h
+ */
+
+
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup notification_persistent_service
+ * @ingroup native_service
+ * @{
+ */
+#ifndef __NATIVESERVICES_NP_SERVICE_PROTOCOL_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_NP_SERVICE_PROTOCOL_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_service_protocol.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \~english notification_persistent_service protocol msg name define
+ */
+typedef enum _NS_NPServiceProtocol {
+ NPS_REGISTER_EV_REQ = PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD + 0, /// <16+0 Request to register a Notification
+ NPS_UNREGISTER_EV_REQ , /// <1 Request to unregister a Notification
+ NPS_PUBLISH_EV_REQ , /// <2 Sender request to NP service to publish (send) a notification to subscribers
+ NPS_NOTIFY_EV_REQ , /// <3 Message to subscribers that the notification was generated by publisher
+ NPS_SUBSCRIBE_TO_EV_REQ , /// <4 Request to subscribe to a notification
+ NPS_UNSUBSCRIBE_FROM_EV_REQ , /// <5 Request to unsubscribe from a notification
+ NPS_SET_PERSIST_FILE_PATH_REQ , /// <6 Request to add a path to the list of files to be persisted
+ NPS_GET_PERS_DATA_REQ , /// <7 Request to get persistent data for specified notification
+ NPS_GET_PERS_DATA_ACK , /// <8 MSG from NPS to requester of persistent data.
+ NPS_GET_PERS_FILE_REQ , /// <9 Request to get persistent File from specified path
+ NPS_GET_PERS_FILE_ACK , /// <10 MSG from NPS to inform that file was retrieved from persistent
+ /// mem and copied.
+ NPS_SAVE_PERS_DATA_REQ , /// <11 Request to save the persistent data to what ever file that has
+ /// been defined.
+ NPS_SAVE_PERS_DATA_ACK , /// <12 MSG from NPS to requester of Save Action.
+ NPS_RELEASE_PERS_FILE_REQ , /// <13 Request to NPS to persist file in persistent memory
+ NPS_NPP_STOP_REQ , /// <14 MSG from system manager to NS_NPS to stop processing.
+ /// NS_NPS goes to idle state.
+ NPS_TST_WAKEUP , /// <15
+ NPS_BATCH_SUBSCRIBE_TO_EV_REQ , /// <16 Request to subscribe to a batch of notification(s)
+ NPS_GET_PERS_DATA_FAILED_ACK , /// <17 Failed to get persistent data
+ NPS_SET_PERSONALITY_REQ , /// <18 Request to change current user
+ NPS_CHANGE_PERSONALITY_REQ , /// <19 Request to change current user
+ NPS_USER_CHANGE_REQ , /// <20 MSG from NPS to frameworkunified applications.
+ NPS_SET_PERSIST_FOLDER_PATH_REQ , /// <21 Request to add a path to the folder to be persisted
+ NPS_GET_PERS_FOLDER_REQ , /// <22 Request to get persistent Folder from specified path
+ NPS_RELEASE_PERS_FOLDER_REQ , /// <23 Request to NPS to persist folder in persistent memory
+ NPS_GET_PERS_FOLDER_ACK, /// <24 Ack from NPS to requester to inform that folder was retrieved from persistent mem
+ /// and copied.
+ NPS_NPP_STOP_ACK , /// <25 Ack from NS_NPS to system manager on NPS_NPP_STOP_REQ request
+ NPS_BATCH_UNSUBSCRIBE_FROM_EV_REQ , /// <26
+ NPS_GET_READYSTATUS_REQ , /// <27 Request from system manager to check the ready status of NPPService
+ NPS_GET_READYSTATUS_ACK , /// <28 Ack from NPPService to system manager, only if NPPService is in ready state
+ NPS_REGISTER_NOR_EV_REQ , /// <29 Request to register immediate notification
+ NPS_DELETE_PERSISTED_DATA_REQ , /// <30 Request to delete the persistent data.
+ NPS_DELETE_PERSISTED_DATA_ACK , /// <31 Ack of deleting the persistent data.
+ NPS_SET_DEFAULT_PERS_DATA , /// <32 Sets the default data for persistent notification.
+ NPS_SET_NOTFN_PERSISTENT_TYPE , /// <33 Sets the persistent type of notification.
+ NPS_SET_FILE_PERSISTENT_TYPE , /// <34 Sets the persistent type of file.
+ NPS_SET_FOLDER_PERSISTENT_TYPE , /// <35 Sets the persistent type of folder.
+ NPS_SYNCHRONOUS_WRITE_NOTIFY_REQ , /// <36 Updates the immediate notification data in NPPService,
+ /// when written using synchronous API.
+ NPS_IMMEDIATE_WRITE_ACK , /// <37 Sends the ack to publisher of immediate notification after
+ /// data is written to persistent memory.
+ NPS_NPP_SYNC_REQ /// <38 Processing which synchronizes by NPPService (syncfs)
+} NS_NPServiceProtocol;
+
+/**
+ * \~english notification_persistent_service service event
+ */
+typedef enum _NS_NPServiceEvent {
+ NPS_NPP_READY_EVENT = 0x100,
+} NS_NPServiceEvent;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __NATIVESERVICES_NP_SERVICE_PROTOCOL_H__ */ // NOLINT (build/header_guard)
+/** @}*/ // end of notification_persistent_service
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
+// EOF
diff --git a/nsframework/framework_unified/client/include/native_service/ns_np_types.h b/nsframework/framework_unified/client/include/native_service/ns_np_types.h
new file mode 100644
index 00000000..01559d97
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_np_types.h
@@ -0,0 +1,47 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NPServiceIf
+/// \brief
+///
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef FRAMEWORK_UNIFIED_CLIENT_NS_NPSERVICEIF_INCLUDE_NS_NP_TYPES_H_
+#define FRAMEWORK_UNIFIED_CLIENT_NS_NPSERVICEIF_INCLUDE_NS_NP_TYPES_H_
+
+// Path of immediate notification data in NS_NPS version 1
+#define IMMEDIATE_PERSISTENCE_STORAGE_V1 "/nv/BS/ns/npp/rwdata/NPSNOR/"
+
+// Path of immediate notification data in NS_NPS version 2
+#define IMMEDIATE_PERSISTENCE_STORAGE_V2 "/nv/BS/ns/npp/rwdata/"
+
+// name of persistence folder for persistent type categorization
+#define USERDATADIR "UserData/" // stores all the user data (all user common data as well as user specific data)
+#define FACTORYDATADIR "FactoryData/" // stores all the factory data
+#define FACTORYCUSTOMERDATADIR "FactoryCustomerData/" // store all the factory customer data
+#define DEALERDATADIR "DealerData/" // stores all the dealer data
+
+#define IMMEDIATEDATADIR "__ImmNotfn/" // all immediate notification are stored under this folder name
+
+// folder for storing userdata common for all user
+#define ALLUSERAPPDATADIR "AllUserAppData/"
+
+#define RELEASETEMP_DIR "/nps_tmp/"
+#define RELEASETEMP_FILENAME "/ReleaseWork.nps_tmp"
+
+#endif // FRAMEWORK_UNIFIED_CLIENT_NS_NPSERVICEIF_INCLUDE_NS_NP_TYPES_H_
diff --git a/nsframework/framework_unified/client/include/native_service/ns_plogger_if.h b/nsframework/framework_unified/client/include/native_service/ns_plogger_if.h
new file mode 100644
index 00000000..f926f38e
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_plogger_if.h
@@ -0,0 +1,288 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \file
+/// Declares functions and macros related to performance logging
+///
+/// \ingroup tag_NSLogger
+/// @{
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @file
+ * @brief \~english Declares functions and macros related to performance logging
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+
+#ifndef NS_PLOGGER_IF_H_ // NOLINT (build/header_guard)
+#define NS_PLOGGER_IF_H_
+
+#include <native_service/frameworkunified_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define NS_PLOGQ "/NSplog"
+#define NS_SYSEVENTLOGQ "/NSSysEventLog"
+
+/// Performance logging
+typedef enum _EPLOG_TIME_FORMAT {
+ EPLOG_TIME_FORMAT_USEC, ///< microseconds
+ EPLOG_TIME_FORMAT_MSEC, ///< miliseconds
+ EPLOG_TIME_FORMAT_SEC, ///< seconds
+} EPLOG_TIME_FORMAT;
+
+typedef enum _EPLOG_OUTPUT_OPTION {
+ EPLOG_SLOG = 0x01, ///< log to standard logging i.e. slogger
+ EPLOG_MSGQ = 0x02, ///< log to message queue NSPlog
+ EPLOG_TRACEEVENT = 0x04 ///< log to trace events
+} EPLOG_OUTPUT_OPTION;
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief Performance LOG parameter
+///////////////////////////////////////////////////////////////////////////////
+typedef struct _FRAMEWORKUNIFIEDLOGPPARAM {
+ BOOL bIsPLogEnabled; ///< PLog enabled or disabled
+ EPLOG_TIME_FORMAT eTimeFormat; ///< Time format when PLog is printed
+ UI_64 ui64GapInuS; ///< Gap in micro seconds
+ UI_8 uiLogOutputOptions; ///< Output log options
+} FRAMEWORKUNIFIEDLOGPPARAM, *LFRAMEWORKUNIFIEDLOGPPARAM;
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief System event LOG parameter
+///////////////////////////////////////////////////////////////////////////////
+typedef struct _FRAMEWORKUNIFIEDLOGSYSEVENTPARAM {
+ BOOL bIsSysEventLogEnabled; ///< SysEvent log enabled or disabled
+} FRAMEWORKUNIFIEDLOGSYSEVENTPARAM, *LFRAMEWORKUNIFIEDLOGSYSEVENTPARAM;
+
+extern FRAMEWORKUNIFIEDLOGPPARAM g_FrameworkunifiedLogPParams;
+extern FRAMEWORKUNIFIEDLOGSYSEVENTPARAM g_FrameworkunifiedLogSysEventParams;
+
+#define PLOG_TEXT(args...) NSLogPrintPerformanceLog(__LINE__, __FUNCTION__, ## args)
+#define SYSEVENTLOG_TEXT(args...) NSLogSysEvent(__LINE__, __FUNCTION__, ## args)
+#define IS_PLOG_ENABLED() NsLogIsPLogEnabled()
+#define IS_SYSEVENTLOG_ENABLED() NSLogIsSysEventLogEnabled()
+
+#ifdef __FRAMEWORKUNIFIEDLOG_NDEBUG_LEVEL2__
+#define FRAMEWORKUNIFIEDLOG_PERFORMANCE_DEBUG(print_fmt, args...) ((void)0)
+#else
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief FRAMEWORKUNIFIEDLOG_PERFORMANCE_DEBUG
+///////////////////////////////////////////////////////////////////////////////
+/// Prints a performance log in PosixBasedOS001 system log. These logs can be viewed by using utility sloginfo.
+/// \note This macro API is disable in Linux system
+/// This macro API is disable if defined "__FRAMEWORKUNIFIEDLOG_NDEBUG_LEVEL2__"
+///
+/// \param [in] print_fmt
+/// PCSTR - Input string
+/// \param [in] args
+/// string similar to that of a printf statement and data argments
+///////////////////////////////////////////////////////////////////////////////
+#define FRAMEWORKUNIFIEDLOG_PERFORMANCE_DEBUG(print_fmt, args...) ((IS_PLOG_ENABLED()) ? PLOG_TEXT(print_fmt, ## args): ((void)0))
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief FRAMEWORKUNIFIEDLOG_PERFORMANCE
+///////////////////////////////////////////////////////////////////////////////
+/// FRAMEWORKUNIFIEDLOG_PERFORMANCE is a logging API provided specifically for logging performance metrics.
+/// \note This macro API is disable in Linux system
+/// It should be used in few locations within an application. (Max 5 times per application).
+/// It should never be used in place of FRAMEWORKUNIFIEDLOG.
+///
+/// \param [in] print_fmt
+/// string similar to that of a printf statement
+/// \param [in] args
+/// Data arguments
+///////////////////////////////////////////////////////////////////////////////
+#define FRAMEWORKUNIFIEDLOG_PERFORMANCE(print_fmt, args...) ((IS_PLOG_ENABLED()) ? PLOG_TEXT(print_fmt, ## args): ((void)0))
+
+///////////////////////////////////////////////////////////////////////////////
+/// FRAMEWORKUNIFIEDLOG_SYSTEMEVENT
+///
+/// \param [in] print_fmt
+/// string similar to that of a printf statement
+/// \param [in] args
+/// Data arguments
+///////////////////////////////////////////////////////////////////////////////
+#define FRAMEWORKUNIFIEDLOG_SYSTEMEVENT(print_fmt, args...) ((IS_SYSEVENTLOG_ENABLED()) ?\
+ SYSEVENTLOG_TEXT(print_fmt, ## args): ((void)0))
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSLogPrintPerformanceLog
+/// \~english @par Brief
+/// This macro API is disable in Linux system
+/// \~english @param [in] f_ui16Line
+/// const UI_16 - line number
+/// \~english @param [in] f_cFuncName
+/// PCSTR - Function name. It takes __PRETTY_FUNCTION__
+/// \~english @param [in] print_fmt
+/// PCSTR - Input string
+/// \~english @retval none
+/// \~english @par Prerequisite
+/// - Work ony when AGL_STUB is disabled.
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// none
+/// \~english @par Detail
+/// Prints a performance log in PosixBasedOS001 system log. These logs can be viewed by using utility sloginfo.
+/// Log is in format: "Plog: Time[us]:x or o (if gap in cs):Line:Function Input string"\n
+/// - Outputs in time units (microseconds/milliseconds/second) that can be set by the NSLogSetPlogTimeFormat.
+/// - The time data to be output is added to the gap data described in the/dev/shmem/Plog.gap files.
+/// - This information is output to the log output destinations (system log, NSPlog message queue, and event trace)
+/// that can be set by the NSLogSetPlogOutputOptions.(Default: NSPLog message queue)
+/// - PLOG_TEXT, Use this API from the FRAMEWORKUNIFIEDLOG_PERFORMANCE and FRAMEWORKUNIFIEDLOG_PERFORMANCE_DEBUG macros.\n
+/// Continued:\n
+/// - PLOG_TEXT("Service Availability Status: %d", IsAvailable);
+/// - FRAMEWORKUNIFIEDLOG_PERFORMANCE("Service Availability Status: %d", IsAvailable);
+/// - FRAMEWORKUNIFIEDLOG_PERFORMANCE_DEBUG("Service Availability Status: %d", IsAvailable);
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// none
+////////////////////////////////////////////////////////////////////////////////////////////////
+VOID NSLogPrintPerformanceLog(const UI_16 f_ui16Line, PCSTR f_cFuncName, PCSTR __format, ...);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// NSLogEnablePLog
+/// Enables/Disables the performance logging
+///
+/// \param [in] f_bEnable
+/// BOOL - TRUE- Enable performance logging, FALSE - Disable
+///
+/// \return none
+///
+////////////////////////////////////////////////////////////////////////////////////////////////
+VOID NSLogEnablePLog(BOOL f_bEnable);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NsLogIsPLogEnabled
+/// \~english @par Brief
+/// Is Enables/Disables the performance logging
+/// \~english @retval TRUE current state of plog enable.
+/// \~english @retval FALSE current state of plog disable.
+/// \~english @par Prerequisite
+/// -
+/// \~english @par Change of internal state
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// -
+/// \~english @par Detail
+/// Get the Performance Log enable/disable status.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// No match
+/// \~english @see
+/// NSLogEnablePLog
+////////////////////////////////////////////////////////////////////////////////////////////////
+BOOL NsLogIsPLogEnabled(void);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// NSLogSetPlogTimeFormat
+/// Set the time format for performance logging.
+///
+/// \param [in] f_ePlogTimeFormat
+/// EPLOG_TIME_FORMAT - Time format for performance logging
+///
+/// \return none
+///
+////////////////////////////////////////////////////////////////////////////////////////////////
+VOID NSLogSetPlogTimeFormat(EPLOG_TIME_FORMAT f_ePlogTimeFormat);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// NSLogSetPlogOutputOptions
+/// Set the output options for performance logging.
+///
+/// \param [in] f_uiPlogOutputOption
+/// UI_8 - Output option. Value is generated by or'ed value of enum EPLOG_OUTPUT_OPTION
+/// e.g. EPLOG_SLOG | EPLOG_MSGQ
+///
+/// \return none
+///
+////////////////////////////////////////////////////////////////////////////////////////////////
+VOID NSLogSetPlogOutputOptions(UI_8 f_uiPlogOutputOption);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// NSLogSysEvent()
+/// Prints system event log in message queue NSSyseventlog.
+///
+/// \param [in] f_ui16Line
+/// const UI_16 - line number
+/// \param [in] f_cFuncName
+/// PCSTR - Function name. It takes __PRETTY_FUNCTION__
+/// \param [in] __format
+/// PCSTR - Input string
+///
+/// \return none
+///
+////////////////////////////////////////////////////////////////////////////////////////////////
+VOID NSLogSysEvent(const UI_16 f_ui16Line, PCSTR f_cFuncName, PCSTR __format, ...);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// NSLogEnableSysEventLog
+/// Enables/Disables the system event logging
+///
+/// \param [in] f_bEnable
+/// BOOL - TRUE- Enable system event logging, FALSE - Disable
+///
+/// \return none
+///
+////////////////////////////////////////////////////////////////////////////////////////////////
+VOID NSLogEnableSysEventLog(BOOL f_bEnable);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// NSLogIsSysEventLogEnabled
+/// Is Enables/Disables the system event logging
+///
+/// \return SysEventLogEnabled
+/// BOOL - current state of sys event log(enable/disable).
+////////////////////////////////////////////////////////////////////////////////////////////////
+BOOL NSLogIsSysEventLogEnabled(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* NS_PLOGGER_IF_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+/// @}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_rcs_data_handler.hpp b/nsframework/framework_unified/client/include/native_service/ns_rcs_data_handler.hpp
new file mode 100644
index 00000000..6f303f1c
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_rcs_data_handler.hpp
@@ -0,0 +1,1159 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file
+ * @brief \~english This file contains declaration of CPassThruInDataHandler class
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup nsrcs
+ * @ingroup framework_unified
+ * @{
+ */
+
+// todo: move this file to the rcs interface folder
+
+#ifndef _NS_RCS_DATA_HANDLER_H__ // NOLINT (build/header_guard)
+#define _NS_RCS_DATA_HANDLER_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_endianess.h>
+#include <vector>
+
+#ifdef AGL_STUB
+#include <cstring>
+#endif
+
+typedef UI_8 NSRCS_BOOL;
+
+#define SIZE_OF_PASSTHRU_DATATYPE_IDENTIFIER 1
+#define SIZE_OF_PASSTHRU_PARAM_BUFFERTYPE_HEADER 3
+#define PASSTHRU_DATA_HEADER_LEN 8
+
+
+// not valid for buffer or array
+// \return - 0 - invalid type id
+/*UI_16 GetLengthOfBasicType(UI_8 f_ui8TypeId)
+{
+
+ UI_16 l_ui16LengthOfBasicType = 0;
+ switch(f_ui8TypeId)
+ {
+ case 0x01: l_ui16LengthOfBasicType = 2; break; // eBool
+ case 0x02: l_ui16LengthOfBasicType = 1; break; // eUint8
+ case 0x03: l_ui16LengthOfBasicType = 2; break; // eUint16
+ case 0x04: l_ui16LengthOfBasicType = 4; break; // eUint32
+ case 0x05: l_ui16LengthOfBasicType = 8; break; // eUint64
+ case 0x06: l_ui16LengthOfBasicType = 1; break; // eSint8
+ case 0x07: l_ui16LengthOfBasicType = 2; break; // eSint16
+ case 0x08: l_ui16LengthOfBasicType = 4; break; // eSint32
+ case 0x09: l_ui16LengthOfBasicType = 8; break; // eSint64
+ case 0x0A: l_ui16LengthOfBasicType = 8; break; // eReal
+ default: break;
+ }
+ return l_ui16LengthOfBasicType;
+}*/
+
+/////////////////////////////////////////
+/// Class: CPassThruInDataHandler
+/////////////////////////////////////////
+/**
+ * @class CPassThruInDataHandler
+ * \~english @brief Data Handler
+ * \~english @par Brief Introduction
+ * Class to get/set function to do input data handler
+ *
+ */
+class CPassThruInDataHandler {
+ public:
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CPassThruInDataHandler
+ /// \~english @par Summary
+ /// Constructor of CPassThruInDataHandler class.
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - The internal state is not changed.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// None
+ /// \~english @par Detail
+ /// To generate a CPassThruInDataHandler class. \n
+ /// Member variables (m_ui8Data, m_ui16TotalLength, m_ui16ParamCount, m_pui8CurOffset, m_ui16RemainingLength) to
+ /// be initialized. \n
+ /// \~english @see ~CPassThruInDataHandler
+ ////////////////////////////////////////////////////////////////////////////////////
+ CPassThruInDataHandler(UI_8 *f_pui8Data, UI_16 f_ui16Length, UI_16 f_ui16ParamCount)
+ : m_ui8Data(f_pui8Data),
+ m_ui16TotalLength(f_ui16Length),
+ m_ui16ParamCount(f_ui16ParamCount),
+ m_pui8CurOffset(f_pui8Data),
+ m_ui16RemainingLength(f_ui16Length) {
+
+ }
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ~CPassThruInDataHandler
+ /// \~english @par Summary
+ /// Destructor of CPassThruInDataHandler class.
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - The internal state is not changed.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// None
+ /// \~english @par Detail
+ /// To delete a CPassThruInDataHandler class. \n
+ /// \~english @see CPassThruInDataHandler
+ ////////////////////////////////////////////////////////////////////////////////////
+ ~CPassThruInDataHandler() {
+ m_ui8Data = NULL; // Do not delete. Because, not allocated in this class
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetBool
+ /// \~english @par Brief
+ /// This function is used to convert value to type NSRCS_BOOL
+ /// \~english @param [out] f_rcsboolOutValue
+ /// NSRCS_BOOL & - the given type of covert result
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Convert member data to the type NSRCS_BOOL(f_rcsboolOutValue).
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetBool(NSRCS_BOOL &f_rcsboolOutValue) {
+ return GetValue<NSRCS_BOOL>(f_rcsboolOutValue);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetUI8
+ /// \~english @par Brief
+ /// This function is used to convert value to type UI_8
+ /// \~english @param [out] f_rcsboolOutValue
+ /// UI_8 & - the given type of covert result
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Convert member data to the type UI_8(f_ui8OutValue).
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetUI8(UI_8 &f_ui8OutValue) {
+ return GetValue<UI_8>(f_ui8OutValue);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetUI16
+ /// \~english @par Brief
+ /// This function is used to convert value to type UI_16
+ /// \~english @param [out] f_rcsboolOutValue
+ /// UI_16 & - the given type of covert result
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Convert member data to the type UI_16(f_ui16OutValue).
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetUI16(UI_16 &f_ui16OutValue) {
+ EFrameworkunifiedStatus l_eStatus = GetValue<UI_16>(f_ui16OutValue);
+ f_ui16OutValue = ConvertEndian_UI16(f_ui16OutValue);
+ return l_eStatus;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetUI32
+ /// \~english @par Brief
+ /// This function is used to convert value to type UI_32
+ /// \~english @param [out] f_rcsboolOutValue
+ /// UI_32 & - the given type of covert result
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Convert member data to the type UI_32(f_ui32OutValue).
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetUI32(UI_32 &f_ui32OutValue) {
+ EFrameworkunifiedStatus l_eStatus = GetValue<UI_32>(f_ui32OutValue);
+ f_ui32OutValue = ConvertEndian_UI32(f_ui32OutValue);
+ return l_eStatus;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetUI64
+ /// \~english @par Brief
+ /// This function is used to convert value to type UI_64
+ /// \~english @param [out] f_rcsboolOutValue
+ /// UI_64 & - the given type of covert result
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Convert member data to the type UI_64(f_ui64OutValue).
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetUI64(UI_64 &f_ui64OutValue) {
+ EFrameworkunifiedStatus l_eStatus = GetValue<UI_64>(f_ui64OutValue);
+ f_ui64OutValue = ConvertEndian_UI64(f_ui64OutValue);
+ return l_eStatus;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetSI8
+ /// \~english @par Brief
+ /// This function is used to convert value to type SI_8
+ /// \~english @param [out] f_rcsboolOutValue
+ /// SI_8 & - the given type of covert result
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Convert member data to the type SI_8(f_si8OutValue).
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetSI8(SI_8 &f_si8OutValue) {
+ return GetValue<SI_8>(f_si8OutValue);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetSI16
+ /// \~english @par Brief
+ /// This function is used to convert value to type SI_16
+ /// \~english @param [out] f_rcsboolOutValue
+ /// SI_16 & - the given type of covert result
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Convert member data to the type SI_16(f_si16OutValue).
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetSI16(SI_16 &f_si16OutValue) {
+ EFrameworkunifiedStatus l_eStatus = GetValue<SI_16>(f_si16OutValue);
+ f_si16OutValue = ConvertEndian_SI16(f_si16OutValue);
+ return l_eStatus;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetSI32
+ /// \~english @par Brief
+ /// This function is used to convert value to type SI_32
+ /// \~english @param [out] f_rcsboolOutValue
+ /// SI_32 & - the given type of covert result
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Convert member data to the type SI_32(f_si32OutValue).
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetSI32(SI_32 &f_si32OutValue) {
+ EFrameworkunifiedStatus l_eStatus = GetValue<SI_32>(f_si32OutValue);
+ f_si32OutValue = ConvertEndian_SI32(f_si32OutValue);
+ return l_eStatus;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetSI64
+ /// \~english @par Brief
+ /// This function is used to convert value to type SI_64
+ /// \~english @param [out] f_rcsboolOutValue
+ /// SI_64 & - the given type of covert result
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Convert member data to the type SI_64(f_si64OutValue).
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetSI64(SI_64 &f_si64OutValue) {
+ EFrameworkunifiedStatus l_eStatus = GetValue<SI_64>(f_si64OutValue);
+ f_si64OutValue = ConvertEndian_SI64(f_si64OutValue);
+ return l_eStatus;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetBuffer
+ /// \~english @par Brief
+ /// This function is used to get the buffer and its size.
+ /// \~english @param [out] f_pui8Buffer
+ /// UI_8 *& - buffer address
+ /// \~english @param [out] f_ui16BufLength
+ /// UI_16 - buffer size
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - invalid data type id passed
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient data is available
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_ui16RemainingLength) is invalid(outrange of the size
+ /// SIZE_OF_PASSTHRU_PARAM_BUFFERTYPE_HEADER) [eFrameworkunifiedStatusInvldParam]
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get buffer address(f_pui8Buffer) and its size.
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetBuffer(UI_8 *&f_pui8Buffer, UI_16 &f_ui16BufLength) {
+ EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
+ if (f_pui8Buffer == NULL) {
+ FRAMEWORKUNIFIEDLOG(ZONE_NS_ERR, __func__, "f_pui8Buffer is NULL");
+ return eFrameworkunifiedStatusNullPointer;
+ }
+ if (m_pui8CurOffset == NULL) {
+ FRAMEWORKUNIFIEDLOG(ZONE_NS_ERR, __func__, "m_pui8CurOffsetis NULL");
+ return eFrameworkunifiedStatusNullPointer;
+ }
+ if (m_ui16RemainingLength >= SIZE_OF_PASSTHRU_PARAM_BUFFERTYPE_HEADER) {
+ if (0xB == *m_pui8CurOffset) { // check if the corresponding data is of type buffer
+ m_pui8CurOffset++;
+ f_ui16BufLength = *(static_cast<UI_16 *>(static_cast<PVOID>(m_pui8CurOffset)));
+ f_ui16BufLength = ConvertEndian_UI16(f_ui16BufLength);
+ m_pui8CurOffset += sizeof(UI_16);
+ m_ui16RemainingLength = static_cast<UI_16>(m_ui16RemainingLength - SIZE_OF_PASSTHRU_PARAM_BUFFERTYPE_HEADER);
+
+ if (m_ui16RemainingLength >= f_ui16BufLength) {
+ f_pui8Buffer = m_pui8CurOffset;
+ m_pui8CurOffset += f_ui16BufLength;
+ m_ui16RemainingLength = static_cast<UI_16>(m_ui16RemainingLength - f_ui16BufLength);
+ } else {
+ l_eStatus = eFrameworkunifiedStatusFail;
+ }
+ } else {
+ l_eStatus = eFrameworkunifiedStatusInvldID;
+ }
+ } else {
+ l_eStatus = eFrameworkunifiedStatusFail;
+ }
+ return l_eStatus;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetArrayCount
+ /// \~english @par Brief
+ /// This function is used to get the buffer and its size.
+ /// \~english @param [out] f_ui16NoOfArrayElements
+ /// UI_16 - buffer size
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - If no array id found at the current location
+ /// \~english @retval eFrameworkunifiedStatusFail - no sufficient buffer to read the data
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Data of value(m_ui16RemainingLength) is invalid(outrange of the size
+ /// SIZE_OF_PASSTHRU_PARAM_BUFFERTYPE_HEADER) [eFrameworkunifiedStatusInvldParam]
+ /// - Data of value(m_pui8CurOffset) is invalid [eFrameworkunifiedStatusInvldParam]
+ /// - Covert value(m_pui8CurOffset) failed [eFrameworkunifiedStatusFail]
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get buffer address(f_pui8Buffer) and its size.
+ /// Return the value(type EFrameworkunifiedStatus) indicate the operation result.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus GetArrayCount(UI_16 &f_ui16NoOfArrayElements) {
+ EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
+ if (m_pui8CurOffset == NULL) {
+ FRAMEWORKUNIFIEDLOG(ZONE_NS_ERR, __func__, "m_pui8CurOffsetis NULL");
+ return eFrameworkunifiedStatusNullPointer;
+ }
+ if (m_ui16RemainingLength >= SIZE_OF_PASSTHRU_PARAM_BUFFERTYPE_HEADER) {
+ if (0xC == *m_pui8CurOffset) { // check if the corresponding data is of type array
+ m_pui8CurOffset++;
+ f_ui16NoOfArrayElements = *(static_cast<UI_16 *>(static_cast<PVOID>(m_pui8CurOffset)));
+ f_ui16NoOfArrayElements = ConvertEndian_UI16(f_ui16NoOfArrayElements);
+ m_pui8CurOffset += sizeof(UI_16);
+ m_ui16RemainingLength = static_cast<UI_16>(m_ui16RemainingLength - SIZE_OF_PASSTHRU_PARAM_BUFFERTYPE_HEADER);
+ } else {
+ l_eStatus = eFrameworkunifiedStatusInvldID;
+ }
+ } else {
+ l_eStatus = eFrameworkunifiedStatusFail;
+ }
+ return l_eStatus;
+ }
+
+ UI_16 GetDataLength() {
+ return m_ui16TotalLength;
+ }
+
+ private:
+ // template <class DataType>
+ // EFrameworkunifiedStatus GetValue(DataType& f_dtOutValue);
+
+
+ /*
+ * \return -
+ * eFrameworkunifiedStatusFail - no sufficient data is available
+ * eFrameworkunifiedStatusOK - data retrieved
+ * eFrameworkunifiedStatusInvldID - invalid data type id passed
+ */
+ template <class DataType>
+ EFrameworkunifiedStatus GetValue(DataType &l_dtOutValue) {
+ if (m_pui8CurOffset == NULL) {
+ FRAMWEORKUNIFIEDLOG(ZONE_NS_ERR, __func__, "m_pui8CurOffsetis NULL");
+ return eFrameworkunifiedStatusNullPointer;
+ }
+ EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
+ if (m_ui16RemainingLength >= (sizeof(DataType) + SIZE_OF_PASSTHRU_DATATYPE_IDENTIFIER)) {
+ if ((0x1 <= *m_pui8CurOffset) && (*m_pui8CurOffset <= 0x9)) // Get value is applicable only for basic types,
+ // not for buffer and array
+ {
+ m_pui8CurOffset++;
+ l_dtOutValue = *(static_cast<DataType *>(static_cast<PVOID>(m_pui8CurOffset)));
+ m_ui16RemainingLength = static_cast<UI_16>(m_ui16RemainingLength - sizeof(DataType));
+ m_pui8CurOffset += sizeof(DataType);
+ } else {
+ l_eStatus = eFrameworkunifiedStatusInvldID;
+ }
+ } else {
+ l_eStatus = eFrameworkunifiedStatusFail;
+ }
+ return l_eStatus;
+ }
+
+ UI_8 *m_ui8Data;
+ UI_16 m_ui16TotalLength; // total data length
+ UI_16 m_ui16ParamCount;
+
+ UI_8 *m_pui8CurOffset;
+ UI_16 m_ui16RemainingLength; // remaining data length. Not yet parsed
+};
+
+/////////////////////////////////////////
+//// CPassThruOutDataHandler
+/////////////////////////////////////////
+/**
+ * @class CPassThruOutDataHandler
+ * \~english @brief Data Handler
+ * \~english @par Brief Introduction
+ * Class to get/set function to do output data handler
+ *
+ */
+class CPassThruOutDataHandler {
+ public:
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CPassThruOutDataHandler
+ /// \~english @par Summary
+ /// Constructor of CPassThruOutDataHandler class.
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - The internal state is not changed.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// None
+ /// \~english @par Detail
+ /// To generate a CPassThruOutDataHandler class. \n
+ /// Member variables (m_ui16TotalLength, m_ui16ParamCount, m_ui16CurOffset, m_ui16CurrentArrCount,
+ /// m_bArrayTypeSet, m_ui8LastArrDataType) to be initialized. \n
+ /// \~english @see ~CPassThruOutDataHandler
+ ////////////////////////////////////////////////////////////////////////////////////
+ CPassThruOutDataHandler(UI_8 f_ui8ClientId, UI_8 f_ui8PluginId, UI_32 f_ui32CommandId)
+ : m_ui16TotalLength(PASSTHRU_DATA_HEADER_LEN),
+ m_ui16ParamCount(0),
+ m_ui16CurOffset(0),
+ m_ui16CurrentArrCount(0),
+ m_bArrayTypeSet(FALSE),
+ m_ui8LastArrDataType(0) { // default data type eNull
+ m_vui8Data.resize(PASSTHRU_DATA_HEADER_LEN);
+ // TODO: check error condition for resize operation
+ // TODO: try if &m_vui8Data[m_ui16CurOffset] directly works without casting
+ *static_cast<UI_8 *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = f_ui8ClientId;
+ m_ui16CurOffset++;
+ *static_cast<UI_8 *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = f_ui8PluginId;
+ m_ui16CurOffset++;
+ *static_cast<UI_32 *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = ConvertEndian_UI32(f_ui32CommandId);
+ m_ui16CurOffset = static_cast<UI_16>(m_ui16CurOffset + sizeof(UI_32));
+ *static_cast<UI_16 *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = 0; // initialize param count
+ m_ui16ParamCount = m_ui16CurOffset;
+ m_ui16CurOffset = static_cast<UI_16>(m_ui16CurOffset + sizeof(UI_16));
+ m_ui8ClientId = f_ui8ClientId;
+ }
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ~CPassThruOutDataHandler
+ /// \~english @par Summary
+ /// Destructor of CPassThruOutDataHandler class.
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of internal state
+ /// - The internal state is not changed.
+ /// \~english @par Change of the internal state
+ /// - The internal state is not changed.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// None
+ /// \~english @par Detail
+ /// To delete a CPassThruOutDataHandler class. \n
+ /// \~english @see CPassThruOutDataHandler
+ ////////////////////////////////////////////////////////////////////////////////////
+ ~CPassThruOutDataHandler() {
+ m_vui8Data.clear();
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetClientID
+ /// \~english @par Brief
+ /// This function is used to get clinet id.
+ /// \~english @param none
+ /// \~english @retval
+ /// UI_8 - client id
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return the value(m_ui8ClientId).
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_8 GetClientID() {
+ return m_ui8ClientId;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetData
+ /// \~english @par Brief
+ /// This function is used to get m_vui8Data data address.
+ /// \~english @param none
+ /// \~english @retval
+ /// UI_8 * - m_vui8Data data address
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return m_vui8Data data address.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_8 *GetData() {
+ return static_cast<UI_8 *>(static_cast<PVOID>(&m_vui8Data[0]));
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetLength
+ /// \~english @par Brief
+ /// This function is used to get m_ui16CurOffset value.
+ /// \~english @param none
+ /// \~english @retval
+ /// UI_16 - m_ui16CurOffset value
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Return m_ui16CurOffset value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_16 GetLength() {
+ return m_ui16CurOffset;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetBool
+ /// \~english @par Brief
+ /// This function is used to set NSRCS_BOOL type value.
+ /// \~english @param[in] f_rcsboolValue
+ /// NSRCS_BOOL - new NSRCS_BOOL value
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - set array element of different type
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set NSRCS_BOOL type value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetBool(NSRCS_BOOL &f_rcsboolValue) {
+ return SetValue<NSRCS_BOOL>(f_rcsboolValue, 0x1);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetUI8
+ /// \~english @par Brief
+ /// This function is used to set UI_8 type value.
+ /// \~english @param[in] f_ui8Value
+ /// UI_8 - new UI_8 value
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - set array element of different type
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set UI_8 type value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetUI8(UI_8 f_ui8Value) {
+ return SetValue<UI_8>(f_ui8Value, 0x2);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetUI16
+ /// \~english @par Brief
+ /// This function is used to set UI_16 type value.
+ /// \~english @param[in] f_ui16Value
+ /// UI_16 - new UI_16 value
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - set array element of different type
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set UI_16 type value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetUI16(UI_16 f_ui16Value) {
+ return SetValue<UI_16>(ConvertEndian_UI16(f_ui16Value), 0x3);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetUI32
+ /// \~english @par Brief
+ /// This function is used to set UI_32 type value.
+ /// \~english @param[in] f_ui32Value
+ /// UI_32 - new UI_32 value
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - set array element of different type
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set UI_32 type value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetUI32(UI_32 f_ui32Value) {
+ return SetValue<UI_32>(ConvertEndian_UI32(f_ui32Value), 0x4);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetUI64
+ /// \~english @par Brief
+ /// This function is used to set UI_64 type value.
+ /// \~english @param[in] f_ui64Value
+ /// UI_64 - new UI_64 value
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - set array element of different type
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set UI_64 type value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetUI64(UI_64 f_ui64Value) {
+ return SetValue<UI_64>(ConvertEndian_UI64(f_ui64Value), 0x5);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetSI8
+ /// \~english @par Brief
+ /// This function is used to set SI_8 type value.
+ /// \~english @param[in] f_si8Value
+ /// SI_8 - new SI_8 value
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - set array element of different type
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set SI_8 type value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetSI8(SI_8 f_si8Value) {
+ return SetValue<SI_8>(f_si8Value, 0x6);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetSI16
+ /// \~english @par Brief
+ /// This function is used to set SI_16 type value.
+ /// \~english @param[in] f_si16Value
+ /// SI_16 - new SI_16 value
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - set array element of different type
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set SI_16 type value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetSI16(SI_16 f_si16Value) {
+ return SetValue<SI_16>(ConvertEndian_SI16(f_si16Value), 0x7);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetSI32
+ /// \~english @par Brief
+ /// This function is used to set SI_32 type value.
+ /// \~english @param[in] f_si32Value
+ /// SI_32 - new SI_32 value
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - set array element of different type
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set SI_32 type value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetSI32(SI_32 f_si32Value) {
+ return SetValue<SI_32>(ConvertEndian_SI32(f_si32Value), 0x8);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetSI64
+ /// \~english @par Brief
+ /// This function is used to set SI_64 type value.
+ /// \~english @param[in] f_si64Value
+ /// SI_64 - new SI_64 value
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - set array element of different type
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set SI_64 type value.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetSI64(SI_64 f_si64Value) {
+ return SetValue<SI_64>(ConvertEndian_SI64(f_si64Value), 0x9);
+ }
+
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetBuffer
+ /// \~english @par Brief
+ /// This function is used to set buffer and size.
+ /// \~english @param[in] f_pui8Buffer
+ /// UI_8* - buffer address
+ /// \~english @param[in] f_ui16BufLength
+ /// UI_16 - buffer size
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @retval eFrameworkunifiedStatusOK - data retrieved
+ /// \~english @retval eFrameworkunifiedStatusInvldID - data member(m_ui8LastArrDataType) is invalid value
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set buffer and size.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetBuffer(UI_8 *f_pui8Buffer, UI_16 f_ui16BufLength) {
+ EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
+ // TODO: add error check for resize operation
+ if (f_pui8Buffer == NULL) {
+ FRAMEWORKUNIFIEDLOG(ZONE_NS_ERR, __func__, "f_pui8Buffer is NULL");
+ return eFrameworkunifiedStatusNullPointer;
+ }
+ m_ui16TotalLength = static_cast<UI_16>(m_ui16TotalLength + f_ui16BufLength + SIZE_OF_PASSTHRU_PARAM_BUFFERTYPE_HEADER);
+ m_vui8Data.resize(m_ui16TotalLength);
+ *static_cast<UI_8 *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = 0xB;
+ m_ui16CurOffset++;
+ *static_cast<UI_16 *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = ConvertEndian_UI16(f_ui16BufLength);
+ m_ui16CurOffset = static_cast<UI_16>(m_ui16CurOffset + sizeof(UI_16));
+ std::memcpy(&m_vui8Data[m_ui16CurOffset], f_pui8Buffer, f_ui16BufLength);
+ m_ui16CurOffset = static_cast<UI_16>(m_ui16CurOffset + f_ui16BufLength);
+
+ if (!m_bArrayTypeSet) {
+// *static_cast<UI_16*>(static_cast<PVOID>(&m_vui8Data[m_ui16ParamCount])) =
+// (*static_cast<UI_16*>(static_cast<PVOID>(&m_vui8Data[m_ui16ParamCount]))) + 1;
+ UpdateParamCount();
+ } else {
+ // setting array element
+ m_ui16CurrentArrCount--;
+
+ if ((m_ui8LastArrDataType != 0) && (m_ui8LastArrDataType != 0xB)) {
+ l_eStatus = eFrameworkunifiedStatusInvldID;
+ } else {
+ m_ui8LastArrDataType = 0xB;
+ if (0 == m_ui16CurrentArrCount) {
+ m_ui8LastArrDataType = 0; // default data type eNull
+ m_bArrayTypeSet = FALSE;
+ }
+ }
+ }
+ return l_eStatus;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetArrayCount
+ /// \~english @par Brief
+ /// This function is used to set ArrayCount.
+ /// \~english @param f_ui16ArrayCount
+ /// UI_16 - ArrayCount
+ /// \~english @retval none
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - none
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set ArrayCount.
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetArrayCount(UI_16 f_ui16ArrayCount) {
+ EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
+ // TODO: add error check for resize operation
+ m_ui16TotalLength = static_cast<UI_16>(m_ui16TotalLength + SIZE_OF_PASSTHRU_PARAM_BUFFERTYPE_HEADER);
+ m_vui8Data.resize(m_ui16TotalLength);
+ *static_cast<UI_8 *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = 0xC;
+ m_ui16CurOffset++;
+ *static_cast<UI_16 *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = ConvertEndian_UI16(f_ui16ArrayCount);
+ m_ui16CurOffset = static_cast<UI_16>(m_ui16CurOffset + sizeof(UI_16));
+
+ m_ui16CurrentArrCount = f_ui16ArrayCount;
+ m_bArrayTypeSet = TRUE;
+// *static_cast<UI_16*>(static_cast<PVOID>(&m_vui8Data[m_ui16ParamCount])) =
+// (*static_cast<UI_16*>(static_cast<PVOID>(&m_vui8Data[m_ui16ParamCount]))) + 1;
+ UpdateParamCount();
+
+ // TODO: add error handling, if any other element is added before the array count reaches to f_ui16ArrayCount
+ return l_eStatus;
+ }
+
+ private:
+ CPassThruOutDataHandler() {
+
+ }
+
+ // SetValue
+ // \return - eFrameworkunifiedStatusInvldID - If setting array element of different type
+ template <class DataType>
+ EFrameworkunifiedStatus SetValue(DataType l_dtValue, UI_8 f_ui8DataType) {
+ EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
+ // TODO: add error check for resize operation
+
+ m_ui16TotalLength = static_cast<UI_16>(m_ui16TotalLength + SIZE_OF_PASSTHRU_DATATYPE_IDENTIFIER + sizeof(DataType));
+ m_vui8Data.resize(m_ui16TotalLength);
+ *static_cast<UI_8 *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = f_ui8DataType;
+ m_ui16CurOffset++;
+ *static_cast<DataType *>(static_cast<PVOID>(&m_vui8Data[m_ui16CurOffset])) = l_dtValue;
+ m_ui16CurOffset = static_cast<UI_16>(m_ui16CurOffset + sizeof(DataType));
+
+ if (!m_bArrayTypeSet) {
+// *static_cast<UI_16*>(static_cast<PVOID>(&m_vui8Data[m_ui16ParamCount])) =
+// (*static_cast<UI_16*>(static_cast<PVOID>(&m_vui8Data[m_ui16ParamCount]))) + 1;
+ UpdateParamCount();
+ } else {
+ // setting array element
+ m_ui16CurrentArrCount--;
+
+ if ((m_ui8LastArrDataType != 0) && (m_ui8LastArrDataType != f_ui8DataType)) {
+ l_eStatus = eFrameworkunifiedStatusInvldID;
+ } else {
+ m_ui8LastArrDataType = f_ui8DataType;
+ if (0 == m_ui16CurrentArrCount) {
+ m_ui8LastArrDataType = 0; // default data type eNull
+ m_bArrayTypeSet = FALSE;
+ }
+ }
+ }
+ return l_eStatus;
+ }
+
+ VOID UpdateParamCount() {
+ UI_16 l_ui16ParamCount = static_cast<UI_16>(ConvertEndian_UI16(*static_cast<UI_16 *>(static_cast<PVOID>
+ (&m_vui8Data[m_ui16ParamCount]))) + 1);
+ l_ui16ParamCount = ConvertEndian_UI16(l_ui16ParamCount);
+ *static_cast<UI_16 *>(static_cast<PVOID>(&m_vui8Data[m_ui16ParamCount])) = l_ui16ParamCount;
+ }
+
+ // UI_8* m_ui8Data;
+ std::vector<UI_8> m_vui8Data;
+ UI_16 m_ui16TotalLength; // total data length
+ UI_16 m_ui16ParamCount;
+ UI_16 m_ui16CurOffset;
+ UI_8 m_ui8ClientId;
+
+ // required for array data type
+ UI_16 m_ui16CurrentArrCount;
+ BOOL m_bArrayTypeSet;
+ UI_8 m_ui8LastArrDataType;
+};
+
+#endif // _NS_RCS_DATA_HANDLER_H__ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_rcs_logger_types.h b/nsframework/framework_unified/client/include/native_service/ns_rcs_logger_types.h
new file mode 100644
index 00000000..cc28f7c1
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_rcs_logger_types.h
@@ -0,0 +1,104 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/*
+ * ns_rcs_logger_if.h
+ */
+/**
+ * @file
+ * @brief \~english This file provides logger type's structures
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup nsrcs
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef _NS_RCS_LOGGER_IF_H_ // NOLINT (build/header_guard)
+#define _NS_RCS_LOGGER_IF_H_
+
+#include <native_service/ns_logger_if.h>
+
+// protocol: NSRCS_SET_LOG_SETTINGS_REQ,
+// NSRCS_SET_LOG_MASK_REQ,
+// NSRCS_SET_LOG_OUT_OPT_REQ,
+// NSRCS_SET_LOG_SEVERITY_REQ
+typedef struct _TNSRCS_SetLogSettingsReq {
+ UI_8 m_ui8ClientId;
+ TFrameworkunifiedZoneMask m_pui32ZoneMask;
+ UI_8 m_ui8OutputLogOption;
+ TFrameworkunifiedLoggerSeverity m_si32Severity;
+} TNSRCS_SetLogSettingsReq;
+
+// protocol: NSRCS_SET_LOG_SETTINGS_RESP
+typedef struct _TNSRCS_SetLogSettingsResp {
+ UI_8 m_ui8ClientId;
+ UI_8 m_ui8SetStatus;
+ TFrameworkunifiedZoneMask m_pui32ZoneMask;
+ UI_8 m_ui8OutputLogOption;
+ TFrameworkunifiedLoggerSeverity m_si32Severity;
+} TNSRCS_SetLogSettingsResp;
+
+// protocol: NSRCS_GET_LOG_SETTINGS_REQ
+typedef struct _TNSRCS_GetLogSettingsReq {
+ UI_8 m_ui8ClientId;
+} TNSRCS_GetLogSettingsReq;
+
+// protocol: NSRCS_GET_LOG_SETTINGS_RESP
+typedef struct _TNSRCS_GetLogSettingsResp {
+ UI_8 m_ui8ClientId;
+ CHAR m_cZoneList[BITS_IN_ZONE_MASK][ZONE_TEXT_SIZE];
+ TFrameworkunifiedZoneMask m_pui32ZoneMask;
+ UI_8 m_ui8OutputLogOption;
+ TFrameworkunifiedLoggerSeverity m_si32Severity;
+} TNSRCS_GetLogSettingsResp;
+
+// protocol: NSRCS_SET_LOG_MASK_RESP
+typedef struct _TNSRCS_SetLogMaskResp {
+ UI_8 m_ui8ClientId;
+ UI_8 m_ui8SetStatus;
+ TFrameworkunifiedZoneMask m_pui32ZoneMask;
+} TNSRCS_SetLogMaskResp;
+
+// protocol: NSRCS_SET_LOG_OUT_OPT_RESP
+typedef struct _TNSRCS_SetLogOutOptResp {
+ UI_8 m_ui8ClientId;
+ UI_8 m_ui8SetStatus;
+ UI_8 m_ui8OutputLogOption;
+} TNSRCS_SetLogOutOptResp;
+
+// protocol: NSRCS_SET_LOG_SEVERITY_RESP
+typedef struct _TNSRCS_SetLogSeverityResp {
+ UI_8 m_ui8ClientId;
+ UI_8 m_ui8SetStatus;
+ SI_32 m_si32Severity;
+} TNSRCS_SetLogSeverityResp;
+
+#endif /* _NS_RCS_LOGGER_IF_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_rcs_plugin.hpp b/nsframework/framework_unified/client/include/native_service/ns_rcs_plugin.hpp
new file mode 100644
index 00000000..617aa1d6
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_rcs_plugin.hpp
@@ -0,0 +1,328 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file
+ * @brief \~english This file contains the declaration of CNSRcsPlugin class
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup nsrcs
+ * @ingroup framework_unified
+ * @{
+ */
+
+#ifndef _NS_RCS_PLUGIN_H__ // NOLINT (build/header_guard)
+#define _NS_RCS_PLUGIN_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <string>
+
+typedef EFrameworkunifiedStatus(*TFPNSRcsSendPassthruData)(UI_8 f_ui8clientId, PVOID f_data, UI_16 f_ui16PayloadLength);
+
+// forward declaration
+class CPassThruInDataHandler;
+
+/**
+ * @class CNSRcsPlugin
+ * \~english @brief CNSRcsPlugin
+ * \~english @par Brief Introduction
+ * Class to provide base class of CNSRcsPlugin
+ */
+
+class CNSRcsPlugin {
+ public:
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// Constructor of CNSRcsPlugin class.
+ /// \~english @param [in] f_cPluginName
+ /// std::string - the name of plugin
+ /// \~english @param [in] f_fpNSRcsSendPassthruData
+ /// TFPNSRcsSendPassthruData - the pointer of send data function
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// Constructor of CNSRcsPlugin class. \n
+ /// variables (m_cPluginName,m_fpNSRcsSendPassthruData,m_uiPluginId) to be initialization.
+ /// \~english @see ~CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ CNSRcsPlugin(std::string f_cPluginName, TFPNSRcsSendPassthruData f_fpNSRcsSendPassthruData)
+ : m_fpNSRcsSendPassthruData(f_fpNSRcsSendPassthruData),
+ m_cPluginName(f_cPluginName) {
+ static UI_8 l_uiPluginId = 0;
+ m_uiPluginId = ++l_uiPluginId;
+ }
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// Destructor of CNSRcsPlugin class.
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// To delete a CNSRcsPlugin class. \n
+ /// \~english @see CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CNSRcsPlugin() {
+
+ }
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// get plugin id.
+ /// \~english @param None
+ /// \~english @retval Plugin Id
+ /// UI_8 - the ID of plugin
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// provide API whar get plugin id. \n
+ /// \~english @see CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ UI_8 GetPluginId() {
+ return m_uiPluginId;
+ }
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// get plugin id.
+ /// \~english @param None
+ /// \~english @retval m_cPluginName
+ /// std::string - the name of plugin
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// provide API whar get plugin name. \n
+ /// \~english @see CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ std::string GetPluginName() {
+ return m_cPluginName;
+ }
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// set parent name.
+ /// \~english @param f_cParentName
+ /// std::string - the name of parent
+ /// \~english @retval none
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// provide API whar set parent name. \n
+ /// \~english @see CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ static VOID SetParentName(const std::string &f_cParentName) {
+ CNSRcsPlugin::m_cParentName = f_cParentName;
+ }
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// request from host side.
+ /// \~english @param f_uiProtocol
+ /// UI_32 - protocol ID
+ /// \~english @param f_ui8ClientId
+ /// UI_8 - client ID
+ /// \~english @param f_pData
+ /// CPassThruInDataHandler - the handler of transfer data
+ /// \~english @retval none
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// provide API whar request from host side.\n
+ /// \~english @see CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus ProcessRequestMessage(UI_32 f_uiProtocol, UI_8 f_ui8ClientId, CPassThruInDataHandler *f_pData) = 0;
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// response from service side on target
+ /// \~english @param f_cMsgSource
+ /// PCSTR -
+ /// \~english @param f_uiProtocol
+ /// UI_32 - protocol ID
+ /// \~english @param f_pui8Data
+ /// UI_8 - pointer of data
+ /// \~english @param f_uiDataLength
+ /// UI_32 - length of data
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// provide API whar response from service side on target.\n
+ /// \~english @see CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus ProcessResponseMessage(PCSTR f_cMsgSource, UI_32 f_uiProtocol, UI_8 *f_pui8Data,
+ UI_32 f_uiDataLength) = 0;
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// get response protocol array
+ /// \~english @param none
+ /// \~english @retval UI_32 const *
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// provide API whar get response protocol array.\n
+ /// \~english @see CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual UI_32 const *GetResponseProtocolArray() = 0;
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// get length of response protocol array
+ /// \~english @param none
+ /// \~english @retval UI_32 const
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// provide API whar get length of response protocol array.\n
+ /// \~english @see CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual UI_32 const GetResponseProtocolArrayLength() = 0;
+
+ static std::string m_cParentName; // TODO: move to private
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRcsPlugin
+ /// \~english @par Summary
+ /// the function of transport data
+ /// \~english @param f_ui8ClientId
+ /// UI_8 - client id
+ /// \~english @param f_data
+ /// PVOID - the pointer of transport data
+ /// \~english @param f_ui16PayloadLength
+ /// UI_16 - the size of transport data
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// provide API whar the function of transport data.\n
+ /// \~english @see CNSRcsPlugin
+ ////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SendPassthruOutData(UI_8 f_ui8clientId, PVOID f_data, UI_16 f_ui16PayloadLength) {
+ return m_fpNSRcsSendPassthruData(f_ui8clientId, f_data, f_ui16PayloadLength);
+ }
+ private:
+ CNSRcsPlugin() {
+ }
+
+ UI_8 m_uiPluginId;
+ TFPNSRcsSendPassthruData m_fpNSRcsSendPassthruData;
+ std::string m_cPluginName;
+};
+
+// std::string CNSRcsPlugin::m_cParentName = "";
+
+#endif // _NS_RCS_PLUGIN_H__ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_reader.h b/nsframework/framework_unified/client/include/native_service/ns_reader.h
new file mode 100644
index 00000000..f306a52d
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_reader.h
@@ -0,0 +1,207 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NS_ConfigParser
+/// \brief This file contains declaration of class IConfigReader.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @file ns_reader.h
+ * @brief \~english This file contains declaration of class IConfigReader.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_READER_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_READER_H__ // NOLINT(build/header_guard)
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_types.h> // NOLINT(build/header_guard)
+#include <string>
+
+/*
+ * IConfigReader is an abstract class which is inherited by different type configuration file
+ * reader class.
+ */
+/**
+ * @class IConfigReader
+ * \~english @brief IConfigReader
+ * \~english @par Brief Introduction
+ * Class to provide class of parse config file.
+ */
+class IConfigReader {
+ public:
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigReader
+ /// \~english @par Summary
+ /// Constructor of IConfigReader class.
+ /// \~english @param none
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// Constructor of IConfigReader class.
+ /// \~english @see ~IConfigReader
+ ////////////////////////////////////////////////////////////////////////////////////
+ IConfigReader();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigReader
+ /// \~english @par Summary
+ /// Destructor of IConfigReader class.
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// To delete a IConfigReader class.
+ /// \~english @see IConfigReader
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual ~IConfigReader();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigReader
+ /// \~english @par Summary
+ /// This function is used to parse the file.
+ /// \~english @param [IN] f_c_filepath
+ /// const std::string - path of file to parse.
+ /// \~english @retval EFrameworkunifiedStatus
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to parse the file.\n
+ /// This is abstract function.
+ /// \~english @see IConfigReader
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus ParseFile(const std::string &f_c_filepath) = 0;
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigReader
+ /// \~english @par Summary
+ /// This function is used to get the value associated with the key.
+ /// \~english @param [IN] f_c_key
+ /// const std::string - key to search.
+ /// \~english @retval l_cValue value for key
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to get the value associated with the key.\n
+ /// This is abstract function.
+ /// \~english @see IConfigReader
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual std::string GetValue(const std::string &f_c_key) = 0;
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigReader
+ /// \~english @par Summary
+ /// This function is used to get the value associated with the key.
+ /// \~english @param [IN] f_c_key
+ /// const std::string - key to search.
+ /// \~english @param [OUT] f_c_value
+ /// const std::string - value for key.
+ /// \~english @retval EFrameworkunifiedStatus error error if key not found else eFrameworkunifiedStatusOK
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to get the value associated with the key.\n
+ /// This is abstract function.
+ /// \~english @see IConfigReader
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus GetValue(const std::string &f_c_key, std::string &f_c_value) = 0; // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigReader
+ /// \~english @par Summary
+ /// This function is used to get the data pointer.
+ /// \~english @param none.
+ /// \~english @retval PVOID - pointer of data structure
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to get the data pointer. This pointer is then set in config writer.\n
+ /// This is needed to avoid recreation of same data structure object in both reader and writer.\n
+ /// when we create object of NSConfigParser.
+ /// This is abstract function.
+ /// \~english @see IConfigReader
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual PVOID GetDataPtr() = 0;
+};
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_READER_H__ */ // NOLINT (build/header_guard)
+/** @}*/ // end of framework_unified
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/ns_resource_controler.h b/nsframework/framework_unified/client/include/native_service/ns_resource_controler.h
new file mode 100644
index 00000000..0cce23af
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_resource_controler.h
@@ -0,0 +1,216 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+/**
+ * @file ns_resource_controler.h
+ * @brief \~english This file provides api for operating Resource
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef _ns_resource_controler_h_ // NOLINT (build/header_guard)
+#define _ns_resource_controler_h_
+
+#define FRAMEWORKUNIFIED_RES_ABNMLMON "FRAMEWORKUNIFIED_RES_ABNMLMON"
+#define FRAMEWORKUNIFIED_RES_TIMER "FRAMEWORKUNIFIED_RES_TIMER"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup BaseSystem
+ /// \~english @par Summary
+ /// This function is used to get the resourceid associated with the mod and the key.
+ /// \~english @param [IN] mod
+ /// const char * - the mod of resource
+ /// \~english @param [IN] key
+ /// const char * - the key of resource
+ /// \~english @param [OUT] resource
+ /// long * - resource ID
+ /// \~english @retval -1 fail
+ /// \~english @retval 0 success
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to get the resourceid associated with the mod and the key.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+int frameworkunifiedGetResource(const char *mod, const char *key, long *resource); // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup BaseSystem
+ /// \~english @par Summary
+ /// This function is used to acquire the resourceid associated with the mod and the key.
+ /// \~english @param [IN] mod
+ /// const char * - the mod of resource
+ /// \~english @param [IN] key
+ /// const char * - the key of resource
+ /// \~english @param [OUT] resource
+ /// long * - resource ID
+ /// \~english @retval ref_counter the counter of user
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to acquire the resourceid associated with the mod and the key.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+int frameworkunifiedAcquireResouce(const char *mod, const char *key, long *resource); // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup BaseSystem
+ /// \~english @par Summary
+ /// This function is used to release the resourceid associated with the mod and the key.
+ /// \~english @param [IN] mod
+ /// const char * - the mod of resource
+ /// \~english @param [IN] key
+ /// const char * - the key of resource
+ /// \~english @retval ref_counter the counter of user
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to release the resourceid associated with the mod and the key.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+int frameworkunifiedReleaseResouce(const char *mod, const char *key);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup BaseSystem
+ /// \~english @par Summary
+ /// This function is used to get the key associated with the mod and the resourceid.
+ /// \~english @param [IN] mod
+ /// const char * - the mod of resource
+ /// \~english @param [IN] resource
+ /// long - resource ID
+ /// \~english @param [OUT] key
+ /// const char * - the key of resource
+ /// \~english @retval -1 fail
+ /// \~english @retval 0 success
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to get the key associated with the mod and the resourceid.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+int frameworkunifiedSearchResourseKey(const char *mod, long resource, const char **key); // NOLINT (readability/nolint)
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup BaseSystem
+ /// \~english @par Summary
+ /// This function is used to register the resource associated with the mod and the key.
+ /// \~english @param [IN] mod
+ /// const char * - the mod of resource
+ /// \~english @param [IN] key
+ /// const char * - the key of resource
+ /// \~english @param [IN] resource
+ /// const char * - resource ID
+ /// \~english @param [IN] init_counter
+ /// long - resource user counter
+ /// \~english @retval -1 fail
+ /// \~english @retval 0 success
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to register the resource associated with the mod and the key.init counter.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+
+int frameworkunifiedRegistResouce(const char *mod, const char *key, long resource, int init_counter); // NOLINT (readability/nolint)
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup BaseSystem
+ /// \~english @par Summary
+ /// This function is used to unregister the resource associated with the mod and the key.
+ /// \~english @param [IN] mod
+ /// const char * - the mod of resource
+ /// \~english @param [IN] key
+ /// const char * - the key of resource
+ /// \~english @retval 0 success
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Causes of failures
+ /// None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// This function is used to unregister the resource associated with the mod and the key.init counter.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////
+int frameworkunifiedUnregistResouce(const char *mod, const char *key);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ns_resource_controler_h_ NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_ringbuffer.h b/nsframework/framework_unified/client/include/native_service/ns_ringbuffer.h
new file mode 100644
index 00000000..b67cd17e
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_ringbuffer.h
@@ -0,0 +1,523 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSRingBuffer
+/// \brief This file contains implementation of class CNSRingBuffer.
+/// This class provides API to open, read, write and close ring buffer
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns_ringbuffer.h
+ * @brief \~english This file contains implementation of class CNSRingBuffer.
+ * This class provides API to open, read, write and close ring buffer
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_RINGBUFFER_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_RINGBUFFER_H__
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <pthread.h>
+
+#include <native_service/frameworkunified_types.h>
+
+#include <string>
+
+// Structure of the header of the ring buffer
+typedef struct _NSRingBufferHdr {
+ UI_32 m_uiReadPtr; // Read pointer
+ UI_32 m_uiWritePtr; // Write pointer
+ UI_32 m_uiUnReadSize; // Data size not read yet
+ BOOL m_bIsFull; // Flag indicating if the buffer has full of data
+ UI_32 m_uiRingBufferSize; // Size of the ring buffer
+} NSRingBufferHdr;
+
+// Structure of the mutex of the ring buffer
+typedef struct _NSRingBufferMtx {
+ pthread_mutex_t m_tBufMutex; // Mutex object to mutual exclusion
+ int m_lid;
+} NSRingBufferMtx;
+
+
+/**
+ * @class CNSRingBuffer
+ * \~english @brief CNSRingBuffer
+ * \~english @par Brief Introduction
+ * Class to provide class of ring buffer.
+ */
+class CNSRingBuffer {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// Constructor for CNSRingBuffer
+ /// \~english @param[in] f_cMappedFilePath
+ /// const std::string& - path of the ring buffer mapped file
+ /// \~english @param[in] f_uiSize
+ /// const UI_32 - size of ring buffer
+ /// \~english @param[in] f_lid
+ /// int - Lock ID
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// none
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Create an instance of CNSRingBuffer class.\n
+ /// Initializes cass member (m_cMappedFilePath, m_uiRingBuffSize, m_pRbufMtx, m_pRbufHdr,
+ /// m_pRbuf, m_lid, m_pLockAddr, m_siProcessLastWrtPage, m_cRbufMtxName).\n
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par Detail
+ /// Constructor of CNSRingBuffer class.
+ /// variables (m_cMappedFilePath, m_uiRingBuffSize, m_pRbufMtx, m_pRbufHdr,
+ /// m_pRbuf, m_lid, m_pLockAddr, m_siProcessLastWrtPage, m_cRbufMtxName) to be initialization.
+ /// \~english @see ~CNSRingBuffer
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSRingBuffer(const std::string &f_cMappedFilePath, const UI_32 f_uiSize, int f_lid = -1);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// Destructor for CNSRingBuffer.
+ /// \~english @param none
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - The constructor creates an instance of the CNSRingBuffer class.
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// Closes the ring buffer, if it is open.
+ /// \~english @par
+ /// Closes the ring buffer if it is open.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CNSRingBuffer
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CNSRingBuffer();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// This function opens and maps the ring buffer object.
+ /// \~english @param none
+ /// \~english @retval eFrameworkunifiedStatusOK
+ /// \~english @retval eFrameworkunifiedStatusInvldParam
+ /// \~english @retval eFrameworkunifiedStatusFail
+ /// \~english @retval eFrameworkunifiedStatusErrOther
+ /// \~english @par Preconditons
+ /// none
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - Different Lock ID in constructor parameter and mutex object [eFrameworkunifiedStatusInvldParam]
+ /// - If the path at the time of CNSRingBuffer class instantiation is empty [eFrameworkunifiedStatusFail]
+ /// - When the CNSRingBuffer class is instantiated with a path longer than 255 characters... [eFrameworkunifiedStatusFail]
+ /// - If accessing the information header file (shm_open/ mmap) fails [eFrameworkunifiedStatusFail]
+ /// - When accessing the ring buffer file (shm_open/ mmap) fails [eFrameworkunifiedStatusFail]
+ /// - Accessing a mutex file (shm_open/ mmap) fails [eFrameworkunifiedStatusFail]
+ /// - Alreadey opened [eFrameworkunifiedStatusErrOther]
+ /// \~english @par Detail
+ /// It creates the ring buffer if it does not exists.
+ /// Opens the path information header, ring buffer, and mutex set at instance creation.
+ /// \~english @par
+ /// Update ring buffer size for instances created with different sizes on the same path.
+ /// \~english @par
+ /// Execute close() to close.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CNSRingBuffer, Close
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Open();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// This function is used to check whether the ring buffer is opened or not..
+ /// \~english @param none
+ /// \~english @retval TRUE - Open
+ /// \~english @retval FALSE - Not open
+ /// \~english @par Preconditions
+ /// - None.
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// none
+ /// \~english @par Detail
+ /// This function is used to check whether the ring buffer is opened or not.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see CNSRingBuffer, Close
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ BOOL IsOpen();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// This function unmaps the ring buffer object.
+ /// \~english @param none
+ /// \~english @retval eFrameworkunifiedStatusOK
+ /// \~english @retval eFrameworkunifiedStatusFail
+ /// \~english @par Preconditons
+ /// - Open has been performed.
+ /// \~english @par Change of internal status
+ /// - The internal state is not changed.
+ /// \~english @par Conditions of processing failure
+ /// - not open [eFrameworkunifiedStatusFail]
+ /// - information header file munmap fail [eFrameworkunifiedStatusFail]
+ /// - ring buffer file munmap fail [eFrameworkunifiedStatusFail]
+ /// - minidesk file munmap fail [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - This function unmaps the ring buffer object.
+ /// \~english @par
+ /// Close processing is also performed when an instance is destructed to prevent leakage.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Close();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// This function reads data from the ring buffer.
+ /// \~english @param [OUT] buffer
+ /// PSTR - pointer to the buffer in which the read data is stored
+ /// \~english @param [IN] f_uilength
+ /// UI_32 - length of the data buffer provided
+ /// \~english @retval SI_32 Returns The number of bytes actually read
+ /// \~english @retval -1 error occurred
+ /// \~english @par Preconditions
+ /// - Open().
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - not open [-1]
+ /// \~english @par Detail
+ /// - This function reads data from the ring buffer.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 Read(PSTR buffer, const UI_32 f_uilength);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// This function writes the data into the ring buffer.
+ /// \~english @param [OUT] buffer
+ /// PSTR - pointer to the buffer containing the data to be written
+ /// \~english @param [IN] f_uilength
+ /// UI_32 - length of the data buffer to be written
+ /// \~english @retval SI_32 Returns The number of bytes written
+ /// \~english @retval -1 error occurred
+ /// \~english @par Preconditions
+ /// - Open().
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - not open [-1]
+ /// \~english @par Detail
+ /// - This function writes the data into the ring buffer.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 Write(PCSTR buffer, const UI_32 f_uilength);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// This function writes all the data in the buffer into provided file f_pPath.
+ /// \~english @param[in] f_pPath
+ /// PCSTR - file path.
+ /// \~english @param[in] f_uiDumpSize
+ /// PUI_32 - Returns The number of bytes written into file
+ /// \~english @retval eFrameworkunifiedStatusOK
+ /// \~english @retval eFrameworkunifiedStatusNullPointer
+ /// \~english @retval eFrameworkunifiedStatusInvldParam
+ /// \~english @retval eFrameworkunifiedStatusFail
+ /// \~english @retval eFrameworkunifiedStatusFileLoadError
+ /// \~english @retval eFrameworkunifiedStatusErrOther
+ /// \~english @par Preconditions
+ /// - Open().
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - f_uiDumpSize is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - dump file path is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - not open [eFrameworkunifiedStatusFail]
+ /// - dump file open fail [eFrameworkunifiedStatusFileLoadError]
+ /// - ring buffer access fail [eFrameworkunifiedStatusFail]
+ /// - dump file write fail [eFrameworkunifiedStatusErrOther]
+ /// \~english @par Detail
+ /// This function does not changes the unread buffer.
+ /// \~english @par
+ /// Please note the following points when using this API for application.
+ /// - Writing to a dump file is overwritten.
+ /// \~english @par
+ /// This function overwrites the file if it exists.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus DumpToFile(PCSTR f_pPath, PUI_32 f_uiDumpSize);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// This function returns the number of unread bytes which can be read by Read().
+ /// \~english @retval SI_32 Returns The number of bytes which can be read by Read()
+ /// \~english @retval -1 error occurred
+ /// \~english @par Preconditions
+ /// - Open().
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - not open [-1]
+ /// \~english @par Detail
+ /// - This function returns the number of unread bytes which can be read by Read().
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 GetSize();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// This function clears the ring buffer.
+ /// \~english @param none
+ /// \~english @retval eFrameworkunifiedStatusOK
+ /// \~english @retval eFrameworkunifiedStatusFail
+ /// \~english @par Preconditions
+ /// - Open().
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - not open [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// This function clears the ring buffer.
+ /// \~english @par
+ /// Please note the following points when using this API for application.
+ /// - Only read/write information cleared, and the size of the ring buffer itself is not changed.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus ClearBuf();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSRingBuffer
+ /// \~english @par Brief
+ /// This function sets the position of read ptr to write ptr in buffer.
+ /// \~english @param none
+ /// \~english @retval eFrameworkunifiedStatusOK success
+ /// \~english @retval eFrameworkunifiedStatusFail ring buffer is not open
+ /// \~english @par Preconditions
+ /// - Open().
+ /// \~english @par Change of the internal state
+ /// - Change of internal state according to the API does not occur.
+ /// \~english @par Conditions of processing failure
+ /// - not open [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// This function sets the position of read ptr to write ptr in buffer.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetReadPtrToWritePtr();
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CNSRingBuffer
+ /// Constructor of CNSRingBuffer class
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSRingBuffer();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CreateRBMutex
+ /// This function creates the ring buffer mutex object.
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK ring buffer created successfully
+ /// eFrameworkunifiedStatusDuplicate ring buffer already exists
+ /// eFrameworkunifiedStatusInvldParam invalid ring buffer name
+ /// eFrameworkunifiedStatusFail on error
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CreateRBMutex();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CreateRBHeader
+ /// This function creates the ring buffer object for header.
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK ring buffer created successfully
+ /// eFrameworkunifiedStatusDuplicate ring buffer already exists
+ /// eFrameworkunifiedStatusInvldParam invalid ring buffer name
+ /// eFrameworkunifiedStatusFail on error
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CreateRBHeader();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CreateRBDataBuffer
+ /// This function creates the ring buffer object for data buffer.
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK ring buffer created successfully
+ /// eFrameworkunifiedStatusDuplicate ring buffer already exists
+ /// eFrameworkunifiedStatusInvldParam invalid ring buffer name
+ /// eFrameworkunifiedStatusFail on error
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CreateRBDataBuffer();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// MapRBHeader
+ /// This function open and maps the file in process space.
+ ///
+ /// \param [out] f_pRbuf
+ /// PVOID* - address of the mapped memory
+ /// \param [in] f_cMappedFile
+ /// std::string - Path of the ring buffer mapped file
+ /// \param [in] f_uiRbufSize
+ /// UI_32 - Size of the ring buffer
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK if ring buffer opened successfully
+ /// eFrameworkunifiedStatusFail unable to open ring buffer
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Map(PVOID *f_pRbuf, const std::string &f_cMappedFile, const UI_32 f_uiRbufSize);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// MapRBHeader
+ /// This function open and maps the shared memory in process space.
+ ///
+ /// \param [out] f_pShMem
+ /// PVOID* - address of the mapped memory
+ /// \param [in] f_cShmName
+ /// std::string - Name of the shared memory
+ /// \param [in] f_uiShmSize
+ /// UI_32 - Size of the shared memory
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK if shared memory opened successfully
+ /// eFrameworkunifiedStatusFail unable to open shared memory
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus MapSM(PVOID *f_pShMem, const std::string &f_cShmName, const UI_32 f_uiShmSize);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// UnMapRB
+ /// This function unmaps the object.
+ ///
+ /// \param [in] f_pRbuf
+ /// PCSTR - address of the memory to unmap
+ /// \param [in] f_uiRbufSize
+ /// UI_32 - Size of the memory to be unmapped
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK if ring buffer closed successfully
+ /// eFrameworkunifiedStatusFail if ring buffer is not open
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus UnMap(PVOID f_pRbuf, const UI_32 f_uiRbufSize);
+
+ EFrameworkunifiedStatus CheckSize(int fd, off_t size);
+
+
+// void LockMtx();
+ int LockMtx();
+
+ void UnlockMtx();
+
+ std::string m_cRbufMtxName; // name of the ring buffer mutex name
+
+ std::string m_cMappedFileHdrPath; // path of the ring buffer mapped file header
+
+ std::string m_cMappedFilePath; // path of the ring buffer mapped file
+
+ UI_32 m_uiRingBuffSize; // ring buffer size
+
+ NSRingBufferMtx *m_pRbufMtx; // The pointer to the ring buffer mutex
+
+ NSRingBufferHdr *m_pRbufHdr; // The pointer to the ring buffer header
+
+ PCHAR m_pRbuf; // The pointer to the ring buffer data buffer
+
+ pthread_mutex_t m_tOpenMutex; // for multithread process
+
+ int m_lid; // Lock ID
+ void *m_pLockAddr; // Lock Address
+
+ SI_32 m_siProcessLastWrtPage; // to hold page that each process wrote in last
+};
+
+#endif /* __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_RINGBUFFER_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_shared_mem.h b/nsframework/framework_unified/client/include/native_service/ns_shared_mem.h
new file mode 100644
index 00000000..981c1ad7
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_shared_mem.h
@@ -0,0 +1,100 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSSharedMemory
+/// \brief Shared interface file for SharedMemory Service
+/// Detail description of interface and usage
+/// \ref http://ptcframeworkunifiedaccbuild2/TikiWiki/tiki-index.php?page=Shared+Memory
+/// http://ptcframeworkunifiedaspsql01/sites/ptcsweng/SW%20Engineering%20Document%20Library/
+/// Projects/Connected%20Color%20Radio%20(CCR)/Architecture/Framework/
+/// CCR%20Messaging.vsd
+///
+/// Declares the external APIs to Zone Player Service.
+///
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns_shared_mem.h
+ * @brief \~english Shared interface file for SharedMemory Service
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+
+#ifndef __CCR_NATIVESERVICES_MESSAGECENTER_SHAREDMEMORY_H__ // NOLINT (build/header_guard)
+#define __CCR_NATIVESERVICES_MESSAGECENTER_SHAREDMEMORY_H__
+
+
+#include <native_service/frameworkunified_types.h> ///< Header file for Template
+#include <stdint.h>
+#ifdef AGL_STUB
+#else
+#include <devctl.h>
+#include <sys/neutrino.h>
+#endif
+
+typedef struct _pulse_t TPosixHdr; ///> Header for system-provided messages
+
+enum ESharedMemCommand {
+ eSharedMemCommandWrite = 1,
+ eSharedMemCommandRead = 2,
+ eSharedMemCommandSize = 3,
+ eSharedMemCommandDelete = 4,
+};
+
+#define NS_SHAREDMEM_NAME "NS_SharedMem"
+#define NS_SHAREDMEM_SOCK_QUEUE 10
+DEFINE_HANDLE_TYPE(SSHMemID, TShMemID);
+
+#ifdef AGL_STUB
+#else
+#include <_pack1.h>
+#endif
+struct SMsgHeader {
+ uint16_t cmd; // Command to the NS_SharedMem
+ uintptr_t id; // NS_SharedMem ID
+ UI_32 size; // The size of the data to write to NS_SharedMem
+};
+
+struct SReplyHeader {
+ EFrameworkunifiedStatus status; // write result
+ UI_32 size; // The size of the data to read from NS_SharedMem
+};
+#ifdef AGL_STUB
+#else
+#include <_packpop.h>
+#endif
+
+#endif // __CCR_NATIVESERVICES_MESSAGECENTER_SHAREDMEMORY_H__ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_shared_mem_if.h b/nsframework/framework_unified/client/include/native_service/ns_shared_mem_if.h
new file mode 100644
index 00000000..25c5da19
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_shared_mem_if.h
@@ -0,0 +1,196 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns_shared_mem_if.h
+ * @brief \~english API Header for Logger.
+ * Declares the external APIs to Logger.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __CCR_NATIVESERVICES_MESSAGECENTER_NSSHAREDMEMIF_H__ // NOLINT (build/header_guard)
+#define __CCR_NATIVESERVICES_MESSAGECENTER_NSSHAREDMEMIF_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <native_service/frameworkunified_types.h> ///< Standard Types
+
+typedef unsigned int TMemID; ///< Type of memory buffer identifiers
+#define BAD_MEM_ID (0)
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup SetDataToShared
+/// \~english @par Summary
+/// - Store a large chunk of memory using SharedMem service
+/// \~english @param [in] data
+/// - const void* - data to be stored in shared memory
+/// \~english @param [in] dataBytes
+/// - UI_32 - length of the data (in bytes) that is stored in shared memory
+/// \~english @param [in] from
+/// - const char * - start address
+/// \~english @param [in] to
+/// - const char * - end address
+/// \~english @retval TMemID - unique MemID of the data stored in the shared memory, 0 if error occurs
+/// \~english @par Preconditions
+/// - None
+/// \~english @par Change of the internal state
+/// - shared memory changed
+/// \~english @par Causes of failures
+/// - param is Invalid.[BAD_MEM_ID]
+/// \~english @par Classification
+/// - Public
+/// \~english @par Type
+/// - sync only
+/// \~english @par Detail
+/// - The function sets the data to the shared memory and associates it with a\n
+/// unique MemID that can be used to refer to data in subsequent calls \n
+/// (not necessarily from the same process).
+/// \~english @par
+/// - TMemID:Result
+/// - Except 0:Success
+/// - 0:Failure
+/// \~english @see None
+////////////////////////////////////////////////////////////////////////////////////
+TMemID SetDataToShared(const void *data, UI_32 dataBytes, const char *from, const char *to);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup GetDataFromShared
+/// \~english @par Summary
+/// - Retrieve a large chunk of memory using SharedMem service
+/// \~english @param [in] id
+/// - TMemID - MemID of the shared data
+/// \~english @param [in] data
+/// - void* - Buffer to store data in, must be at least as large as buffer associated with id
+/// \~english @param [in] dataMaxBytes
+/// - UI_32 - Size of data - system will never copy more than dataMaxBytes bytes into data
+/// \~english @retval eFrameworkunifiedStatusOK Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldID Invalid id
+/// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
+/// \~english @par Preconditions
+/// -
+/// \~english @par Change of the internal state
+/// - None
+/// \~english @par Causes of failures
+/// - param is Invalid. [eFrameworkunifiedStatusInvldParam]
+/// - id is Invalid. [eFrameworkunifiedStatusInvldID]
+/// - Any error has occurred at the time of transmission of the System Manager message for the session.
+/// [eFrameworkunifiedStatusFail]
+/// \~english @par Classification
+/// - Public
+/// \~english @par Type
+/// - sync only
+/// \~english @par Detail
+/// - Retrieve data, given a MemID. Each MemID is only safe to use until a call to \n
+/// DiscardDataFromShared If the call succeeds, the return value is eFrameworkunifiedStatusOK.\n
+/// Otherwise, the contents of data are undefined.
+/// \~english @par
+/// - eFrameworkunifiedStatus:Result
+/// - eFrameworkunifiedStatusOK:Success
+/// - Except eFrameworkunifiedStatusOK:Failure
+/// \~english @see None
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus GetDataFromShared(TMemID id, void *data, UI_32 dataMaxBytes);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup GetLengthOfDataFromShared
+/// \~english @par Summary
+/// - Query the minimum buffer size, in bytes, necessary to hold a chunk of memory in SharedMem
+/// \~english @param [in] id
+/// - TMemID - MemID of the shared data
+/// \~english @retval length - Minimum buffer size, in bytes, required to hold the data associated with id.
+/// \~english @par Preconditions
+/// -
+/// \~english @par Change of the internal state
+/// - None
+/// \~english @par Causes of failures
+/// - param is Invalid.[BAD_MEM_ID]
+/// \~english @par Classification
+/// - Public
+/// \~english @par Type
+/// - sync only
+/// \~english @par Detail
+/// - Returns the minimum buffer size, in bytes, required to hold the data associated with id.\n
+/// Return value of 0 indicates failure.For an id, may be called one or more times \n
+/// until a successful call to either GetDataFromShared or DiscardDataFromShared with that id.
+/// \~english @par
+/// - TMemID:Result
+/// - Except 0:Success
+/// - 0:Failure
+/// \~english @see None
+////////////////////////////////////////////////////////////////////////////////////
+UI_32 GetLengthOfDataFromShared(TMemID id);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup DiscardDataFromShared
+/// \~english @par Summary
+/// - Discard a chunk of memory in SharedMem
+/// \~english @param [in] id
+/// - TMemID - MemID of the shared data
+/// \~english @retval eFrameworkunifiedStatusOK - Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam -Invalid parameter
+/// \~english @retval eFrameworkunifiedStatusInvldID -Invalid id
+/// \~english @retval eFrameworkunifiedStatusFail -Some sort of error occurred
+/// \~english @par Preconditions
+/// -
+/// \~english @par Change of the internal state
+/// - None
+/// \~english @par Causes of failures
+/// - param is Invalid. [eFrameworkunifiedStatusInvldParam]
+/// - id is Invalid. [eFrameworkunifiedStatusInvldID]
+/// - Any error has occurred at the time of transmission of the System Manager message for the session.
+/// [eFrameworkunifiedStatusFail]
+/// \~english @par Classification
+/// - Public
+/// \~english @par Type
+/// - sync only
+/// \~english @par Detail
+/// - Invalidates the data stored with the MemID. Each id is only safe to use in a\n
+/// single successful call to GetDataFromShared or DiscardDataFromShared
+/// If the call succeeds, the return value is eImageStatusOK.
+/// On failure, the state of shared memory shall not be altered
+/// \~english @par
+/// - eFrameworkunifiedStatus:Result
+/// - eFrameworkunifiedStatusOK:Success
+/// - Except eFrameworkunifiedStatusOK:Failure
+/// \~english @see None
+////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus DiscardDataFromShared(TMemID id);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // __CCR_NATIVESERVICES_MESSAGECENTER_NSSHAREDMEMIF_H__ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_sharedmem.h b/nsframework/framework_unified/client/include/native_service/ns_sharedmem.h
new file mode 100644
index 00000000..d8ac8b93
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_sharedmem.h
@@ -0,0 +1,486 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSSharedMemory
+/// \brief This file contains implementation of class CNSSharedMem.
+/// This class provides API to open, read, write and close shared memory
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns_sharedmem.h
+ * @brief \~english This file contains implementation of class CNSSharedMem.
+ * This class provides API to open, read, write and close shared memory
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_H__
+
+// Used only in nstest_sharedmem.
+// set environment, CNSSharedMem::Open() always fail. ===> eFrameworkunifiedStatusErrOther
+#define NSTEST_FAIL_SHAREDMEM_OPEN "NSTEST_FAIL_SHAREDMEM_OPEN"
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <pthread.h>
+#include <native_service/frameworkunified_types.h>
+#include <string>
+
+// Structure of the header of the shared memory buffer
+typedef struct _NSSharedBuffer {
+ pthread_mutex_t m_tBufMutex; // Mutex object to mutual exclusion
+ pthread_cond_t m_tCondVar; // Condition Variable
+ UI_32 m_uiReadPtr; // Read pointer
+ UI_32 m_uiWritePtr; // Write pointer
+ UI_32 m_uiUnReadSize; // Data size not read yet
+ BOOL m_bIsFull; // Flag indicating if the buffer has full of data
+ UI_32 m_uiShMemSize; // Size of the shared memory buffer
+} NSSharedBufferHdr;
+
+/**
+ * @class CNSSharedMem
+ * \~english @brief shared memory
+ * \~english @par Brief Introduction
+ * This class is used for handle shared memory.
+ *
+ */
+class CNSSharedMem {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// Constructor for CNSSharedMem
+ /// \~english @param[in] f_cSharedMemName
+ /// const std::string& - name of the shared memory
+ /// \~english @param[in] f_uiSize
+ /// const UI_32 - size of shared memory
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// None
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// Create object of CNSSharedMem class.
+ /// This class don't used to open shared memory object or allocate memory.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// \~english @see ~CNSSharedMem
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSSharedMem(const std::string &f_cSharedMemName, const UI_32 f_uiSize);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// Destructor for CNSSharedMem.
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// None
+ /// \~english @par Change of internal status
+ /// - Change the state of shared memory to closed state
+ /// \~english @par Conditions of processing failure
+ /// None
+ /// \~english @par Detail
+ /// Closes the shared memory, if it is open.
+ /// \~english @par
+ /// Please note the following points when using this API for application.
+ /// - Since the destructor does not delete the shared memory area, \n
+ /// the application must execute shm_unlink to delete the shared memory area.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// \~english @see CNSSharedMem(const std::string&, const UI_32), CNSSharedMem(), Close
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CNSSharedMem();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// This function opens and maps the shared memory object.
+ /// \~english @retval eFrameworkunifiedStatusOK if shared memory opened successfully
+ /// \~english @retval eFrameworkunifiedStatusFail unable to open shared memory
+ /// \~english @retval eFrameworkunifiedStatusErrOther if shared memory already opened
+ /// \~english @par Preconditons
+ /// None
+ /// \~english @par Change of internal status
+ /// - Open shared memory object
+ /// \~english @par Conditions of processing failure
+ /// - if shared memory already opened [eFrameworkunifiedStatusErrOther]
+ /// - Unable to open shared memory(shm_open) [eFrameworkunifiedStatusFail]
+ /// - Unable to create shared memory(mmap) [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// It creates the shared memory if it does not exists.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see Close
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Open();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// This function is used to check whether the shared memory buffer is opened or not.
+ /// \~english @retval TRUE - Open
+ /// \~english @retval FALSE - Not open
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - Check whether the shared memory buffer is opened or not, and return the result.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ BOOL IsOpen();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// This function unmaps the shared memory object.
+ /// \~english @retval eFrameworkunifiedStatusOK if shared memory closed successfully
+ /// \~english @retval eFrameworkunifiedStatusFail if shared memory is not opened
+ /// \~english @par Preconditons
+ /// - Open the shared memory object
+ /// \~english @par Change of internal status
+ /// - Close the shared memory object
+ /// \~english @par Conditions of processing failure
+ /// - The shared memory object is not opened. [eFrameworkunifiedStatusFail]
+ /// - Unable to unmap(munmap) the shared memory object [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - This function unmaps the shared memory object from memory space.
+ /// \~english @par
+ /// Please note the following points when using this API for application.
+ /// - Since the destructor does not delete the shared memory area, \n
+ /// the application must execute shm_unlink to delete the shared memory area.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Close();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ // Read data from shared memory.
+ /// \~english @param [out] buffer
+ /// PSTR - pointer to the buffer in which the read data is stored
+ /// \~english @param [in] f_uilength
+ /// UI_32 - length of the data buffer provided
+ /// \~english @param [in] f_bBlock
+ /// BOOL - TRUE - blocking call
+ /// FALSE - non blocking call
+ /// \~english @retval SI_32 Returns The number of bytes actually read, or NS_SHM_ERROR if an error occurred
+ /// \~english @retval NS_SHM_ERROR
+ /// \~english @par Preconditons
+ /// - Open the shared memory object
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - The shared memory object is not opened. [NS_SHM_ERROR]
+ /// - Pointor to buffer(buffer) is NULL. [NS_SHM_ERROR]
+ /// - Byte of data(f_uilength)is 0. [NS_SHM_ERROR]
+ /// \~english @par Detail
+ /// This function reads data from the shared memory.
+ /// If this function is used as blocking call, then the calling thread will get blocked
+ /// until data is available for read. By default it is a blocking call.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see Write
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 Read(PSTR buffer, const UI_32 f_uilength, const BOOL f_bBlock = TRUE);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// This function writes the data into the shared memory.
+ /// \~english @param[in] buffer
+ /// PCSTR - pointer to the buffer containing the data to be written
+ /// \~english @param[in] f_uilength
+ /// const UI_32 - length of the data buffer to be written
+ /// \~english @retval SI_32 Returns The number of bytes written, or NS_SHM_ERROR if an error occurred
+ /// \~english @par Preconditons
+ /// - Open the shared memory object
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - The shared memory object is not opened. [NS_SHM_ERROR]
+ /// - Pointor to buffer(buffer) is NULL. [NS_SHM_ERROR]
+ /// - Size of buffer(f_uilength) is larger than the size designated by constructor. [NS_SHM_ERROR]
+ /// \~english @par Detail
+ /// - This function writes the data into the shared memory.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see Read
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 Write(PCSTR buffer, const UI_32 f_uilength);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// Dump data to file.
+ /// \~english @param [in] f_pPath
+ /// PCSTR - file path.
+ /// \~english @param[in] [in] f_uiDumpSize
+ /// PUI_32 - Returns The number of bytes written into file
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK on success,
+ /// eFrameworkunifiedStatusFileLoadError - file path is incorrect
+ /// eFrameworkunifiedStatusSemLockFail/
+ /// eFrameworkunifiedStatusSemLockFail - mutex locking/unlocking error
+ /// eFrameworkunifiedStatusFail - shared memory is not opened
+ /// eFrameworkunifiedStatusInvldParam - invalid param
+ /// \~english @par Preconditons
+ /// -
+ /// \~english @par Change of internal status
+ /// -None
+ /// \~english @par Conditions of processing failure
+ /// - file path is incorrect.[eFrameworkunifiedStatusFileLoadError]
+ /// - mutex locking/unlocking error.[eFrameworkunifiedStatusSemLockFail/eFrameworkunifiedStatusSemLockFail]
+ /// - shared memory is not opened.[eFrameworkunifiedStatusFail]
+ /// - invalid param.[eFrameworkunifiedStatusInvldParam]
+ /// \~english @par Detail
+ /// - This function writes all the data in the buffer into provided file f_pPath.
+ /// - This function does not changes the unread buffer.
+ /// - This function overwrites the file if it exists.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus DumpToFile(PCSTR f_pPath, PUI_32 f_uiDumpSize);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// This function gets size of unread bytes.
+ /// \~english @param None
+ /// \~english @retval Except NS_SHM_ERROR - Returns The number of unread bytes
+ /// \~english @retval NS_SHM_ERROR -if an error occurred
+ /// \~english @par Preconditons
+ /// -
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// if m_pShmHdr is null.[NS_SHM_ERROR]
+ /// \~english @par Detail
+ /// This function returns the number of unread bytes which can be read by Read().
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par
+ /// - l_uiReadSize:Result
+ /// - NS_SHM_ERROR:Failure
+ /// - Except NS_SHM_ERROR:Success
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 GetSize();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// Clear buffer.
+ /// \~english @param None
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK on success,
+ /// eFrameworkunifiedStatusSemLockFail/
+ /// eFrameworkunifiedStatusSemLockFail - mutex locking/unlocking error
+ /// eFrameworkunifiedStatusFail - shared memory is not opened
+ /// \~english @par Preconditons
+ /// -
+ /// \~english @par Change of internal status
+ /// - set m_pShmHdr->m_uiReadPtr with 0;
+ /// - set m_pShmHdr->m_uiWritePtr with 0;
+ /// - set m_pShmHdr->m_uiUnReadSize with 0;
+ /// - set m_pShmHdr->m_bIsFull with FALSE;
+ /// \~english @par Conditions of processing failure
+ /// - mutex locking/unlocking error.[eFrameworkunifiedStatusSemLockFail/eFrameworkunifiedStatusSemLockFail]
+ /// - shared memory is not opened.[eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - This function clears the shared memory buffer.if m_pShmHdr is null,return failure.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus ClearBuf();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMem
+ /// \~english @par Brief
+ /// This function sets the position of read ptr to write ptr in buffer.
+ /// \~english @param None
+ /// \~english @retval EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK on success,
+ /// eFrameworkunifiedStatusSemLockFail/
+ /// eFrameworkunifiedStatusSemLockFail - mutex locking/unlocking error
+ /// eFrameworkunifiedStatusFail - shared memory is not opened
+ /// \~english @par Preconditons
+ /// -
+ /// \~english @par Change of internal status
+ /// - set m_pShmHdr->m_uiReadPtr with m_pShmHdr->m_uiWritePtr;
+ /// - set m_pShmHdr->m_uiUnReadSize with 0;
+ /// \~english @par Conditions of processing failure
+ /// - mutex locking/unlocking error.[eFrameworkunifiedStatusSemLockFail/eFrameworkunifiedStatusSemLockFail]
+ /// - shared memory is not opened.[eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - This function sets the position of read ptr to write ptr in buffer.\n
+ /// If m_pShmHdr of lock failure or unlock failure,result is error.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetReadPtrToWritePtr();
+
+ protected:
+ // no members in protected
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CNSSharedMem
+ /// Constructor of CNSSharedMem class
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSSharedMem();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CreateSMHeader
+ /// This function creates the shared memory object for header.
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK shared memory created successfully
+ /// eFrameworkunifiedStatusDuplicate shared memory already exists
+ /// eFrameworkunifiedStatusInvldParam invalid shared memory name
+ /// eFrameworkunifiedStatusFail on error
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CreateSMHeader();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CreateSMDataBuffer
+ /// This function creates the shared memory object for data buffer.
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK shared memory created successfully
+ /// eFrameworkunifiedStatusDuplicate shared memory already exists
+ /// eFrameworkunifiedStatusInvldParam invalid shared memory name
+ /// eFrameworkunifiedStatusFail on error
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus CreateSMDataBuffer();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// MapSMHeader
+ /// This function open and maps the shared memory in process space.
+ ///
+ /// \param [out] f_pShMem
+ /// PVOID* - address of the mapped memory
+ /// \param [in] f_cShmName
+ /// std::string - Name of the shared memory
+ /// \param [in] f_uiShmSize
+ /// UI_32 - Size of the shared memory
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK if shared memory opened successfully
+ /// eFrameworkunifiedStatusFail unable to open shared memory
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus MapSM(PVOID *f_pShMem, const std::string &f_cShmName, const UI_32 f_uiShmSize);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// UnMapSM
+ /// This function unmaps the shared memory object.
+ ///
+ /// \param [in] f_pShMem
+ /// PCSTR - address of the memory to unmap
+ /// \param [in] f_uiShmSize
+ /// UI_32 - Size of the memory to be unmapped
+ ///
+ /// \return EFrameworkunifiedStatus
+ /// eFrameworkunifiedStatusOK if shared memory closed successfully
+ /// eFrameworkunifiedStatusFail if shared memory is not opened
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus UnMapSM(PVOID f_pShMem, const UI_32 f_uiShmSize);
+
+ std::string m_cShmHdrName; // name of the shared memory header
+
+ std::string m_cShmName; // name of the shared memory data
+
+ UI_32 m_uiShmBuffSize; // shared memory size
+
+ NSSharedBufferHdr *m_pShmHdr; // The pointer to the shared memory header
+
+ PCHAR m_pShmBuff; // The pointer to the shared memory data buffer
+};
+
+#endif /* __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_sharedmem_reader.h b/nsframework/framework_unified/client/include/native_service/ns_sharedmem_reader.h
new file mode 100644
index 00000000..9a34909e
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_sharedmem_reader.h
@@ -0,0 +1,340 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSSharedMemory
+/// \brief This file contains implementation of class CNSSharedMemReader.
+/// This class provides API to open, close and perform read operation on shared memory.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns_sharedmem_reader.h
+ * @brief \~english This file contains implementation of class CNSSharedMemReader.
+ * This class provides API to open, close and perform read operation on shared memory.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_READER_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_READER_H__
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_types.h>
+#include <string>
+
+class CNSSharedMem;
+
+/**
+ * @class CNSSharedMemReader
+ * \~english @brief read shared memory
+ * \~english @par Brief Introduction
+ * This class is used for read shared memory.
+ *
+ */
+class CNSSharedMemReader {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemReader
+ /// \~english @par Brief
+ /// Constructor for CNSSharedMemReader
+ /// \~english @param[in] f_cSharedMemName
+ /// const std::string& - name of the shared memory
+ /// \~english @param[in] f_bBlock
+ /// BOOL - TRUE - blocking call for Read() API,Thread will get blocked \n
+ /// the thread until data is available for read.
+ /// FALSE - non blocking call for Read() API
+ /// \~english @retval None
+ /// \~english @par Preconditons
+ /// -None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// Create object of CNSSharedMemReader class.
+ /// This class don't used to open shared memory object or allocate memory.
+ /// \~english @par Classification
+ /// - public
+ /// \~english @par Type
+ /// - None
+ /// \~english @see ~CNSSharedMemReader
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSSharedMemReader(const std::string &f_cSharedMemName, const BOOL f_bBlock = TRUE); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemReader
+ /// \~english @par Brief
+ /// Destructor for CNSSharedMemReader.
+ /// \~english @param None
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - Change the state of shared memory to closed state
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// Closes the shared memory, if it is open.
+ /// \~english @par
+ /// Please note the following points when using this API for application.
+ /// - Since the destructor does not delete the shared memory area, \n
+ /// the application must execute shm_unlink to delete the shared memory area.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// -None
+ /// \~english @see CNSSharedMemReader(const std::string&, const BOOL), CNSSharedMemReader(), Close
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CNSSharedMemReader();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemReader
+ /// \~english @par Brief
+ /// This function opens and maps the shared memory object.
+ /// \~english @retval eFrameworkunifiedStatusOK if shared memory opened successfully
+ /// \~english @retval eFrameworkunifiedStatusFail unable to open shared memory
+ /// \~english @retval eFrameworkunifiedStatusErrOther if shared memory already opened
+ /// \~english @par Preconditons
+ /// None
+ /// \~english @par Change of internal status
+ /// - Open shared memory object
+ /// \~english @par Conditions of processing failure
+ /// - if shared memory already opened [eFrameworkunifiedStatusErrOther]
+ /// - Unable to open shared memory(shm_open) [eFrameworkunifiedStatusFail]
+ /// - Unable to create shared memory(mmap) [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// Opens a shared memory object and allocates it to a memory space.\n
+ /// It creates the shared memory if it does not exists.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see Close
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Open();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemReader
+ /// \~english @par Brief
+ /// This function is used to check whether the shared memory buffer is opened or not.
+ /// \~english @retval TRUE - Open
+ /// \~english @retval FALSE - Not open
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - Check whether the shared memory buffer is opened or not, and return the result.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ BOOL IsOpen();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemReader
+ /// \~english @par Brief
+ /// This function unmaps the shared memory object.
+ /// \~english @retval eFrameworkunifiedStatusOK if shared memory closed successfully
+ /// \~english @retval eFrameworkunifiedStatusFail if shared memory is not opened
+ /// \~english @par Preconditons
+ /// - Open the shared memory object
+ /// \~english @par Change of internal status
+ /// - Close the shared memory object
+ /// \~english @par Conditions of processing failure
+ /// - The shared memory object is not opened. [eFrameworkunifiedStatusFail]
+ /// - Unable to unmap(munmap) the shared memory object [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - This function unmaps the shared memory object from memory space.
+ /// \~english @par
+ /// Please note the following points when using this API for application.
+ /// - Since the closing does not delete the shared memory area, \n
+ /// the application must execute shm_unlink to delete the shared memory area.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see Open
+ ////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Close();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemReader
+ /// \~english @par Brief
+ /// This function reads data from the shared memory.
+ /// \~english @param[in] buffer
+ /// PSTR - pointer to the buffer in which the read data is stored
+ /// \~english @param[in] f_uilength
+ /// const UI_32 - length of the data buffer provided
+ /// \~english @retval The number of bytes actually read, or NS_SHM_ERROR if an error occurred
+ /// \~english @par Preconditons
+ /// - Open the shared memory object
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - The shared memory object is not opened. [NS_SHM_ERROR]
+ /// - Pointor to buffer(buffer) is NULL. [NS_SHM_ERROR]
+ /// - Byte of data(f_uilength)is 0. [NS_SHM_ERROR]
+ /// \~english @par Detail
+ /// If this constructor is used as blocking call, then the calling thread will get blocked\n
+ /// until data is available for read.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see Write
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 Read(PSTR buffer, const UI_32 f_uilength);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemReader
+ /// \~english @par Brief
+ /// This function writes all the data in the buffer into provided file f_pPath.
+ /// \~english @param[in] f_pPath
+ /// PCSTR - file path.
+ /// \~english @param[in] f_uiDumpSize
+ /// PUI_32 - Returns The number of bytes written into file
+ /// \~english @retval eFrameworkunifiedStatusOK - on success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid param
+ /// \~english @retval eFrameworkunifiedStatusFail - shared memory is not open
+ /// \~english @retval eFrameworkunifiedStatusFileLoadError - file path is incorrect
+ /// \~english @retval eFrameworkunifiedStatusErrOther
+ /// \~english @retval eFrameworkunifiedStatusSemUnlockFail
+ /// \~english @par Preconditons
+ /// - File is opened.
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - Pointor to dump size(f_uiDumpSize)is NULL [eFrameworkunifiedStatusNullPointer]
+ /// - Dump file path is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - File is not opened [eFrameworkunifiedStatusFail]
+ /// - Failed to open dump file [eFrameworkunifiedStatusFileLoadError]
+ /// - Failed to access shared memory [eFrameworkunifiedStatusFail]
+ /// - Failed to write data into dump file [eFrameworkunifiedStatusErrOther]
+ /// - Failed to lock mutex [eFrameworkunifiedStatusSemLockFail]
+ /// - Failed to unlock mutex [eFrameworkunifiedStatusSemUnlockFail]
+ /// \~english @par Detail
+ /// This function does not changes the unread buffer.
+ /// \~english @par
+ /// This function overwrites the file if it exists.
+ /// \~english @par Classification
+ /// public
+ /// \~english @par Type
+ /// none
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus DumpToFile(PCSTR f_pPath, PUI_32 f_uiDumpSize);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemReader
+ /// \~english @par Brief
+ /// This function gets size of unread .bytes.
+ /// \~english @param None
+ /// \~english @retval Except NS_SHM_ERROR - Returns The number of bytes written,
+ /// \~english @retval NS_SHM_ERROR -if an error occurred
+ /// \~english @par Preconditons
+ /// -
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// if m_pShmHdr is null.[NS_SHM_ERROR]
+ /// \~english @par Detail
+ /// This function returns the number of unread bytes which can be read by Read().
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// sync only
+ /// \~english @par
+ /// - l_uiReadSize:Result
+ /// - NS_SHM_ERROR:Failure
+ /// - Except NS_SHM_ERROR:Success
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 GetSize();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemReader
+ /// \~english @par Brief
+ /// This function sets the position of read ptr to write ptr in buffer.
+ /// \~english @retval eFrameworkunifiedStatusOK - on success
+ /// \~english @retval eFrameworkunifiedStatusFail - shared memory is not open
+ /// \~english @retval eFrameworkunifiedStatusSemLockFail - mutex locking error
+ /// \~english @retval eFrameworkunifiedStatusSemUnlockFail - mutex unlocking error
+ /// \~english @par Preconditons
+ /// - File is opened.
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - File is not opened [eFrameworkunifiedStatusFail]
+ /// - Failed to lock mutex [eFrameworkunifiedStatusSemLockFail]
+ /// - Failed to unlock mutex [eFrameworkunifiedStatusSemUnlockFail]
+ /// \~english @par Detail
+ /// - Set the position of read ptr to write ptr in buffer.\n
+ /// - Initialize state of unreading bytes to 0.
+ /// \~english @par Classification
+ /// - public
+ /// \~english @par Type
+ /// Open Close
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetReadPtrToWritePtr();
+
+ protected:
+ // no members in protected
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CNSSharedMemReader
+ /// Constructor of CNSSharedMemReader class
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSSharedMemReader();
+
+ CNSSharedMem *m_pShmReader; // pointer to the CNSSharedMem object
+
+ BOOL m_bBlock; // blocking or non blocking read
+};
+
+#endif /*__NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_READER_H__*/ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_sharedmem_writer.h b/nsframework/framework_unified/client/include/native_service/ns_sharedmem_writer.h
new file mode 100644
index 00000000..de6e9f94
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_sharedmem_writer.h
@@ -0,0 +1,283 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSSharedMemory
+/// \brief This file contains implementation of class CNSSharedMemWriter.
+/// This class provides API to open, close and perform write operation on shared memory.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns_sharedmem_writer.h
+ * @brief \~english This file contains implementation of class CNSSharedMemWriter.
+ * This class provides API to open, close and perform write operation on shared memory.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_WRITER_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_WRITER_H__
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_types.h>
+#include <string>
+
+class CNSSharedMem;
+
+/**
+ * @class CNSSharedMemWriter
+ * \~english @brief write shared memory
+ * \~english @par Brief Introduction
+ * This class is used for write shared memory.
+ *
+ */
+class CNSSharedMemWriter {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemWriter
+ /// \~english @par Brief
+ /// Constructor for CNSSharedMemWriter
+ /// \~english @param[in] f_cSharedMemName
+ /// const std::string& - name of the shared memory
+ /// \~english @param[in] f_uiSize
+ /// UI_32 - size of shared memory
+ /// \~english @retval None
+ /// \~english @par Preconditons
+ /// -None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// Create object of CNSSharedMemWriter class.
+ /// This class don't used to open shared memory object or allocate memory.
+ /// \~english @par Classification
+ /// - public
+ /// \~english @par Type
+ /// - sync only
+ /// \~english @see ~CNSSharedMemWriter
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSSharedMemWriter(const std::string &f_cSharedMemName, const UI_32 f_uiSize);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemWriter
+ /// \~english @par Brief
+ /// Destructor of CNSSharedMemWriter class.
+ /// \~english @param None
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - Change the state of shared memory to closed state
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// Closes the shared memory, if it is open.
+ /// \~english @par
+ /// Please note the following points when using this API for application.
+ /// - Since the destructor does not delete the shared memory area, \n
+ /// the application must execute shm_unlink to delete the shared memory area.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - sync only
+ /// \~english @see CNSSharedMemWriter(const std::string&, const BOOL), CNSSharedMemWriter(), Close
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CNSSharedMemWriter();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemWriter
+ /// \~english @par Brief
+ /// This function opens and maps the shared memory object.
+ /// \~english @param None
+ /// \~english @retval eFrameworkunifiedStatusOK if shared memory opened successfully
+ /// \~english @retval eFrameworkunifiedStatusNullPointer pointer of the CNSSharedMem object is NULL
+ /// \~english @retval eFrameworkunifiedStatusFail unable to open shared memory
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - Open shared memory object
+ /// \~english @par Conditions of processing failure
+ /// - pointer of the CNSSharedMem object is NULL.[eFrameworkunifiedStatusNullPointer]
+ /// - unable to open shared memory.[eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// This function opens and maps the shared memory object.\n
+ /// It creates the shared memory if it does not exists.
+ /// \~english @par Classification
+ /// - public
+ /// \~english @par Type
+ /// - sync only
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see Close
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Open();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemWriter
+ /// \~english @par Brief
+ /// This function is used to check whether the shared memory buffer is opened or not.
+ /// \~english @retval TRUE - Open
+ /// \~english @retval FALSE - Not open
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - Check whether the shared memory buffer is opened or not, and return the result.
+ /// \~english @par Classification
+ /// - public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ BOOL IsOpen();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemWriter
+ /// \~english @par Brief
+ /// This function unmaps the shared memory object.
+ /// \~english @retval eFrameworkunifiedStatusOK if shared memory closed successfully
+ /// \~english @retval eFrameworkunifiedStatusNullPointer pointer of the CNSSharedMem object is NULL
+ /// \~english @retval eFrameworkunifiedStatusFail if shared memory is not open
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - Close the shared memory object
+ /// \~english @par Conditions of processing failure
+ /// - Pointer of the CNSSharedMem object is NULL.[eFrameworkunifiedStatusNullPointer]
+ /// - If shared memory is not open.[eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - This function unmaps the shared memory object.\n
+ /// If pointer of the CNSSharedMem object is NULL, will return eFrameworkunifiedStatusNullPointer.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see Open
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Close();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemWriter
+ /// \~english @par Brief
+ /// This function writes the data into the shared memory.
+ /// \~english @param[in] buffer
+ /// PSTR - pointer to the buffer containing the data to be written
+ /// \~english @param[in] f_uilength
+ /// const UI_32 - length of the data buffer to be written
+ /// \~english @retval The number of bytes written
+ /// \~english @retval NS_SHM_ERROR if an error occurred
+ /// \~english @par Preconditons
+ /// - Open the shared memory object
+ /// \~english @par Change of internal status
+ /// - shared memory is changed.
+ /// \~english @par Conditions of processing failure
+ /// - m_pShmWriter is NULL.
+ /// - buffer is NULL.
+ /// - f_uilength is 0.
+ /// \~english @par Detail
+ /// - This function writes the buffer's data whose length is f_uilength to shared memory.\n
+ /// If successed,return write size,else return NS_SHM_ERROR.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// Sync only
+ /// \~english @par
+ /// - l_iWriteSize:Result
+ /// - NS_SHM_ERROR:Failure
+ /// - Except NS_SHM_ERROR:Success
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ SI_32 Write(PCSTR buffer, const UI_32 f_uilength);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CNSSharedMemWriter
+ /// \~english @par Brief
+ /// This function clears the shared memory buffer.
+ /// \~english @retval eFrameworkunifiedStatusOK if shared memory cleared successfully
+ /// \~english @retval eFrameworkunifiedStatusNullPointer pointer of the CNSSharedMem object is NULL
+ /// \~english @retval eFrameworkunifiedStatusFail if shared memory is not open
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - shared memory is changed.
+ /// \~english @par Conditions of processing failure
+ /// - Pointer of the CNSSharedMem object is NULL.[eFrameworkunifiedStatusNullPointer]
+ /// - If shared memory is not open.[eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - This function clears the shared memory buffer.\n
+ /// If pointer of the CNSSharedMem object is NULL, will return eFrameworkunifiedStatusNullPointer.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @par
+ /// - eFrameworkunifiedStatus:Result
+ /// - eFrameworkunifiedStatusOK:Success
+ /// - Except eFrameworkunifiedStatusOK:Failure
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus ClearBuf();
+
+ protected:
+ // no members in protected
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CNSSharedMemWriter
+ /// Constructor of CNSSharedMemWriter class
+ ///
+ /// \param
+ ///
+ /// \return None
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CNSSharedMemWriter();
+
+ CNSSharedMem *m_pShmWriter; // pointer to the CNSSharedMem object
+};
+
+#endif /*__NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_WRITER_H__*/ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_system_mode.h b/nsframework/framework_unified/client/include/native_service/ns_system_mode.h
new file mode 100644
index 00000000..9815904c
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_system_mode.h
@@ -0,0 +1,67 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/*
+ * NS_SYSTEM_MODE.h
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSFramework
+///////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns_system_mode.h
+ * @brief \~english The file defines enum SystemModeProtocol
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_SYSTEM_MODE_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_SYSTEM_MODE_H__
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_service_protocol.h>
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_System
+/// \brief System Mode Protocol
+////////////////////////////////////////////////////////////////////////////////////////////////
+typedef enum _SystemModeProtocol {
+ SYSTEM_ON_INITIALIZATION = PROTOCOL_THREAD_INITIALIZATION, ///< Initialize thread after creation
+ SYSTEM_ON_WAKEUP = PROTOCOL_THREAD_WAKEUP, ///< Wakeup Thread after sleep
+ SYSTEM_ON_SHUTDOWN = PROTOCOL_THREAD_SHUTDOWN, ///< Stop the thread
+ SYSTEM_ON_DESTROY = PROTOCOL_THREAD_DESTROY ///< Destroy the thread
+} SystemModeProtocol;
+
+#endif /* __NATIVESERVICES_SYSTEM_MODE_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_timer_if.h b/nsframework/framework_unified/client/include/native_service/ns_timer_if.h
new file mode 100644
index 00000000..549fc4c3
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_timer_if.h
@@ -0,0 +1,317 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns_timer_if.h
+ * @brief \~english APIs to create, delete and use Native Service timers .
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_TIMER_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_TIMER_H__
+
+#include <native_service/frameworkunified_types.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TIMER_QUE "TIMER"
+
+#define MAX_SERVICE_NAME 15
+
+/// \brief Timer Function Pointer definition
+/// Detailed description of the class
+typedef void (*TimerCb)(UI_16 cmd);
+
+/// \brief Timer info, defines the initial
+/// start of a timer, the repeat timer
+/// values and the cmd id for a timer
+typedef struct _NSTimerInfo {
+
+// UI_32 t_sec;
+ time_t t_sec;
+ UI_64 t_nsec;
+ UI_16 iCmd;
+
+// UI_32 rpt_sec;
+ time_t rpt_sec;
+ UI_64 rpt_nsec;
+} NSTimerInfo;
+
+/// \brief Enum Types for valid Callback Mechanisms for
+/// a NS_Timer
+typedef enum _NSTimerCallbackMechanism {
+ CALLBACK_MESSAGE
+} eNSTimerCallbackMechanism;
+
+/// \brief Helper methods that convert time provided in MS.
+/// mseconds
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup WholeSeconds
+/// \~english @par Brief
+/// Converts a time value in milliseconds (ms) to a time value in secods (s).
+/// \~english @param [in] ms
+/// UI_32 - Time value in milliseconds(0 to ULONG_MAX)
+/// \~english @retval Time value in seconds
+/// \~english @par Preconditons
+/// - none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - none
+/// \~english @par Detail
+/// This function converts a time value in ms to a time value in s and returns it.\n
+/// For example, 12345ms obtains 12s as the conversion result.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Not applicable
+/// \~english @see
+/// none
+///
+/// \~english @par Brief
+/// Get the number of whole seconds in the milsecond number that was passed.
+/// \~english @param[in] ms
+/// UI_32 - time value in mil seconds
+/// \~english @retval Number of whole seconds in the number passed.
+/// \~english @par Preconditons
+/// \~english @par Change of internal status
+/// \~english @par Conditions of processing failure
+/// \~english @par Detail
+/// \~english @par Classification
+/// \~english @par Type
+/// \~english @see
+/// none
+/////////////////////////////////////////////////////////////////////////////////////
+
+//UI_32 WholeSeconds(UI_32 ms);
+time_t WholeSeconds(UI_32 ms);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup RemainderMs
+/// \~english @par Brief
+/// Get the number of remaining milseconds out of whole second for the number passed.
+/// \~english @param[in] ms
+/// UI_32 - time value in mil seconds
+/// \~english @retval Number of remaining mil seconds in the number passed.
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// none
+/// \~english @par Detail
+/// This function returns the time value in ms of the remainder from converting the time value in ms to the time value in s.\n
+/// For example, 12345ms obtains 345ms as the conversion result.
+/// \~english @par Classification
+/// \~english @par Type
+/// \~english @see
+/// none
+/////////////////////////////////////////////////////////////////////////////////////
+UI_32 RemainderMs(UI_32 ms);
+
+/////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup MSToNS
+/// \~english @par Brief
+/// Converts mil seconds to nano seconds.
+/// \~english @param[in] ms
+/// UI_32 - time value in mil seconds
+/// \~english @retval Number of nano seconds there are in mil seconds in the number passed.
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// none
+/// \~english @par Detail
+/// This function converts a time value in ms to a time value in ns and returns it.\n
+/// For example, 1234ms obtains 1234000000ns as the conversion result.
+/// \~english @par Classification
+/// \~english @par Type
+/// \~english @see
+/// none
+/////////////////////////////////////////////////////////////////////////////////////
+UI_64 MSToNS(UI_32 ms);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_TimerCreate
+/// \~english @par Brief
+/// to create an instance of a timer object, and start it
+/// \~english @param[in] timer_info
+/// NSTimerInfo - timer value represents an absolute expiration timeout
+/// \~english @param[in] cbMech
+/// eNSTimerCallbackMechanism - CALLBACKMECHANISM_ENUM - specifies the callback mechanism associated with the
+/// timer\n
+/// CALLBACK_MESSAGE will send a message to a message queue
+/// \~english @param[in] sndMqHndl
+/// HANDLE - implies a MESSAGE QUE HANDLE generated by McOpenSender() is specified
+/// \~english @retval Handle to the timer object or NULL on failure
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If HANDLE(sndMqHndl) is NULL, [NULL]
+/// - If the Callback mechanism (cbMech) specified in the arguments is not CALLBACK_MESSAGE [NULL]
+/// - If thread creation fails (reateTimerMonitoringThread(); returns eFrameworkunifiedStatusFail) [NULL]
+/// - Unable to allocate memory for timer handle structures [NULL]
+/// - Memory cannot be allocated for the timer-information struct. [NULL]
+/// - When the message queue name of the handle (sndMqHndl) specified in the arguments is NULL,[NULL]
+/// - If a system call (such as epoll_ctl()) is in error,[NULL]
+/// \~english @par Detail
+/// Creates an instance of a timer object, sends a CALLBACK_MESSAGE message to the message queue, and starts the timer.\n
+/// When McOpenSender() is executed to execute NS_TimerCreate, the handles should be closed if not needed.
+/// \~english @par Classification
+/// \~english @par Type
+/// \~english @see NS_TimerDelete,NS_TimerSetTime
+////////////////////////////////////////////////////////////////////////////////////////////
+HANDLE NS_TimerCreate(NSTimerInfo timer_info, eNSTimerCallbackMechanism cbMech, HANDLE sndMqHndl);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_TimerDelete
+/// \~english @par Brief
+/// to delete an instance of a timer object
+/// \~english @param[in] hTimer
+/// HANDLE - a timer handle that was created via NS_TimerCreate
+/// \~english @retval EFrameworkunifiedStatus indicates if the timer handle was delete successfully
+/// \~english @retval eFrameworkunifiedStatusOK
+/// \~english @retval eFrameworkunifiedStatusFail
+/// \~english @retval eFrameworkunifiedStatusInvldParam
+/// \~english @par Preconditons
+/// - NS_TimerCreate has generated a HANDLE of timers
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If HANDLE(hTimer) is NULL,[eFrameworkunifiedStatusInvldParam]
+/// - Initializes the state. [eFrameworkunifiedStatusFail]
+/// - Invalid timed objects for HANDLE(hTimer specified by arguments:[eFrameworkunifiedStatusInvldParam]
+/// - If semaphoring fails, [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// If the timer is set, the timer is stopped.\n
+/// Delete an instance of a timer object.
+/// \~english @par Classification
+/// \~english @par Type
+/// \~english @see NS_TimerCreate, NS_TimerSetTime
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NS_TimerDelete(HANDLE hTimer);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_TimerSetTime
+/// \~english @par Brief
+/// to start or stop a timer by setting the time interval associated
+/// with a timer, value of 0 in t_sec & t_nsec, will stop the timer.
+/// \~english @param[in] hTimer
+/// HANDLE - handle to timer that your specifying the timer to be set
+/// \~english @param[in] timer_info
+/// NSTimerInfo - timer value represents an absolute expiration timeout
+/// \~english @retval EFrameworkunifiedStatus indicates if the timer info was set successfully
+/// \~english @retval eFrameworkunifiedStatusOK
+/// \~english @retval eFrameworkunifiedStatusInvldHandle
+/// \~english @retval eFrameworkunifiedStatusFail
+/// \~english @par Preconditons
+/// the timer must have already been created with NS_TimerCreate
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If HANDLE(hTimer) is NULL,[eFrameworkunifiedStatusInvldHandle]
+/// - Initializes the state. [eFrameworkunifiedStatusFail]
+/// - Retrieving timers fails [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// When the timer information (t_sec and t_nsec) is 0, the timer is stopped.\n
+/// If it is not 0, the timer is started based on the timer information.\n
+/// The hTimer must have been created with NS_TimerCreate.
+/// \~english @par Classification
+/// \~english @par Type
+/// \~english @see NS_TimerCreate, NS_TimerGetTime
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NS_TimerSetTime(HANDLE hTimer, NSTimerInfo timer_info);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_TimerGetTime
+/// \~english @par Brief
+/// to retrieve the time until a timer expires
+/// \~english @param[in] hTimer
+/// HANDLE - handle to timer that your trying to get information about
+/// \~english @param[out] timer_info
+/// NSTimerInfo* - a structure to store the delay time until the timer expires
+/// \~english @retval EFrameworkunifiedStatus indicates if the timer info was get successfully
+/// \~english @retval eFrameworkunifiedStatusOK
+/// \~english @retval eFrameworkunifiedStatusInvldHandle
+/// \~english @retval eFrameworkunifiedStatusFail
+/// \~english @par Preconditons
+/// - NS_TimerCreate has generated a HANDLE of timers
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// - If HANDLE(hTimer) is NULL,[eFrameworkunifiedStatusInvldHandle]
+/// - If the timer_info specified in the arguments is NULL,... [eFrameworkunifiedStatusInvldHandle]
+/// - Initializes the state. [eFrameworkunifiedStatusFail]
+/// - If the timerdelete fails.... [eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Gets the time until the timer expires.
+/// \~english @par Classification
+/// \~english @par Type
+/// \~english @see NS_TimerCreate, NS_TimerSetTime
+////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NS_TimerGetTime(HANDLE hTimer, NSTimerInfo *timer_info);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_TimerDebugOn
+/// \~english @par Brief
+/// to make a flag for the debugging process. for debug.
+/// \~english @param[in] FlagState
+/// BOOL - DebugFlag state
+/// \~english @retval none
+/// \~english @par Preconditons
+/// none
+/// \~english @par Change of internal status
+/// - The internal state is not changed.
+/// \~english @par Conditions of processing failure
+/// none
+/// \~english @par Detail
+/// Sets the debug flag specified by the argument.\n
+/// However, if the set flag is the same as the flag specified in the argument, no operation is performed.
+/// \~english @par Classification
+/// \~english @par Type
+/// \~english @see none
+////////////////////////////////////////////////////////////////////////////////////////////
+void NS_TimerDebugOn(BOOL FlagState);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __NATIVESERVICES_TIMER_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_timer_if.hpp b/nsframework/framework_unified/client/include/native_service/ns_timer_if.hpp
new file mode 100644
index 00000000..ffcd8c8a
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_timer_if.hpp
@@ -0,0 +1,393 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSTimer
+/// \brief Header file for Timer class.
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns_timer_if.hpp
+ * @brief \~english Header file for Timer class.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef NS_TIMER_IF_HPP_ // NOLINT (build/header_guard)
+#define NS_TIMER_IF_HPP_
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_timer_if.h>
+
+/**
+ * @class NSTimer
+ * \~english @brief Handle Timer
+ * \~english @par Brief Introduction
+ * Timer class is using to handle the timer.creating, starting, stopping,and so on.
+ *
+ */
+class NSTimer {
+ public:
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// Creates a timer object with default behavior as single timeout timer.
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// -None
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// -To create the instance of this class.init the member var using m_hTimer, m_u64TimeInterval,
+ /// m_bRepeatTimer.\n
+ /// Default status,all time will be set 0.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// -
+ /// \~english @see ~NSTimer
+ ////////////////////////////////////////////////////////////////////////////////////
+ NSTimer();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// Deletes a timer object.
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// -Instance of this class is created successfully.
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// -Destruct the instance of this class.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// -None
+ /// \~english @see NSTimer
+ ////////////////////////////////////////////////////////////////////////////////////
+ ~NSTimer();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// This function overloads \ref SetNotifyMethod().
+ /// On timeout, sends the command id to the message queue of specified application.
+ /// Resets previous notify method if any.
+ /// \~english @param[in] notifyCmdId
+ /// UI_16 - command id.
+ /// \~english @param[in] notifyToAppName
+ /// PCSTR - Send command id to the message queue of this application
+ /// \~english @retval EFrameworkunifiedStatus - Returns eFrameworkunifiedStatusOK if the action is set otherwise eFrameworkunifiedStatusFail
+ /// \~english @retval eFrameworkunifiedStatusOK - Success
+ /// \~english @retval eFrameworkunifiedStatusInvldParam - Invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusFail - process error
+ /// \~english @par Preconditons
+ /// -None
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// - Pointer of AppName specified by argument(notifyToAppName) is NULL [eFrameworkunifiedStatusInvldParam]
+ /// - Bytes of AppName specified by argument(notifyToAppName) are larger then MAX_SERVICE_NAME(15byte)
+ /// [eFrameworkunifiedStatusInvldParam]
+ /// - There isn't enough buffer(malloc) to storage message queue name, when getting(McOpenSender) message queue
+ /// handle [eFrameworkunifiedStatusFail]
+ /// - Bytes of message queue name are larger then LIMIT_QUEUE_NAME_SIZE(16byte), when getting(McOpenSender)
+ /// message queue handle [eFrameworkunifiedStatusFail]
+ /// - Failed to get message queue(mq_open), when getting(McOpenSender) message queue handle [eFrameworkunifiedStatusFail]
+ /// - There isn't enough buffer(malloc) to storage message queue information, when getting(McOpenSender) message
+ /// queue handle [eFrameworkunifiedStatusFail]
+ /// - Failed to create(epoll_create1) file descriptor for epoll, when creating timer handle(NS_TimerCreate)
+ /// [eFrameworkunifiedStatusFail]
+ /// - Failed to create(eventfd) file descriptor for event notification, when creating timer
+ /// handle(NS_TimerCreate) [eFrameworkunifiedStatusFail]
+ /// - Failed to connect(epoll_ctl) file descriptors for epoll and event notification, when creating timer
+ /// handle(NS_TimerCreate) [eFrameworkunifiedStatusFail]
+ /// - Failed to create(pthread_create) timer thread for event notification, when creating timer
+ /// handle(NS_TimerCreate) [eFrameworkunifiedStatusFail]
+ /// - There isn't enough buffer(malloc) to storage timer handle structure, when creating timer
+ /// handle(NS_TimerCreate) [eFrameworkunifiedStatusFail]
+ /// - There isn't enough buffer(malloc) to storage timer information structure,, when creating timer
+ /// handle(NS_TimerCreate) [eFrameworkunifiedStatusFail]
+ /// - Message queue handle is INVALID_HANDLE(-1), when creating timer handle(NS_TimerCreate) [eFrameworkunifiedStatusFail]
+ /// - Checking code of message queue handle is not MQ_CHECK_CODE, when creating timer handle(NS_TimerCreate)
+ /// [eFrameworkunifiedStatusFail]
+ /// - Type of message queue handle is not send/receive, when creating timer handle(NS_TimerCreate)
+ /// [eFrameworkunifiedStatusFail]
+ /// - Failed to create(timerfd_create) file descriptor for timer, when creating timer handle(NS_TimerCreate)
+ /// [eFrameworkunifiedStatusFail]
+ /// - Failed to connect(epoll_ctl) file descriptors for epoll and timer, when creating timer
+ /// handle(NS_TimerCreate) [eFrameworkunifiedStatusFail]
+ /// - Timer handle state of instance has been deleted(DELETED_STATE), when creating timer handle(NS_TimerCreate)
+ /// [eFrameworkunifiedStatusFail]
+ /// - Failed to start/stop(timerfd_settime) timer, when creating timer handle(NS_TimerCreate) [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// This function overloads \ref SetNotifyMethod().
+ /// On timeout, sends the command id to the message queue of specified application.
+ /// Create a timer handle(m_hTimer) of instance, if the time handle already exits, delete it then create a new
+ /// one.
+ /// If there is resource for timer notification before, reset it.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// -None
+ /// \~english @see McOpenSender, McClose, NS_TimerCreate
+ ////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus SetNotifyMethod(UI_16 notifyCmdId, PCSTR notifyToAppName);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// Sets the timer as a repeat timer. Timer timeouts repeatedly as per the interval set.
+ /// Default timer fires only once.
+ /// Not effective, if the timer is running. Effective on next \ref Start() or \ref Start(seconds, msecs) call.
+ /// \~english @param[in] repeatTimer
+ /// BOOL - TRUE - set repeat timer
+ /// FALSE - set single timeout timer. (Default behavior)
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// -None
+ /// \~english @par Change of internal status
+ /// -None
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// Sets the timer as a repeat timer. Timer timeouts repeatedly as per the interval set.
+ /// Default timer fires only once.
+ /// Not effective, if the timer is running. Effective on next \ref Start() or \ref Start(seconds, msecs) call.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// -None
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////
+ VOID SetRepeatTimer(BOOL repeatTimer);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// Set the interval of timeout. Interval is addition of seconds and milliseconds passed as an arguments.
+ /// \~english @param[in] seconds
+ /// UI_32 - Time in seconds
+ /// \~english @param[in] msecs
+ /// UI_64 - Time in milliseconds
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// -None
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// Set the interval of timeout. Interval is addition of seconds and milliseconds passed as an arguments.
+ /// The default value of interval time is 0.
+ /// If interval time is 0, stop timer.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// -None
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////
+ VOID SetTime(UI_32 seconds, UI_64 msecs);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// This function overloads SetTime(). Set the interval of timeout. Interval is addition of hrs,
+ /// mins, seconds and milliseconds passed as an arguments.
+ /// \~english @param[in] hrs
+ /// UI_32 - Time in hours
+ /// \~english @param[in] mins
+ /// UI_64 - Time in minutes
+ /// \~english @param[in] seconds
+ /// UI_32 - Time in seconds
+ /// \~english @param[in] msecs
+ /// UI_64 - Time in milliseconds
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// -None
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// This function overloads SetTime(). Set the interval of timeout. Interval is addition of hrs,
+ /// mins, seconds and milliseconds passed as an arguments.
+ /// The default value of interval time is 0.
+ /// If interval time is 0, stop timer.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// -None
+ /// \~english @see none
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ VOID SetTime(UI_32 hrs, UI_32 mins, UI_32 seconds, UI_64 msecs);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// Starts or restarts timer with specified time interval. Interval is addition of seconds and
+ /// milliseconds passed as an arguments.
+ /// \~english @param[in] seconds
+ /// UI_32 - Time in seconds
+ /// \~english @param[in] msecs
+ /// UI_64 - Time in milliseconds
+ /// \~english @retval EFrameworkunifiedStatus - Returns eFrameworkunifiedStatusOK on success otherwise eFrameworkunifiedStatusFail
+ /// \~english @par Preconditons
+ /// - Create a timer handle of instance by SetNotifyMethod()
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// - Timer handle of instance is NULL [eFrameworkunifiedStatusFail]
+ /// - Timer handle state of instance has been deleted(DELETED_STATE) [eFrameworkunifiedStatusFail]
+ /// - Failed to start/stop(timerfd_settime) timer [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// Starts or restarts timer with specified time interval. Interval is addition of seconds and
+ /// milliseconds passed as an arguments.
+ /// Interval time setted by this method will overwrite interval time setted by SetTime(UI_32, UI_64).
+ /// If interval time is 0, stop timer.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// - None
+ /// \~english @see SetTime(UI_32, UI_64), Start, Stop, SetNotifyMethod
+ ////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Start(UI_32 seconds, UI_64 msecs);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// This function overloads Start(). Starts or restarts timer with interval specified using SetTime()
+ /// or last interval (if the timer was started before using Start(seconds, msecs)).
+ /// \~english @retval EFrameworkunifiedStatus - Returns eFrameworkunifiedStatusOK on success otherwise eFrameworkunifiedStatusFail
+ /// \~english @par Preconditons
+ /// - Create a timer handle of instance by SetNotifyMethod()
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// - Timer handle of instance is NULL [eFrameworkunifiedStatusFail]
+ /// - Timer handle state of instance has been deleted(DELETED_STATE) [eFrameworkunifiedStatusFail]
+ /// - Failed to start/stop(timerfd_settime) timer [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - Starts or restarts timer with interval specified using SetTime(UI_32, UI_64) or Start(UI_32, UI_64).
+ /// If interval time is not setted, default value is 0. If interval time is 0, stop timer.
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// - None
+ /// \~english @see SetTime(UI_32, UI_64), Stop, SetNotifyMethod, WholeSeconds, MSToNS, NS_TimerSetTime
+ ////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Start();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// Stops the timer
+ /// \~english @retval EFrameworkunifiedStatus - Returns eFrameworkunifiedStatusOK on success otherwise eFrameworkunifiedStatusFail
+ /// \~english @par Preconditons
+ /// - Create a timer handle of instance by SetNotifyMethod()
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// - Timer handle of instance is NULL [eFrameworkunifiedStatusFail]
+ /// - Timer handle state of instance has been deleted(DELETED_STATE) [eFrameworkunifiedStatusFail]
+ /// - Failed to stop(timerfd_settime) timer [eFrameworkunifiedStatusFail]
+ /// \~english @par Detail
+ /// - Stops the timer
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// - None
+ /// \~english @see Start, Start(UI_32, UI_64), SetNotifyMethod, NS_TimerSetTime
+ ////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus Stop();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// Returns timer running status
+ /// \~english @retval BOOL - TRUE if timer is running else FALSE
+ /// \~english @par Preconditons
+ /// -None
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// -Returns timer running status
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// -None
+ /// \~english @see Start, Start(UI_32, UI_64), SetNotifyMethod, NS_TimerSetTime
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ BOOL IsRunning();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NSTimer
+ /// \~english @par Brief
+ /// Returns timeout interval in milliseconds
+ /// \~english @retval UI_64 - Timeout interval in milliseconds
+ /// \~english @par Preconditons
+ /// -None
+ /// \~english @par Change of internal status
+ /// None
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// - Returns timeout interval in milliseconds
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// -None
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_64 GetInterval();
+
+ private:
+
+ HANDLE m_hTimer; ///< Corresponding NS timer handle
+
+ UI_64 m_u64TimeInterval; ///< time interval in milliseconds
+
+ BOOL m_bRepeatTimer; ///< if it is a repeat timer. Default value is false.
+};
+
+
+#endif // NS_TIMER_IF_HPP_ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_transmit_log.h b/nsframework/framework_unified/client/include/native_service/ns_transmit_log.h
new file mode 100644
index 00000000..e61ec7ef
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_transmit_log.h
@@ -0,0 +1,256 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSSharedMemory
+/// \brief This file contains declaration of wrapper C type API's for class CNSSharedMem
+/// to read and write transmit log to shared memory.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns_transmit_log.h
+ * @brief \~english This file contains declaration of wrapper C type API for reading and writing
+ * transmit log on shared memory.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_LOG_H__ // NOLINT (build/header_guard)
+#define __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_LOG_H__
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#define TRANSMIT_LOG_SHAREDMEM_NAME "/TransmitLogShBuf"
+#define TRANSMIT_LOG_SHAREDMEM_SIZE 5242880 // 5MB
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSSharedMemTransmitLogOpen
+/// \~english @par Brief
+/// Open the shared memory for transmit logging.
+/// \~english @param[in]
+/// \~english @retval eFrameworkunifiedStatusOK if shared memory is opened.
+/// \~english @retval eFrameworkunifiedStatusNullPointer if memory allocation error while creating shared memory pointer.
+/// \~english @retval eFrameworkunifiedStatusFail if shared memory not open
+/// \~english @par Preconditons
+/// - None
+/// \~english @par Change of internal status
+/// - Open shared memory object
+/// \~english @par Conditions of processing failure
+/// - Memory allocation error while creating shared memory pointer.[eFrameworkunifiedStatusNullPointer]
+/// - If shared memory not open.[eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Open the shared memory for transmit logging.\n
+/// If shared memory is not exist,then create a shared memory,and open.
+/// \~english @par Classification
+/// - public
+/// \~english @par Type
+/// - sync only
+/// \~english @par
+/// - eFrameworkunifiedStatus:Result
+/// - eFrameworkunifiedStatusOK:Success
+/// - Except eFrameworkunifiedStatusOK:Failure
+/// \~english @see NSSharedMemTransmitLogClose
+////////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NSSharedMemTransmitLogOpen();
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSSharedMemTransmitLogClose
+/// \~english @par Brief
+/// Close the transmit logging shared memory
+/// \~english @param[in]
+/// \~english @retval eFrameworkunifiedStatusOK if shared memory is closed
+/// \~english @retval eFrameworkunifiedStatusNullPointer if shared memory pointer is NULL.
+/// \~english @retval eFrameworkunifiedStatusFail if shared memory was not closed.
+/// \~english @par Preconditons
+/// - None
+/// \~english @par Change of internal status
+/// -Open shared memory object
+/// \~english @par Conditions of processing failure
+/// - shared memory pointer is NULL.[eFrameworkunifiedStatusNullPointer]
+/// - If shared memory not close.[eFrameworkunifiedStatusFail]
+/// \~english @par Detail
+/// Close the transmit logging shared memory.\n
+/// If shared memory closed failure or shared memory don't exist,then return failure.
+/// \~english @par Classification
+/// - public
+/// \~english @par Type
+/// - sync only
+/// \~english @par
+/// - eFrameworkunifiedStatus:Result
+/// - eFrameworkunifiedStatusOK:Success
+/// - Except eFrameworkunifiedStatusOK:Failure
+/// \~english @see NSSharedMemTransmitLogOpen
+////////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NSSharedMemTransmitLogClose();
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSSharedMemReadTransmitLog
+/// \~english @par Brief
+/// Reads transmit log from the shared memory buffer.
+/// \~english @param [in] f_pBuffer
+/// PSTR - pointer to the buffer in which data to be read.
+/// \~english @param [in] f_uiLength
+/// UI_32 - length of the data to be read.
+/// \~english @param [in] f_bBlock
+/// BOOL - TRUE - blocking call
+/// FALSE - non blocking call
+/// \~english @retval Except NS_SHM_ERROR - Indicates the number of bytes read.
+/// \~english @retval NS_SHM_ERROR -if shared memory is not opened.
+/// \~english @par Preconditons
+/// -None
+/// \~english @par Change of internal status
+/// None
+/// \~english @par Conditions of processing failure
+/// if g_pTransmitLogSharedBuf or f_pBuffer is null.[NS_SHM_ERROR]
+/// \~english @par Detail
+/// If this function is used as blocking call,\n
+/// then the calling thread will get blocked until data is available for read.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @par
+/// - l_iReadSize:Result
+/// - NS_SHM_ERROR:Failure
+/// - Except NS_SHM_ERROR:Success
+/// \~english @see NSSharedMemWriteTransmitLog
+////////////////////////////////////////////////////////////////////////////////////////////////
+SI_32 NSSharedMemReadTransmitLog(PSTR f_pBuffer, const UI_32 f_uiLength, const BOOL f_bBlock);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSSharedMemWriteTransmitLog
+/// \~english @par Brief
+/// Write transmit log into the shared memory buffer.
+/// \~english @param [in] f_pBuffer
+/// PSTR - pointer to the buffer containing the data to be written.
+/// \~english @param [in] f_uiLength
+/// UI_32 - length of the data buffer to be written.
+/// \~english @retval Except NS_SHM_ERROR - Indicates the number of bytes written,
+/// \~english @retval NS_SHM_ERROR -if shared memory is not opened.
+/// \~english @par Preconditons
+/// -None
+/// \~english @par Change of internal status
+/// None
+/// \~english @par Conditions of processing failure
+/// if g_pTransmitLogSharedBuf or f_pBuffer is null.[NS_SHM_ERROR]
+/// \~english @par Detail
+/// If this function is used as blocking call,\n
+/// then the calling thread will get blocked until data is available for write.
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// sync only
+/// \~english @par
+/// - l_iReadSize:Result
+/// - NS_SHM_ERROR:Failure
+/// - Except NS_SHM_ERROR:Success
+/// \~english @see NSSharedMemReadTransmitLog
+////////////////////////////////////////////////////////////////////////////////////////////////
+SI_32 NSSharedMemWriteTransmitLog(PCSTR f_pBuffer, const UI_32 f_uiLength);
+
+////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSSharedMemDumpTransmitLogToFile
+/// \~english @par Brief
+/// Dump the transmit logging shared memory to file
+/// \~english @param [in] f_pPath
+/// PCSTR - full file path
+/// \~english @param [in] f_puiSize
+/// PCSTR - Size of data dumped to file
+/// \~english @retval eFrameworkunifiedStatusOK if shared memory is closed
+/// \~english @retval eFrameworkunifiedStatusFileLoadError file path is incorrect
+/// \~english @retval eFrameworkunifiedStatusSemLockFail/
+/// eFrameworkunifiedStatusSemUnLockFail - mutex locking/unlocking error
+/// \~english @retval eFrameworkunifiedStatusFail shared memory is not open
+/// \~english @par Preconditons
+/// - None
+/// \~english @par Change of internal status
+/// -Open shared memory object
+/// \~english @par Conditions of processing failure
+/// - shared memory pointer is NULL.[eFrameworkunifiedStatusNullPointer]
+/// - mutex locking/unlocking error.[eFrameworkunifiedStatusSemLockFail/eFrameworkunifiedStatusSemUnLockFail]
+/// - shared memory is not open.[eFrameworkunifiedStatusFail]
+/// - file path is incorrect.[eFrameworkunifiedStatusFileLoadError]
+/// \~english @par Detail
+/// Writes all the data in the buffer into provided file path.\n
+/// Overwrites the file if it exists.
+/// \~english @par Classification
+/// - public
+/// \~english @par Type
+/// - sync only
+/// \~english @par
+/// - eFrameworkunifiedStatus:Result
+/// - eFrameworkunifiedStatusOK:Success
+/// - Except eFrameworkunifiedStatusOK:Failure
+/// \~english @see None
+////////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus NSSharedMemDumpTransmitLogToFile(PCSTR f_pPath, PUI_32 f_puiDumpSize);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NSSharedMemTransmitLogIsOpen
+/// \~english @par Brief
+/// This function is used to check whether the shared memory buffer is opened or not.
+/// \~english @retval TRUE - Open
+/// \~english @retval FALSE - Not open
+/// \~english @par Preconditons
+/// - None
+/// \~english @par Change of internal status
+/// - None
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Detail
+/// - This function is used to check whether the shared memory buffer is opened or not.\n
+/// Used only in nstest_sharedmem.
+/// \~english @par Classification
+/// - public
+/// \~english @par Type
+/// Sync only
+/// \~english @see none
+////////////////////////////////////////////////////////////////////////////////////////////////
+BOOL NSSharedMemTransmitLogIsOpen();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NATIVESERVICES_NATIVESERVICES_INC_NATIVE_NS_SHAREDMEM_LOG_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_util_crc.h b/nsframework/framework_unified/client/include/native_service/ns_util_crc.h
new file mode 100644
index 00000000..55280071
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_util_crc.h
@@ -0,0 +1,111 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \brief This file contains declaration of APIs to calcuate 16-bit and 32-bit CRC checksum of file.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @file ns_util_crc.h
+ */
+
+#ifndef NS_NS_UTILITYCENTER_INC_NS_UTIL_CRC_H_ // NOLINT (build/header_guard)
+#define NS_NS_UTILITYCENTER_INC_NS_UTIL_CRC_H_
+
+#include <native_service/frameworkunified_types.h>
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup utility
+ * @ingroup framework_unified
+ * @{
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Calculate the CRC value of the file
+/// \~english @param [in] f_c_file_name
+/// PCSTR - the file to be calculated
+/// \~english @param [out] f_ui_check_sum
+/// UI_16 - the CRC value of the file
+/// \~english @retval eFrameworkunifiedStatusOK : Success
+/// \~english @retval eFrameworkunifiedStatusFileLoadError : File Load Error
+/// \~english @retval eFrameworkunifiedStatusInvldParam : Invalid Param
+///
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - Failed to open the file. [eFrameworkunifiedStatusFileLoadError]
+/// - The pointer f_c_file_name is NULL. [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function calculates the CRC value(16 bit) of the file f_c_file_name.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus CalculateCRC16(PCSTR f_c_file_name, UI_16 & f_ui_check_sum); // NOLINT (readability/nolint)
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Calculate the CRC value of the file
+/// \~english @param [in] f_c_file_name
+/// PCSTR - the file to be calculated
+/// \~english @param [out] f_ui_check_sum
+/// UI_32 - the CRC value of the file
+/// \~english @retval eFrameworkunifiedStatusOK : Success
+/// \~english @retval eFrameworkunifiedStatusFileLoadError : File Load Error
+/// \~english @retval eFrameworkunifiedStatusInvldParam : Invalid Param
+///
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - Failed to open the file. [eFrameworkunifiedStatusFileLoadError]
+/// - The pointer f_c_file_name is NULL. [eFrameworkunifiedStatusInvldParam]
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function calculates the CRC value(32 bit) of the file f_c_file_name.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus CalculateCRC32(PCSTR f_c_file_name, UI_32 & f_ui_check_sum); // NOLINT (readability/nolint)
+
+#endif // NS_NS_UTILITYCENTER_INC_NS_UTIL_CRC_H_ // NOLINT (build/header_guard)
+
+/** @}*/ // end of utility
+/** @}*/ // end of framework_unified
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/ns_util_directory.h b/nsframework/framework_unified/client/include/native_service/ns_util_directory.h
new file mode 100644
index 00000000..945275c0
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_util_directory.h
@@ -0,0 +1,160 @@
+/**
+ * @file ns_util_directory.h
+ * @brief \~english This file contains declaration of ns_util_directory.
+ *
+ */
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief This file contains utility functions to handle file and folder operations.
+///
+///
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef NS_NS_UTILITYCENTER_INC_NS_UTIL_DIRECTORY_H_ // NOLINT (build/header_guard)
+#define NS_NS_UTILITYCENTER_INC_NS_UTIL_DIRECTORY_H_
+
+#include <native_service/frameworkunified_types.h>
+#include <vector>
+#include <string>
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup utility
+ * @ingroup framework_unified
+ * @{
+ */
+
+/**
+ * \~english an abbreviation for std::vector<std::string>
+ */
+typedef std::vector< std::string > TFileList;
+
+/**
+ * \~english a abbreviation for std::vector<std::string>::iterator
+ */
+typedef TFileList::iterator TFileListIterator;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Get the name of files existing in a specific directory
+/// \~english @param [in] f_pc_path
+/// PCSTR - the directory path
+/// \~english @param [out] f_pv_tfile_list
+/// TFileList - store the name of the files in the specific directory
+/// \~english @retval eFrameworkunifiedStatusOK : Success
+/// \~english @retval eFrameworkunifiedStatusInvldParam : Invalid Param
+/// \~english @retval eFrameworkunifiedStatusNullPointer : NULL Pointer
+/// \~english @retval eFrameworkunifiedStatusFail : Abnormal Error
+///
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - The pointer f_pv_tfile_list or f_pc_path is NULL. [eFrameworkunifiedStatusInvldParam]
+/// - Failed to open the directory f_pc_path. [eFrameworkunifiedStatusFail]
+/// - Failed to new a buffer for inner using. [eFrameworkunifiedStatusNullPointer]
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function gets all the name of the file locating at the directory f_pc_path and stores \n
+/// them in f_pv_tfile_list.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus GetFileList(TFileList * f_pv_tfile_list, PCSTR f_pc_path);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Check whether the directory is existing or not.
+/// \~english @param [in] f_c_dir_path
+/// std::string - the directory to be checked
+/// \~english @retval TRUE: the directory is existing.
+/// FALSE: the directory is not existing.
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - None
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function checks whether the directory is existing or not.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+BOOL DoesDirecotryExist(std::string f_c_dir_path);
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup NS_UtilityCenter
+/// \~english @par Brief
+/// Create the directory f_c_dir_path.
+/// \~english @param [in] f_c_dir_path
+/// std::string - the directory to be created
+/// \~english @retval eFrameworkunifiedStatusOK : Success
+/// \~english @retval eFrameworkunifiedStatusFail : Abnormal Error
+///
+/// \~english @par Prerequisite
+/// - None
+/// \~english @par Change of internal state
+/// - None
+/// \~english @par Conditions of processing failure
+/// - The input param f_c_dir_path is empty. [eFrameworkunifiedStatusFail]
+/// - Faild to create(mkdir) the direcory. [eFrameworkunifiedStatusFail]
+/// \~english @par Classification
+/// Public
+/// \~english @par Type
+/// Sync Only
+/// \~english @par Detail
+/// The function creates the directory f_c_dir_path.
+/// \~english @see
+////////////////////////////////////////////////////////////////////////////////////////////////
+EFrameworkunifiedStatus CreateDirectory(std::string f_c_dir_path);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // NS_NS_UTILITYCENTER_INC_NS_UTIL_DIRECTORY_H_ NOLINT (build/header_guard)
+
+/** @}*/ // end of utility
+/** @}*/ // end of framework_unified
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/ns_utility.hpp b/nsframework/framework_unified/client/include/native_service/ns_utility.hpp
new file mode 100644
index 00000000..07fe4f55
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_utility.hpp
@@ -0,0 +1,572 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NS_UtilityCenter
+/// \brief This file contains declaration of common APIs for NS_UtilityCenter.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//@{
+/**
+ * @file ns_utility.hpp
+ * @brief \~english This file contains declaration of common APIs for NS_UtilityCenter.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __NSFRAMEWORK_NSUTILITY_NSUTILITY__ // NOLINT (build/header_guard)
+#define __NSFRAMEWORK_NSUTILITY_NSUTILITY__
+
+#include <native_service/frameworkunified_types.h>
+#include <new>
+#include <exception>
+#include <algorithm>
+#include <iterator>
+
+#ifdef AGL_STUB
+#include <stdexcept>
+#endif
+
+// Macros ///////////////////////////////////////////////////////////////
+
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+ TypeName(const TypeName&); \
+ void operator=(const TypeName& )
+
+#define DEFINE_EXCEPTION( name, base ) \
+class name : public base \
+{ \
+public: \
+ name ( const char* str = "" ) : base ( str ) \
+ {} \
+}
+
+// Helpful type definitions ////////////////////////////////////////////////
+template <int v>
+struct Int2Type {
+ enum { value = v }; // NOLINT (readability/nolint)
+};
+
+template <class T>
+struct Type2Type {
+ typedef T Type;
+};
+
+// Helpful Fucntions /////////////////////////////////////////////////////////
+template< class T, UI_32 N >
+const T *ArrBeg(const T(&arr)[ N ]) {
+ return &arr[ 0 ];
+}
+
+template< class T, UI_32 N >
+const T *ArrEnd(const T(&arr)[ N ]) {
+ return &arr[ 0 ] + N;
+}
+
+template< class O, class I >
+O SimpleCast(I i) {
+ return static_cast< O >(i);
+}
+
+template< class R, class B >
+R UnalignedRet(B *b) {
+ return *reinterpret_cast< R volatile * >(b);
+}
+
+template< class Cont, class Gen >
+Cont genRange(UI_32 N, Gen genFn) {
+ Cont c;
+ std::generate_n(std::back_inserter(c), N, genFn);
+ return c;
+}
+
+template< class OCont, class IIter, class MapFn >
+OCont mapRange(const IIter &begin, const IIter &end, MapFn fn) {
+ OCont c;
+ std::transform(begin, end, std::inserter(c, c.begin()), fn);
+ return c;
+}
+// Static Compile-time list creation /////////////////////////////////////////
+
+#ifdef AGL_STUB
+#else
+////////////////////////
+#include <_pack1.h> //
+//////////////////////////
+#endif
+
+template< class T, UI_32 N >
+struct TList {
+ T datum;
+ TList < T, N - 1 > data;
+
+ T *operator&() { // NOLINT (readability/nolint)
+ return reinterpret_cast< T * >(this);
+ }
+ const T *operator&() const { // NOLINT (readability/nolint)
+ return reinterpret_cast< const T * >(this);
+ }
+ static const UI_32 count = N; // NOLINT (readability/nolint)
+
+};
+
+template< class T >
+struct TList< T, 1 > {
+ T datum;
+
+ T *operator&() { // NOLINT (readability/nolint)
+ return reinterpret_cast< T * >(this);
+ }
+ const T *operator&() const { // NOLINT (readability/nolint)
+ return reinterpret_cast< const T * >(this);
+ }
+ static const UI_32 count = 1; // NOLINT (readability/nolint)
+
+};
+
+#ifdef AGL_STUB
+#else
+/////////////////////////
+#include <_packpop.h> //
+///////////////////////
+#endif
+
+// Function Decomposition ///////////////////////////////////////////////////
+
+template< class Sig >
+struct FSig {
+};
+
+template<class R>
+struct FSig< R(*)() > {
+ typedef R RType;
+ static const UI_32 argCount = 0; // NOLINT (readability/nolint)
+};
+
+template<class R, class T1>
+struct FSig< R(*)(T1) > {
+ typedef R RType;
+ typedef T1 TArg1;
+ static const UI_32 argCount = 1; // NOLINT (readability/nolint)
+};
+
+template<class R, class T1, class T2>
+struct FSig< R(*)(T1, T2) > {
+ typedef R RType;
+ typedef T1 TArg1;
+ typedef T2 TArg2;
+ static const UI_32 argCount = 2; // NOLINT (readability/nolint)
+};
+
+template<class R, class T1, class T2, class T3>
+struct FSig< R(*)(T1, T2, T3) > {
+ typedef R RType;
+ typedef T1 TArg1;
+ typedef T2 TArg2;
+ typedef T3 TArg3;
+ static const UI_32 argCount = 3; // NOLINT (readability/nolint)
+};
+
+template<class R, class T1, class T2, class T3, class T4>
+struct FSig< R(*)(T1, T2, T3, T4) > {
+ typedef R RType;
+ typedef T1 TArg1;
+ typedef T2 TArg2;
+ typedef T3 TArg3;
+ typedef T4 TArg4;
+ static const UI_32 argCount = 4; // NOLINT (readability/nolint)
+};
+
+template<class R, class T1, class T2, class T3, class T4, class T5>
+struct FSig< R(*)(T1, T2, T3, T4, T5) > {
+ typedef R RType;
+ typedef T1 TArg1;
+ typedef T2 TArg2;
+ typedef T3 TArg3;
+ typedef T4 TArg4;
+ typedef T5 TArg5;
+ static const UI_32 argCount = 5; // NOLINT (readability/nolint)
+};
+
+template<class R, class T1, class T2, class T3, class T4, class T5, class T6>
+struct FSig< R(*)(T1, T2, T3, T4, T5, T6) > {
+ typedef R RType;
+ typedef T1 TArg1;
+ typedef T2 TArg2;
+ typedef T3 TArg3;
+ typedef T4 TArg4;
+ typedef T5 TArg5;
+ typedef T6 TArg6;
+ static const UI_32 argCount = 6; // NOLINT (readability/nolint)
+};
+
+template<class R, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+struct FSig< R(*)(T1, T2, T3, T4, T5, T6, T7) > {
+ typedef R RType;
+ typedef T1 TArg1;
+ typedef T2 TArg2;
+ typedef T3 TArg3;
+ typedef T4 TArg4;
+ typedef T5 TArg5;
+ typedef T6 TArg6;
+ typedef T7 TArg7;
+ static const UI_32 argCount = 7; // NOLINT (readability/nolint)
+};
+
+
+
+// Accumulator definition //////////////////////////////////////////////////
+
+/// \brief Accumultor type
+///
+/// An accumulator is an object that keeps an internal counter, and will increment its
+/// counter by n, which defaults to 1, each time operator() is called on it. Eample usage:
+///
+/// Accumulator< int > a( 42 ); // initialize a to 42
+/// int v1 = a(); // <-- v1 == 43
+/// int v2 = a(); // <-- v2 == 44
+/// int v4 = a(10); // <-- v4 == 54
+/// int v5 = a(); // <-- v5 == 55
+template<typename T>
+class Accumulator {
+ public:
+ Accumulator(T n) : n(n) {}
+
+ template<typename U>
+ Accumulator(const Accumulator<U> &u) : n(u.n) {}
+
+ T operator()(T i = 1) { // NOLINT (readability/nolint)
+ return operator()< T >(i);
+ }
+
+ template<typename U>
+ T operator()(U i) {
+ return n += i;
+ }
+
+ template< typename U >
+ friend class Accumulator;
+
+ private:
+ T n;
+};
+
+
+/// \brief Accumulator utility function
+///
+/// Given a value n of type T, returns an accumulator of type Accumulator<T> initialized to value n
+template<typename T>
+Accumulator<T> MakeAccumulator(T n) {
+ return Accumulator<T>(n);
+}
+
+// Rsrc Management helper class /////////////////////////////////////////////
+
+template< class T >
+class MemTraits {
+ public:
+ typedef T *Type;
+ typedef std::bad_alloc Exception;
+ static void Release(Type rsrc) {
+ delete rsrc;
+ }
+
+ static BOOL BadValue(Type rsrc) {
+ return NULL == rsrc;
+ }
+};
+
+template< class RsrcTraits >
+class RaiseExceptionPolicy {
+ public:
+ typedef typename RsrcTraits::Type Type;
+ static Type check(Type t) { // NOLINT (readability/nolint)
+ if (RsrcTraits::BadValue(t)) {
+ throw typename RsrcTraits::Exception();
+ }
+
+ return t;
+ }
+};
+
+template< class RsrcTraits >
+class CheckForErrorPolicy { // no exceptions
+ public:
+ typedef typename RsrcTraits::Type Type;
+
+ static Type check(Type t) { // NOLINT (readability/nolint)
+ return t;
+ }
+
+ static bool isValid(Type t) { // NOLINT (readability/nolint)
+ return ! RsrcTraits::BadValue(t);
+ }
+};
+
+template < class T,
+ class RsrcTraits = MemTraits< T >,
+ template <class> class ErrorPolicy = RaiseExceptionPolicy >
+class ResourceMgr : public RsrcTraits {
+ public:
+ typedef typename RsrcTraits::Type Type;
+ typedef ErrorPolicy< RsrcTraits > TFullErrorPolicy;
+
+ ResourceMgr(Type rsrc) : m_rsrc(TFullErrorPolicy::check(rsrc)) {}
+
+ ~ResourceMgr() {
+ RsrcTraits::Release(m_rsrc);
+ }
+
+ operator Type() { // NOLINT (readability/nolint)
+ return m_rsrc;
+ }
+
+ operator const Type() const { // NOLINT (readability/nolint)
+ return m_rsrc;
+ }
+
+ bool isValid() const { // NOLINT (readability/nolint)
+ return TFullErrorPolicy::isValid(m_rsrc);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ResourceMgr);
+
+ Type m_rsrc;
+};
+
+// Functor Helper classes /////////////////////////////////////
+template< class R >
+class IFunctor {
+ public:
+ IFunctor() {}
+ virtual ~IFunctor() {}
+
+ virtual R operator()() const = 0; // NOLINT (readability/nolint)
+ virtual UI_32 size() const = 0; // NOLINT (readability/nolint)
+};
+
+template< class TFn >
+class CFunctor0 : public IFunctor< typename FSig< TFn >::RType > {
+ public:
+ CFunctor0(TFn fn) : m_function(fn) {}
+ typename FSig< TFn >::RType operator()() const { // NOLINT (readability/nolint)
+ return m_function();
+ }
+ UI_32 size() const { // NOLINT (readability/nolint)
+ return sizeof(TFn);
+ }
+
+ private:
+ TFn m_function;
+};
+
+template< class TFn, class Arg1 >
+class CFunctor1 : public IFunctor< typename FSig< TFn >::RType > {
+ public:
+
+ CFunctor1(TFn fn, Arg1 arg1) : m_function(fn), m_arg1(arg1) {}
+ typename FSig< TFn >::RType operator()() const { // NOLINT (readability/nolint)
+ return m_function(m_arg1);
+ }
+ UI_32 size() const { // NOLINT (readability/nolint)
+ return sizeof(TFn) + sizeof(Arg1);
+ }
+
+ private:
+ TFn m_function;
+ Arg1 m_arg1;
+};
+
+template< class TFn, class Arg1, class Arg2 >
+class CFunctor2 : public IFunctor< typename FSig< TFn >::RType > {
+ public:
+
+ CFunctor2(TFn fn, Arg1 arg1, Arg2 arg2) : m_function(fn), m_arg1(arg1), m_arg2(arg2) {}
+ typename FSig< TFn >::RType operator()() const { // NOLINT (readability/nolint)
+ return m_function(m_arg1, m_arg2);
+ }
+ UI_32 size() const { // NOLINT (readability/nolint)
+ return sizeof(TFn) + sizeof(Arg1) + sizeof(Arg2);
+ }
+ private:
+ TFn m_function;
+ Arg1 m_arg1;
+ Arg2 m_arg2;
+};
+
+template< class TFn, class Arg1, class Arg2, class Arg3 >
+class CFunctor3 : public IFunctor< typename FSig< TFn >::RType > {
+ public:
+
+ CFunctor3(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3) : m_function(fn), m_arg1(arg1), m_arg2(arg2), m_arg3(arg3) {}
+ typename FSig< TFn >::RType operator()() const { // NOLINT (readability/nolint)
+ return m_function(m_arg1, m_arg2, m_arg3);
+ }
+ UI_32 size() const { // NOLINT (readability/nolint)
+ return sizeof(TFn) + sizeof(Arg1) + sizeof(Arg2) + sizeof(Arg3);
+ }
+ private:
+ TFn m_function;
+ Arg1 m_arg1;
+ Arg2 m_arg2;
+ Arg3 m_arg3;
+};
+
+template< class TFn, class Arg1, class Arg2, class Arg3, class Arg4 >
+class CFunctor4 : public IFunctor< typename FSig< TFn >::RType > {
+ public:
+ CFunctor4(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4) : m_function(fn), m_arg1(arg1), m_arg2(arg2),
+ m_arg3(arg3), m_arg4(arg4) {}
+ typename FSig< TFn >::RType operator()() const { // NOLINT (readability/nolint)
+ return m_function(m_arg1, m_arg2, m_arg3, m_arg4);
+ }
+ UI_32 size() const { // NOLINT (readability/nolint)
+ return sizeof(TFn) + sizeof(Arg1) + sizeof(Arg2) + sizeof(Arg3) + sizeof(Arg4);
+ }
+ private:
+ TFn m_function;
+ Arg1 m_arg1;
+ Arg2 m_arg2;
+ Arg3 m_arg3;
+ Arg4 m_arg4;
+};
+
+template< class TFn, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5 >
+class CFunctor5 : public IFunctor< typename FSig< TFn >::RType > {
+ public:
+ CFunctor5(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5) : m_function(fn), m_arg1(arg1), m_arg2(arg2),
+ m_arg3(arg3), m_arg4(arg4), m_arg5(arg5) {}
+ typename FSig< TFn >::RType operator()() const { // NOLINT (readability/nolint)
+ return m_function(m_arg1, m_arg2, m_arg3, m_arg4, m_arg5);
+ }
+ UI_32 size() const { // NOLINT (readability/nolint)
+ return sizeof(TFn) + sizeof(Arg1) + sizeof(Arg2) + sizeof(Arg3) + sizeof(Arg4) + sizeof(Arg5);
+ }
+ private:
+ TFn m_function;
+ Arg1 m_arg1;
+ Arg2 m_arg2;
+ Arg3 m_arg3;
+ Arg4 m_arg4;
+ Arg5 m_arg5;
+};
+
+template< class TFn, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6 >
+class CFunctor6 : public IFunctor< typename FSig< TFn >::RType > {
+ public:
+ CFunctor6(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6) : m_function(fn), m_arg1(arg1),
+ m_arg2(arg2), m_arg3(arg3), m_arg4(arg4), m_arg5(arg5), m_arg6(arg6) {}
+ typename FSig< TFn >::RType operator()() const { // NOLINT (readability/nolint)
+ return m_function(m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6);
+ }
+ UI_32 size() const { // NOLINT (readability/nolint)
+ return sizeof(TFn) + sizeof(Arg1) + sizeof(Arg2) + sizeof(Arg3) + sizeof(Arg4) + sizeof(Arg5) + sizeof(Arg6);
+ }
+ private:
+ TFn m_function;
+ Arg1 m_arg1;
+ Arg2 m_arg2;
+ Arg3 m_arg3;
+ Arg4 m_arg4;
+ Arg5 m_arg5;
+ Arg6 m_arg6;
+};
+
+template< class TFn, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7 >
+class CFunctor7 : public IFunctor< typename FSig< TFn >::RType > {
+ public:
+ CFunctor7(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6, Arg7 arg7)
+ : m_function(fn), m_arg1(arg1), m_arg2(arg2), m_arg3(arg3), m_arg4(arg4), m_arg5(arg5), m_arg6(arg6), m_arg7(arg7) {}
+ typename FSig< TFn >::RType operator()() const { // NOLINT (readability/nolint)
+ return m_function(m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7);
+ }
+ UI_32 size() const { // NOLINT (readability/nolint)
+ return sizeof(TFn) + sizeof(Arg1) + sizeof(Arg2) + sizeof(Arg3) + sizeof(Arg4) + sizeof(Arg5) + sizeof(Arg6) + sizeof(Arg7);
+ }
+ private:
+ TFn m_function;
+ Arg1 m_arg1;
+ Arg2 m_arg2;
+ Arg3 m_arg3;
+ Arg4 m_arg4;
+ Arg5 m_arg5;
+ Arg6 m_arg6;
+ Arg7 m_arg7;
+};
+
+
+template<class TFn>
+CFunctor0<TFn> functor(TFn fn) {
+ return CFunctor0<TFn>(fn);
+}
+
+template<class TFn, class Arg1>
+CFunctor1<TFn, Arg1> functor(TFn fn, Arg1 arg1) {
+ return CFunctor1<TFn, Arg1>(fn, arg1);
+}
+
+template<class TFn, class Arg1, class Arg2>
+CFunctor2<TFn, Arg1, Arg2> functor(TFn fn, Arg1 arg1, Arg2 arg2) {
+ return CFunctor2<TFn, Arg1, Arg2>(fn, arg1, arg2);
+}
+
+template<class TFn, class Arg1, class Arg2, class Arg3>
+CFunctor3<TFn, Arg1, Arg2, Arg3> functor(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3) {
+ return CFunctor3<TFn, Arg1, Arg2, Arg3>(fn, arg1, arg2, arg3);
+}
+
+template<class TFn, class Arg1, class Arg2, class Arg3, class Arg4>
+CFunctor4<TFn, Arg1, Arg2, Arg3, Arg4> functor(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4) {
+ return CFunctor4<TFn, Arg1, Arg2, Arg3, Arg4>(fn, arg1, arg2, arg3, arg4);
+}
+
+template<class TFn, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
+CFunctor5<TFn, Arg1, Arg2, Arg3, Arg4, Arg5> functor(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5) {
+ return CFunctor5<TFn, Arg1, Arg2, Arg3, Arg4, Arg5>(fn, arg1, arg2, arg3, arg4, arg5);
+}
+
+template<class TFn, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6>
+CFunctor6<TFn, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6> functor(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4,
+ Arg5 arg5, Arg6 arg6) {
+ return CFunctor6<TFn, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6>(fn, arg1, arg2, arg3, arg4, arg5, arg6);
+}
+
+template<class TFn, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7>
+CFunctor7<TFn, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7> functor(TFn fn, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4,
+ Arg5 arg5, Arg6 arg6, Arg7 arg7) {
+ return CFunctor7<TFn, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7>(fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+}
+
+#endif // __NSFRAMEWORK_NSUTILITY_NSUTILITY__ NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
+//@}
diff --git a/nsframework/framework_unified/client/include/native_service/ns_utility_if.h b/nsframework/framework_unified/client/include/native_service/ns_utility_if.h
new file mode 100644
index 00000000..ee103376
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_utility_if.h
@@ -0,0 +1,76 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief This file contains declaration of common APIs for NS_UtilityCenter.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @file ns_utility_if.h
+ */
+
+#ifndef NS_NATIVESERVICES_INC_NATIVE_NS_UTILITY_IF_H_ // NOLINT (build/header_guard)
+#define NS_NATIVESERVICES_INC_NATIVE_NS_UTILITY_IF_H_
+
+#include <native_service/frameworkunified_types.h>
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+
+/**
+ * \~english Macro for invalid/undefined return
+ */
+#define NS_INVALID_RETURN -1
+
+/**
+ * \~english Macro for setting the i bit of x to one
+ */
+#define NS_SETBIT(x, i) ((x) |= (1 << (i)))
+
+/**
+ * \~english Macro for setting the i bit of x to zero
+ */
+#define NS_CLEARBIT(x, i) ((x) &= ~(1 << (i)))
+
+/**
+ * \~english Macro for making the exclusive-OR operator on the i bit of x with one
+ */
+#define NS_TOGGLEBIT(x, i) ((x) ^= (1 << (i)))
+
+/**
+ * \~english Macro for checking whether the i bit of x is one or not
+ */
+#define NS_ISBITSET(x, i) (((x) & (1 << (i))) != 0)
+
+#endif // NS_NATIVESERVICES_INC_NATIVE_NS_UTILITY_IF_H_ // NOLINT (build/header_guard)
+
+/** @}*/ // end of native
+/** @}*/ // end of framework_unified
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/ns_utility_sys.hpp b/nsframework/framework_unified/client/include/native_service/ns_utility_sys.hpp
new file mode 100644
index 00000000..5780144d
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_utility_sys.hpp
@@ -0,0 +1,321 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief This file contains declaration of common APIs for NS_UtilityCenter.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @file ns_utility_sys.hpp
+ */
+
+#ifndef __NSFRAMEWORK_NSUTILITY_NSUTILITYSYS__ // NOLINT (build/header_guard)
+#define __NSFRAMEWORK_NSUTILITY_NSUTILITYSYS__
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_utility.hpp>
+#include <pthread.h>
+#include <errno.h>
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+
+// Lock Wrapper ////////////////////////////////////////////////////////////////
+
+/**
+ * \~english define the lock_error class inherit from std::runtime_error
+ */
+DEFINE_EXCEPTION(lock_error, std::runtime_error);
+
+/**
+ * \~english define the lock_creation_error class inherit from lock_error
+ */
+DEFINE_EXCEPTION(lock_creation_error, lock_error);
+
+/**
+ * \~english define the lock_acquireread_error class inherit from lock_error
+ */
+DEFINE_EXCEPTION(lock_acquireread_error, lock_error);
+
+/**
+ * \~english define the lock_acquirewrite_error class inherit from lock_error
+ */
+DEFINE_EXCEPTION(lock_acquirewrite_error, lock_error);
+
+/**
+ * \~english define the lock_release_error class inherit from lock_error
+ */
+DEFINE_EXCEPTION(lock_release_error, lock_error);
+
+
+/**
+ * @class CMutex
+ * @brief \~english Mutex Lock Class
+ * @par \~english Brief Introduction
+ * \~english This class defines locking policy for Mutexes.
+ *
+ */
+class CMutex {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Construct a CMutex object.
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function constructs a CMutex object.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CMutex();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Destruct the CMutex object.
+ /// \~english @par Prerequisite
+ /// - Construct a CMutex object
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function destructs the CMutex object.
+ /// \~english @see CMutex()
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CMutex();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Lock the CMutex object when reading.
+ /// \~english @retval void
+ ///
+ /// \~english @par Prerequisite
+ /// - Construct a CMutex object
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function locks the CMutex object when reading.
+ /// \~english @see CMutex(), WriteLock(), UnLock()
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ void ReadLock();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Lock the CMutex object when writing.
+ /// \~english @retval void
+ ///
+ /// \~english @par Prerequisite
+ /// - Construct a CMutex object
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function locks the CMutex object when writing.
+ /// \~english @see CMutex(), ReadLock(), UnLock()
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ void WriteLock();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Open the lock of the CMutex object.
+ /// \~english @retval void
+ ///
+ /// \~english @par Prerequisite
+ /// - Construct a CMutex object
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function opens the lock of the CMutex object.
+ /// \~english @see CMutex(), ReadLock(), WriteLock()
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ void Unlock();
+
+ private:
+
+ pthread_mutex_t m_mtx;
+};
+
+/**
+ * @class CRWLock
+ * @brief \~english Read/Write Lock Class
+ * @par \~english Brief Introduction
+ * \~english This class defines locking policy for reader/writer.
+ *
+ */
+class CRWLock {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// - Construct a CRWLock object.
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function constructs a CRWLock object.
+ /// \~english @see ~CRWLock()
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CRWLock();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Destruct the CRWLock object.
+ /// \~english @par Prerequisite
+ /// - Construct a CRWLock object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function destructs the CRWLock object.
+ /// \~english @see CRWLock()
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CRWLock();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Lock the CRWLock object when reading.
+ /// \~english @retval void
+ ///
+ /// \~english @par Prerequisite
+ /// - Construct a CRWLock object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function locks the CRWLock object when reading.
+ /// \~english @see CRWLock(), WriteLock(), UnLoack()
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ void ReadLock();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Lock the CRWLock object when writing.
+ /// \~english @retval void
+ ///
+ /// \~english @par Prerequisite
+ /// - Construct a CRWLock object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function locks the CRWLock object when writing.
+ /// \~english @see CRWLock(), ReadLock(), UnLock()
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ void WriteLock();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Open the lock of CRWLock object
+ /// \~english @retval void
+ ///
+ /// \~english @par Prerequisite
+ /// - Construct a CRWLock object.
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function opens the lock of the CRWLock object.
+ /// \~english @see CRWLock(), ReadLock(), WriteLock()
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ void Unlock();
+
+ private:
+ pthread_rwlock_t m_rwl;
+};
+
+#endif // __NSFRAMEWORK_NSUTILITY_NSUTILITYSYS__ // NOLINT (build/header_guard)
+/** @}*/ // end of native
+/** @}*/ // end of framework_unified
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/ns_version.h b/nsframework/framework_unified/client/include/native_service/ns_version.h
new file mode 100644
index 00000000..fad7efff
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_version.h
@@ -0,0 +1,48 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns_version.h
+ * @brief \~english This file provides version define
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef VERSION_H_ // NOLINT (build/header_guard)
+#define VERSION_H_
+
+#define MAJORNO 0x02
+#define MINORNO 0x02
+#define REVISION 0x05
+
+#endif /* VERSION_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_version_if.h b/nsframework/framework_unified/client/include/native_service/ns_version_if.h
new file mode 100644
index 00000000..d0f5172e
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_version_if.h
@@ -0,0 +1,510 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief Header for CFrameworkunifiedVersion class
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @file ns_version_if.h
+* @brief \~english Header for CFrameworkunifiedVersion class
+ */
+
+#ifndef NS_NATIVESERVICES_INC_NATIVE_NS_VERSION_IF_H_ // NOLINT (build/header_guard)
+#define NS_NATIVESERVICES_INC_NATIVE_NS_VERSION_IF_H_
+#include <native_service/frameworkunified_types.h>
+#include <string.h>
+
+#ifdef AGL_STUB
+#include <other_service/strlcpy.h>
+#include <other_service/strlcat.h>
+#endif
+
+
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup native
+ * @ingroup framework_unified
+ * @{
+ */
+
+/**
+ * @class CFrameworkunifiedVersion
+ * @brief \~english Version Info Class
+ * @par \~english Brief Introduction
+ * \~english This class provides functions to get various information of the version.
+ *
+ */
+class CFrameworkunifiedVersion {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Construct a CFrameworkunifiedVersion object.
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function constructs a CFrameworkunifiedVersion object.
+ /// \~english @see ~CFrameworkunifiedVersion
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedVersion();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Constructs a CFrameworkunifiedVersion object with parameters.
+ /// \~english @param[in] major
+ /// UI_16 - Major number of the application
+ /// \~english @param[in] minor
+ /// UI_16 - Minor number of the application
+ /// \~english @param[in] revision
+ /// UI_16 - Revision number of the application
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function constructs a CFrameworkunifiedVersion object with parameters.
+ /// \~english @see ~CFrameworkunifiedVersion
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CFrameworkunifiedVersion(UI_16 major, UI_16 minor, UI_16 revision);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Destruct the CFrameworkunifiedVersion object.
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function destructs the CFrameworkunifiedVersion object.
+ /// \~english @see CFrameworkunifiedVersion
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ virtual ~CFrameworkunifiedVersion();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the data number
+ /// \~english @param [in] a
+ /// CFrameworkunifiedVersion - the CFrameworkunifiedVersion object that will be compared against b.
+ /// \~english @param [in] b
+ /// CFrameworkunifiedVersion - the CFrameworkunifiedVersion object that will be compared against a.
+ /// \~english @retval TRUE: Match, FALSE: Does not Match
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function is a friend function of the class. \n
+ /// The function checks whether the object matchs the other or not. Match: returns TRUE, \n
+ /// Does not match: returns FALSE.
+ /// \~english @see operator ==
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ friend BOOL operator == (CFrameworkunifiedVersion &a, CFrameworkunifiedVersion &b); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the data number
+ /// \~english @param [in] f_test_i
+ /// CFrameworkunifiedVersion - the CFrameworkunifiedVersion object that will be compared against this obj.
+ /// \~english @retval TRUE: Match, FALSE: Does not Match
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function checks whether the object matchs the other or not. Match: returns TRUE, \n
+ /// Does not match: returns FALSE.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ BOOL operator == (const CFrameworkunifiedVersion &f_test_i); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the version as string
+ /// \~english @retval the vision string
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the version string.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ PCSTR VersionStr();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the date as string
+ /// \~english @retval the date string
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the date when building.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ PCSTR DateStr();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the signature number
+ /// \~english @retval the signature
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the signature number.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_32 Signature() const;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the structure version number
+ /// \~english @retval the structure version number
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the structure version number.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_32 StrucVersion() const;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the product version
+ /// \~english @retval the product version
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the product version.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_32 ProductVersion() const;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the date as number
+ /// \~english @retval the date number
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the date as number.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_32 Date() const;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the major verion number
+ /// \~english @retval the major version number
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the major version number.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_16 Major() const;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the minor version number
+ /// \~english @retval the minor version number
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the minor version number.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_16 Minor() const;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the unique product identifier
+ /// \~english @retval the revision number
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the unique product identifier generated by the build server.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ PCSTR Product() const;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the building version string
+ /// \~english @retval the building version string
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the unique build identifier generated by the build server.
+ /// \~english @see
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ PCSTR Build() const;
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NS_UtilityCenter
+ /// \~english @par Brief
+ /// Get the revision number
+ /// \~english @retval the revision number
+ ///
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Change of internal state
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// The function returns the revision as number.
+ /// \~english @see CFrameworkunifiedVersion
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ UI_16 Revision() const;
+
+ private:
+ CFrameworkunifiedVersion(const CFrameworkunifiedVersion &);
+ CFrameworkunifiedVersion &operator= (const CFrameworkunifiedVersion &); // NOLINT (readability/nolint)
+ struct VersionInfo {
+ PSTR p_str_product;
+ UI_32 u32_signature;
+ UI_32 u32_struc_version;
+ UI_32 u32_product_version;
+ UI_32 u32_date;
+ UI_16 u16_major;
+ UI_16 u16_minor;
+ PSTR p_str_build;
+ UI_16 u16_revision;
+ VersionInfo(PSTR p, UI_32 a, UI_32 b, UI_32 c, UI_32 d, UI_16 e, UI_16 f , PSTR g, UI_16 h) :
+ u32_signature(a),
+ u32_struc_version(b),
+ u32_product_version(c),
+ u32_date(d),
+ u16_major(e),
+ u16_minor(f),
+ u16_revision(h) {
+ size_t length = strlen(p) + 1;
+ p_str_product = new CHAR[length]; // LCOV_EXCL_BR_LINE 11:except branch
+ if (NULL != p_str_product) { // LCOV_EXCL_BR_LINE 5:new's error case
+ memset(p_str_product, 0, length);
+#ifdef AGL_PosixBasedOS001LEGACY_USED
+ strlcpy(p_str_product, p, length);
+#endif
+ }
+
+ length = strlen(g) + 1;
+ p_str_build = new CHAR[length]; // LCOV_EXCL_BR_LINE 11:except branch
+ if (NULL != p_str_build) { // LCOV_EXCL_BR_LINE 5:new's error case
+ memset(p_str_build, 0, length);
+#ifdef AGL_PosixBasedOS001LEGACY_USED
+ strlcpy(p_str_build, g , length);
+#endif
+ }
+ }
+ ~VersionInfo() {
+ delete[] p_str_product; // LCOV_EXCL_BR_LINE 11:except branch
+ p_str_product = NULL;
+ delete[] p_str_build; // LCOV_EXCL_BR_LINE 11:except branch
+ p_str_build = NULL;
+ }
+ } m_tVersionInfo;
+ UI_32 m_u32Month;
+ UI_32 m_u32Year;
+ UI_32 m_u32Day;
+};
+
+/**
+ * \~english define macro for version string
+ */
+#define FRAMEWORKUNIFIED_GET_VERSION() "undefined_undefined_00.00.00"
+
+/**
+ * \~english define macro for the major number of the version
+ */
+#define FRAMEWORKUNIFIED_APP_VERSION_MAJOR() (0)
+
+/**
+ * \~english define macro for the minor number of the version
+ */
+#define FRAMEWORKUNIFIED_APP_VERSION_MINOR() (0)
+
+/**
+ * \~english define macro for the revision number
+ */
+#define FRAMEWORKUNIFIED_APP_VERSION_REVISION() (0)
+
+/**
+ * \~english define macro for the building version
+ */
+#define FRAMEWORKUNIFIED_APP_VERSION_BUILDVER() "undefined"
+
+/**
+ * \~english define macro for product version
+ */
+#define FRAMEWORKUNIFIED_APP_VERSION_PRODUCTID() "undefined"
+
+#endif // NS_NATIVESERVICES_INC_NATIVE_NS_VERSION_IF_H_ // NOLINT (build/header_guard)
+/** @}*/ // end of native
+/** @}*/ // end of framework_unified
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/ns_writer.h b/nsframework/framework_unified/client/include/native_service/ns_writer.h
new file mode 100644
index 00000000..788b6a4f
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_writer.h
@@ -0,0 +1,229 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NS_ConfigParser
+/// \brief This file contains declaration of class IConfigWriter.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @file ns_writer.h
+ * @brief \~english This file contains declaration of class IConfigWriter.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_WRITER_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_WRITER_H__ // NOLINT(build/header_guard)
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_types.h> // NOLINT(build/header_guard)
+#include <string>
+
+
+/**
+ * @class IConfigWriter
+ * \~english @brief Config writer abstract class.
+ * \~english @par Brief Introduction
+ * IConfigWriter is an abstract class which is inherited by\n
+ * different type configuration file writer class.
+ *
+ */
+class IConfigWriter {
+ public:
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigWriter
+ /// \~english @par Brief
+ /// Constructor of IConfigWriter class
+ /// \~english @param None
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - To get a instance of this class.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see ~IConfigWriter
+ ////////////////////////////////////////////////////////////////////////////////////
+ IConfigWriter();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ~IConfigWriter
+ /// \~english @par Brief
+ /// Destructor of IConfigWriter class
+ /// \~english @param None
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// - Destruct the object of this class.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see IConfigWriter
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual ~IConfigWriter();
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigWriter
+ /// \~english @par Brief
+ /// This function is used to parse the file.
+ /// \~english @param [in] f_c_filepath
+ /// std::string - path of file to parse
+ /// \~english @retval EFrameworkunifiedStatus - success or failure
+ /// \~english @par Preconditons
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This function is used to parse the file.
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus ParseFile(const std::string &f_c_filepath) = 0;
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigWriter
+ /// \~english @par Brief
+ /// This function is used to set the value for the key
+ /// \~english @param [in] f_c_key
+ /// std::string - key to search
+ /// \~english @param [in] f_c_value
+ /// std::string - value to set
+ /// \~english @retval EFrameworkunifiedStatus - error if key not found else eFrameworkunifiedStatusOK
+ /// \~english @par Preconditons
+ /// - Calls constructor to successfully create object.
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This function is used to set the value for the key
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus SetValue(const std::string &f_c_key, std::string f_c_value) = 0;
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigWriter
+ /// \~english @par Brief
+ /// This function is used to save the changed value permanently to the config source
+ /// \~english @param None
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This function is used to save the changed value permanently to the config source
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus SaveData() = 0;
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigWriter
+ /// \~english @par Brief
+ /// This function is used to set the config file path
+ /// \~english @param [in] f_cpath
+ /// std::string - Path of file
+ /// \~english @retval EFrameworkunifiedStatus - success or failure
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This function is used to set the config file path
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual EFrameworkunifiedStatus SetPath(const std::string &f_cpath) = 0;
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IConfigWriter
+ /// \~english @par Brief
+ /// This function is used to set the data pointer in config writer class with data pointer\n
+ /// created in config reader class.\n
+ /// This is needed to avoid recreation of same data structure object in both reader and writer\n
+ /// when we create object of NSConfigParser.\n
+ /// \~english @param [in] f_pdata
+ /// PVOID - Pointer to data structure
+ /// \~english @retval None
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - None
+ /// \~english @par Conditions of processing failure
+ /// - None
+ /// \~english @par Detail
+ /// This function is used to set the data pointer in config writer class with data pointer\n
+ /// created in config reader class.\n
+ /// This is needed to avoid recreation of same data structure object in both reader and writer\n
+ /// when we create object of NSConfigParser.\n
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - Sync only
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////////
+ virtual VOID SetDataPtr(PVOID f_pdata) = 0;
+};
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_WRITER_H__ */ // NOLINT (build/header_guard)
+/** @}*/ // end of framework_unified
+/** @}*/ // end of native_service
+/** @}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/ns_xml_reader.h b/nsframework/framework_unified/client/include/native_service/ns_xml_reader.h
new file mode 100644
index 00000000..91e88c03
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_xml_reader.h
@@ -0,0 +1,291 @@
+/**
+ * @file ns_xml_reader.h
+ * @brief \~english This file contains declaration of class CXMLReader.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NS_ConfigParser
+/// \brief This file contains declaration of class CXMLReader.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_NS_XML_READER_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_NS_XML_READER_H__
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <libxml/tree.h>
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_reader.h>
+#include <string>
+
+
+/**
+ * @class CXMLReader
+ * \~english @par Brief Introduction
+ * This class provides functionalities to read from XML config file.
+ *
+ */
+class CXMLReader: public IConfigReader {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXMLReader
+ /// \~english @par Brief
+ /// This API constructor of CXMLReader class.
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This API should be called by ServiceA and create a new object of CXMLReader.
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////
+ CXMLReader();
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXMLReader
+ /// \~english @par Brief
+ /// This API constructor of CXMLReader class.
+ /// \~english @param [IN] f_cFilePath
+ /// std::string - Full path of the configuration file
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This API should be called by ServiceA and create a new object of CXMLReader with filepath.
+ /// \~english @see GetCXMLReaderObject
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXMLReader(const std::string &f_cFilePath); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ~CXMLReader
+ /// \~english @par CXMLReader
+ /// Destructor of CXMLReader class.
+ /// \~english @param None
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// - Close shared memory object.
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// Destruct the object of CXMLReader
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - sync only
+ /// \~english @see CXMLReader
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CXMLReader();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ParseFile
+ /// \~english @par Brief
+ /// This API parser file
+ /// \~english @param [IN] f_cFilePath
+ /// std::string - path of file to parse
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first.
+ /// - Create XmlReader object.
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This API is used to parse the file from the path.
+ /// \~english @see CXMLReader or GetCXMLReaderObject
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus ParseFile(const std::string &f_cFilePath);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ParseFile
+ /// \~english @par Brief
+ /// Get Value with key
+ /// \~english @param [IN] f_cKey
+ /// std::string - key to search
+ /// \~english @retval std::string - value for key
+ /// \~english @par Prerequisite
+ /// - Load the shared library first.
+ /// - Create XmlReader object.
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This function is used to get the value associated with the key
+ /// \~english @see CXMLReader or GetCXMLReaderObject
+ ////////////////////////////////////////////////////////////////////////////////
+ std::string GetValue(const std::string &f_cKey);
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ParseFile
+ /// \~english @par Brief
+ /// Get Value with key
+ /// \~english @param [IN] f_cKey
+ /// std::string - key to search
+ /// \~english @param [REF] f_cValue
+ /// std::string - Value of key
+ /// \~english @retval eFrameworkunifiedStatusOK Success / Pass / OK
+ /// \~english @retval eFrameworkunifiedStatusFail Failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first.
+ /// - Create XmlReader object.
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This function is used to get the value associated with the key
+ /// \~english @see CXMLReader or GetCXMLReaderObject
+ ////////////////////////////////////////////////////////////////////////////////
+
+
+ EFrameworkunifiedStatus GetValue(const std::string &f_cKey, std::string &f_cValue); // NOLINT (readability/nolint)
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ParseFile
+ /// \~english @par Brief
+ /// Get Value with key
+ /// \~english @param None
+ /// \~english @retval PVOID - pointer of data structure
+ /// \~english @par Prerequisite
+ /// - Load the shared library first.
+ /// - Create XmlReader object.
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This function is used to get the data pointer. This pointer is then set in config writer.
+ /// \~english @see CXMLReader or GetCXMLReaderObject
+ ////////////////////////////////////////////////////////////////////////////////
+ PVOID GetDataPtr();
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// XMLGetValue
+ /// This function is used to parse and get the value from xml file
+ ///
+ /// \param [IN] f_pCurrNode
+ /// xmlNodePtr - pointer to current node in xml
+ /// \param [IN] f_cUserKey
+ /// std::string - Key to be searched for
+ ///
+ /// \return std::string - content of key node
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ std::string XMLGetValue(xmlNodePtr f_pCurrNode, const std::string &f_cUserKey);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// XMLGetValue
+ /// This function is used to parse and get the value from xml file
+ ///
+ /// \param [IN] f_pCurrNode
+ /// xmlNodePtr - pointer to current node in xml
+ /// \param [IN] f_cUserKey
+ /// std::string - Key to be searched for
+ /// \param [IN] f_cValue
+ /// std::string - Value of Key
+ /// \param [IN] f_bKeyFound
+ /// BOOL - flag to check whether key exists in xml file or not
+ ///
+ /// \return EFrameworkunifiedStatus - error if key not found or else eFrameworkunifiedStatusOK
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus XMLGetValue(xmlNodePtr f_pCurrNode,
+ const std::string &f_cUserKey, std::string &f_cValue, BOOL &f_bKeyFound); // NOLINT (readability/nolint)
+ // pointer of xml document structure(DOM)
+ xmlDocPtr m_pXmlDoc;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetCXMLReaderObject
+ /// \~english @par Brief
+ /// Get CXMLReader object.
+ /// \~english @param [IN] f_cFilePath
+ /// std::string - path of file to parse
+ /// \~english @retval CXMLReader *
+ /// \~english @par Prerequisite
+ /// - Load the shared library first.
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This API is used to create CXMLReader object with file path and return the CXMLReader pointer.
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////
+CXMLReader *GetCXMLReaderObject(CHAR *f_cFilePath);
+#ifdef __cplusplus
+}
+#endif
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_NS_XML_READER_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_xml_writer.h b/nsframework/framework_unified/client/include/native_service/ns_xml_writer.h
new file mode 100644
index 00000000..7686553e
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_xml_writer.h
@@ -0,0 +1,336 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+/**
+ * @file ns_xml_writer.h
+ * @brief \~english This file contains declaration of class CXMLWriter.
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NS_ConfigParser
+/// \brief This file contains declaration of class CXMLWriter.
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_NS_XML_WRITER_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_NS_XML_WRITER_H__
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <libxml/tree.h>
+
+#include <native_service/frameworkunified_types.h>
+#include <native_service/ns_writer.h>
+
+#include <string>
+
+/**
+ * @class CXMLWriter
+ * \~english @brief this file has the CXMLWriter class definitions
+ * \~english @par Brief Introduction
+ * This class provides functionalities to write to XML config file
+ *
+ */
+class CXMLWriter: public IConfigWriter {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXMLWriter
+ /// \~english @par Brief
+ /// Parameterless Constructor of CXMLWriter class
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This API should be called by ServiceA and create a new object without file path of CXMLWriter
+ /// \~english @see GetCXMLWriterObjectNoParam
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXMLWriter();
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXMLWriter
+ /// \~english @par Brief
+ /// Constructor of CXMLWriter class
+ /// \~english @param [IN] f_cFilePath
+ /// std::string - Full path of the configuration file
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This API should be called by ServiceA and create a new object with file path of CXMLWriter
+ /// \~english @see GetCXMLWriterObject
+ ////////////////////////////////////////////////////////////////////////////////
+ CXMLWriter(const std::string &f_cFilePath); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ~CXMLWriter
+ /// \~english @par CXMLWriter
+ /// Destructor of CXMLWriter class.
+ /// \~english @param None
+ /// \~english @retval none
+ /// \~english @par Preconditons
+ /// - None
+ /// \~english @par Change of internal status
+ /// -None
+ /// \~english @par Conditions of processing failure
+ /// -None
+ /// \~english @par Detail
+ /// Destruct the object of CXMLWriter
+ /// \~english @par Classification
+ /// - Public
+ /// \~english @par Type
+ /// - sync only
+ /// \~english @see CXMLWriter
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ ~CXMLWriter();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ParseFile
+ /// \~english @par Brief
+ /// Parse file
+ /// \~english @param [IN] f_cFilePath
+ /// std::string - path of file to parse
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Create CXMLWriter object
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This function is used to parse the file
+ /// \~english @see CXMLWriter
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus ParseFile(const std::string &f_cFilePath);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetValue
+ /// \~english @par Brief
+ /// Set vaule for key
+ /// \~english @param [IN] f_cKey
+ /// std::string - key to search
+ /// \~english @param [IN] f_cValue
+ /// std::string - value to set
+ /// \~english @retval eFrameworkunifiedStatusOK Success / Pass / OK
+ /// \~english @retval eFrameworkunifiedStatusFail Failed
+ /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Create CXMLWriter object
+ /// - ParseFile set the path
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This function is used to set the value for the key
+ /// \~english @see CXMLWriter,ParseFile
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus SetValue(const std::string &f_cKey, std::string f_cValue);
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SaveData
+ /// \~english @par Brief
+ /// Save changed data
+ /// \~english @param None
+ /// \~english @retval eFrameworkunifiedStatusOK Success / Pass / OK
+ /// \~english @retval eFrameworkunifiedStatusFail Failed
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Create CXMLWriter object
+ /// - ParseFile set the path
+ /// - Change the data
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This function is used to save the changed value to the xml config file
+ /// \~english @see GetCXMLWriterObjectNoParam
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus SaveData();
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetPath
+ /// \~english @par Brief
+ /// Updata file path
+ /// \~english @param [IN] f_cPath
+ /// std::string - Path of file
+ /// \~english @retval eFrameworkunifiedStatusOK Success / Pass / OK
+ /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Create CXMLWriter object
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This function is used to set the config file path
+ /// \~english @see GetCXMLWriterObjectNoParam
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus SetPath(const std::string &f_cPath);
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetDataPtr
+ /// \~english @par Brief
+ /// Parse file
+ /// \~english @param [IN] f_pData
+ /// PVOID - Pointer to data structure
+ /// \~english @retval VOID
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Create CXMLWriter object
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This function is used to set the data pointer in config writer class
+ /// \~english @see CXMLWriter
+ ////////////////////////////////////////////////////////////////////////////////
+
+ VOID SetDataPtr(PVOID f_pData);
+
+ private:
+////////////////////////////////////////////////////////////////////////////////////////////////
+/// XMLSetValue
+/// This function is used to parse the value from xml file
+///
+/// \param [IN] f_pCurrNode
+/// xmlNodePtr - pointer to current node in xml
+/// \param [IN] f_cUserKey
+/// std::string - Key to be searched for
+/// \param [IN] f_cValue
+/// std::string - Required Value for key
+/// \param [IN] f_bKeyFound
+/// std::string - Flag to check whether key is present in xml file
+///
+/// \return EFrameworkunifiedStatus- success or failure
+///
+////////////////////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus XMLSetValue(xmlNodePtr f_pCurrNode,
+ const std::string &f_cUserKey, // NOLINT (readability/nolint)
+ std::string &f_cValue, // NOLINT (readability/nolint)
+ BOOL &f_bKeyFound); // NOLINT (readability/nolint)
+
+// pointer of xml document structure(DOM)
+ xmlDocPtr m_pXmlDoc;
+
+// path of config file
+ std::string m_cFilePath;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetCXMLWriterObject
+ /// \~english @par Brief
+ /// Get CXMLWriter object.
+ /// \~english @param [IN] f_cFilePath
+ /// std::string - path of file to parse
+ /// \~english @retval CXMLWriter *
+ /// \~english @par Prerequisite
+ /// - Load the shared library first.
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This API is used to create CXMLWriter object with file path and return the CXMLWriter pointer.
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////
+CXMLWriter *GetCXMLWriterObject(CHAR *f_cFilePath);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetCXMLWriterObjectNoParam
+ /// \~english @par Brief
+ /// Get CXMLWriter object.
+ /// \~english @param None
+ /// \~english @retval CXMLWriter *
+ /// \~english @par Prerequisite
+ /// - Load the shared library first.
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync
+ /// \~english @par Detail
+ /// This API is used to create CXMLWriter object without file path and return the CXMLWriter pointer.
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////
+
+CXMLWriter *GetCXMLWriterObjectNoParam();
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_NS_XML_WRITER_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/ns_xmlparser_if.h b/nsframework/framework_unified/client/include/native_service/ns_xmlparser_if.h
new file mode 100644
index 00000000..f944dddb
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/ns_xmlparser_if.h
@@ -0,0 +1,1150 @@
+/**
+ * @file ns_xmlparser_if.h
+ * @brief \~english This file contains declaration of class CXmlParser, CXmlNode and CXmlAttr.
+ * This file provides the interface for Parsing XML file, API for operation on node
+ * of an xml structure.
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+#ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NS_XMLPARSER_INC_NS_XMLPARSER_IF_H__ // NOLINT (build/header_guard)
+#define __FRAMEWORKUNIFIED_NATIVESERVICES_NS_XMLPARSER_INC_NS_XMLPARSER_IF_H__
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// Include Files
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <native_service/frameworkunified_types.h>
+
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <string>
+#include <list>
+
+// defines the type of xml nodes
+/**
+ * \~english type of xml nodes
+ */
+typedef enum _EFrameworkunifiedXmlNodeTypes {
+ FRAMEWORKUNIFIED_XML_NODE_NONE = 0, //!< \~english not exist node
+ FRAMEWORKUNIFIED_XML_ELEMENT_NODE = 1, //!< \~english element node
+ FRAMEWORKUNIFIED_XML_ATTRIBUTE_NODE = 2, //!< \~english attribute node
+ FRAMEWORKUNIFIED_XML_TEXT_NODE = 3, //!< \~english text node
+ FRAMEWORKUNIFIED_XML_CDATA_SECTION_NODE = 4, //!< \~english section node
+ FRAMEWORKUNIFIED_XML_ENTITY_REF_NODE = 5, //!< \~english entity ref node
+ FRAMEWORKUNIFIED_XML_ENTITY_NODE = 6, //!< \~english entity node
+ FRAMEWORKUNIFIED_XML_PI_NODE = 7, //!< \~english PI node
+ FRAMEWORKUNIFIED_XML_COMMENT_NODE = 8, //!< \~english comment node
+ FRAMEWORKUNIFIED_XML_DOCUMENT_NODE = 9, //!< \~english document node
+ FRAMEWORKUNIFIED_XML_DOCUMENT_TYPE_NODE = 10, //!< \~english document type node
+ FRAMEWORKUNIFIED_XML_DOCUMENT_FRAG_NODE = 11, //!< \~english document frag node
+ FRAMEWORKUNIFIED_XML_NOTATION_NODE = 12, //!< \~english notation node
+ FRAMEWORKUNIFIED_XML_HTML_DOCUMENT_NODE = 13, //!< \~english document node
+ FRAMEWORKUNIFIED_XML_DTD_NODE = 14, //!< \~english dtd node
+ FRAMEWORKUNIFIED_XML_ELEMENT_DECL = 15, //!< \~english element decl
+ FRAMEWORKUNIFIED_XML_ATTRIBUTE_DECL = 16, //!< \~english attribute decl
+ FRAMEWORKUNIFIED_XML_ENTITY_DECL = 17, //!< \~english entity decl
+ FRAMEWORKUNIFIED_XML_NAMESPACE_DECL = 18, //!< \~english namespace decl
+ FRAMEWORKUNIFIED_XML_XINCLUDE_START = 19, //!< \~english include start
+ FRAMEWORKUNIFIED_XML_XINCLUDE_END = 20, //!< \~english include end
+ FRAMEWORKUNIFIED_XML_DOCB_DOCUMENT_NODE = 21 //!< \~english document node
+} EFrameworkunifiedXmlNodeTypes;
+
+// forward declaration
+class CXmlNode;
+class CXmlAttr;
+
+// list of CXmlNode
+typedef std::list<CXmlNode> TNodeList;
+typedef TNodeList::iterator TNodeListIterator;
+
+// list of CXmlAttr
+typedef std::list<CXmlAttr> TAttrList;
+typedef std::list<CXmlAttr>::iterator TAttrListIterator;
+
+
+/**
+ * @class CXmlNode
+ * \~english @brief This class represents node of an XML.
+ * \~english @par Brief Introduction
+ * Provides API for performing operations on node.
+ *
+ */
+class CXmlNode {
+ friend class CXmlParser;
+
+ public:
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXmlNode
+ /// \~english @par Brief
+ /// Destructor of CXmlNode class
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Inside state change
+ /// - None
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Destructor of CXmlNode class
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////
+ ~CXmlNode();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup IsNull
+ /// \~english @par Brief
+ /// Check xmlNodePtr
+ /// \~english @param None
+ /// \~english @retval BOOL true if valid else false
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Checks whether the corresponding xmlNodePtr is valid or not
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ BOOL IsNull();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Type
+ /// \~english @par Brief
+ /// Get type
+ /// \~english @param None
+ /// \~english @retval FRAMEWORKUNIFIED_XML_NODE_NONE not exist node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_ELEMENT_NODE element node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_TEXT_NODE text node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_CDATA_SECTION_NODE section node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_ENTITY_REF_NODE entity ref node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_ENTITY_NODE entity node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_PI_NODE PI node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_COMMENT_NODE comment node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_DOCUMENT_NODE document node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_DOCUMENT_TYPE_NODE document type node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_DOCUMENT_FRAG_NODE document frag node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_NOTATION_NODE notation node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_HTML_DOCUMENT_NODE document node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_DTD_NODE dtd node
+ /// \~english @retval FRAMEWORKUNIFIED_XML_ELEMENT_DECL element decl
+ /// \~english @retval FRAMEWORKUNIFIED_XML_ATTRIBUTE_DECL attribute decl
+ /// \~english @retval FRAMEWORKUNIFIED_XML_ENTITY_DECL entity decl
+ /// \~english @retval FRAMEWORKUNIFIED_XML_NAMESPACE_DECL namespace decl
+ /// \~english @retval FRAMEWORKUNIFIED_XML_XINCLUDE_START include start
+ /// \~english @retval FRAMEWORKUNIFIED_XML_XINCLUDE_END include end
+ /// \~english @retval FRAMEWORKUNIFIED_XML_DOCB_DOCUMENT_NODE document node
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Gets the type of XML node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedXmlNodeTypes Type();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Name
+ /// \~english @par Brief
+ /// Get name
+ /// \~english @param None
+ /// \~english @retval std::string node name
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the name/tag of an XML node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ std::string Name();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetContent
+ /// \~english @par Brief
+ /// Get content
+ /// \~english @param None
+ /// \~english @retval std::string content of current node
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Gets the content of current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ std::string GetContent();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetContent
+ /// \~english @par Brief
+ /// Set content
+ /// \~english @param [IN] f_cUpdatedText
+ /// std::string - updated value
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set or update the content of current node. If the node has children then it removes all the child
+ /// nodes and sets the content for the current node.
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus SetContent(std::string f_cUpdatedText);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetAttributeValue
+ /// \~english @par Brief
+ /// Get attribute
+ /// \~english @param [IN] f_cKey
+ /// std::string - attribute name
+ /// \~english @param [OUT] f_cAttributeValue
+ /// std::string& - attribute value
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the attribute's value for the key
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus GetAttributeValue(std::string f_cKey, std::string &f_cAttributeValue); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SetAttributeValue
+ /// \~english @par Brief
+ /// Set attribute
+ /// \~english @param [IN] f_cKey
+ /// std::string - attribute name
+ /// \~english @param [IN] f_cValue
+ /// std::string - attribute value
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Set the attribute's value for the key
+ /// If attribute is not found then new attribute key-value pair is created and added to node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus SetAttributeValue(std::string f_cKey, std::string f_cValue);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup AddNewAttribute
+ /// \~english @par Brief
+ /// Add new attribute
+ /// \~english @param [IN] f_cKey
+ /// std::string - attribute name
+ /// \~english @param [IN] f_cValue
+ /// std::string - attribute value
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Add new attribute to the node. If the attribute key is existing then it updates the existing
+ /// value with the new value or else adds the new attribute
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus AddNewAttribute(std::string f_cKey, std::string f_cAttributeValue);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup RemoveAttribute
+ /// \~english @par Brief
+ /// Removes attribute
+ /// \~english @param [IN] f_cKey
+ /// std::string - attribute name
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Remove the attribute from the node with the specified key
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus RemoveAttribute(std::string f_cKey);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetAttributeItems
+ /// \~english @par Brief
+ /// Get attributes list
+ /// \~english @param None
+ /// \~english @retval TAttrList - list of all attributes of node or empty list in case of no attributes
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the list of all the attribute's key and value of the node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ TAttrList GetAttributeItems();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Parent
+ /// \~english @par Brief
+ /// Get parent
+ /// \~english @param None
+ /// \~english @retval CXmlNode - node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the parent node of current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+
+ CXmlNode Parent();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup FirstChild
+ /// \~english @par Brief
+ /// Get first child
+ /// \~english @param None
+ /// \~english @retval CXmlNode - node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the first child node of current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXmlNode FirstChild();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup LastChild
+ /// \~english @par Brief
+ /// Get last child
+ /// \~english @param None
+ /// \~english @retval CXmlNode - node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the last child node of current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXmlNode LastChild();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup Children
+ /// \~english @par Brief
+ /// Get child list
+ /// \~english @param None
+ /// \~english @retval TNodeList - list of all child node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the list of all the child nodes of current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ TNodeList Children();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup NextSibling
+ /// \~english @par Brief
+ /// Get next node
+ /// \~english @param None
+ /// \~english @retval CXmlNode - node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the next sibling node of current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXmlNode NextSibling();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup PrevSibling
+ /// \~english @par Brief
+ /// Get previous node
+ /// \~english @param None
+ /// \~english @retval CXmlNode - node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the previous sibling node of current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXmlNode PrevSibling();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup FindChildNode
+ /// \~english @par Brief
+ /// Find child node
+ /// \~english @param [IN] f_cNodeName std::string - tag name of the node
+ /// \~english @retval CXmlNode - node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the first immediate sub node with matching node name
+ /// This function does not provide support to find node based on attribute value
+ /// Use FindNode() API of CXmlParser to find node based on XPath expression
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+
+ CXmlNode FindChildNode(std::string f_cNodeName);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup FindAllChildNodes
+ /// \~english @par Brief
+ /// Get list of all the immediate sub node
+ /// \~english @param [IN] f_cNodeName std::string - tag name of the node
+ /// \~english @retval TNodeList - list of matching nodes
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the list of all the immediate sub node matching tag as f_cNodeName.
+ /// This function does not provide support to find node based on attribute value.
+ /// Use FindNode() API of CXmlParser to find node based on XPath expression.
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ TNodeList FindAllChildNodes(std::string f_cNodeName);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetContentOfChildNode
+ /// \~english @par Brief
+ /// Find first level node
+ /// \~english @param [IN] f_cNodeName
+ /// std::string - name of the node
+ /// \~english @param [OUT] f_cContent
+ /// std::string& - content of the node
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusFail Failed
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Find the first level sub node matching tag as f_cNodeName
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus GetContentOfChildNode(std::string f_cNodeName, std::string &f_cContent); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup AddChildNode
+ /// \~english @par Brief
+ /// Add sub node
+ /// \~english @param [IN] f_cNodeName
+ /// std::string - tag of the new node
+ /// \~english @param [IN] f_cText
+ /// std::string - content of the new node
+ /// \~english @retval CXmlNode - object of child node
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Add sub node to the current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXmlNode AddChildNode(std::string f_cNodeName, std::string f_cText = "");
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup AddSiblingNode
+ /// \~english @par Brief
+ /// Add new node to siblings
+ /// \~english @param [IN] f_cNodeName
+ /// std::string - tag of the new node
+ /// \~english @param [IN] f_cText
+ /// std::string - content of the new node
+ /// \~english @retval CXmlNode - object of sibling node
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Add a new node to the list of siblings of current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXmlNode AddSiblingNode(std::string f_cNodeName, std::string f_cText = "");
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup RemoveChildNode
+ /// \~english @par Brief
+ /// Remove child node
+ /// \~english @param [IN] f_cNodeName
+ /// std::string - name of child node
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Remove the child node from current node
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus RemoveChildNode(std::string f_cNodeName);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ClearNode
+ /// \~english @par Brief
+ /// Removes elements and attributes
+ /// \~english @param None
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// This function removes all sub elements, clears all attributes,
+ /// and sets the text and tail attributes to None
+ /// \~english @see CXmlNode
+ ////////////////////////////////////////////////////////////////////////////////
+ EFrameworkunifiedStatus ClearNode();
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CXmlNode
+ /// Constructor of CXmlNode class
+ ///
+ /// \param
+ ///
+ /// \return
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CXmlNode();
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// CXmlNode
+ /// Parameterized constructor of CXmlNode class
+ ///
+ /// \param f_pXmlNodePtr
+ /// xmlNodePtr - pointer of an xml node
+ ///
+ /// \return
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ CXmlNode(xmlNodePtr f_pXmlNodePtr); // NOLINT (readability/nolint)
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// SetXmlNodePtr
+ /// Sets the xmlNodePtr
+ ///
+ /// \param f_pXmlNodePtr
+ /// xmlNodePtr - pointer of an xml node
+ ///
+ /// \return VOID
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ VOID SetXmlNodePtr(xmlNodePtr f_pXmlNodePtr);
+
+ // pointer to xml node
+ xmlNodePtr m_pXmlNodePtr;
+};
+
+
+/**
+ * @class CXmlAttr
+ * \~english @brief This class represents the attribute of an xml node.
+ * \~english @par Brief Introduction
+ * This class represents the attribute of an xml node.
+ *
+ */
+class CXmlAttr {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXmlAttr
+ /// \~english @par Brief
+ /// CXmlAttr constructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Parameterized constructor of CXmlAttr class
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////
+ CXmlAttr();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXmlAttr
+ /// \~english @par Brief
+ /// CXmlAttr constructor
+ /// \~english @param [IN] f_cKey
+ /// std::string - attributes key
+ /// \~english @param [IN] f_cValue
+ /// std::string - attributes value
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Parameterized constructor of CXmlAttr class
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////
+ CXmlAttr(std::string f_cKey, std::string f_cValue);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXmlAttr
+ /// \~english @par Brief
+ /// Destructor of CXmlAttr class
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Inside state change
+ /// - None
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Destructor of CXmlAttr class
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////
+ ~CXmlAttr();
+
+ // atrribute key
+ std::string m_cKey;
+
+ // atrribute value
+ std::string m_cValue;
+};
+
+/**
+ * @class CXmlParser
+ * \~english @brief This class represents the XML parser.
+ * \~english @par Brief Introduction
+ * Provides API for parsing xml file. Also provides API to search node/nodes based on Xml Path
+ *
+ */
+class CXmlParser {
+ public:
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXmlParser
+ /// \~english @par Brief
+ /// CXmlParser constructor
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Constructor of CXmlParser class
+ /// \~english @see None
+ ////////////////////////////////////////////////////////////////////////////////
+ CXmlParser();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CXmlParser
+ /// \~english @par Brief
+ /// Destructor of CXmlParser class
+ /// \~english @param None
+ /// \~english @retval None
+ /// \~english @par Prerequisite
+ /// - None
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Destructor of CXmlParser class
+ /// \~english @see CXmlParser
+ ////////////////////////////////////////////////////////////////////////////////
+ ~CXmlParser();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup ParseXml
+ /// \~english @par Brief
+ /// Parses xml file
+ /// \~english @param [IN] f_cFileName
+ /// std::string - full path of xml file to be parsed
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Parses the xml file and creates a document structure
+ /// \~english @see CXmlParser
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus ParseXml(std::string f_cFileName);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup CreateNewXmlDoc
+ /// \~english @par Brief
+ /// Creates new xml
+ /// \~english @param [IN] f_cRootNodeName
+ /// std::string - root node name in new doc
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Create a new xml document
+ /// \~english @see CXmlParser
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus CreateNewXmlDoc(std::string f_cRootNodeName);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup SaveXml
+ /// \~english @par Brief
+ /// Save XML file
+ /// \~english @param [IN] f_cFileName
+ /// std::string - full path of output xml file
+ /// In case of parsing an xml file,
+ /// if f_cFileName is empty, output will be saved in source xml file
+ /// else output will be saved in user provided file path
+ /// In case of creating new xml document,
+ /// if f_cFileName is empty, returns error
+ /// else output will be saved in user provided file path
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Save the updated structure to the XML file
+ /// \~english @see CXmlParser
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus SaveXml(std::string f_cFileName = "");
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup GetRootNode
+ /// \~english @par Brief
+ /// Get root node
+ /// \~english @param None
+ /// \~english @retval CXmlNode - root node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Get the root node object
+ /// \~english @see CXmlParser
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXmlNode GetRootNode();
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup AddNewNode
+ /// \~english @par Brief
+ /// Create and add node
+ /// \~english @param [IN] f_pParentNode
+ /// CXmlNode - parent node
+ /// \~english @param [IN] f_cNewNodeName
+ /// std::string - tag name of the new node
+ /// \~english @param [IN] f_cContent
+ /// std::string - text to set for the new node
+ /// \~english @retval CXmlNode - new node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Create new node and add it to the parent node
+ /// \~english @see CXmlParser
+ ////////////////////////////////////////////////////////////////////////////////
+
+ CXmlNode AddNewNode(CXmlNode m_pParentNode, std::string f_cNewNodeName, std::string f_cContent = "");
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup RemoveNode
+ /// \~english @par Brief
+ /// Remove node
+ /// \~english @param [IN] f_pNode
+ /// CXmlNode - node object
+ /// \~english @retval eFrameworkunifiedStatusOK Success
+ /// \~english @retval eFrameworkunifiedStatusNullPointer Null pointer
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Remove the node from the xml
+ /// \~english @see CXmlParser
+ ////////////////////////////////////////////////////////////////////////////////
+
+ EFrameworkunifiedStatus RemoveNode(CXmlNode m_pNode);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup FindNode
+ /// \~english @par Brief
+ /// Find first matching node
+ /// \~english @param [IN] f_cNodePath
+ /// std::string - name or path of node(XPath) path is relative to current node or absolute path
+ /// \~english @param [IN] f_pCurrentNode
+ /// CXmlNode - current node
+ /// \~english @retval CXmlNode - node object
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Find the first matching node, by tag name or path relative to current node path or
+ /// absolute path. Here the path is XPath expression
+ /// \~english @see CXmlParser
+ ////////////////////////////////////////////////////////////////////////////////
+
+
+ CXmlNode FindNode(std::string f_cNodePath, CXmlNode f_pCurrentNode);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// \ingroup FindAllNodes
+ /// \~english @par Brief
+ /// Find all matching node
+ /// \~english @param [IN] f_cNodePath
+ /// std::string - name or path of node(XPath) path is relative to current node or absolute path
+ /// \~english @param [IN] f_pCurrentNode
+ /// CXmlNode - current node
+ /// \~english @retval TNodeList - list of matching nodes
+ /// \~english @par Prerequisite
+ /// - Load the shared library first
+ /// - Get CXmlNode from CXmlParser
+ /// \~english @par Inside state change
+ /// - The API no inside state change
+ /// \~english @par None
+ /// \~english @par Classification
+ /// Public
+ /// \~english @par Type
+ /// Sync Only
+ /// \~english @par Detail
+ /// Find all the matching node, by tag name or path relative to current node path or
+ /// absolute path.
+ /// \~english @see CXmlParser
+ ////////////////////////////////////////////////////////////////////////////////
+
+ TNodeList FindAllNodes(std::string f_cNodePath, CXmlNode f_pCurrentNode);
+
+ private:
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// GetNodeSet
+ /// Gets the node set resulting from search of nodepath using XPath
+ ///
+ /// \param f_cNodePath
+ /// std::string - name or path of node
+ /// path is relative to current node or absolute path
+ /// \param f_pCurrentNode
+ /// CXmlNode - current node
+ ///
+ /// \return xmlXPathObjectPtr
+ /// xmlXPathObjectPtr - returns the xpath object pointer containing nodes pointer
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ xmlXPathObjectPtr GetNodeSet(std::string f_cNodePath, CXmlNode f_pCurrentNode);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// IsReadable
+ /// Checks whether the file exists or not
+ ///
+ /// \param
+ ///
+ /// \return VOID
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ BOOL IsReadable(const std::string &filename);
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ /// ClearDocument
+ /// Clears the document structure and resets the root node
+ ///
+ /// \param
+ ///
+ /// \return VOID
+ ///
+ ////////////////////////////////////////////////////////////////////////////////////////////////
+ VOID ClearDocument();
+
+ // pointer to structure created from xml after parsing
+ xmlDocPtr m_pXmlDoc;
+
+ // stores the name/path of source xml file
+ std::string m_cFileName;
+
+ // pointer to the root node of xml structure
+ CXmlNode m_pRootNode;
+};
+
+
+#endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NS_XMLPARSER_INC_NS_XMLPARSER_IF_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/nsfw_message.h b/nsframework/framework_unified/client/include/native_service/nsfw_message.h
new file mode 100644
index 00000000..b5872c57
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/nsfw_message.h
@@ -0,0 +1,65 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+/**
+ * @file nsfw_message.h
+ * @brief \~english The file definition of NSFW message for NSFW independent module reference
+ *
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup utility
+ * @ingroup framework_unified
+ * @{
+ */
+/*
+ * The definition of NSFW message for NSFW independent module reference.
+ *
+ */
+//@{
+#ifndef _nsfw_message_h_ // NOLINT (build/header_guard)
+#define _nsfw_message_h_
+
+/*
+ * The following definitions are defined only for NSFW to check consistency.
+ * NOT TO BE USED IN ANY WAY.
+ */
+#define _NSFW_MSG_LEN_ (40)
+#define _NSFW_SYSINFO_FLAG_ (4)
+#define _NSFW_SYSINFO_SIZE_ (64)
+
+/*
+ * The following definitions are published definitions.
+ */
+#define NSFW_GET_MESSAGE(msg) \
+ ((*((unsigned int *)msg) & _NSFW_SYSINFO_FLAG_) ? \
+ ((unsigned char *)msg) + _NSFW_MSG_LEN_ + _NSFW_SYSINFO_SIZE_ : \
+ ((unsigned char *)msg) + _NSFW_MSG_LEN_)
+
+#endif // _nsfw_message_h_ // NOLINT (build/header_guard)
+//@}
+/**@}*/ // end of utility
+/**@}*/ // end of framework_unified
+/**@}*/ // end of native_service
+/**@}*/ // end of BaseSystem
diff --git a/nsframework/framework_unified/client/include/native_service/nslogutil_cmd_if.h b/nsframework/framework_unified/client/include/native_service/nslogutil_cmd_if.h
new file mode 100644
index 00000000..90f03b79
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/nslogutil_cmd_if.h
@@ -0,0 +1,86 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \file
+/// Declares COMMANDS related to Log Utility
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @file
+ * @brief \~english Declares COMMANDS related to Log Utility
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup utility
+ * @ingroup framework_unified
+ * @{
+ */
+
+#ifndef COMMANDS_H_ // NOLINT (build/header_guard)
+#define COMMANDS_H_
+
+// Notifications
+#define NTFY_LOGGER_SETCONTROLMASK "LoggerService/SetControlMask"
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief Logger Utility Commands
+///////////////////////////////////////////////////////////////////////////////
+typedef enum _COMMANDS {
+ SET_LOG_MASK = 0xAEA, // < Sets the NS log mask for a process. uses CHANGELOGPARAMS
+ GET_LOG_MASK, // < Gets the NS log mask for a process. uses CHANGELOGPARAMS
+ SET_LOG_OUT_OPT, // < Sets the NS log output option mask for a process. uses CHANGELOGPARAMS
+ GET_LOG_OUT_OPT, // < Gets the NS log output option mask for a process. uses CHANGELOGPARAMS
+ GET_LOG_MASK_RESPONSE, // < Get the response about NS log masks
+ GET_LOG_OUT_OPT_RESPONSE, // < Get the response about NS log output options
+ SET_MSGTX_RX_ON_AND_TX_OFF, // < Sets TransmissionLogger to receive ON, transmit OFF
+ SET_MSGTX_RX_OFF_AND_TX_ON, // < Sets TransmissionLogger to receive OFF, transmit ON
+ SET_MSGTX_RX_AND_TX_ON, // < Sets TransmissionLogger to receive ON, transmit ON
+ SET_MSGTX_RX_AND_TX_OFF, // < Sets TransmissionLogger to receive OFF, transmit OFF
+ kDebugDumpRequest, // < Sets a debug dump log to the debug dump queue
+ SET_LOG_SEVERITY, // < Sets the NS severity log level
+ GET_LOG_SEVERITY, // < Gets the NS severity log level
+ GET_LOG_SEVERITY_RESPONSE, // < Get the response about NS serverity log level
+
+ // list of protocols provided for rcs logger plugin
+ NSRCS_SET_LOG_SETTINGS_REQ, // < Set the NS RCS log setting request
+ NSRCS_SET_LOG_SETTINGS_RESP, // < Set the NS RCS log setting response
+ NSRCS_GET_LOG_SETTINGS_REQ, // < Get the NS RCS log setting request
+ NSRCS_GET_LOG_SETTINGS_RESP, // < Get the NS RCS log setting response
+ NSRCS_SET_LOG_MASK_REQ, // < Set the NS RCS log mask request
+ NSRCS_SET_LOG_MASK_RESP, // < Get the NS RCS log mask response
+ NSRCS_SET_LOG_OUT_OPT_REQ, // < Set the NS RCS log output option request
+ NSRCS_SET_LOG_OUT_OPT_RESP, // < Set the NS RCS log output option response
+ NSRCS_SET_LOG_SEVERITY_REQ, // < Set the NS RCS severity log level request
+ NSRCS_SET_LOG_SEVERITY_RESP, // < Set the NS RCS severity log level response
+} COMMANDS;
+
+#endif /* COMMANDS_H_ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/native_service/wpf_legacy.h b/nsframework/framework_unified/client/include/native_service/wpf_legacy.h
new file mode 100644
index 00000000..7553f911
--- /dev/null
+++ b/nsframework/framework_unified/client/include/native_service/wpf_legacy.h
@@ -0,0 +1,152 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+/**
+ * @file
+ * @brief \~english This file define primary types to use
+ */
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup native_service
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup framework_unified
+ * @ingroup native_service
+ * @{
+ */
+/** @addtogroup framework
+ * @ingroup framework_unified
+ * @{
+ */
+#ifndef __WPF_LEGACY_H__ // NOLINT (build/header_guard)
+#define __WPF_LEGACY_H__
+
+// these are legacy definitions.
+// these were defined at Windows_Def.h ... in the past.
+// if you make new code , you should not use these.
+// you should use definitions in frameworkunified_types.h.
+
+#include <native_service/frameworkunified_types.h>
+
+
+// Windows_Def.h
+#define CALLBACK
+#define INVALID_HANDLE_VALUE ((void*)(-1))
+#define INFINITE 0xFFFFFFFF
+
+typedef int INT;
+typedef unsigned int UINT;
+typedef unsigned int *PUINT;
+#define VOID void
+typedef char CHAR;
+typedef short SHORT; // NOLINT (readability/nolint)
+typedef long LONG; // NOLINT (readability/nolint)
+typedef SHORT *PSHORT;
+typedef LONG *PLONG;
+typedef unsigned long ULONG; // NOLINT (readability/nolint)
+typedef ULONG *PULONG;
+typedef unsigned short USHORT; // NOLINT (readability/nolint)
+typedef USHORT *PUSHORT;
+typedef unsigned char UCHAR;
+typedef UCHAR *PUCHAR;
+typedef unsigned long DWORD; // NOLINT (readability/nolint)
+// defined in kernelmoduleevklibdd.h typedef int BOOL;
+typedef unsigned char BYTE;
+typedef unsigned short WORD; // NOLINT (readability/nolint)
+typedef float FLOAT;
+typedef FLOAT *PFLOAT;
+typedef BOOL *PBOOL;
+typedef BOOL *LPBOOL;
+typedef BYTE *PBYTE;
+typedef BYTE *LPBYTE;
+typedef int *PINT;
+typedef int *LPINT;
+typedef WORD *PWORD;
+typedef WORD *LPWORD;
+typedef long *LPLONG; // NOLINT (readability/nolint)
+typedef DWORD *PDWORD;
+typedef DWORD *LPDWORD;
+typedef void *PVOID;
+typedef void *LPVOID;
+typedef const void *LPCVOID;
+typedef wchar_t WCHAR;
+typedef size_t SIZE_T;
+typedef DWORD COLORREF;
+typedef DWORD *LPCOLORREF;
+typedef CHAR *PCHAR, *LPCH, *PCH;
+typedef CONST CHAR *LPCCH, *PCCH;
+typedef CHAR *NPSTR, *LPSTR, *PSTR;
+typedef PSTR *PZPSTR;
+typedef CONST PSTR *PCZPSTR;
+typedef CONST CHAR *LPCSTR, *PCSTR;
+typedef PCSTR *PZPCSTR;
+typedef void *HGDIOBJ;
+typedef int INT_PTR, *PINT_PTR;
+typedef unsigned int UINT_PTR, *PUINT_PTR;
+typedef long LONG_PTR, *PLONG_PTR; // NOLINT (readability/nolint)
+typedef unsigned long ULONG_PTR, *PULONG_PTR; // NOLINT (readability/nolint)
+typedef unsigned long ULONGLONG; // NOLINT (readability/nolint)
+typedef char CCHAR;
+typedef DWORD LCID;
+typedef PDWORD PLCID;
+typedef WORD LANGID;
+typedef long LONGLONG; // NOLINT (readability/nolint)
+typedef WORD ATOM;
+
+typedef pthread_mutex_t CRITICAL_SECTION;
+typedef CRITICAL_SECTION *LPCRITICAL_SECTION;
+
+#define __readableTo(extent)
+#define __nullterminated __readableTo(sentinel(0))
+
+typedef __nullterminated WCHAR *NWPSTR, *LPWSTR, *PWSTR;
+typedef __nullterminated PWSTR *PZPWSTR;
+typedef __nullterminated CONST PWSTR *PCZPWSTR;
+typedef __nullterminated CONST WCHAR *LPCWSTR, *PCWSTR;
+typedef __nullterminated PCWSTR *PZPCWSTR;
+
+#ifdef UNICODE
+#define wsprintf swprintf
+typedef WCHAR *PWCHAR, *LPWCH, *PWCH;
+typedef LPWSTR PTSTR, LPTSTR;
+typedef LPCWSTR PCTSTR, LPCTSTR;
+#else /* UNICODE */
+#define wsprintf sprintf
+typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR;
+typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR;
+typedef WCHAR *LPWCH;
+typedef WCHAR *PWCHAR; // 110509 chg
+#endif /* UNICODE */
+
+#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
+
+typedef struct _SYSTEMTIME {
+ WORD wYear;
+ WORD wMonth;
+ WORD wDayOfWeek;
+ WORD wDay;
+ WORD wHour;
+ WORD wMinute;
+ WORD wSecond;
+ WORD wMilliseconds;
+} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
+
+#endif /* __WPF_LEGACY_H__ */ // NOLINT (build/header_guard)
+/** @}*/
+/** @}*/
+/** @}*/
+/** @}*/
diff --git a/nsframework/framework_unified/client/include/ns__CWORD77__template.h b/nsframework/framework_unified/client/include/ns__CWORD77__template.h
new file mode 100644
index 00000000..e4069dd9
--- /dev/null
+++ b/nsframework/framework_unified/client/include/ns__CWORD77__template.h
@@ -0,0 +1,60 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+////////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_HMI_CWORD77_Controller
+/// \brief
+///
+////////////////////////////////////////////////////////////////////////////////
+//@{
+
+#ifndef FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NS__CWORD77__TEMPLATE_H_
+#define FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NS__CWORD77__TEMPLATE_H_
+
+#include <iterator>
+#include <algorithm>
+
+/// Template for Map range transformation
+template< class OCont, class IIter, class MapFn >
+OCont mapRange(const IIter &begin, const IIter &end, MapFn fn) {
+ OCont c;
+ std::transform(begin, end, std::inserter(c, c.begin()), fn);
+ return c;
+}
+
+
+/// Template to get Array begining
+template< class T, UI_32 N >
+const T *ArrBeg(const T(&arr)[ N ]) {
+ return &arr[ 0 ];
+}
+
+/// Template to get Array ending
+template< class T, UI_32 N >
+const T *ArrEnd(const T(&arr)[ N ]) {
+ return &arr[ 0 ] + N;
+}
+
+/// Template to convert structure to Map
+template< class Cont, class T, class C, class TFn >
+const Cont GetMap(const T *mapTable, C N, TFn transform) {
+ return mapRange< Cont >(&mapTable[0], &mapTable[0] + N, transform);
+}
+
+ServiceResponseTableItem TransformServiceResponseTableIteminMap(const ServiceResponse &uch);
+
+#endif // FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NS__CWORD77__TEMPLATE_H_
+//@}
diff --git a/nsframework/framework_unified/client/include/ns_logger_additional_if.h b/nsframework/framework_unified/client/include/ns_logger_additional_if.h
new file mode 100644
index 00000000..4d67e189
--- /dev/null
+++ b/nsframework/framework_unified/client/include/ns_logger_additional_if.h
@@ -0,0 +1,40 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \file
+/// Declares the external APIs to Logger.Include this header when you want to use FRAMEWORKUNIFIEDLOG_TEXT.
+/// \ingroup tag_NSLogger
+/// @{
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NS_LOGGER_ADDITIONAL_IF_H_
+#define FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NS_LOGGER_ADDITIONAL_IF_H_
+
+#include <native_service/ns_logger_if.h>
+
+///////////////////////////////////////////////////////////////////////////////
+/// \ingroup tag_NSLogger
+/// \brief FRAMEWORKUNIFIEDLOG_TEXT
+///////////////////////////////////////////////////////////////////////////////
+/// FRAMEWORKUNIFIEDLOG_TEXT macro will output the log without relationship to the ZONE.
+/// \note Developers should use the FRAMEWORKUNIFIEDLOG for logging.
+///////////////////////////////////////////////////////////////////////////////
+#define FRAMEWORKUNIFIEDLOG_TEXT(funcname, args...) TEXT_ZONE(BITS_IN_ZONE_MASK, funcname, ## args)
+
+#endif // FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NS_LOGGER_ADDITIONAL_IF_H_
+/// @}
diff --git a/nsframework/framework_unified/client/include/nsverutil_cmd_if.h b/nsframework/framework_unified/client/include/nsverutil_cmd_if.h
new file mode 100644
index 00000000..70705e84
--- /dev/null
+++ b/nsframework/framework_unified/client/include/nsverutil_cmd_if.h
@@ -0,0 +1,25 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * 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.
+ */
+
+#ifndef FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NSVERUTIL_CMD_IF_H_
+#define FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NSVERUTIL_CMD_IF_H_
+
+typedef enum _VERCOMMANDS {
+ GET_VERSION_RESPONSE = 0xBEB, /**< Version response from framework */
+ GET_VERSION /**< Version request to framework */
+} VERCOMMANDS;
+
+#endif // FRAMEWORK_UNIFIED_CLIENT_INCLUDE_NSVERUTIL_CMD_IF_H_