summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_regular
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2018-04-25 15:17:36 -0400
committerjacobkeeler <jacob.keeler@livioradio.com>2018-04-26 13:33:09 -0400
commitffab62e1f509d5aeb44436a705146c1ee4f5f77a (patch)
tree27eb7177a5994a3653ad977fdbabb6d3c06aefa8 /src/components/policy/policy_regular
parentdf9b67026d90f0f9cdf04bec7dd3c7666a25db87 (diff)
downloadsdl_core-ffab62e1f509d5aeb44436a705146c1ee4f5f77a.tar.gz
Add `engineOilLife` vehicle datafeature/engine_oil_life
Diffstat (limited to 'src/components/policy/policy_regular')
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/enums.h1
-rw-r--r--src/components/policy/policy_regular/policy_table_interface_ext.xml1
-rw-r--r--src/components/policy/policy_regular/src/policy_table/enums.cc7
-rw-r--r--src/components/policy/policy_regular/test/PTU.json4
-rw-r--r--src/components/policy/policy_regular/test/PTU2.json4
-rw-r--r--src/components/policy/policy_regular/test/PTU3.json4
-rw-r--r--src/components/policy/policy_regular/test/PTU4.json4
-rw-r--r--src/components/policy/policy_regular/test/ptu2_requestType.json4
-rw-r--r--src/components/policy/policy_regular/test/ptu_requestType.json4
-rw-r--r--src/components/policy/policy_regular/test/sdl_preloaded_pt.json4
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_first_update.json4
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_second_update.json4
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_update.json4
-rw-r--r--src/components/policy/policy_regular/test/valid_sdl_pt_update.json4
14 files changed, 53 insertions, 0 deletions
diff --git a/src/components/policy/policy_regular/include/policy/policy_table/enums.h b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
index 4eb35d2aa4..d01e2407d8 100644
--- a/src/components/policy/policy_regular/include/policy/policy_table/enums.h
+++ b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
@@ -80,6 +80,7 @@ enum Parameter {
P_PRNDL,
P_RPM,
P_STEERINGWHEELANGLE,
+ P_ENGINEOILLIFE,
P_MYKEY,
P_AIRBAGSTATUS,
P_BODYINFORMATION,
diff --git a/src/components/policy/policy_regular/policy_table_interface_ext.xml b/src/components/policy/policy_regular/policy_table_interface_ext.xml
index 468eec2b0b..e619b79efc 100644
--- a/src/components/policy/policy_regular/policy_table_interface_ext.xml
+++ b/src/components/policy/policy_regular/policy_table_interface_ext.xml
@@ -40,6 +40,7 @@
<element name="prndl" />
<element name="rpm" />
<element name="steeringWheelAngle" />
+ <element name="engineOilLife" />
<element name="myKey" />
<element name="airbagStatus" />
<element name="bodyInformation" />
diff --git a/src/components/policy/policy_regular/src/policy_table/enums.cc b/src/components/policy/policy_regular/src/policy_table/enums.cc
index 34d12420d8..b3205c0cb5 100644
--- a/src/components/policy/policy_regular/src/policy_table/enums.cc
+++ b/src/components/policy/policy_regular/src/policy_table/enums.cc
@@ -147,6 +147,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_STEERINGWHEELANGLE:
return true;
+ case P_ENGINEOILLIFE:
+ return true;
case P_MYKEY:
return true;
case P_AIRBAGSTATUS:
@@ -205,6 +207,8 @@ const char* EnumToJsonString(Parameter val) {
return "rpm";
case P_STEERINGWHEELANGLE:
return "steeringWheelAngle";
+ case P_ENGINEOILLIFE:
+ return "engineOilLife";
case P_MYKEY:
return "myKey";
case P_AIRBAGSTATUS:
@@ -281,6 +285,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("steeringWheelAngle" == literal) {
*result = P_STEERINGWHEELANGLE;
return true;
+ } else if ("engineOilLife" == literal) {
+ *result = P_ENGINEOILLIFE;
+ return true;
} else if ("myKey" == literal) {
*result = P_MYKEY;
return true;
diff --git a/src/components/policy/policy_regular/test/PTU.json b/src/components/policy/policy_regular/test/PTU.json
index d9f70426d1..7881876d45 100644
--- a/src/components/policy/policy_regular/test/PTU.json
+++ b/src/components/policy/policy_regular/test/PTU.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -366,6 +367,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -383,6 +385,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -399,6 +402,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/PTU2.json b/src/components/policy/policy_regular/test/PTU2.json
index b4c3c0624c..73a90092a1 100644
--- a/src/components/policy/policy_regular/test/PTU2.json
+++ b/src/components/policy/policy_regular/test/PTU2.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -366,6 +367,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -383,6 +385,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -399,6 +402,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/PTU3.json b/src/components/policy/policy_regular/test/PTU3.json
index 6309bd9cfd..57b829ea55 100644
--- a/src/components/policy/policy_regular/test/PTU3.json
+++ b/src/components/policy/policy_regular/test/PTU3.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -366,6 +367,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -383,6 +385,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -399,6 +402,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/PTU4.json b/src/components/policy/policy_regular/test/PTU4.json
index 651a4cb2ef..271f9b5a79 100644
--- a/src/components/policy/policy_regular/test/PTU4.json
+++ b/src/components/policy/policy_regular/test/PTU4.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -366,6 +367,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -383,6 +385,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -399,6 +402,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/ptu2_requestType.json b/src/components/policy/policy_regular/test/ptu2_requestType.json
index e25095bb9f..431f680bbc 100644
--- a/src/components/policy/policy_regular/test/ptu2_requestType.json
+++ b/src/components/policy/policy_regular/test/ptu2_requestType.json
@@ -485,6 +485,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -506,6 +507,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -547,6 +550,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/ptu_requestType.json b/src/components/policy/policy_regular/test/ptu_requestType.json
index c5aa6f0a6c..9de649f2b5 100644
--- a/src/components/policy/policy_regular/test/ptu_requestType.json
+++ b/src/components/policy/policy_regular/test/ptu_requestType.json
@@ -485,6 +485,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -506,6 +507,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -547,6 +550,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json b/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
index 10894516cf..856e2edeb3 100644
--- a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
+++ b/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -366,6 +367,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -383,6 +385,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -399,6 +402,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/sdl_pt_first_update.json b/src/components/policy/policy_regular/test/sdl_pt_first_update.json
index ac2b18ab6f..74fa119c53 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_first_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_first_update.json
@@ -1609,6 +1609,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1624,6 +1625,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1639,6 +1641,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1653,6 +1656,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/sdl_pt_second_update.json b/src/components/policy/policy_regular/test/sdl_pt_second_update.json
index 230ad1fa4f..c0f3069a6e 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_second_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_second_update.json
@@ -1609,6 +1609,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1624,6 +1625,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1639,6 +1641,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1653,6 +1656,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/sdl_pt_update.json b/src/components/policy/policy_regular/test/sdl_pt_update.json
index f890e8e5ae..f5f071e9df 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_update.json
@@ -1587,6 +1587,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1602,6 +1603,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1617,6 +1619,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1631,6 +1634,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/valid_sdl_pt_update.json b/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
index c384ea73e2..f06fd99a59 100644
--- a/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
+++ b/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
@@ -1585,6 +1585,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1600,6 +1601,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1615,6 +1617,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1629,6 +1632,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",