2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 ///////////////////////////////////////////////////////////////////////////////////////////////////
18 /// \defgroup <<Group Tag>> <<Group Name>>
19 /// \ingroup tag_NSFramework
21 ///////////////////////////////////////////////////////////////////////////////////////////////////
23 ///////////////////////////////////////////////////////////////////////////////////////////////////
24 /// \ingroup tag_NSFramework
27 /// This file has the CFrameworkunifiedShallowHistoryState class definitions. CFrameworkunifiedShallowHistoryState is derived
28 /// from CFrameworkunifiedHistoryState class.This class implements the additional functionality supported by
29 /// HSM ShallowHistory state.
31 ///////////////////////////////////////////////////////////////////////////////////////////////////
33 #include <native_service/frameworkunified_sm_shallowhistorystate.h>
34 #include <native_service/frameworkunified_sm_framework_types.h>
37 // define static members of class
38 const UI_32 CFrameworkunifiedShallowHistoryState::m_suievShallowHistory = 71;
40 ////////////////////////////////////////////////////////////////////////////////////////////////////
41 /// CFrameworkunifiedShallowHistoryState
42 /// Parameterized constructor
43 ////////////////////////////////////////////////////////////////////////////////////////////////////
44 CFrameworkunifiedShallowHistoryState::CFrameworkunifiedShallowHistoryState(std::string f_pName): CFrameworkunifiedHistoryState(f_pName) {
45 m_uiEventId = m_suievShallowHistory;
46 m_cEventName = "evShallowHistory";
49 ////////////////////////////////////////////////////////////////////////////////////////////////////
50 /// ~CFrameworkunifiedShallowHistoryState
52 ////////////////////////////////////////////////////////////////////////////////////////////////////
53 CFrameworkunifiedShallowHistoryState::~CFrameworkunifiedShallowHistoryState() {
54 FRAMEWORKUNIFIEDLOG(ZONE_NS_SM_DEV_INFO, __FUNCTION__, "CFrameworkunifiedShallowHistoryState destructor");
57 ////////////////////////////////////////////////////////////////////////////////////////////////////
59 /// This function stores the last active state
60 ////////////////////////////////////////////////////////////////////////////////////////////////////
61 EFrameworkunifiedStatus CFrameworkunifiedShallowHistoryState::UpdateHistory() {
62 EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
65 CHKNULL(m_pParentState);
67 m_pLastActiveState = m_pParentState->m_pActiveState;
68 } catch (std::exception &e) {
69 FRAMEWORKUNIFIEDLOG(ZONE_NS_ERR, __FUNCTION__, "Exception %s", e.what());
70 l_eStatus = eFrameworkunifiedStatusNullPointer;