aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-06-20 22:17:03 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-06-20 22:17:03 +0900
commit5ea38c92ac6cb61fe108b7962ab4e2b71df06f05 (patch)
tree882ff8c057f501a5af4dd5d5ef1ff7405fed5a33
parentac6a264383ea7846433057450242b126f2b459db (diff)
Replace word "is_changed" to "changed"
Change-Id: I86a64c98f97ba9f7c2fd8ee294c29b073329be25 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
-rw-r--r--src/policy_manager/policy_manager.cpp18
-rw-r--r--src/policy_manager/zipc/dummy_stm.c122
-rw-r--r--src/policy_manager/zipc/dummy_stm.h48
3 files changed, 94 insertions, 94 deletions
diff --git a/src/policy_manager/policy_manager.cpp b/src/policy_manager/policy_manager.cpp
index e7ef9de..9b8670c 100644
--- a/src/policy_manager/policy_manager.cpp
+++ b/src/policy_manager/policy_manager.cpp
@@ -242,7 +242,7 @@ static void updateLocalCarElementState(stm::stm_state_t crr_state) {
car_state_no = crr_state.car_element[car_ele_no].state;
car_state = stm::gStmCarStateNameList[car_ele_no][car_state_no];
- changed = crr_state.car_element[car_ele_no].is_changed;
+ changed = crr_state.car_element[car_ele_no].changed;
pm::g_crr_car_elements[car_ele_name].state = car_state;
pm::g_crr_car_elements[car_ele_name].changed = changed;
@@ -279,7 +279,7 @@ static void updateLocalLayerState(int event_data, stm::stm_state_t crr_state) {
#if 1
// If restriction mode is changed off -> on,
// store current state for state of restriction mode off
- if ((crr_state.car_element[stm::gStmCarElementNoRestrictionMode].is_changed)
+ if ((crr_state.car_element[stm::gStmCarElementNoRestrictionMode].changed)
&& (stm::gStmRestrictionModeStateNoOn == crr_state.car_element[stm::gStmCarElementNoRestrictionMode].state)) {
HMI_DEBUG("wm:lm", "Store current state for state of restriction mode off");
pm::g_prv_layers_car_stop[layer_name] = pm::g_crr_layers[layer_name];
@@ -287,7 +287,7 @@ static void updateLocalLayerState(int event_data, stm::stm_state_t crr_state) {
#else
// If car state is changed car_stop -> car_run,
// store current state for state of car stop
- if ((crr_state.car.is_changed)
+ if ((crr_state.car.changed)
&& (stm::gStmRunningNoRun == crr_state.car.state)) {
HMI_DEBUG("wm:lm", "Store current state for state of car stop");
pm::g_prv_layers_car_stop[layer_name] = pm::g_crr_layers[layer_name];
@@ -296,7 +296,7 @@ static void updateLocalLayerState(int event_data, stm::stm_state_t crr_state) {
// This layer is changed?
- if (crr_state.layer[layer_no].is_changed) {
+ if (crr_state.layer[layer_no].changed) {
// Get previous layout name of this layer
pm::LayoutState prv_layout_state = pm::g_prv_layers[layer_name].layout_state;
std::string prv_layout_name = prv_layout_state.name;
@@ -307,14 +307,14 @@ static void updateLocalLayerState(int event_data, stm::stm_state_t crr_state) {
pm::LayoutState crr_layout_state;
#if 1
- if ((crr_state.car_element[stm::gStmCarElementNoRestrictionMode].is_changed)
+ if ((crr_state.car_element[stm::gStmCarElementNoRestrictionMode].changed)
&& (stm::gStmRestrictionModeStateNoOff == crr_state.car_element[stm::gStmCarElementNoRestrictionMode].state)) {
// If restriction mode is changed on -> off,
// restore state of restriction mode off
HMI_DEBUG("wm:lm", "Restriction mode is changed on -> off, so restore state of restriction mode off");
crr_layout_state = pm::g_prv_layers_car_stop[layer_name].layout_state;
#else
- if ((crr_state.car_element[gStmCarElementNoRunning].is_changed)
+ if ((crr_state.car_element[gStmCarElementNoRunning].changed)
&& (stm::gStmCarElementNoStop == crr_state.car_element[gStmCarElementNoRunning].state)) {
// If car state is changed car_run -> car_stop,
// restore state of car stop
@@ -454,7 +454,7 @@ static void updateLocalLayerState(int event_data, stm::stm_state_t crr_state) {
}
// Update current layout of this layer
pm::g_crr_layers[layer_name].layout_state = crr_layout_state;
- pm::g_crr_layers[layer_name].changed = crr_state.layer[layer_no].is_changed;
+ pm::g_crr_layers[layer_name].changed = crr_state.layer[layer_no].changed;
}
}
@@ -489,7 +489,7 @@ static void createOutputInformation(stm::stm_state_t crr_state, json_object **js
// "car_elements": [
// {
// "parking_brake": {
- // "is_changed": <bool>,
+ // "changed": <bool>,
// "state": <const char*>
// },
// ...
@@ -541,7 +541,7 @@ static void createOutputInformation(stm::stm_state_t crr_state, json_object **js
static int checkPolicyEntry(int event, uint64_t delay_ms, std::string role);
static void controlTimerEvent(stm::stm_state_t crr_state) {
- if (crr_state.car_element[stm::gStmCarElementNoRunning].is_changed) {
+ if (crr_state.car_element[stm::gStmCarElementNoRunning].changed) {
if (stm::gStmRunningNoRun == crr_state.car_element[stm::gStmCarElementNoRunning].state) {
// Set delay event(restriction mode on)
checkPolicyEntry(STM_EVT_NO_RESTRICTION_MODE_ON, 3000, "");
diff --git a/src/policy_manager/zipc/dummy_stm.c b/src/policy_manager/zipc/dummy_stm.c
index 660f8a1..146176f 100644
--- a/src/policy_manager/zipc/dummy_stm.c
+++ b/src/policy_manager/zipc/dummy_stm.c
@@ -214,17 +214,17 @@ int stmTransitionState(int event, stm_state_t* state) {
restriction_mode_state = g_prv_state.car_element[gStmCarElementNoRestrictionMode].state;
// Clear flags
- g_crr_state.layer[gStmLayerNoOnScreen].is_changed = STM_FALSE;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_FALSE;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_FALSE;
- g_crr_state.layer[gStmLayerNoHomescreen].is_changed = STM_FALSE;
- g_crr_state.car_element[gStmCarElementNoTransGear].is_changed = STM_FALSE;
- g_crr_state.car_element[gStmCarElementNoParkingBrake].is_changed = STM_FALSE;
- g_crr_state.car_element[gStmCarElementNoLightstatusBrake].is_changed = STM_FALSE;
- g_crr_state.car_element[gStmCarElementNoAccelPedal].is_changed = STM_FALSE;
- g_crr_state.car_element[gStmCarElementNoRunning].is_changed = STM_FALSE;
- g_crr_state.car_element[gStmCarElementNoLamp].is_changed = STM_FALSE;
- g_crr_state.car_element[gStmCarElementNoRestrictionMode].is_changed = STM_FALSE;
+ g_crr_state.layer[gStmLayerNoOnScreen].changed = STM_FALSE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_FALSE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_FALSE;
+ g_crr_state.layer[gStmLayerNoHomescreen].changed = STM_FALSE;
+ g_crr_state.car_element[gStmCarElementNoTransGear].changed = STM_FALSE;
+ g_crr_state.car_element[gStmCarElementNoParkingBrake].changed = STM_FALSE;
+ g_crr_state.car_element[gStmCarElementNoLightstatusBrake].changed = STM_FALSE;
+ g_crr_state.car_element[gStmCarElementNoAccelPedal].changed = STM_FALSE;
+ g_crr_state.car_element[gStmCarElementNoRunning].changed = STM_FALSE;
+ g_crr_state.car_element[gStmCarElementNoLamp].changed = STM_FALSE;
+ g_crr_state.car_element[gStmCarElementNoRestrictionMode].changed = STM_FALSE;
// Set car state
@@ -232,61 +232,61 @@ int stmTransitionState(int event, stm_state_t* state) {
case STM_EVT_NO_TRANS_GEAR_N:
if (gStmTransGearStateNoN != trans_gear_state) {
g_crr_state.car_element[gStmCarElementNoTransGear].state = gStmTransGearStateNoN;
- g_crr_state.car_element[gStmCarElementNoTransGear].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoTransGear].changed = STM_TRUE;
}
break;
case STM_EVT_NO_TRANS_GEAR_NOT_N:
if (gStmTransGearStateNoNotN != trans_gear_state) {
g_crr_state.car_element[gStmCarElementNoTransGear].state = gStmTransGearStateNoNotN;
- g_crr_state.car_element[gStmCarElementNoTransGear].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoTransGear].changed = STM_TRUE;
}
break;
case STM_EVT_NO_PARKING_BRAKE_OFF:
if (gStmParkingBrakeStateNoOff != parking_brake_state) {
g_crr_state.car_element[gStmCarElementNoParkingBrake].state = gStmParkingBrakeStateNoOff;
- g_crr_state.car_element[gStmCarElementNoParkingBrake].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoParkingBrake].changed = STM_TRUE;
}
break;
case STM_EVT_NO_PARKING_BRAKE_ON:
if (gStmParkingBrakeStateNoOn != parking_brake_state) {
g_crr_state.car_element[gStmCarElementNoParkingBrake].state = gStmParkingBrakeStateNoOn;
- g_crr_state.car_element[gStmCarElementNoParkingBrake].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoParkingBrake].changed = STM_TRUE;
}
break;
case STM_EVT_NO_ACCEL_PEDAL_OFF:
if (gStmAccelPedalStateNoOff != accel_pedal_state) {
g_crr_state.car_element[gStmCarElementNoAccelPedal].state = gStmAccelPedalStateNoOff;
- g_crr_state.car_element[gStmCarElementNoAccelPedal].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoAccelPedal].changed = STM_TRUE;
}
break;
case STM_EVT_NO_ACCEL_PEDAL_ON:
if (gStmAccelPedalStateNoOn != accel_pedal_state) {
g_crr_state.car_element[gStmCarElementNoAccelPedal].state = gStmAccelPedalStateNoOn;
- g_crr_state.car_element[gStmCarElementNoAccelPedal].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoAccelPedal].changed = STM_TRUE;
}
break;
case STM_EVT_NO_LAMP_OFF:
if (gStmLampStateNoOff != lamp_state) {
g_crr_state.car_element[gStmCarElementNoLamp].state = gStmLampStateNoOff;
- g_crr_state.car_element[gStmCarElementNoLamp].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoLamp].changed = STM_TRUE;
}
break;
case STM_EVT_NO_LAMP_ON:
if (gStmLampStateNoOn != lamp_state) {
g_crr_state.car_element[gStmCarElementNoLamp].state = gStmLampStateNoOn;
- g_crr_state.car_element[gStmCarElementNoLamp].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoLamp].changed = STM_TRUE;
}
break;
case STM_EVT_NO_LIGHTSTATUS_BRAKE_OFF:
if (gStmLightstatusBrakeStateNoOff != lightstatus_brake_state) {
g_crr_state.car_element[gStmCarElementNoLightstatusBrake].state = gStmLightstatusBrakeStateNoOff;
- g_crr_state.car_element[gStmCarElementNoLightstatusBrake].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoLightstatusBrake].changed = STM_TRUE;
}
break;
case STM_EVT_NO_LIGHTSTATUS_BRAKE_ON:
if (gStmLightstatusBrakeStateNoOn != lightstatus_brake_state) {
g_crr_state.car_element[gStmCarElementNoLightstatusBrake].state = gStmLightstatusBrakeStateNoOn;
- g_crr_state.car_element[gStmCarElementNoLightstatusBrake].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoLightstatusBrake].changed = STM_TRUE;
}
break;
default:
@@ -295,27 +295,27 @@ int stmTransitionState(int event, stm_state_t* state) {
}
#if 1 // FOR ALS
- if (g_crr_state.car_element[gStmCarElementNoLightstatusBrake].is_changed
- || g_crr_state.car_element[gStmCarElementNoAccelPedal].is_changed) {
+ if (g_crr_state.car_element[gStmCarElementNoLightstatusBrake].changed
+ || g_crr_state.car_element[gStmCarElementNoAccelPedal].changed) {
if ((gStmLightstatusBrakeStateNoOff == g_crr_state.car_element[gStmCarElementNoLightstatusBrake].state)
&& (gStmAccelPedalStateNoOn == g_crr_state.car_element[gStmCarElementNoAccelPedal].state)){
#else
- if (g_crr_state.car_element[gStmCarElementNoParkingBrake].is_changed
- || g_crr_state.car_element[gStmCarElementNoTransGear].is_changed) {
+ if (g_crr_state.car_element[gStmCarElementNoParkingBrake].changed
+ || g_crr_state.car_element[gStmCarElementNoTransGear].changed) {
if ((gStmParkingBrakeStateNoOff == g_crr_state.car_element[gStmCarElementNoParkingBrake].state)
&& (gStmTransGearStateNoNotN == g_crr_state.car_element[gStmCarElementNoTransGear].state)){
#endif
if (gStmRunningNoRun != car_state) {
// Car state is changed stop -> run
g_crr_state.car_element[gStmCarElementNoRunning].state = gStmRunningNoRun;
- g_crr_state.car_element[gStmCarElementNoRunning].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoRunning].changed = STM_TRUE;
}
}
else {
if (gStmRunningNoStop != car_state) {
// Car state is changed run -> stop
g_crr_state.car_element[gStmCarElementNoRunning].state = gStmRunningNoStop;
- g_crr_state.car_element[gStmCarElementNoRunning].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoRunning].changed = STM_TRUE;
}
}
}
@@ -327,19 +327,19 @@ int stmTransitionState(int event, stm_state_t* state) {
// Restriction mode is changed OFF -> ON
g_crr_state.car_element[gStmCarElementNoRestrictionMode].state = gStmRestrictionModeStateNoOn;
- g_crr_state.car_element[gStmCarElementNoRestrictionMode].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoRestrictionMode].changed = STM_TRUE;
// Update restriction layer
g_prv_restriction_state_car_stop = restriction_state;
g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoNone;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
// Update apps layer
g_prv_apps_state_car_stop = apps_state;
if ((STM_TRUE == g_map_is_activated)
&& (gStmLayoutNoSystem != apps_state)) {
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM1;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
}
}
else if ((STM_EVT_NO_RESTRICTION_MODE_OFF == event_no)
@@ -348,16 +348,16 @@ int stmTransitionState(int event, stm_state_t* state) {
// Restriction mode is changed ON -> OFF
g_crr_state.car_element[gStmCarElementNoRestrictionMode].state = gStmRestrictionModeStateNoOff;
- g_crr_state.car_element[gStmCarElementNoRestrictionMode].is_changed = STM_TRUE;
+ g_crr_state.car_element[gStmCarElementNoRestrictionMode].changed = STM_TRUE;
// Update restriction layer
g_crr_state.layer[gStmLayerNoRestriction].state = g_prv_restriction_state_car_stop;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
// Update apps layer
if (STM_TRUE == g_map_is_activated) {
g_crr_state.layer[gStmLayerNoApps].state = g_prv_apps_state_car_stop;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
}
}
@@ -369,12 +369,12 @@ int stmTransitionState(int event, stm_state_t* state) {
case STM_CTG_NO_HOMESCREEN:
// Homescreen layer
g_crr_state.layer[gStmLayerNoHomescreen].state = gStmLayoutNoHs;
- g_crr_state.layer[gStmLayerNoHomescreen].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoHomescreen].changed = STM_TRUE;
// Apps layer
if (gStmLayoutNoNone != apps_state) {
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoNone;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
}
break;
case STM_CTG_NO_MAP:
@@ -387,7 +387,7 @@ int stmTransitionState(int event, stm_state_t* state) {
break;
default:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMf;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
}
break;
@@ -399,11 +399,11 @@ int stmTransitionState(int event, stm_state_t* state) {
break;
case gStmLayoutNoS1:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM2;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
default:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM1;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
}
break;
case STM_ARA_NO_SPLIT_MAIN:
@@ -412,7 +412,7 @@ int stmTransitionState(int event, stm_state_t* state) {
case gStmLayoutNoS1:
case gStmLayoutNoS2:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
default:
// nop
@@ -431,7 +431,7 @@ int stmTransitionState(int event, stm_state_t* state) {
break;
default:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoG;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
}
break;
@@ -450,7 +450,7 @@ int stmTransitionState(int event, stm_state_t* state) {
break;
default:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSystem;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
}
break;
@@ -466,7 +466,7 @@ int stmTransitionState(int event, stm_state_t* state) {
switch (apps_state) {
case gStmLayoutNoM1:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM2;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
case gStmLayoutNoMf:
case gStmLayoutNoS1:
@@ -474,7 +474,7 @@ int stmTransitionState(int event, stm_state_t* state) {
break;
default:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS1;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
}
break;
@@ -483,11 +483,11 @@ int stmTransitionState(int event, stm_state_t* state) {
switch (apps_state) {
case gStmLayoutNoS1:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
case gStmLayoutNoS2:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
default:
// nop
@@ -499,19 +499,19 @@ int stmTransitionState(int event, stm_state_t* state) {
switch (apps_state) {
case gStmLayoutNoM1:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM2;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
case gStmLayoutNoM2:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM2;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
case gStmLayoutNoS1:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
case gStmLayoutNoS2:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
default:
// nop
@@ -543,7 +543,7 @@ int stmTransitionState(int event, stm_state_t* state) {
break;
default:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM1;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
}
break;
}
@@ -558,7 +558,7 @@ int stmTransitionState(int event, stm_state_t* state) {
break;
default:
g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSystem;
- g_crr_state.layer[gStmLayerNoApps].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE;
break;
}
break;
@@ -592,7 +592,7 @@ int stmTransitionState(int event, stm_state_t* state) {
case gStmLayoutNoNone:
if (g_crr_state.layer[gStmLayerNoApps].state == gStmLayoutNoS1) {
g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestriction;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
}
break;
default:
@@ -604,7 +604,7 @@ int stmTransitionState(int event, stm_state_t* state) {
switch (restriction_state) {
case gStmLayoutNoNone:
g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestrictionSplitMain;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
break;
default:
// nop
@@ -616,7 +616,7 @@ int stmTransitionState(int event, stm_state_t* state) {
case gStmLayoutNoNone:
if (g_crr_state.layer[gStmLayerNoApps].state == gStmLayoutNoM2) {
g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestrictionSplitSub;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
}
break;
default:
@@ -636,7 +636,7 @@ int stmTransitionState(int event, stm_state_t* state) {
case gStmLayoutNoRestrictionSplitMain:
case gStmLayoutNoRestrictionSplitSub:
g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoNone;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
break;
default:
// nop
@@ -644,27 +644,27 @@ int stmTransitionState(int event, stm_state_t* state) {
}
}
}
- else if (g_crr_state.layer[gStmLayerNoApps].is_changed) {
+ else if (g_crr_state.layer[gStmLayerNoApps].changed) {
if (gStmLightstatusBrakeStateNoOff == g_crr_state.car_element[gStmCarElementNoLightstatusBrake].state) {
if (gStmLayoutNoM2 == g_crr_state.layer[gStmLayerNoApps].state) {
g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestrictionSplitSub;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
}
else if (gStmLayoutNoS1 == g_crr_state.layer[gStmLayerNoApps].state) {
g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestriction;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
}
else {
if (gStmLayoutNoNone != g_crr_state.layer[gStmLayerNoRestriction].state) {
g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoNone;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
}
}
}
else {
if (gStmLayoutNoNone != g_crr_state.layer[gStmLayerNoRestriction].state) {
g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoNone;
- g_crr_state.layer[gStmLayerNoRestriction].is_changed = STM_TRUE;
+ g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE;
}
}
}
@@ -673,7 +673,7 @@ int stmTransitionState(int event, stm_state_t* state) {
memcpy(state, &g_crr_state, sizeof(g_crr_state));
if ((STM_FALSE == g_map_is_activated)
- && (STM_TRUE == g_crr_state.layer[gStmLayerNoApps].is_changed)
+ && (STM_TRUE == g_crr_state.layer[gStmLayerNoApps].changed)
&& ((gStmLayoutNoM1 == g_crr_state.layer[gStmLayerNoApps].state)
|| (gStmLayoutNoM2 == g_crr_state.layer[gStmLayerNoApps].state)
|| (gStmLayoutNoMf == g_crr_state.layer[gStmLayerNoApps].state))) {
diff --git a/src/policy_manager/zipc/dummy_stm.h b/src/policy_manager/zipc/dummy_stm.h
index 4c4a980..3c80310 100644
--- a/src/policy_manager/zipc/dummy_stm.h
+++ b/src/policy_manager/zipc/dummy_stm.h
@@ -24,31 +24,31 @@
#define STM_FALSE 0
// Event number
-#define STM_EVT_NO_ACTIVATE 0x02
-#define STM_EVT_NO_DEACTIVATE 0x03
-#define STM_EVT_NO_TRANS_GEAR_N 0x04
-#define STM_EVT_NO_TRANS_GEAR_NOT_N 0x05
-#define STM_EVT_NO_PARKING_BRAKE_OFF 0x06
-#define STM_EVT_NO_PARKING_BRAKE_ON 0x07
-#define STM_EVT_NO_ACCEL_PEDAL_OFF 0x08
-#define STM_EVT_NO_ACCEL_PEDAL_ON 0x09
-#define STM_EVT_NO_TIMER_EXPIRED 0x0A
-#define STM_EVT_NO_LAMP_OFF 0x0B
-#define STM_EVT_NO_LAMP_ON 0x0C
-#define STM_EVT_NO_LIGHTSTATUS_BRAKE_OFF 0x0D
-#define STM_EVT_NO_LIGHTSTATUS_BRAKE_ON 0x0E
-#define STM_EVT_NO_RESTRICTION_MODE_OFF 0x0F
-#define STM_EVT_NO_RESTRICTION_MODE_ON 0x10
+#define STM_EVT_NO_ACTIVATE 0x01
+#define STM_EVT_NO_DEACTIVATE 0x02
+#define STM_EVT_NO_TRANS_GEAR_N 0x03
+#define STM_EVT_NO_TRANS_GEAR_NOT_N 0x04
+#define STM_EVT_NO_PARKING_BRAKE_OFF 0x05
+#define STM_EVT_NO_PARKING_BRAKE_ON 0x06
+#define STM_EVT_NO_ACCEL_PEDAL_OFF 0x07
+#define STM_EVT_NO_ACCEL_PEDAL_ON 0x08
+#define STM_EVT_NO_TIMER_EXPIRED 0x09
+#define STM_EVT_NO_LAMP_OFF 0x0A
+#define STM_EVT_NO_LAMP_ON 0x0B
+#define STM_EVT_NO_LIGHTSTATUS_BRAKE_OFF 0x0C
+#define STM_EVT_NO_LIGHTSTATUS_BRAKE_ON 0x0D
+#define STM_EVT_NO_RESTRICTION_MODE_OFF 0x0E
+#define STM_EVT_NO_RESTRICTION_MODE_ON 0x0F
// Category number
-#define STM_CTG_NO_HOMESCREEN 0x0200
-#define STM_CTG_NO_MAP 0x0300
-#define STM_CTG_NO_GENERAL 0x0400
-#define STM_CTG_NO_SPLITABLE 0x0500
-#define STM_CTG_NO_POPUP 0x0600
-#define STM_CTG_NO_SYSTEM_ALERT 0x0700
-#define STM_CTG_NO_RESTRICTION 0x0800
-#define STM_CTG_NO_SYSTEM 0x0900
+#define STM_CTG_NO_HOMESCREEN 0x0100
+#define STM_CTG_NO_MAP 0x0200
+#define STM_CTG_NO_GENERAL 0x0300
+#define STM_CTG_NO_SPLITABLE 0x0400
+#define STM_CTG_NO_POPUP 0x0500
+#define STM_CTG_NO_SYSTEM_ALERT 0x0600
+#define STM_CTG_NO_RESTRICTION 0x0700
+#define STM_CTG_NO_SYSTEM 0x0800
// Area number
#define STM_ARA_NO_NONE 0x010000
@@ -215,7 +215,7 @@ extern const char** gStmCarStateNameList[];
// Struct for state
typedef struct stm_base_state_ {
- int is_changed;
+ int changed;
int state;
} stm_base_state;