summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 13:34:37 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 13:34:37 +0900
commit2ae6a2bf586d43255bdbe743b81e4cc370da7020 (patch)
tree8616cb23d2a578d346e9defe92f71a8cf832874b
parentc32108fe1bb212667de414db5fb34d61535b6684 (diff)
os-vehicleparameterlibrary branch 0.1sandbox/ToshikazuOhiwa/os-vehicleparameterlibrary
-rw-r--r--other_service.mk2
-rw-r--r--vehicle_parameter_library/Makefile.client2
-rw-r--r--vehicle_parameter_library/library/Makefile7
-rw-r--r--vehicle_parameter_library/library/include/VP_FuncCheck_CanRcv_private.h2
-rw-r--r--vehicle_parameter_library/library/include/other_service/VP_FuncCheck_CanRcv.h16
-rw-r--r--vehicle_parameter_library/library/include/other_service/VP_GetEnv.h12
-rw-r--r--vehicle_parameter_library/library/include/other_service/env_ext.h2
-rw-r--r--vehicle_parameter_library/library/include/other_service/env_vehicle.h113
-rw-r--r--vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary.h192
-rw-r--r--vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary_serial.h23
-rw-r--r--vehicle_parameter_library/library/include/other_service/vehicle_parameter_library.h2
-rw-r--r--vehicle_parameter_library/library/src/VP_FuncCheck_CanRcv.c46
-rw-r--r--vehicle_parameter_library/library/src/VP_GetEnv.c249
13 files changed, 358 insertions, 310 deletions
diff --git a/other_service.mk b/other_service.mk
index 908176bf..85a2f2c7 100644
--- a/other_service.mk
+++ b/other_service.mk
@@ -1,7 +1,7 @@
#############################################################
#
# Common Makefile for other_service
-# Copyright (C) 2017-2019 TOYOTA MOTOR CORPORATION
+# 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.
diff --git a/vehicle_parameter_library/Makefile.client b/vehicle_parameter_library/Makefile.client
index d81f4a0f..172da8f3 100644
--- a/vehicle_parameter_library/Makefile.client
+++ b/vehicle_parameter_library/Makefile.client
@@ -1,5 +1,5 @@
#
-# @copyright Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION.
+# @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.
diff --git a/vehicle_parameter_library/library/Makefile b/vehicle_parameter_library/library/Makefile
index dc06ae26..ae99cfa2 100644
--- a/vehicle_parameter_library/library/Makefile
+++ b/vehicle_parameter_library/library/Makefile
@@ -1,5 +1,5 @@
#
-# @copyright Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION.
+# @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.
@@ -24,8 +24,10 @@ INST_HEADERS = VP_GetEnv.h env_vehicle.h \
libvp_SRCS = VP_FuncCheck_CanRcv.c VP_GetEnv.c
-CPPFLAGS += -I./include
+LDLIBS += -Wl,--no-as-needed
+LDLIBS += -Wl,-Bdynamic -lns_backup
+CPPFLAGS += -I./include
CPPFLAGS += -Werror=implicit-function-declaration
CPPFLAGS += -Werror=format-security
CPPFLAGS += -Wconversion
@@ -33,5 +35,6 @@ CPPFLAGS += -Wpointer-to-int-cast
CPPFLAGS += -Wint-to-pointer-cast
CPPFLAGS += -Wpointer-arith
CPPFLAGS += -Wformat
+CPPFLAGS += -DVP_FUNCCHECK_CANRCV_CANRCV_ACTIVATE
include ../../other_service.mk
diff --git a/vehicle_parameter_library/library/include/VP_FuncCheck_CanRcv_private.h b/vehicle_parameter_library/library/include/VP_FuncCheck_CanRcv_private.h
index b020f5c2..193e54a8 100644
--- a/vehicle_parameter_library/library/include/VP_FuncCheck_CanRcv_private.h
+++ b/vehicle_parameter_library/library/include/VP_FuncCheck_CanRcv_private.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @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.
diff --git a/vehicle_parameter_library/library/include/other_service/VP_FuncCheck_CanRcv.h b/vehicle_parameter_library/library/include/other_service/VP_FuncCheck_CanRcv.h
index 9e9e73fc..17b45036 100644
--- a/vehicle_parameter_library/library/include/other_service/VP_FuncCheck_CanRcv.h
+++ b/vehicle_parameter_library/library/include/other_service/VP_FuncCheck_CanRcv.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @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.
@@ -48,12 +48,9 @@
/**
* @~english _CWORD76_
*/
-#define _CWORD76_ ((u_int8_t)2)
+#define _CWORD76_ ((u_int8_t)2)
-/**
-* @~english HD Data (Include traffic)
-*/
-#define VP_CANRCV__CWORD27_ ((u_int8_t)3) /**< _CWORD27_ */
+#define VP_CANRCV__CWORD27_ ((u_int8_t)3) /**< _CWORD27_ */
/**
* @~english WiFi HotSpot
*/
@@ -61,11 +58,15 @@
/**
* @~english standard driving rregulation of AREA1
*/
-#define AREA1_STD_TRAF_LIMIT ((u_int8_t)5)
+#define AREA1_STD_TRAF_LIMIT ((u_int8_t)5)
/**
* @~english HD Data (Include traffic)
*/
#define HD_DATA ((u_int8_t)6)
+/**
+* @~english WiFi 5G
+*/
+#define WIFI_5G ((u_int8_t)7)
/**
* @~english definiton of return value of API(VP_FuncCheck_CanRcv),which is used to get status of function implemention
@@ -98,6 +99,7 @@ extern "C" {
/// \~english @retval FUNCTION_CHECK_RESULT_OK: This function is available
/// \~english @retval FUNCTION_CHECK_RESULT_NG: This function is unavailable
/// \~english @retval FUNCTION_CHECK_RESULT_UNKNOWN: This function does not exist
+/// \~english @retval FUNCTION_CHECK_RESULT_OUT_OF_AREA1: reference out of Area1
/// \~english @par Prerequisite
/// None
/// \~english @par Change of internal state
diff --git a/vehicle_parameter_library/library/include/other_service/VP_GetEnv.h b/vehicle_parameter_library/library/include/other_service/VP_GetEnv.h
index 50696f75..69f6df23 100644
--- a/vehicle_parameter_library/library/include/other_service/VP_GetEnv.h
+++ b/vehicle_parameter_library/library/include/other_service/VP_GetEnv.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @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.
@@ -51,21 +51,11 @@
#define VEHICLEPARAMETERLIBRARY_AREA "VEHICLEPARAMETERLIBRARY_AREA"
/**
-* @~english grade diff
-*/
-#define VEHICLEPARAMETERLIBRARY_GRADE "VEHICLEPARAMETERLIBRARY_GRADE"
-
-/**
* @~english brand diff
*/
#define VEHICLEPARAMETERLIBRARY_BRAND "VEHICLEPARAMETERLIBRARY_BRAND"
/**
-* @~english board type
-*/
-#define VEHICLEPARAMETERLIBRARY_BOARD "VEHICLEPARAMETERLIBRARY_BOARD"
-
-/**
* @~english definition of _CWORD31_ vehicle parameter environment viarable
*/
#include <other_service/env_vehicle.h>
diff --git a/vehicle_parameter_library/library/include/other_service/env_ext.h b/vehicle_parameter_library/library/include/other_service/env_ext.h
index d28ef256..266e5106 100644
--- a/vehicle_parameter_library/library/include/other_service/env_ext.h
+++ b/vehicle_parameter_library/library/include/other_service/env_ext.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION.
+ * @copyright Copyright (c) 2019-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.
diff --git a/vehicle_parameter_library/library/include/other_service/env_vehicle.h b/vehicle_parameter_library/library/include/other_service/env_vehicle.h
index f3227f9f..a0eaaf98 100644
--- a/vehicle_parameter_library/library/include/other_service/env_vehicle.h
+++ b/vehicle_parameter_library/library/include/other_service/env_vehicle.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @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.
@@ -74,6 +74,10 @@
#define VP__CWORD31__THEME_COLOR "VP__CWORD31__theme_color"
/**
+* @~english _CWORD31_ vehicle design vehicle body
+*/
+#define VP__CWORD31__VEHICLE_BODY "VP__CWORD31__vehicle_body"
+/**
* @~english _CWORD31_ air conditioner on screen
*/
#define VP__CWORD31__AC_ONSCREEN "VP__CWORD31__AC_onscreen"
@@ -86,26 +90,10 @@
*/
#define VP__CWORD31__AC_SCREEN_HOME "VP__CWORD31__AC_screen_home"
/**
-* @~english _CWORD31_ air conditioner switch front temperature
-*/
-#define VP__CWORD31__AC_SWITCH_FRONT_TEMP "VP__CWORD31__AC_switch_front_temp"
-/**
-* @~english _CWORD31_ air conditioner display of outside temperature
-*/
-#define VP__CWORD31__AC_TEMP_DISP_OUTSIDE "VP__CWORD31__AC_temp_disp_outside"
-/**
-* @~english _CWORD31_ air conditioner setting of display
-*/
-#define VP__CWORD31__AC_TEMP_DISP_SETTING "VP__CWORD31__AC_temp_disp_setting"
-/**
* @~english _CWORD31_ air conditioner switch concierge
*/
#define VP__CWORD31__AC_SWITCH_CONCIERGE "VP__CWORD31__AC_switch_concierge"
/**
-* @~english S flow of _CWORD31_ air conditioner switch
-*/
-#define VP__CWORD31__AC_SWITCH_S_FLOW "VP__CWORD31__AC_switch_S_flow"
-/**
* @~english _CWORD31_ _CWORD113_
*/
#define VP__CWORD31___CWORD11_ "VP__CWORD31___CWORD11_"
@@ -126,14 +114,6 @@
*/
#define VP__CWORD31___CWORD11__BATTERY_POSITION "VP__CWORD31___CWORD11__battery_position"
/**
-* @~english _CWORD31_ battery direction of _CWORD113_
-*/
-#define VP__CWORD31___CWORD11__BATTERY_DIRECTION "VP__CWORD31___CWORD11__battery_direction"
-/**
-* @~english _CWORD31_ motor position of _CWORD113_
-*/
-#define VP__CWORD31___CWORD11__MOTOR_POSITION "VP__CWORD31___CWORD11__motor_position"
-/**
* @~english _CWORD31_ _CWORD112_ trip
*/
#define VP__CWORD31___CWORD9__TRIP "VP__CWORD31___CWORD9__trip"
@@ -162,6 +142,14 @@
*/
#define VP__CWORD31__FC_SCALE_HV "VP__CWORD31__FC_scale_HV"
/**
+* @~english _CWORD31_ fuel consumption display function scale of fuel consumption (ForFC)
+*/
+#define VP__CWORD31__FC_SCALE_FC "VP__CWORD31__FC_scale_FC"
+/**
+* @~english _CWORD31_ fuel consumption display function scale of fuel consumption (ForEV)
+*/
+#define VP__CWORD31__FC_SCALE_EV "VP__CWORD31__FC_scale_EV"
+/**
* @~english _CWORD31_ FC energy mark
*/
#define VP__CWORD31__FC_ENERGY_MARK "VP__CWORD31__FC_energy_mark"
@@ -178,10 +166,6 @@
*/
#define VP__CWORD31__DISPLAY_SETTING_SCREEN "VP__CWORD31__display_setting_screen"
/**
-* @~english _CWORD31_ VR HVAC control
-*/
-#define VP__CWORD31__VR_HVAC_CONTROL "VP__CWORD31__VR_HVAC_control"
-/**
* @~english _CWORD31_ clock type
*/
#define VP__CWORD31__CLOCK_TYPE "VP__CWORD31__clock_type"
@@ -214,31 +198,31 @@
*/
#define VP__CWORD31__DTV_ANTENNA "VP__CWORD31__DTV_antenna"
/**
-* @~english _CWORD31_ HF voice quality type
-*/
-#define VP__CWORD31__HF_VOICE_QUALITY_TYPE "VP__CWORD31__HF_voice_quality_type"
-/**
-* @~english _CWORD31_ tune knob push
+* @~english _CWORD31_ antenna info antenna available / unavailable
*/
-#define VP__CWORD31__TUNE_KNOB_PUSH "VP__CWORD31__tune_knob_push"
+#define VP__CWORD31__BEACON_ANTENNA "VP__CWORD31__beacon_antenna"
/**
-* @~english _CWORD31_ screen switch seek
+* @~english _CWORD31_ HF voice quality type
*/
-#define VP__CWORD31__SCREEN_SWITCH_SEEK "VP__CWORD31__screen_switch_seek"
+#define VP__CWORD31__HF_VOICE_QUALITY_TYPE "VP__CWORD31__HF_voice_quality_type"
/**
* @~english _CWORD31_ DAB antenna
*/
#define VP__CWORD31__DAB_ANTENNA "VP__CWORD31__DAB_antenna"
/**
+* @~english _CWORD31_ DAB screen display
+*/
+#define VP__CWORD31__DAB_SCREEN "VP__CWORD31__DAB_screen"
+/**
* @~english _CWORD31_ hard switch beep
*/
#define VP__CWORD31__HARD_SWITCH_BEEP "VP__CWORD31__hard_switch_beep"
/**
-* @~english _CWORD31_ screen switch beep
+* @~english _CWORD31_ beep while hard SW being pressed
*/
#define VP__CWORD31__SCREEN_SWITCH_BEEP "VP__CWORD31__screen_switch_beep"
/**
-* @~english _CWORD31_ steering switch type
+* @~english _CWORD31_ steering SW type of steering SW
*/
#define VP__CWORD31__STEERING_SWITCH_TYPE "VP__CWORD31__steering_switch_type"
/**
@@ -250,14 +234,6 @@
*/
#define VP__CWORD31__CLASS_CIRCUIT_MODE "VP__CWORD31__class_circuit_mode"
/**
-* @~english _CWORD31_ _CWORD67_ warning
-*/
-#define VP__CWORD31___CWORD67__WARNING "VP__CWORD31___CWORD67__warning"
-/**
-* @~english _CWORD31_ _CWORD67_ accelerator
-*/
-#define VP__CWORD31___CWORD67__ACCELERATOR "VP__CWORD31___CWORD67__accelerator"
-/**
* @~english _CWORD31_ panel microcomputer
*/
#define VP__CWORD31__PANEL_MICROCOMPUTER "VP__CWORD31__panel_microcomputer"
@@ -270,9 +246,9 @@
*/
#define VP__CWORD31__GPS_ANTENNA "VP__CWORD31__GPS_antenna"
/**
-* @~english _CWORD31_ illumination vehicle signal
+* @~english _CWORD31_ ILL- available / unavailable
*/
-#define VP__CWORD31__VEHICLE_SIGNAL_ILL "VP__CWORD31__vehicle_signal_ILL"
+#define VP__CWORD31__ILL_SIGNAL "VP__CWORD31__ILL_signal"
/**
* @~english _CWORD31_ switch trigger
*/
@@ -282,21 +258,17 @@
*/
#define VP__CWORD31__SENSITIVITY_LEVEL "VP__CWORD31__sensitivity_level"
/**
-* @~english _CWORD31_ invalidity term
+* @~english _CWORD31_ hadsfree bluetooth device name / WiFi AP name selection
*/
-#define VP__CWORD31__INVALIDITY_TERM "VP__CWORD31__invalidity_term"
+#define VP__CWORD31__BT_DEVICE_AP_NAME "VP__CWORD31__BT_device_AP_name"
/**
-* @~english _CWORD31_ thumbnail type
+* @~english _CWORD31_ Eco drive max vol setting in D4 model
*/
-#define VP__CWORD31__THUMBNAIL_TYPE "VP__CWORD31__thumbnail_type"
-/**
-* @~english _CWORD31_ BT device name
-*/
-#define VP__CWORD31__BT_DEVICE_NAME "VP__CWORD31__BT_device_name"
+#define VP__CWORD31__ECO_RUN_D4_VOL_MAX "VP__CWORD31__eco_run_D4_VOL_max"
/**
-* @~english _CWORD31_ eco drive max volume
+* @~english _CWORD31_ thumbnail type
*/
-#define VP__CWORD31__ECO_DRIVE_MAX_VOLUME "VP__CWORD31__eco_drive_max_volume"
+#define VP__CWORD31__THUMBNAIL_TYPE "VP__CWORD31__thumbnail_type"
/**
* @~english _CWORD31_ EOM function
*/
@@ -310,12 +282,25 @@
*/
#define VP__CWORD31__MICROPHONE_LOCATION "VP__CWORD31__Microphone_Location"
/**
+* @~english _CWORD31_ VR microphone parameter vehicle noize level
+*/
+#define VP__CWORD31__VEHICLE_NOIZE_LEVEL "VP__CWORD31__vehicle_noize_level"
+
+/**
* @~english _CWORD31_ wide band FM
*/
#define VP__CWORD31__WIDE_BAND_FM "VP__CWORD31__Wide_band_FM"
-
+/**
+* @~english _CWORD31_ map color
+*/
#define VP__CWORD31__MAP_COLOR "VP__CWORD31__map_color"
+/**
+* @~english _CWORD31_ cloud eco
+*/
#define VP__CWORD31__CLOUD_ECO "VP__CWORD31__cloud_eco"
+/**
+* @~english _CWORD31_ eg type
+*/
#define VP__CWORD31__EG_TYPE "VP__CWORD31__EG_type"
/**
@@ -335,17 +320,9 @@
*/
#define VP__CWORD31__CLASS_OPERATION "VP__CWORD31__class_operation"
/**
-* @~english _CWORD31_ opening interval
-*/
-#define VP__CWORD31__OPENING_INTERVAL "VP__CWORD31__opening_interval"
-/**
* @~english _CWORD31_ DES function
*/
#define VP__CWORD31__DES_FUNCTION "VP__CWORD31__DES_function"
-/**
-* @~english _CWORD31_ beep sound keys
-*/
-#define VP__CWORD31__BEEP_SOUND_KEYS "VP__CWORD31__beep_sound_keys"
/** @}*/ // end of vehicle_parameter_library
/** @}*/ // end of other_service
diff --git a/vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary.h b/vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary.h
index bbe49917..1c0020cd 100644
--- a/vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary.h
+++ b/vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @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.
@@ -39,10 +39,6 @@
*/
#define VP_VEHICLEPARAMETERLIBRARY_VERSION "VP_VEHICLEPARAMETERLIBRARY_version"
/**
-* @~english ID
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_VEHICLEPARAMETERLIBRARY_ID "VP_VEHICLEPARAMETERLIBRARY_vehicleparameterlibrary_ID"
-/**
* @~english maker ID
*/
#define VP_VEHICLEPARAMETERLIBRARY_MAKER_ID "VP_VEHICLEPARAMETERLIBRARY_maker_ID"
@@ -55,46 +51,22 @@
*/
#define VP_VEHICLEPARAMETERLIBRARY_GRADE "VP_VEHICLEPARAMETERLIBRARY_grade"
/**
-* @~english model ID
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_MODEL_ID "VP_VEHICLEPARAMETERLIBRARY_model_ID"
-/**
* @~english destination country code
*/
#define VP_VEHICLEPARAMETERLIBRARY_DEST_C_CODE "VP_VEHICLEPARAMETERLIBRARY_dest_c_code"
/**
-* @~english radio tuner number
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_RADIO_TUNER_NUM "VP_VEHICLEPARAMETERLIBRARY_radio_tuner_num"
-/**
-* @~english radio antenna number
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_RADIO_ANTENNA_NUM "VP_VEHICLEPARAMETERLIBRARY_radio_antenna_num"
-/**
* @~english DAB tuner number
*/
#define VP_VEHICLEPARAMETERLIBRARY_DAB_TUNER_NUM "VP_VEHICLEPARAMETERLIBRARY_DAB_tuner_num"
/**
-* @~english DAB sub antenna
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_DAB_SUB_ANTENNA "VP_VEHICLEPARAMETERLIBRARY_DAB_sub_antenna"
-/**
-* @~english _CWORD32_ DAB
+* @~english AM radio
*/
-#define VP_VEHICLEPARAMETERLIBRARY__CWORD32__DAB "VP_VEHICLEPARAMETERLIBRARY__CWORD32__DAB"
-/**
-* @~english cache radio
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_CACHERADIO "VP_VEHICLEPARAMETERLIBRARY_CacheRadio"
+#define VP_VEHICLEPARAMETERLIBRARY_AM_RADIO "VP_VEHICLEPARAMETERLIBRARY_AM_Radio"
/**
* @~english amp type
*/
#define VP_VEHICLEPARAMETERLIBRARY_AMP_TYPE "VP_VEHICLEPARAMETERLIBRARY_AMP_type"
/**
-* @~english op cooperation
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_OP_COOPERATION "VP_VEHICLEPARAMETERLIBRARY_OP_cooperation"
-/**
* @~english display
*/
#define VP_VEHICLEPARAMETERLIBRARY_DISPLAY "VP_VEHICLEPARAMETERLIBRARY_DISPLAY"
@@ -107,163 +79,57 @@
*/
#define VP_VEHICLEPARAMETERLIBRARY_DECK "VP_VEHICLEPARAMETERLIBRARY_DECK"
/**
-* @~english display mode
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_DEFAULT_MODE "VP_VEHICLEPARAMETERLIBRARY_default_mode"
-/**
-* @~english voice recognition tutorial
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_VOICE_RECOGNITION_TUTORIAL "VP_VEHICLEPARAMETERLIBRARY_VOICE_RECOGNITION_TUTORIAL"
-/**
-* @~english search
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_SEARCH "VP_VEHICLEPARAMETERLIBRARY_SEARCH"
-/**
-* @~english contact
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_CONTACT "VP_VEHICLEPARAMETERLIBRARY_CONTACT"
-/**
* @~english JP traffic information show
*/
#define VP_VEHICLEPARAMETERLIBRARY_JPTRAFFICINFO_SHOW "VP_VEHICLEPARAMETERLIBRARY_JPTrafficInfo_show"
/**
-* @~english information management
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_INFOMATION_MANAGEMENT "VP_VEHICLEPARAMETERLIBRARY_INFOMATION_MANAGEMENT"
-/**
-* @~english sub screen apps show
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_SUBSCREEN_APPS_SW "VP_VEHICLEPARAMETERLIBRARY_SUBSCREEN_APPS_SW"
-/**
-* @~english WIFI STA enable
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_WIFI_STA_ENABLE "VP_VEHICLEPARAMETERLIBRARY_WIFI_STA_ENABLE"
-/**
-* @~english WIFI AP enable
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_WIFI_AP_ENABLE "VP_VEHICLEPARAMETERLIBRARY_WIFI_AP_ENABLE"
-/**
-* @~english WIFI DIRECT enable
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_WIFI_DIRECT_ENABLE "VP_VEHICLEPARAMETERLIBRARY_WIFI_DIRECT_ENABLE"
-/**
-* @~english has GPS
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_HAS_GPS "VP_VEHICLEPARAMETERLIBRARY_HAS_GPS"
-/**
-* @~english default status is has _CWORD80_
-*/
-#define VP_VEHICLEPARAMETERLIBRARY__CWORD6_ "VP_VEHICLEPARAMETERLIBRARY__CWORD6_"
-/**
-* @~english phase
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_PHASE "VP_VEHICLEPARAMETERLIBRARY_PHASE"
-/**
-* @~english certification soft
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_CERTIFICATION_SOFT "VP_VEHICLEPARAMETERLIBRARY_CERTIFICATION_SOFT"
-/**
-* @~english _CWORD116_
-*/
-#define VP_VEHICLEPARAMETERLIBRARY__CWORD6_ "VP_VEHICLEPARAMETERLIBRARY__CWORD6_"
-/**
-* @~english voice tags
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_VOICE_TAGS "VP_VEHICLEPARAMETERLIBRARY_VOICE_TAGS"
-/**
-* @~english BT HFP
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_BT_2HFP "VP_VEHICLEPARAMETERLIBRARY_BT_2HFP"
-/**
* @~english connection server
*/
#define VP_VEHICLEPARAMETERLIBRARY_CONNECTION_SERVER "VP_VEHICLEPARAMETERLIBRARY_CONNECTION_SERVER"
/**
-* @~english frameworkunifiedlog ENC key type
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_VEHICLEPARAMETERLIBRARYLOG_ENC_KEYTYPE "VP_VEHICLEPARAMETERLIBRARY_VEHICLEPARAMETERLIBRARYLOG_ENC_KEYTYPE"
-/**
-* @~english destination vol 1
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_DES_VOL_1 "VP_VEHICLEPARAMETERLIBRARY_DES_VOL_1"
-/**
-* @~english destination vol 2
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_DES_VOL_2 "VP_VEHICLEPARAMETERLIBRARY_DES_VOL_2"
-/**
-* @~english destination vol 3
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_DES_VOL_3 "VP_VEHICLEPARAMETERLIBRARY_DES_VOL_3"
-/**
-* @~english destination vol 4
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_DES_VOL_4 "VP_VEHICLEPARAMETERLIBRARY_DES_VOL_4"
-/**
-* @~english destination vol 5
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_DES_VOL_5 "VP_VEHICLEPARAMETERLIBRARY_DES_VOL_5"
-/**
-* @~english destination vol 6
-*/
-#define VP_VEHICLEPARAMETERLIBRARY_DES_VOL_6 "VP_VEHICLEPARAMETERLIBRARY_DES_VOL_6"
-/**
-* @~english destination vol 7
+* @~english _CWORD40_ generation
*/
-#define VP_VEHICLEPARAMETERLIBRARY_DES_VOL_7 "VP_VEHICLEPARAMETERLIBRARY_DES_VOL_7"
+#define VP_VEHICLEPARAMETERLIBRARY__CWORD40_ "VP_VEHICLEPARAMETERLIBRARY__CWORD40_"
+
/**
-* @~english destination vol 8
+* @~english Radio reception level
*/
-#define VP_VEHICLEPARAMETERLIBRARY_DES_VOL_8 "VP_VEHICLEPARAMETERLIBRARY_DES_VOL_8"
+#define VP_VEHICLEPARAMETERLIBRARY_RADIO_LV_DIAG "VP_VEHICLEPARAMETERLIBRARY_RADIO_LV_DIAG"
+
/**
-* @~english steering type
+* @~english Navigation model
*/
-#define VP_VEHICLEPARAMETERLIBRARY_STEERING_TYPE "VP_VEHICLEPARAMETERLIBRARY_STEERING_TYPE"
+#define VP_VEHICLEPARAMETERLIBRARY_NAVI "VP_VEHICLEPARAMETERLIBRARY_NAVI"
+
/**
-* @~english move range of handwrite mode
+* @~english Map update service
*/
-#define VP_VEHICLEPARAMETERLIBRARY_HANDWRITEMODE_MOVERANGE "VP_VEHICLEPARAMETERLIBRARY_Handwritemode_moverange"
+#define VP_VEHICLEPARAMETERLIBRARY_MAP_UPDATE "VP_VEHICLEPARAMETERLIBRARY_MAP_UPDATE"
+
/**
-* @~english touchpad home show
+* @~english Headunit identification
*/
-#define VP_VEHICLEPARAMETERLIBRARY_TOUCHPAD_HOME_SW "VP_VEHICLEPARAMETERLIBRARY_TOUCHPAD_HOME_SW"
+#define VP_HEAD_UNIT_ID "VP_HEAD_UNIT_ID"
+
/**
-* @~english BT add device switch
+* @~english Serius raido
*/
-#define VP_VEHICLEPARAMETERLIBRARY_BT_ADD_DEVICE_SW "VP_VEHICLEPARAMETERLIBRARY_BT_ADD_DEVICE_SW"
+#define VP_VEHICLEPARAMETERLIBRARY_SDARS "VP_VEHICLEPARAMETERLIBRARY_SDARS"
+
/**
-* @~english AGL URL of Product for Repro.
+* @~english optional amp
*/
-#define VP_AGL_REPRO_SVR_PRODUCT_URL "VP_AGL_REPRO_SVR_PRODUCT_URL"
+#define VP_VEHICLEPARAMETERLIBRARY_ACCESSORY_AMP "VP_VEHICLEPARAMETERLIBRARY_ACCESSORY_AMP"
+
/**
-* @~english AGL URL of Try for Repro.
+* @~english Key trace
*/
-#define VP_AGL_REPRO_SVR_TRY_URL "VP_AGL_REPRO_SVR_TRY_URL"
+#define VP_VEHICLEPARAMETERLIBRARY_KEY_TRACE "VP_VEHICLEPARAMETERLIBRARY_KEY_TRACE"
+
/**
-* @~english AGL URL of Test for Repro.
+* @~english diatal TV
*/
-#define VP_AGL_REPRO_SVR_TEST_URL "VP_AGL_REPRO_SVR_TEST_URL"
-
-
-#define VP_VEHICLEPARAMETERLIBRARY__CWORD70__EU "VP_VEHICLEPARAMETERLIBRARY__CWORD70__EU"
-#define VP_VEHICLEPARAMETERLIBRARY__CWORD40_ "VP_VEHICLEPARAMETERLIBRARY__CWORD40_"
-#define VP_VEHICLEPARAMETERLIBRARY_DCM_EC "VP_VEHICLEPARAMETERLIBRARY_DCM_EC"
-#define VP_VEHICLEPARAMETERLIBRARY_EXTERNALDISPLAY_INTERACTION "VP_VEHICLEPARAMETERLIBRARY_ExternalDisplay_Interaction"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_FL_SP "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_FL_SP"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_FR_SP "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_FR_SP"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_RL_SP "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_RL_SP"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_RR_SP "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_RR_SP"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_FC_SP "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_FC_SP"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_ML_SP "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_ML_SP"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_MR_SP "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_MR_SP"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_NAVI_SP "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_NAVI_SP"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_HRDRIVER "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_HRDriver"
-#define VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_HRPASSENGER "VP_VEHICLEPARAMETERLIBRARY_DES_OUTPUT_HRPassenger"
-#define VP_VEHICLEPARAMETERLIBRARY_AUTOMATED_DRIVING "VP_VEHICLEPARAMETERLIBRARY_AUTOMATED_DRIVING"
-#define VP_VEHICLEPARAMETERLIBRARY_OPN_MOV "VP_VEHICLEPARAMETERLIBRARY_OPN_MOV"
-#define VP_VEHICLEPARAMETERLIBRARY__CWORD84__SDSLOT "VP_VEHICLEPARAMETERLIBRARY__CWORD84__SDslot"
-#define VP_VEHICLEPARAMETERLIBRARY_BTANT_TYPE "VP_VEHICLEPARAMETERLIBRARY_BTANT_TYPE"
-#define VP_VEHICLEPARAMETERLIBRARY_MIC_MFR "VP_VEHICLEPARAMETERLIBRARY_MIC_MFR"
-
+#define VP_VEHICLEPARAMETERLIBRARY_DTV "VP_VEHICLEPARAMETERLIBRARY_DTV"
/** @}*/ // end of vehicle_parameter_library
/** @}*/ // end of other_service
diff --git a/vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary_serial.h b/vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary_serial.h
index 8aeb048f..04ae10e6 100644
--- a/vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary_serial.h
+++ b/vehicle_parameter_library/library/include/other_service/env_vehicleparameterlibrary_serial.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @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.
@@ -35,30 +35,9 @@
*/
/**
- * \~english Enviroment variable serial
- */
-#define VP_VEHICLEPARAMETERLIBRARY_SER_SERIAL "VP_VEHICLEPARAMETERLIBRARY_SER_serial"
-
-/**
* \~english Enviroment variable _CWORD49__ID
*/
#define VP_VEHICLEPARAMETERLIBRARY_SER__CWORD49__ID "VP_VEHICLEPARAMETERLIBRARY_SER__CWORD49__ID"
-/**
- * \~english Enviroment variable HELPNET_ID
- */
-#define VP_VEHICLEPARAMETERLIBRARY_SER_HELPNET_ID "VP_VEHICLEPARAMETERLIBRARY_SER_HELPNET_ID"
-/**
- * \~english Enviroment variable map_update_ID
- */
-#define VP_VEHICLEPARAMETERLIBRARY_SER_MAP_UPDATE_ID "VP_VEHICLEPARAMETERLIBRARY_SER_map_update_ID"
-/**
- * \~english Enviroment variable ship_date
- */
-#define VP_VEHICLEPARAMETERLIBRARY_SER_SHIP_DATE "VP_VEHICLEPARAMETERLIBRARY_SER_ship_date"
-/**
- * \~english Enviroment variable FACTORY_ID
- */
-#define VP_VEHICLEPARAMETERLIBRARY_SER_FACTORY_ID "VP_VEHICLEPARAMETERLIBRARY_SER_FACTORY_ID"
/** @}*/ // end of vehicle_parameter_library
/** @}*/ // end of other_service
diff --git a/vehicle_parameter_library/library/include/other_service/vehicle_parameter_library.h b/vehicle_parameter_library/library/include/other_service/vehicle_parameter_library.h
index bf88080d..151bae5d 100644
--- a/vehicle_parameter_library/library/include/other_service/vehicle_parameter_library.h
+++ b/vehicle_parameter_library/library/include/other_service/vehicle_parameter_library.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION.
+ * @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.
diff --git a/vehicle_parameter_library/library/src/VP_FuncCheck_CanRcv.c b/vehicle_parameter_library/library/src/VP_FuncCheck_CanRcv.c
index 5f39609b..938ea7f3 100644
--- a/vehicle_parameter_library/library/src/VP_FuncCheck_CanRcv.c
+++ b/vehicle_parameter_library/library/src/VP_FuncCheck_CanRcv.c
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @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.
@@ -84,6 +84,7 @@ typedef enum VPFuncTableFuncTypeIndexTag{
VP_FUNC_TABLE_FUNC_TYPE_INDEX_WIFI_HOTSPOT , /**< Wifi Hotspot */
VP_FUNC_TABLE_FUNC_TYPE_INDEX_RESTRICT_FUNCTION , /**< Travel Restriction */
VP_FUNC_TABLE_FUNC_TYPE_INDEX_HD_DATA , /**< HD Data */
+ VP_FUNC_TABLE_FUNC_TYPE_INDEX_WIFI_5G , /**< Wifi 5G */
VP_FUNC_TABLE_FUNC_TYPE_INDEX_MAX /**< Number of choices (index maximum value: 1) */
} VP_FUNC_TABLE_FUNC_TYPE;
@@ -99,7 +100,7 @@ typedef enum CANFuncCheckSwitchTag{
/**< Definition of number of functions (required for initial definition of function availability table) */
-#define VP_FUNC_TABLE_FUNCTION_INDEX_MAX ((unsigned int)6)
+#define VP_FUNC_TABLE_FUNCTION_INDEX_MAX ((unsigned int)7)
/* ====================================================================== */
/* Macro definitions */
@@ -108,7 +109,7 @@ typedef enum CANFuncCheckSwitchTag{
#define RET_STD_LIB_STRING_STR_CMP_OK ((int)0) /**< The return value of the strncmp. this value is returned when matched. */
/* Default index values */
-#define DEFAULT_TABLE_INDEX_DEST (VP_FUNC_TABLE_DEST_INDEX_OTHER) /* Initial value changed by the specification which returns the setting of the belonging property when the undefined country code is gotten. */
+#define DEFAULT_TABLE_INDEX_DEST (VP_FUNC_TABLE_DEST_INDEX_A) /* Initial value changed by the specification which returns the setting of the belonging property when the undefined country code is gotten. */
#define DEFAULT_TABLE_INDEX_BRAND (VP_FUNC_TABLE_BRAND_A)
#define DEFAULT_TABLE_INDEX_GRADE_A (VP_FUNC_TABLE_GRADE_A1)
#define DEFAULT_TABLE_INDEX_GRADE_B (VP_FUNC_TABLE_GRADE_B1)
@@ -168,6 +169,7 @@ u_int8_t VP_FuncCheck_CanRcv( u_int8_t FunctionName )
case WIFI_HOTSPOT:
case AREA1_STD_TRAF_LIMIT:
case HD_DATA:
+ case WIFI_5G:
result = FUNCTION_CHECK_RESULT_OK;
break;
default:
@@ -212,7 +214,7 @@ u_int8_t VP_FuncCheck_CanRcv( u_int8_t FunctionName )
/* Get vehicle parameter */
VP_GetEnv( VEHICLEPARAMETERLIBRARY_AREA , &(VP_area[0]) );
- DEBUG_PRINTF( "AREA = %d; " , VP_area )
+ DEBUG_PRINTF( "AREA = %s; " , VP_area )
/* Get feature name index */
idx_func = getIndexOfFunc( FunctionName );
@@ -304,7 +306,7 @@ MT_STATIC u_int8_t getResult_CanJudge( unsigned int idx_func )
/* ====================================================================== */
/* Internal constant definition */
/* ====================================================================== */
- static const char MULTIPLE_COUNTRY_CODE_DESIG[] = "^[0-9](;[0-9]);{0,1}"; /**< Regular Expression String for Multiple Countries (Attributes) */
+ static const char MULTIPLE_COUNTRY_CODE_DESIG[] = "^[0-9]{3}(;[0-9]{3})+;{0,1}"; /**< Regular Expression String for Multiple Countries (Attributes). Make sure at least two country codes are stored / delimited */
/* ====================================================================== */
/* Internal table definitions */
@@ -372,15 +374,15 @@ MT_STATIC u_int8_t getResult_CanJudge( unsigned int idx_func )
*/
/* Destination A */
{
- // Unknown , XM Audio , _CWORD27_ , Wifi HotSpot , Travel Restriction , HD Data
- { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK }, // GRADE A1
- { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_NG } // GRADE A2
+ // Unknown , XM Audio , _CWORD27_ , Wifi HotSpot , Travel Restriction , HD Data Wifi 5G
+ { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK }, // GRADE A1
+ { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK } // GRADE A2
},
/* Destination B */
{
- { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK }, // GRADE A1
- { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_NG } // GRADE A2
+ { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK }, // GRADE A1
+ { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_NG } // GRADE A2
}
};
@@ -399,15 +401,15 @@ MT_STATIC u_int8_t getResult_CanJudge( unsigned int idx_func )
*/
/* Destination A */
{
- // Unknown , XM Audio , _CWORD27_ , Wifi HotSpot , Travel Restriction , HD Data
- { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK }, // GRADE B1
- { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_NG }, // GRADE B2
+ // Unknown , XM Audio , _CWORD27_ , Wifi HotSpot , Travel Restriction , HD Data , Wifi 5G
+ { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK }, // GRADE B1
+ { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK }, // GRADE B2
},
/* Detination B */
{
- { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK }, // GRADE B1
- { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_NG }, // GRADE B2
+ { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK }, // GRADE B1
+ { FUNCTION_CHECK_RESULT_UNKNOWN, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_OK, FUNCTION_CHECK_RESULT_NG, FUNCTION_CHECK_RESULT_NG }, // GRADE B2
}
};
@@ -557,7 +559,8 @@ MT_STATIC unsigned int getIndexOfFunc( u_int8_t func )
VP_FUNC_TABLE_FUNC_TYPE_INDEX_VP_CANRCV__CWORD27_ , //#define _CWORD27_ ((u_int8_t)3) /* _CWORD27_ */
VP_FUNC_TABLE_FUNC_TYPE_INDEX_WIFI_HOTSPOT , //#define WIFI_HOTSPOT ((u_int8_t)4) /* WiFi HotSpot */
VP_FUNC_TABLE_FUNC_TYPE_INDEX_RESTRICT_FUNCTION , //#define AREA1_STD_TRAF_LIMIT ((u_int8_t)5) /* Standard Travel Restriction of AREA1 */
- VP_FUNC_TABLE_FUNC_TYPE_INDEX_HD_DATA //#define HD_DATA ((u_int8_t)6) /* HD Data (Include traffic) */
+ VP_FUNC_TABLE_FUNC_TYPE_INDEX_HD_DATA , //#define HD_DATA ((u_int8_t)6) /* HD Data (Include traffic) */
+ VP_FUNC_TABLE_FUNC_TYPE_INDEX_WIFI_5G //#define WIFI_5G ((u_int8_t)7) /* WiFi 5G */
};
@@ -577,12 +580,13 @@ MT_STATIC unsigned int getIndexOfFunc( u_int8_t func )
/* Translation tables or the enumeration pair (VP_FUNC_TABLE_FUNC_TYPE) must also be modified when the definition value changes.
It may also be changed, added, or deleted following asserts as appropriate according to the defined value. */
- VP_DEBUG_STATIC_ASSERT( XM_AUDIO == VP_FUNC_TABLE_FUNC_TYPE_INDEX_XM_AUDIO )
+ VP_DEBUG_STATIC_ASSERT( XM_AUDIO == VP_FUNC_TABLE_FUNC_TYPE_INDEX_XM_AUDIO )
- VP_DEBUG_STATIC_ASSERT( VP_CANRCV__CWORD27_ == VP_FUNC_TABLE_FUNC_TYPE_INDEX_VP_CANRCV__CWORD27_ )
- VP_DEBUG_STATIC_ASSERT( WIFI_HOTSPOT == VP_FUNC_TABLE_FUNC_TYPE_INDEX_WIFI_HOTSPOT )
- VP_DEBUG_STATIC_ASSERT( AREA1_STD_TRAF_LIMIT == VP_FUNC_TABLE_FUNC_TYPE_INDEX_RESTRICT_FUNCTION )
- VP_DEBUG_STATIC_ASSERT( HD_DATA == VP_FUNC_TABLE_FUNC_TYPE_INDEX_HD_DATA )
+ VP_DEBUG_STATIC_ASSERT( VP_CANRCV__CWORD27_ == VP_FUNC_TABLE_FUNC_TYPE_INDEX_VP_CANRCV__CWORD27_ )
+ VP_DEBUG_STATIC_ASSERT( WIFI_HOTSPOT == VP_FUNC_TABLE_FUNC_TYPE_INDEX_WIFI_HOTSPOT )
+ VP_DEBUG_STATIC_ASSERT( AREA1_STD_TRAF_LIMIT == VP_FUNC_TABLE_FUNC_TYPE_INDEX_RESTRICT_FUNCTION )
+ VP_DEBUG_STATIC_ASSERT( HD_DATA == VP_FUNC_TABLE_FUNC_TYPE_INDEX_HD_DATA )
+ VP_DEBUG_STATIC_ASSERT( WIFI_5G == VP_FUNC_TABLE_FUNC_TYPE_INDEX_WIFI_5G )
/* ====================================================================== */
diff --git a/vehicle_parameter_library/library/src/VP_GetEnv.c b/vehicle_parameter_library/library/src/VP_GetEnv.c
index 54652501..c6cd6a79 100644
--- a/vehicle_parameter_library/library/src/VP_GetEnv.c
+++ b/vehicle_parameter_library/library/src/VP_GetEnv.c
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @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.
@@ -24,7 +24,230 @@
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
+#include <limits.h>
#include <other_service/VP_GetEnv.h>
+#include <native_service/ns_backup.h>
+#include <native_service/ns_backup_id.h>
+
+#include "VP_FuncCheck_CanRcv_private.h"
+
+// copy from vpsvc.h
+#define VPSVC_COUNTRY_MAX (0x10) // Maximal number of country codes for 1 destination
+
+// copy from VehicleSens_Vpupdate.cpp
+
+#define VP_VEHICLEPARAMETERLIBRARY_DEST_LEN_MIN 5 // At least 5 characters for 1 destination(e.g. "I:104")
+#define VP_VEHICLEPARAMETERLIBRARY_DEST_NUM_MAX (VP_MAX_LENGTH/VP_VEHICLEPARAMETERLIBRARY_DEST_LEN_MIN)
+#define DS_PACK2_LEN_MAX 2+1 // Max. digits of destination package 2(+\0)
+
+typedef struct {
+ char dest_bdb[2]; // Destination symbol
+ char ds_pack2[DS_PACK2_LEN_MAX]; // Destination package 2
+ uint8_t coutry_num; // Number of Country Codes
+ uint16_t country_no[VPSVC_COUNTRY_MAX]; // Country Code
+} VP_VEHICLEPARAMETERLIBRARY_DEST_C_CODE_t;
+
+VP_VEHICLEPARAMETERLIBRARY_DEST_C_CODE_t g_vp_vehicleparameterlibrary_dest[VP_VEHICLEPARAMETERLIBRARY_DEST_NUM_MAX]; // Destination information get from environment variables
+static uint32_t g_vp_vehicleparameterlibrary_dest_num; // Number of destination information get from environment variables
+
+static void AnalyzeVpVehicleparameterlibraryDestEnv(void) {
+ char p_env_variable[VP_MAX_LENGTH] = {};
+ char dest_buf[VP_MAX_LENGTH] = { 0 }; // Destination data for environment variables
+ char *c_code_ascii; // Country Code(ASCII)
+ char *dest_bdb_buf; // Destination symbol
+ uint32_t dest_num = 0; // Number of destinations
+ int country_num = 0; // Number of Country Codes per Destination
+ char *token1, *saveptr1; // Destination break token
+ char *token2, *saveptr2; // Delimiter tokens in each destination
+ VP_VEHICLEPARAMETERLIBRARY_DEST_C_CODE_t *p_dest;
+ uint16_t *p_country;
+
+ g_vp_vehicleparameterlibrary_dest_num = 0;
+ memset(&g_vp_vehicleparameterlibrary_dest, 0x00, sizeof(VP_VEHICLEPARAMETERLIBRARY_DEST_C_CODE_t));
+
+ // Get environment variables
+ VP_GetEnv(VP_VEHICLEPARAMETERLIBRARY_DEST_C_CODE, p_env_variable);
+ if (0 == strncmp(p_env_variable, "", VP_MAX_LENGTH)) {
+ DEBUG_PRINT("VP_VEHICLEPARAMETERLIBRARY_DEST_C_CODE is NULL");
+ return;
+ }
+
+ DEBUG_PRINTF("VP_VEHICLEPARAMETERLIBRARY_DEST_C_CODE=[%s]\n", p_env_variable);
+
+ // Begin analysis First, separate with ","
+ token1 = strtok_r(p_env_variable, ",", &saveptr1);
+ while (token1 != NULL) {
+ snprintf(dest_buf, VP_MAX_LENGTH, "%s", token1);
+ DEBUG_PRINTF("dest_buf\t[%s]", dest_buf);
+ p_dest = &g_vp_vehicleparameterlibrary_dest[dest_num];
+
+ // Get the country code 000-999
+ country_num = 0;
+ c_code_ascii = strchr(dest_buf, (int32_t)(':'));
+ if (c_code_ascii != NULL) {
+ c_code_ascii += 1;
+ token2 = strtok_r(c_code_ascii, "/", &saveptr2);
+ while (token2 != NULL) {
+ p_country = &(p_dest->country_no[country_num]);
+ errno = 0;
+ long int val = strtol(token2, (char **)NULL, 10);
+ if ((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN))
+ || (errno != 0 && val == 0)) {
+ DEBUG_PRINTF("country No format error [%s]", token2);
+ return;
+ }
+ *p_country = (uint16_t)val;
+
+ if (country_num >= VPSVC_COUNTRY_MAX) {
+ DEBUG_PRINTF("country num over [%s]", token2);
+ return;
+ }
+ country_num++;
+ token2 = strtok_r(NULL, "/", &saveptr2);
+ }
+ p_dest->coutry_num = (uint8_t)(country_num);
+ DEBUG_PRINTF("country_num\t[%d]", country_num);
+ }
+
+ // Get destination symbol (may not be available)
+ dest_bdb_buf = strchr(dest_buf, (int32_t)('&'));
+ if (dest_bdb_buf != NULL) {
+ p_dest->dest_bdb[0] = *(dest_bdb_buf + 1);
+ DEBUG_PRINTF("dest_bdb\t[%s]", p_dest->dest_bdb);
+ } else {
+ DEBUG_PRINT("dest_bdb is noting");
+ }
+
+ // Get destination packages
+ token2 = strtok_r(dest_buf, "&:", &saveptr2);
+ snprintf(p_dest->ds_pack2, DS_PACK2_LEN_MAX, "%s", token2);
+ DEBUG_PRINTF("ds_pack2\t[%s]\n", p_dest->ds_pack2);
+
+ dest_num++;
+ token1 = strtok_r(NULL, ",", &saveptr1);
+ }
+
+ g_vp_vehicleparameterlibrary_dest_num = dest_num;
+}
+
+// based VP_DspackToCountryCode
+// dest [in] Destination codes read from the bkup_manager
+// country_code [out] Country code string, separated by ";" for multi-country codes
+static BOOL VP_DspackToCountryCode(uint8_t* dest, char *country_code) {
+ BOOL ret = FALSE;
+ VP_VEHICLEPARAMETERLIBRARY_DEST_C_CODE_t *p;
+ typedef struct {
+ char dest_bdb[2]; // Destination symbol
+ char ds_pack2[DS_PACK2_LEN_MAX]; // Destination package 2
+ } VEHICLE_CAN_DEST_t;
+ VEHICLE_CAN_DEST_t can_dest = {};
+
+ AnalyzeVpVehicleparameterlibraryDestEnv();
+
+ // Setting CAN data
+ can_dest.dest_bdb[0] = (int8_t)dest[0]; // Get destination symbol
+
+ if (isalpha(dest[2]) != 0) { // Get destination packages
+ can_dest.ds_pack2[0] = (int8_t)dest[2];
+ } else {
+ DEBUG_PRINTF("ds_pack2 is neither Alpha character[%c]", (int32_t)dest[2]);
+ return ret;
+ }
+
+ // Comparison with vehicle parameter
+ for (uint32_t i = 0; i < g_vp_vehicleparameterlibrary_dest_num; i++) {
+ p = &g_vp_vehicleparameterlibrary_dest[i];
+ // Determination of destination packages
+ if (strncmp(p->ds_pack2, can_dest.ds_pack2, sizeof(can_dest.ds_pack2)) != 0) {
+ continue;
+ }
+
+ // Determination of destination symbol
+ if (p->dest_bdb[0] == 0) {
+ ret = TRUE; // When the destination code judgment is not required
+ break;
+ }
+
+ if (strncmp(p->dest_bdb, can_dest.dest_bdb, sizeof(can_dest.dest_bdb)) == 0) {
+ ret = TRUE;
+ break;
+ }
+ }
+
+ // Returned as a country code string
+ if (ret == TRUE) {
+ snprintf(country_code, VP_MAX_LENGTH, "%03d", p->country_no[0]);
+ for (uint32_t i = 1; i < p->coutry_num; i++) {
+ char buf[VP_MAX_LENGTH] = {};
+ snprintf(buf, VP_MAX_LENGTH, "%s;%03d", country_code, p->country_no[i]);
+ strncpy(country_code, buf, VP_MAX_LENGTH);
+ }
+ }
+ return ret;
+}
+// end of copy from VehicleSens_Vpupdate.cpp
+
+// copy from vehicle unit
+typedef struct {
+ uint8_t uc_hv; /* hv */
+ uint8_t uc_hv_status; /* hv status */
+ uint8_t uc_2wd4wd; /* 2wd4wd */
+ uint8_t uc_2wd4wd_status; /* 2wd4wd status */
+ uint8_t uc_dest[3]; /* Destination */
+ uint8_t uc_dest_status; /* Destination status */
+ uint8_t uc_stwheel; /* STEERING_WHEEL */
+ uint8_t uc_stwheel_status; /* STEERING_WHEEL status */
+ uint8_t uc_reserve[6]; /* Reserve */
+} VEHICLESENS_NON_VOLATILE_DATA;
+
+/* ====================================================================== */
+/**
+ * @fn
+ * void VP_GetVp_CWORD31_Destination(char *pEnvBuff)
+ * @breaf Get environment variables
+ * @param[out] (pEnvBuff) Start address of the area to store the get environment variable value
+ * @return None
+ * @detail Read and analyze D_BK_ID_VEHICLE_STABLE_DATA from BackupManager.
+ * The country code string is stored in the argument and returned.
+ */
+/* ====================================================================== */
+static void VP_GetVp_CWORD31_Destination(char *pEnvBuff)
+{
+ int32_t ret_api = BKUP_RET_NORMAL;
+ VEHICLESENS_NON_VOLATILE_DATA pstback_up_data;
+ memset(&pstback_up_data, 0x00, sizeof(VEHICLESENS_NON_VOLATILE_DATA));
+ char env_string[VP_MAX_LENGTH];
+
+ VP_GetEnv(VP__CWORD31__TELEMATICS_FUNCTION, env_string);
+
+ if ('\0' == env_string[0]) {
+ *pEnvBuff = '\0';
+ return;
+ } else {
+ // read from backup
+ ret_api = Backup_DataRd(D_BK_ID_VEHICLE_STABLE_DATA,
+ 0,
+ &pstback_up_data,
+ sizeof(VEHICLESENS_NON_VOLATILE_DATA));
+ if (BKUP_RET_NORMAL != ret_api) {
+ *pEnvBuff = '\0';
+ return;
+ }
+ }
+
+ if (0 == strncmp(env_string, "country_ID", strlen("country_ID"))) {
+ uint32_t country_code = 0;
+ country_code += (pstback_up_data.uc_dest[1]); // countory_code 3rd and 2nd digit
+ country_code = (country_code << 4); // shift
+ country_code += (pstback_up_data.uc_dest[2] >> 4); // countory_code 1st digit
+ snprintf(pEnvBuff, VP_MAX_LENGTH, "%x", country_code);
+ } else if(0 == strncmp(env_string, "CAN_judge", strlen("CAN_judge"))) {
+ VP_DspackToCountryCode(pstback_up_data.uc_dest, pEnvBuff);
+ } else {
+ *pEnvBuff = '\0';
+ }
+}
/* ====================================================================== */
/**
@@ -39,21 +262,25 @@
/* ====================================================================== */
void VP_GetEnv(const char *pEnvStr, char *pEnvBuff )
{
- char *env_string;
+ const char *env_string;
size_t length;
if ((pEnvStr != NULL) && (pEnvBuff != NULL)) {
- env_string = getenv(pEnvStr);
-
- if (env_string == NULL) {
- *pEnvBuff = '\0';
+ if (0 == strncmp(pEnvStr, VP__CWORD31__DESTINATION, strlen(VP__CWORD31__DESTINATION))) {
+ VP_GetVp_CWORD31_Destination(pEnvBuff);
} else {
- length = strlen( env_string );
- if (length < VP_MAX_LENGTH) {
- (void)strcpy(pEnvBuff, env_string);
+ env_string = getenv(pEnvStr);
+
+ if (env_string == NULL) {
+ *pEnvBuff = '\0';
} else {
- (void)strncpy(pEnvBuff, env_string, (VP_MAX_LENGTH - 1));
- pEnvBuff[ VP_MAX_LENGTH - 1 ] = '\0';
+ length = strlen( env_string );
+ if (length < ((size_t)VP_MAX_LENGTH)) {
+ (void)strcpy(pEnvBuff, env_string);
+ } else {
+ (void)strncpy(pEnvBuff, env_string, (VP_MAX_LENGTH - 1));
+ pEnvBuff[ VP_MAX_LENGTH - 1 ] = '\0';
+ }
}
}
} else {