summaryrefslogtreecommitdiffstats
path: root/vehicleservice/positioning/server/include
diff options
context:
space:
mode:
Diffstat (limited to 'vehicleservice/positioning/server/include')
-rw-r--r--vehicleservice/positioning/server/include/Sensor/ClockDataMng.h100
-rw-r--r--vehicleservice/positioning/server/include/Sensor/ClockGPS_Process_Proto.h37
-rw-r--r--vehicleservice/positioning/server/include/Sensor/ClockUtility.h46
-rw-r--r--vehicleservice/positioning/server/include/Sensor/ClockUtility_private.h49
-rw-r--r--vehicleservice/positioning/server/include/Sensor/DeadReckoning_Common.h84
-rw-r--r--vehicleservice/positioning/server/include/Sensor/DeadReckoning_DataMaster.h127
-rw-r--r--vehicleservice/positioning/server/include/Sensor/DeadReckoning_DeliveryCtrl.h137
-rw-r--r--vehicleservice/positioning/server/include/Sensor/DeadReckoning_main.h146
-rw-r--r--vehicleservice/positioning/server/include/Sensor/GpsInt.h68
-rw-r--r--vehicleservice/positioning/server/include/Sensor/SensorLog.h114
-rw-r--r--vehicleservice/positioning/server/include/Sensor/VehicleSens_Common.h131
-rw-r--r--vehicleservice/positioning/server/include/Sensor/VehicleSens_DataMaster.h1091
-rw-r--r--vehicleservice/positioning/server/include/Sensor/VehicleSens_DeliveryCtrl.h253
-rw-r--r--vehicleservice/positioning/server/include/Sensor/VehicleSens_FromAccess.h69
-rw-r--r--vehicleservice/positioning/server/include/Sensor/VehicleSens_SelectionItemList.h116
-rw-r--r--vehicleservice/positioning/server/include/Sensor/VehicleSens_SharedMemory.h48
-rw-r--r--vehicleservice/positioning/server/include/Sensor/VehicleSens_Thread.h185
-rw-r--r--vehicleservice/positioning/server/include/Sensor/VehicleSensor_Thread.h33
-rw-r--r--vehicleservice/positioning/server/include/Sensor/VehicleUtility.h128
-rw-r--r--vehicleservice/positioning/server/include/ServiceInterface/BackupMgrIf.h65
-rw-r--r--vehicleservice/positioning/server/include/ServiceInterface/ClockIf.h61
-rw-r--r--vehicleservice/positioning/server/include/ServiceInterface/CommUsbIf.h64
-rw-r--r--vehicleservice/positioning/server/include/ServiceInterface/DevDetectSrvIf.h69
-rw-r--r--vehicleservice/positioning/server/include/ServiceInterface/DiagSrvIf.h55
-rw-r--r--vehicleservice/positioning/server/include/ServiceInterface/PSMShadowIf.h58
-rw-r--r--vehicleservice/positioning/server/include/ServiceInterface/VehicleIf.h82
-rw-r--r--vehicleservice/positioning/server/include/ServiceInterface/ps_psmshadow_notifications.h62
-rw-r--r--vehicleservice/positioning/server/include/ServiceInterface/ps_version.h45
-rw-r--r--vehicleservice/positioning/server/include/nsfw/positioning_common.h90
-rw-r--r--vehicleservice/positioning/server/include/nsfw/vehicle_version.h29
30 files changed, 3642 insertions, 0 deletions
diff --git a/vehicleservice/positioning/server/include/Sensor/ClockDataMng.h b/vehicleservice/positioning/server/include/Sensor/ClockDataMng.h
new file mode 100644
index 00000000..69a96c20
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/ClockDataMng.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.
+ */
+
+/******************************************************************************
+ * File name : ClockDataMng.h
+ * System name : PastModel002
+ * Subsystem name : Time-related processing
+ ******************************************************************************/
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKDATAMNG_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKDATAMNG_H_
+
+#include <vehicle_service/positioning_base_library.h>
+
+
+#include "positioning_hal.h"
+#include "CanInput_API.h"
+#include "Sensor_API.h"
+
+/********************************************************************************
+* Macro definitions *
+*********************************************************************************/
+#define CLOCKDATAMNG_SECONDS_PAR_WEEK (7 * 24 * 60 * 60)
+#define CLOCKDATAMNG_CNV_WEEK2SEC(WEEK) ((WEEK)* CLOCKDATAMNG_SECONDS_PAR_WEEK)
+
+/* [PastModel002 Specifications]Time difference tolerance(plus or minus 512 week or less,GPS TIME range from 0 to 1023 week) */
+#define CLOCKDATAMNG_TIME_DIFF_LIMIT_UPPER (512 * CLOCKDATAMNG_SECONDS_PAR_WEEK)
+#define CLOCKDATAMNG_TIME_DIFF_LIMIT_LOWER (-512 * CLOCKDATAMNG_SECONDS_PAR_WEEK)
+
+/* [PastModel002 Specifications]Time difference addition value(+1024week,GPS TIME range from 0 to 1023 week) */
+#define CLOCKDATAMNG_TIME_DIFF_ADD_VALUE (CLOCKDATAMNG_TIME_DIFF_LIMIT_UPPER * 2)
+
+/* [PastModel002 Specifications]GPS TIME weekNo scope */
+#define CLOCKDATAMNG_GPS_TIME_WEEKNO_LIMIT 1024
+
+/* [PastModel002 Specifications]Initial value of time difference information at the previous shutdown */
+#define CLOCKDATAMNG_TIME_DIFF_INIT_VALUE 0x7FFFFFFFL
+
+/* [PastModel002 Specifications]AID-INI lifetime(+4Time) */
+#define CLOCKDATAMNG_AID_INI_EFFECTIVE_TIME (4 * 60 * 60)
+
+/* [PastModel002 Specifications]AID-EPH lifetime(plus or minus 2 hours) */
+#define CLOCKDATAMNG_AID_EPH_EFFECTIVE_TIME (2 * 60 * 60)
+
+#define MUTEX_CLOCKDATAMNG __TEXT("MUTEX_VEHICLE_CLOCKDATAMNG")
+
+/********************************************************************************
+* Struct definitions *
+*********************************************************************************/
+/********************************************************************************
+ * TAG :CLOCKDATAMNG_GPS_TIME
+ * ABSTRACT :GPS time structure
+ * NOTE :
+ ********************************************************************************/
+typedef struct {
+ u_int32 tow; /* Time of week (msec) */
+ int16 week_no; /* GPS Week No. */
+ u_int8 reserve[2]; /* reserve */
+ BOOL validity_flag; /* Enabled/DisabledFlagging */
+} CLOCKDATAMNG_GPS_TIME;
+
+/********************************************************************************
+* Function prototype *
+*********************************************************************************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ BOOL ClockDataMngInitialize(void);
+ void ClockDataMngSetLastTimeDiff(int32 time_diff);
+
+ void ClockDataMngSetGpsTime(const SENSOR_MSG_GPSDATA_DAT *gps_time_data);
+ void ClockDataMngGetGpsTime(CLOCKDATAMNG_GPS_TIME *gps_time_data);
+
+ BOOL ClockDataMngGetLocalTime(const CANINPUT_MSG_LOCALTIMEINFO_DAT *can_local_time, LOCALTIME *vehicle_local_time);
+ BOOL ClockDataMngGetTimeDiff(LOCALTIME *local_time, int32 *time_diff);
+
+ void ClockDataMngGetStartupTime(CLOCKDATAMNG_GPS_TIME *start_up_time);
+ int32 ClockDataMngCalculateTimeDiff(int32 munuend, int32 subtrahend);
+
+ BOOL ClockDataMngCheckLocalTime(LOCALTIME *local_time);
+ int32 ClockDataMngConversionLocalTime2GpsTime(LOCALTIME *local_time, BOOL calc_second_available);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKDATAMNG_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/ClockGPS_Process_Proto.h b/vehicleservice/positioning/server/include/Sensor/ClockGPS_Process_Proto.h
new file mode 100644
index 00000000..5f20c338
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/ClockGPS_Process_Proto.h
@@ -0,0 +1,37 @@
+/*
+ * @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 : ClockGPS_Process_Proto.h
+ * SYSTEM : _CWORD107_
+ * SUBSYSTEM: ClockGPS thread
+ * TITLE : Header for publication in a process (EXL)
+ ******************************************************************************/
+
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKGPS_PROCESS_PROTO_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKGPS_PROCESS_PROTO_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+EFrameworkunifiedStatus ClockGPSThread(HANDLE h_app);
+int TimerSramInit(int); /* Baackup data check/initialization function */ /* Ignore->MISRA-C++:2008 Rule 3-9-2 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKGPS_PROCESS_PROTO_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/ClockUtility.h b/vehicleservice/positioning/server/include/Sensor/ClockUtility.h
new file mode 100644
index 00000000..8924975c
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/ClockUtility.h
@@ -0,0 +1,46 @@
+/*
+ * @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 ClockUtility.h
+@detail Common processing function header file concerning clock
+*****************************************************************************/
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKUTILITY_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKUTILITY_H_
+
+#include <vehicle_service/positioning_base_library.h>
+#include "Clock_API.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ Function prototype declaration
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ RET_API ClockUtilityConvertDateToSecond(const LPSYSTEMTIME lp_st, u_int32* uli_sec);
+ RET_API ClockUtilityConvertSecondToDate(const u_int32* uli_sec, LPSYSTEMTIME lp_st);
+
+ /* Converting TimeData Types to SYSTEMTIME Types Functions */
+ CLOCK_RETURN ClockApiConvertTimeDataToSYSTEMTIME(const TimeData* base_time,
+ SYSTEMTIME* result_time);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKUTILITY_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/ClockUtility_private.h b/vehicleservice/positioning/server/include/Sensor/ClockUtility_private.h
new file mode 100644
index 00000000..8c322ae0
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/ClockUtility_private.h
@@ -0,0 +1,49 @@
+/*
+ * @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 ClockUtility_private.h
+@detail Common processing function private header file concerning clock
+*****************************************************************************/
+
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKUTILITY_PRIVATE_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKUTILITY_PRIVATE_H_
+
+#include "CommonDefine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ Macro definitions
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#define MONTH_MAX (12U) /* Maximum value of month */
+
+ /*
+ Data typing
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ /* Time parameter */
+ typedef struct ClockDayCnvTblTag {
+ YearCntTbl st_tbl[CNV_YEAR_MAX + 1 ]; /* Have +1 data for end determination */
+ } ClockDayCntTbl;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_CLOCKUTILITY_PRIVATE_H_
+
diff --git a/vehicleservice/positioning/server/include/Sensor/DeadReckoning_Common.h b/vehicleservice/positioning/server/include/Sensor/DeadReckoning_Common.h
new file mode 100644
index 00000000..1c6e0604
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/DeadReckoning_Common.h
@@ -0,0 +1,84 @@
+/*
+ * @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 POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_COMMON_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_COMMON_H_
+/****************************************************************************
+ * File name :DeadReckoning_Common.h
+ * System name :PastModel002
+ * Subsystem name :
+ ****************************************************************************/
+
+#include "Dead_Reckoning_Local_Api.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+#define DEADRECKONING_ZERO 0
+#define DEADRECKONING_BIT0 0x00000001
+#define DEADRECKONING_BIT1 0x00000002
+#define DEADRECKONING_BIT2 0x00000004
+#define DEADRECKONING_BIT3 0x00000008
+#define DEADRECKONING_BIT4 0x00000010
+#define DEADRECKONING_BIT5 0x00000020
+#define DEADRECKONING_BIT6 0x00000040
+#define DEADRECKONING_BIT7 0x00000080
+#define DEADRECKONING_BIT29 0x20000000
+#define DEADRECKONING_BIT30 0x40000000
+#define DEADRECKONING_BIT31 0x80000000
+#define DEADRECKONING_NEQ 1
+#define DEADRECKONING_EQ 0
+#define DEADRECKONING_INVALID 0
+#define DEADRECKONING_EFFECTIVE 1
+#define DEADRECKONING_CHGTYPE_NCHG DEADRECKONING_EQ
+#define DEADRECKONING_CHGTYPE_CHG DEADRECKONING_NEQ
+#define DEADRECKONING_GETMETHOD_DR 4 /* Data collection way: DR */
+
+/* Offset value of normal data of vehicle sensor */
+#define DEADRECKONING_OFFSET_NORMAL 4
+
+/************************************************************************
+* Typedef definitions *
+************************************************************************/
+
+/* Data Master Set Notification Function */
+typedef void (*PFUNC_DR_DMASTER_SET_N) (DID, u_int8, u_int8);
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+/*********************************************************************
+* TAG : DEADRECKONING_DID_OFFSET_TBL
+* ABSTRACT : Vehicle sensor data ID,Structure of each data in the offset table
+***********************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_offset; /* Offset value */
+ u_int8 uc_reserve[2]; /* Reserved */
+} DEADRECKONING_DID_OFFSET_TBL;
+
+/*********************************************************************
+* TAG :
+* ABSTRACT :
+***********************************************************************/
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+u_int8 DeadReckoningMemcmp(const void *, const void *, size_t);
+int32 DeadReckoningCheckDid(DID);
+u_int16 DeadReckoningGetDataMasterOffset(DID);
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_COMMON_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/DeadReckoning_DataMaster.h b/vehicleservice/positioning/server/include/Sensor/DeadReckoning_DataMaster.h
new file mode 100644
index 00000000..00c056af
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/DeadReckoning_DataMaster.h
@@ -0,0 +1,127 @@
+/*
+ * @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 POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_DATAMASTER_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_DATAMASTER_H_
+/****************************************************************************
+ * File name :DeadReckoning_DataMaster.h
+ * System name :PastModel002
+ * Subsystem name :DeadReckoning processes
+ ****************************************************************************/
+
+#include "DeadReckoning_Common.h"
+#include "Dead_Reckoning_Local_Api.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+/* Initial value */
+#define VEHICLE_DINIT_LONGITUDE 0x00
+#define VEHICLE_DINIT_LATITUDE 0x00
+#define VEHICLE_DINIT_ALTITUDE 0x00
+#define VEHICLE_DINIT_SPEED 0x00
+#define VEHICLE_DINIT_HEADING 0x00
+#define VEHICLE_DINIT_DR_SNS_COUNTER 0x00
+#define VEHICLE_DINIT_GYRO_OFFSET 0x0000
+#define VEHICLE_DINIT_GYRO_SCALE_FACTOR 0x00
+#define VEHICLE_DINIT_GYRO_SCALE_FACTOR_LEVEL 0x00
+#define VEHICLE_DINIT_SPEED_PULSE_SCALE_FACTOR 0x0000
+#define VEHICLE_DINIT_SPEED_PULSE_SCALE_FACTOR_LEVEL 0x00
+
+#define VEHICLE_DSIZE_LONGITUDE 0x04
+#define VEHICLE_DSIZE_LATITUDE 0x04
+#define VEHICLE_DSIZE_ALTITUDE 0x04
+#define VEHICLE_DSIZE_SPEED 0x02
+#define VEHICLE_DSIZE_HEADING 0x02
+#define VEHICLE_DSIZE_DR_SNS_COUNTER 0x01
+#define VEHICLE_DSIZE_GYRO_OFFSET 0x02
+#define VEHICLE_DSIZE_GYRO_SCALE_FACTOR 0x01
+#define VEHICLE_DSIZE_GYRO_SCALE_FACTOR_LEVEL 0x01
+#define VEHICLE_DSIZE_SPEED_PULSE_SCALE_FACTOR 0x02
+#define VEHICLE_DSIZE_SPEED_PULSE_SCALE_FACTOR_LEVEL 0x01
+
+/* Data received*/
+#define DEADRECKONING_RCVFLAG_ON 0x01
+#define DEADRECKONING_RCVFLAG_OFF 0x00
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+
+/*********************************************************************
+* TAG : DEADRECKONING_DATA_MASTER
+* ABSTRACT : Vehicle SW Data Master Structure
+***********************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcv_flag; /* Receive flag */
+ u_int8 dr_status; /* DR status */
+ u_int8 uc_data[4]; /* Vehicle DR data */
+} DEADRECKONING_DATA_MASTER;
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+void DeadReckoningInitDataMaster(void);
+void DeadReckoningSetDataMaster(const DEADRECKONING_DATA_MASTER *, PFUNC_DR_DMASTER_SET_N);
+void DeadReckoningGetDataMaster(DID ul_did, DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitLongitudeDr(void);
+u_int8 DeadReckoningSetLongitudeDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetLongitudeDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitLatitudeDr(void);
+u_int8 DeadReckoningSetLatitudeDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetLatitudeDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitAltitudeDr(void);
+u_int8 DeadReckoningSetAltitudeDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetAltitudeDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitSpeedDr(void);
+u_int8 DeadReckoningSetSpeedDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetSpeedDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitHeadingDr(void);
+u_int8 DeadReckoningSetHeadingDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetHeadingDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitSnsCounterDr(void);
+u_int8 DeadReckoningSetSnsCounterDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetSnsCounterDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitGyroOffsetDr(void);
+u_int8 DeadReckoningSetGyroOffsetDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetGyroOffsetDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitGyroScaleFactorDr(void);
+u_int8 DeadReckoningSetGyroScaleFactorDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetGyroScaleFactorDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitGyroScaleFactorLevelDr(void);
+u_int8 DeadReckoningSetGyroScaleFactorLevelDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetGyroScaleFactorLevelDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitSpeedPulseScaleFactorDr(void);
+u_int8 DeadReckoningSetSpeedPulseScaleFactorDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetSpeedPulseScaleFactorDr(DEADRECKONING_DATA_MASTER *);
+
+void DeadReckoningInitSpeedPulseScaleFactorLevelDr(void);
+u_int8 DeadReckoningSetSpeedPulseScaleFactorLevelDr(const DEADRECKONING_DATA_MASTER *);
+void DeadReckoningGetSpeedPulseScaleFactorLevelDr(DEADRECKONING_DATA_MASTER *);
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_DATAMASTER_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/DeadReckoning_DeliveryCtrl.h b/vehicleservice/positioning/server/include/Sensor/DeadReckoning_DeliveryCtrl.h
new file mode 100644
index 00000000..a555a475
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/DeadReckoning_DeliveryCtrl.h
@@ -0,0 +1,137 @@
+/*
+ * @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 POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_DELIVERYCTRL_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_DELIVERYCTRL_H_
+/******************************************************************************
+ * File name :DeadReckoning_DeliveryCtrl.h
+ * System name :PastModel002
+ * Subsystem name :
+ ******************************************************************************/
+
+#include "DeadReckoning_DataMaster.h"
+#include "Dead_Reckoning_Local_Api.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+#define DEADRECKONING_SIGNAL 6 /* Number of vehicle signals */
+#define DEADRECKONING_DELIVERY 10 /* Number of delivery destinations */
+/* Vehicle sensor information */
+#define DEADRECKONING_DELIVERY_INFO (DEADRECKONING_SIGNAL)
+/* Maximum number of vehicle sensor information */
+#define DEADRECKONING_DELIVERY_INFO_MAX (DEADRECKONING_DELIVERY_INFO * DEADRECKONING_DELIVERY)
+/* Vehicle Sensor Information Valid Number */
+#define DEADRECKONING_DID_EFFECTIVE (DEADRECKONING_SIGNAL)
+#define DEADRECKONING_ACTION_TYPE_ADD 0 /* Vehicle sensor addition processing */
+#define DEADRECKONING_ACTION_TYPE_UPDATE 1 /* Vehicle sensor update processing */
+
+#define DEADRECKONING_LINK_INDEX_END 0xFFFF /* End of the link index */
+
+#define DEADRECKONING_DELIVERY_METHOD_NORMAL 0 /* Delivery system normal delivery */
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+
+/*********************************************************************
+* TAG :DEADRECKONING_DELIVERY_CTRL_TBL_DATA
+* ABSTRACT : Structure of each data of the vehicle sensor delivery destination management table
+***********************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID */
+ PNO us_pno; /* Shipping PID */
+ u_int8 uc_chg_type; /* Delivery timing */
+ u_int8 uc_ctrl_flg; /* Delivery operation */
+ u_int16 us_link_idx; /* Link index */
+ u_int8 uc_method; /* Delivery system */
+ u_int8 uc_reserve; /* reserve */
+} DEADRECKONING_DELIVERY_CTRL_TBL_DATA;
+
+/*********************************************************************
+* TAG : DEADRECKONING_DELIVERY_CTRL_TBL
+* ABSTRACT : Vehicle Sensor Delivery Destination Management Table Structure
+***********************************************************************/
+typedef struct {
+ u_int16 us_num; /* Number of delivery destination management data items */
+ u_int8 uc_reserve[2]; /* Reserved */
+ /* Array of each data */
+ DEADRECKONING_DELIVERY_CTRL_TBL_DATA st_ctrl_data[DEADRECKONING_DELIVERY_INFO_MAX];
+} DEADRECKONING_DELIVERY_CTRL_TBL;
+
+/*********************************************************************
+* TAG : DEADRECKONING_DELIVERY_CTRL_TBL_MNG_DATA
+* ABSTRACT : Structure of each data of Vehicle Sensor Destination Management Table Management
+***********************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_start_idx; /* Start index */
+ u_int16 us_end_idx; /* End index */
+ u_int16 us_dlvry_entry_num; /* Number of registered shipping addresses */
+ u_int8 uc_reserve[2]; /* Reserved */
+} DEADRECKONING_DELIVERY_CTRL_TBL_MNG_DATA;
+
+/*********************************************************************
+* TAG : DEADRECKONING_DELIVERY_CTRL_TBL_MNG
+* ABSTRACT : Structure of Vehicle Sensor Delivery Destination Management Table Management
+***********************************************************************/
+typedef struct {
+ u_int16 us_num; /* Number of data items */
+ u_int8 uc_reserve[2]; /* Reserved */
+ /* Array of each data */
+ DEADRECKONING_DELIVERY_CTRL_TBL_MNG_DATA st_ctrl_tbl_mng_data[DEADRECKONING_DELIVERY_INFO];
+} DEADRECKONING_DELIVERY_CTRL_TBL_MNG;
+
+/*********************************************************************
+* TAG : DEADRECKONING_DELIVERY_PNO_TBL
+* ABSTRACT : Vehicle Sensor Destination PNO Table
+***********************************************************************/
+typedef struct {
+ PNO us_pno; /* Thread ID */
+ u_int16 us_index; /* Appropriate INDEX in the delivery control table */
+ u_int8 uc_method; /* Delivery system */
+ u_int8 uc_reserve[3]; /* reserve */
+} DEADRECKONING_DELIVERY_PNO_TBL_DAT;
+
+typedef struct {
+ u_int16 us_num; /* Number of data items */
+ u_int8 uc_reserve[2]; /* reserve */
+ DEADRECKONING_DELIVERY_PNO_TBL_DAT st_pno_data[DEADRECKONING_DELIVERY_INFO_MAX];
+} DEADRECKONING_DELIVERY_PNO_TBL;
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+
+DEADRECKONING_DELIVERY_PNO_TBL* DeadReckoningMakeDeliveryPnoTbl(DID ul_did, u_int8 change_type);
+
+DEAD_RECKONING_RET_API DeadReckoningEntryDeliveryCtrl(const DEADRECKONING_MSG_DELIVERY_ENTRY *);
+
+void DeadReckoningInitDeliveryCtrlTbl(void);
+void DeadReckoningInitDeliveryCtrlTblMng(void);
+
+void DeadReckoningAddDeliveryCtrlTbl(const DEADRECKONING_MSG_DELIVERY_ENTRY *);
+void DeadReckoningUpdateDeliveryCtrlTbl(DEADRECKONING_DELIVERY_CTRL_TBL_MNG_DATA *);
+void DeadReckoningAddDeliveryCtrlTblMng(const DEADRECKONING_MSG_DELIVERY_ENTRY *);
+void DeadReckoningUpdateDeliveryCtrlTblMng(DEADRECKONING_DELIVERY_CTRL_TBL_MNG_DATA *);
+
+void DeadReckoningAddPnoTbl(u_int16);
+void DeadReckoningDeliveryProc(DID ul_did, u_int8 uc_chg_type, u_int8 uc_get_method);
+void DeadReckoningFirstDelivery(PNO us_pno, DID ul_did);
+
+RET_API DRManagerSndMsg(PNO us_pno_src, PNO us_pno_dest, CID us_cid, u_int16 us_msg_len, const void *p_msg_data);
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_DELIVERYCTRL_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/DeadReckoning_main.h b/vehicleservice/positioning/server/include/Sensor/DeadReckoning_main.h
new file mode 100644
index 00000000..3e2e9d48
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/DeadReckoning_main.h
@@ -0,0 +1,146 @@
+/*
+ * @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 POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_MAIN_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_MAIN_H_
+/****************************************************************************
+ * File name :DeadReckoning_main.h
+ * System name :PastModel002
+ * Subsystem name :
+ ******************************************************************************/
+
+#include <vehicle_service/positioning_base_library.h>
+
+#include "Sensor_Common_API.h"
+
+#include "Dead_Reckoning_API.h"
+#include "Dead_Reckoning_Local_Api.h"
+#include "DeadReckoning_Common.h"
+#include "DeadReckoning_DataMaster.h"
+#include "DeadReckoning_DeliveryCtrl.h"
+
+#include "Sensor_API.h"
+#include "VehicleSens_DeliveryCtrl.h"
+#include "VehicleDebug_API.h"
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+/* Return value */
+#define RET_SWMNG_SUCCESS RET_NORMAL /* Success of API processing */
+#define RET_SWMNG_ERROR RET_ERROR /* API processing failed */
+
+/*** Rcv Message Relationships ***************************************************/
+/* Size of data section */
+#define DEAD_RECKONING_RCVMSG_MSGBUF 512 /* RcvMSG Byte count in data section */
+#define DEAD_RECKONING_RCVDATA_SENSOR_MSGBUF 40 /* RcvMSG Byte count of Sensor data section */
+#define DEAD_RECKONING_RCVDATA_SENSOR_FIRST_MSGBUF 1000 /* RcvMSG Initial Byte count of sensor data section */
+#define DEAD_RECKONING_SENSOR_FIRST_NUM 175 /* Initial number of saved sensor data */
+
+/* Event initial value */
+/* DR_API_private. Synchronize with DR_EVENT_VAL_INIT in h */
+#define DR_EVENT_VAL_INIT (-101)
+
+/* Event initial value */
+/* DeadReckoning_main. Synchronize with h's VEHICELEDEBUG_EVENT_VAL_INIT */
+#define VEHICLEDEBUG_EVENT_VAL_INIT (-101)
+
+/* PastModel002 sleep time[ms] for CPU load balancing in the first sensor data processing */
+#define DR_FST_SENS_CALC_SLEEP_TIME 15
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+
+/*********************************************************************
+* TAG : DEAD_RECKONING_RCVDATA
+* ABSTRACT : Message receive buffer structure
+***********************************************************************/
+typedef struct {
+ T_APIMSG_MSGBUF_HEADER hdr;
+ u_int8 data[DEAD_RECKONING_RCVMSG_MSGBUF]; /* Data portion */
+} DEAD_RECKONING_RCVDATA;
+
+/*********************************************************************
+* TAG : DEAD_RECKONING_RCVDATA_SENSOR
+* ABSTRACT : LineSensor Vehicle Signal Notification Message Structure
+***********************************************************************/
+typedef struct {
+ u_int32 did; /* Data ID */
+ u_int8 size; /* Size of the data */
+ u_int8 reserve[3]; /* Reserved */
+ u_int8 data[DEAD_RECKONING_RCVDATA_SENSOR_MSGBUF]; /* Data content */
+} DEAD_RECKONING_RCVDATA_SENSOR;
+
+/*********************************************************************
+* TAG : DEAD_RECKONING_RCVDATA_SENSOR_FIRST
+* ABSTRACT : LineSensor Vehicle Signal Notification Message Structure
+***********************************************************************/
+typedef struct {
+ u_int32 did; /* Data ID */
+ u_int16 size; /* Size of the data */
+ u_int8 reserve[1]; /* Reserved */
+ u_int8 num; /* Number of data */
+ u_int8 data[DEAD_RECKONING_RCVDATA_SENSOR_FIRST_MSGBUF]; /* Data content */
+} DEAD_RECKONING_RCVDATA_SENSOR_FIRST;
+
+/*********************************************************************
+* TAG : DEAD_RECKONING_SAVEDATA_SENSOR_FIRST
+* ABSTRACT : LineSensor Vehicle Signal-Storage Message Structures
+***********************************************************************/
+typedef struct {
+ u_int16 gyro_x_data[DEAD_RECKONING_SENSOR_FIRST_NUM * NUM_OF_100msData]; /* Data content */
+ u_int16 gyro_y_data[DEAD_RECKONING_SENSOR_FIRST_NUM * NUM_OF_100msData]; /* Data content */
+ u_int16 gyro_z_data[DEAD_RECKONING_SENSOR_FIRST_NUM * NUM_OF_100msData]; /* Data content */
+ u_int16 spd_pulse_data[DEAD_RECKONING_SENSOR_FIRST_NUM]; /* Data content */
+ u_int8 spd_pulse_check_data[DEAD_RECKONING_SENSOR_FIRST_NUM]; /* Data content */
+ u_int8 rev_data[DEAD_RECKONING_SENSOR_FIRST_NUM]; /* Data content */
+ u_int8 data_num; /* Number of data */
+ u_int8 reserve[3]; /* reserve */
+ u_int16 gyro_x_rcv_size; /* Receiving Size */
+ u_int16 gyro_y_rcv_size; /* Receiving Size */
+ u_int16 gyro_z_rcv_size; /* Receiving Size */
+ u_int16 spd_pulse_rcv_size; /* Receiving Size */
+ u_int16 spd_pulse_check_rcv_size; /* Receiving Size */
+ u_int16 rev_rcv_size; /* Receiving Size */
+} DEAD_RECKONING_SAVEDATA_SENSOR_FIRST;
+
+/*********************************************************************
+* TAG : DEAD_RECKONING_LONLAT_INFO
+* ABSTRACT : Get Position Information Structure
+***********************************************************************/
+typedef struct {
+ u_int8 calc_called; /* Whether Calculate_DeadReckoningData was called */
+ u_int8 available;
+ u_int8 reserve[2];
+ LONLAT lonlat;
+} DEAD_RECKONING_LONLAT_INFO;
+
+/************************************************************************
+* DeadReckoning_main function prototype *
+************************************************************************/
+
+void DeadReckoningRcvMsg(const DEAD_RECKONING_RCVDATA *msg, DEAD_RECKONING_LONLAT_INFO *location_info);
+void DeadReckoningRcvMsgFstSens(const DEAD_RECKONING_RCVDATA *msg, DEAD_RECKONING_LONLAT_INFO *location_info,
+ const SENSOR_MSG_GPSDATA_DAT *rcv_gps_msg, Struct_GpsData* send_gps_msg,
+ Struct_SensData* send_sensor_msg);
+int32 DeadReckoningInit(void);
+void DeadReckoningGetDRData(const DEADRECKONING_MSG_GET_DR_DATA *msg);
+void DeadReckoningSetMapMatchingData(const DR_MSG_MAP_MATCHING_DATA *msg);
+void DeadReckoningClearBackupData(const DR_MSG_CLEAR_BACKUP_DATA *msg);
+void DeadReckoningGetLocationLogStatus(PNO pno);
+void DeadReckoningSetLocationLogStatus(BOOL log_sw, u_int8 severity);
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_MAIN_H_ */
diff --git a/vehicleservice/positioning/server/include/Sensor/GpsInt.h b/vehicleservice/positioning/server/include/Sensor/GpsInt.h
new file mode 100644
index 00000000..fbb69de6
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/GpsInt.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.
+ */
+
+/*****************************************************************************************
+* File name :GpsInt.h
+* System name :PastModel002
+* Process name :Vehicle
+* Overview :GPS interrupt thread header
+******************************************************************************************/
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_GPSINT_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_GPSINT_H_
+
+/*******************************************************************************
+* Include File
+*******************************************************************************/
+
+/*******************************************************************************
+* Define
+*******************************************************************************/
+#define GPS_IRQ_ADR 0x00000306UL /* GPS IRQ addresses */
+#define GPS_MASK_6BIT 0x00000040UL /* GPS IRQ bit-mask position */
+
+#define GPS_GPIO0_IRQSTATUS_0_OFFSET 0x0000002CUL /* IRQSTATUS_0 offset */
+#define GPS_GPIO0_IRQSTATUS_SET_0_OFFSET 0x00000034UL /* IRQSTATUS_SET_0 offset */
+#define GPS_GPIO0_RISINGDETECT_OFFSET 0x00000148UL /* RISINGDETECT offsets */
+
+/* IRQSTATUS_0 address */
+#define GPS_GPIO0_IRQSTATUS_0_ADDR (DM816X_GPIO0_BASE + GPS_GPIO0_IRQSTATUS_0_OFFSET)
+
+/* IRQSTATUS_SET_0 address */
+#define GPS_GPIO0_IRQSTATUS_SET_0_ADDR (DM816X_GPIO0_BASE + GPS_GPIO0_IRQSTATUS_SET_0_OFFSET)
+
+/* RISINGDETECT addresses */
+#define GPS_GPIO0_RISINGDETECT_ADDR (DM816X_GPIO0_BASE + GPS_GPIO0_RISINGDETECT_OFFSET)
+
+/*******************************************************************************
+* Struct
+*******************************************************************************/
+typedef struct {
+ DWORD irq_status_reg; /* Interrupt Source Clear Register */
+ DWORD irq_status_set_reg; /* Interrupt enable register */
+ DWORD rising_detect_reg; /* Rising edge detection setting register */
+} GPS_INT_DATA;
+
+/***************************
+* Function prototype declaration
+***************************/
+RET_API DEVGpsIntInitial(void);
+BOOL DEVGpsIntMapDevice(void);
+void DEVGpsIntUnMapDevice(void);
+void DEVGpsIntSetInterupt(void);
+void DEVGpsIntIntRegClear(void);
+RET_API DEVGpsIntSndMsg(void);
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_GPSINT_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/SensorLog.h b/vehicleservice/positioning/server/include/Sensor/SensorLog.h
new file mode 100644
index 00000000..9b6a49aa
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/SensorLog.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.
+ */
+
+/**
+ * @file
+ * SensorLog.h
+ * @brief
+ * Definition for Sensor Logging I/F Liblary
+ */
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_SENSORLOG_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_SENSORLOG_H_
+
+#include <stdint.h>
+#include <vehicle_service/positioning_base_library.h>
+#include <vehicle_service/POS_define.h>
+
+/*---------------------------------------------------------------------------------*
+ * Definition *
+ *---------------------------------------------------------------------------------*/
+/* NAV-SVINFO sizes(chnum=20) */
+#define SENSLOG_GPS_SIZE_NAVSVINFO 248
+
+/* Sensor log data type */
+typedef enum {
+ SENSLOG_DATA_I_UNSPECIFIED = 0, /* Input:Not specified */
+
+ SENSLOG_DATA_I_SYS, /* Input:Sensor */
+ SENSLOG_DATA_I_SYS_STS, /* Input:External terminal status */
+ SENSLOG_DATA_I_GPS, /* Input:GPS(_CWORD82_/u-blox) */
+ SENSLOG_DATA_I_LOC, /* Input:Location information */
+ SENSLOG_DATA_I_SPEED, /* Input:Vehicle speed */
+ SENSLOG_DATA_I_TIME, /* Input:Request to set GPS time */
+ SENSLOG_DATA_I_GPSINF, /* Input:GPS information setting request */
+ SENSLOG_DATA_I_GPSRST, /* Input:GPS reset request */
+ SENSLOG_DATA_I_GPSSET, /* Input:GPS setting request */
+ SENSLOG_DATA_I_NAVSVINFO, /* Input:NAV-SVINFO(u-blox)*/
+ SENSLOG_DATA_I_SYS_ABNORMAL, /* Input:Sensor(When an error occurs) */
+ SENSLOG_DATA_I_COUNT /* Classified number */
+} SENSLOG_DATA_I;
+
+typedef enum {
+ SENSLOG_DATA_O_UNSPECIFIED = 0, /* Output:Not specified */
+
+ SENSLOG_DATA_O_SYS, /* Output:Sensor */
+ SENSLOG_DATA_O_SYS_PKG, /* Output:Sensor(PKG) */
+ SENSLOG_DATA_O_GPS, /* Output:GPS(_CWORD82_/u-blox) */
+ SENSLOG_DATA_O_LONLAT_N, /* Output:Latitude and longitude(NAVI) */
+ SENSLOG_DATA_O_LONLAT_G, /* Output:Latitude and longitude(GPS) */
+ SENSLOG_DATA_O_ALT, /* Output:Altitude */
+ SENSLOG_DATA_O_SPEED_N, /* Output:Vehicle speed(NAVI) */
+ SENSLOG_DATA_O_SPEED_P, /* Output:Vehicle speed(POS) */
+ SENSLOG_DATA_O_HEAD_N, /* Output:Orientation(NAVI) */
+ SENSLOG_DATA_O_HEAD_G, /* Output:Orientation(GPS) */
+ SENSLOG_DATA_O_TIME_SETREQ, /* Output:GPS time delivery request */
+ SENSLOG_DATA_O_TIME, /* Output:GPS time */
+ SENSLOG_DATA_O_GPSINF, /* Output:GPS information */
+ SENSLOG_DATA_O_TIME_CS, /* Output:GPS time(For the ClockService) */
+ SENSLOG_DATA_O_GPSRST, /* Output:GPS reset response */
+
+ SENSLOG_DATA_O_COUNT /* Classified number */
+} SENSLOG_DATA_O;
+
+/* Send/Receive result */
+#define SENSLOG_RES_SUCCESS 0 /* Send/Receive Success */
+#define SENSLOG_RES_FAIL 1 /* Send/Receive Abnormality */
+
+/* Destination name(Internal use) */
+#define SENSLOG_PNAME_CLOCK "*Clock" /* Clock Service */
+#define SENSLOG_PNAME_COMMUSB "*CommUSB" /* CommUSB */
+
+#define SENSLOG_ON 1
+#define SENSLOG_OFF 0
+
+/*---------------------------------------------------------------------------------*
+ * Typedef declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Struct declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Prototype Declaration *
+ *---------------------------------------------------------------------------------*/
+/* SensorLog public API */
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void SensLogInitialize(uint8_t *p_mount_path);
+ uint8_t SensLogGetNavSvinfoFlag(void);
+ void SensLogWriteInputData(uint16_t us_data_type, DID ul_did, PNO us_pno, uint8_t *p_data, \
+ uint16_t us_size, uint8_t uc_result, uint8_t u_write_flag, uint8_t u_write_abnormal_flag);
+ void SensLogWriteOutputData(uint16_t us_data_type, DID ul_did, PNO us_pno, uint8_t *p_data, \
+ uint16_t us_size, uint8_t uc_result);
+ void SensLogTerminate(void);
+ void SensLogStore(void);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_SENSORLOG_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/VehicleSens_Common.h b/vehicleservice/positioning/server/include/Sensor/VehicleSens_Common.h
new file mode 100644
index 00000000..7b472684
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/VehicleSens_Common.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.
+ */
+
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_COMMON_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_COMMON_H_
+/****************************************************************************
+ * File name :VehicleSens_Common.h
+ * System name :_CWORD107_
+ * Subsystem name :Vehicle sensor process
+ ****************************************************************************/
+
+#include "Vehicle_API_Dummy.h"
+#include "Vehicle_API_private.h"
+
+#include "positioning_hal.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+#define VEHICLESENS_ZERO 0
+#define VEHICLESENS_BIT0 0x00000001
+#define VEHICLESENS_BIT1 0x00000002
+#define VEHICLESENS_BIT2 0x00000004
+#define VEHICLESENS_BIT3 0x00000008
+#define VEHICLESENS_BIT4 0x00000010
+#define VEHICLESENS_BIT5 0x00000020
+#define VEHICLESENS_BIT6 0x00000040
+#define VEHICLESENS_BIT7 0x00000080
+#define VEHICLESENS_BIT29 0x20000000
+#define VEHICLESENS_BIT30 0x40000000
+#define VEHICLESENS_BIT31 0x80000000
+#define VEHICLESENS_NEQ 1
+#define VEHICLESENS_EQ 0
+#define VEHICLESENS_INVALID 0
+#define VEHICLESENS_EFFECTIVE 1
+#define VEHICLESENS_CHGTYPE_NCHG VEHICLESENS_EQ
+#define VEHICLESENS_CHGTYPE_CHG VEHICLESENS_NEQ
+#define VEHICLESENS_GETMETHOD_CAN 0 /* Data collection way: CAN communication */
+#define VEHICLESENS_GETMETHOD_LINE 1 /* Data collection way: LineSensor drivers */
+#define VEHICLESENS_GETMETHOD_NO_DETECTION 2 /* Data collection way: Not downloaded */
+#define VEHICLESENS_GETMETHOD_GPS 3 /* Data collection way: GPS */
+#define VEHICLESENS_GETMETHOD_NAVI 4 /* Data collection way: NAVI */
+#define VEHICLESENS_GETMETHOD_CLOCK 5 /* Data collection way: Clock Information */
+#define VEHICLESENS_GETMETHOD_INTERNAL 6 /* Data collection way: Internal calculation */
+#define VEHICLESENS_GETMETHOD_OTHER 7 /* Data collection way: Others */
+
+/* Offset value of normal data of vehicle sensor */
+#define VEHICLESENS_OFFSET_NORMAL 32
+/* Offset value of normal data of vehicle sensor */
+#define VEHICLESENS_OFFSET_GPS_FORMAT 268 /* 8 + 260 */
+/* Offset value of normal data of vehicle sensor */
+#define VEHICLESENS_OFFSET_GPS_BINARY 368 /* 8 + 360 */
+/* ++ GPS _CWORD82_ support */
+#define VEHICLESENS_OFFSET_GPS_NMEA 460 /* 8 + 452 Packaged delivery offset */
+/* -- GPS _CWORD82_ support */
+
+/* ++ PastModel002 support */
+/* U-Blox GPS offsets */
+#define VEHICLESENS_OFFSET_GPS_UBLOX 220 /* 220 */
+/* -- PastModel002 support */
+
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+#define VEHICLESENS_OFFSET_10WORD_PKG_EXT 208 /* Offset value of 10 initial deliveries(WORD) 8 + (20 * 10) */
+#define VEHICLESENS_OFFSET_WORD_PKG_EXT 28 /* Offset value of 10 initial deliveries(WORD) 8 + 20 */
+#define VEHICLESENS_OFFSET_BYTE_PKG_EXT 18 /* Offset value of 10 initial deliveries(BYTE) 8 + 10 */
+#define VEHICLESENS_OFFSET_32LONG_PKG_EXT 1328 /* Offset value of 10 initial deliveries(LONG) 8 + (132 * 10) */
+#define VEHICLESENS_OFFSET_20WORD 48 /* Offset value of 20 sensor data(WORD) 8 + 40 */
+#define VEHICLESENS_OFFSET_20WORD_FST 408 /* Offset value of 20 initial sensor data(WORD) 8 + 400 */
+#define VEHICLESENS_DNUM_4 4 /* Number of sensor data */
+#define VEHICLESENS_DNUM_5 5 /* Number of sensor data */
+#define VEHICLESENS_DNUM_7 7 /* Number of sensor data */
+#endif
+#define VEHICLESENS_EXT_OFF 0 /* Normal delivery */
+#define VEHICLESENS_EXT_ON 1 /* Extended delivery */
+
+#if CONFIG_HW_PORTSET_TYPE_C
+#define VEHICLESENS_OFFSET_GPS_NMEA 248 /* 8 + 240 */
+#endif
+
+/************************************************************************
+* Typedef definitions *
+************************************************************************/
+/* typedef u_int32 DID; */ /* Data ID */
+
+/* Data Master Set Notification Function */
+typedef void (*PFUNC_DMASTER_SET_N) (DID, u_int8, u_int8);
+typedef void (*PFUNC_DMASTER_SET_SHARED_MEMORY) (DID, u_int8);
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+/*********************************************************************
+* TAG : VEHICLESENS_DID_OFFSET_TBL
+* ABSTRACT : Vehicle sensor data ID,Structure of each data in the offset table
+***********************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_offset; /* Offset value */
+ u_int8 uc_reserve[2]; /* Reserved */
+} VEHICLESENS_DID_OFFSET_TBL;
+
+/*********************************************************************
+* TAG :
+* ABSTRACT :
+***********************************************************************/
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+u_int8 VehicleSensmemcmp(const void *, const void *, size_t);
+int32 VehicleSensCheckDid(DID);
+u_int16 VehicleSensGetDataMasterOffset(DID);
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+u_int16 VehicleSensGetDataMasterExtOffset(DID);
+#endif
+void VehicleSensSetGpsVersion(const SENSOR_MSG_GPSDATA_DAT *pstData);
+void VehicleSensGetDebugPosDate(void* pBuf, u_int8 uc_get_method);
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_COMMON_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/VehicleSens_DataMaster.h b/vehicleservice/positioning/server/include/Sensor/VehicleSens_DataMaster.h
new file mode 100644
index 00000000..a1807642
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/VehicleSens_DataMaster.h
@@ -0,0 +1,1091 @@
+/*
+ * @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 POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_DATAMASTER_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_DATAMASTER_H_
+/****************************************************************************
+ * File name :VehicleSens_DataMaster.h
+ * System name :_CWORD107_
+ * Subsystem name :Vehicle sensor process
+ ****************************************************************************/
+
+#include "Vehicle_API_Dummy.h"
+#include "Vehicle_API_private.h"
+
+#include "positioning_hal.h"
+#include "VehicleSens_Common.h"
+#include "VehicleSens_SelectionItemList.h"
+#include "CommonDefine.h"
+#include <vehicle_service/POS_common_API.h>
+#include <vehicle_service/POS_gps_API.h>
+#include "Naviinfo_API.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+/* Initial value */
+#define VEHICLE_DINIT_SP1P 0x0000
+#define VEHICLE_DINIT_SP1S 0x00
+#define VEHICLE_DINIT_SP1 0x0000
+#define VEHICLE_DINIT_ECOMODE 0x00
+#define VEHICLE_DINIT_NE1 0x0000
+#define VEHICLE_DINIT_R_ACCALL 0x00
+#define VEHICLE_DINIT_R_AC_WNG 0x00
+#define VEHICLE_DINIT_R_SW_CON 0x00
+#define VEHICLE_DINIT_R_BEEP 0x00
+#define VEHICLE_DINIT_I_RA_AUT 0x00
+#define VEHICLE_DINIT_I_RA_AC 0x00
+#define VEHICLE_DINIT_I_RA_LO 0x00
+#define VEHICLE_DINIT_I_RA_HI 0x00
+#define VEHICLE_DINIT_I_AUTO_D 0x00
+#define VEHICLE_DINIT_I_AUTO_P 0x00
+#define VEHICLE_DINIT_I_DEF 0x00
+#define VEHICLE_DINIT_I_RRDEF 0x00
+#define VEHICLE_DINIT_I_RFAUT 0x00
+#define VEHICLE_DINIT_I_REC 0x00
+#define VEHICLE_DINIT_I_FRS 0x00
+#define VEHICLE_DINIT_I_AC 0x00
+#define VEHICLE_DINIT_I_MHTR 0x00
+#define VEHICLE_DINIT_I_WIPD 0x00
+#define VEHICLE_DINIT_I_DUSY 0x00
+#define VEHICLE_DINIT_I_SWNG 0x00
+#define VEHICLE_DINIT_I_BLW_F 0x00
+#define VEHICLE_DINIT_I_OAUT_D 0x00
+#define VEHICLE_DINIT_I_OLET_D 0x00
+#define VEHICLE_DINIT_I_OAUT_P 0x00
+#define VEHICLE_DINIT_I_OLET_P 0x00
+#define VEHICLE_DINIT_ST_BMN_F 0x00
+#define VEHICLE_DINIT_I_AIRPR 0x00
+#define VEHICLE_DINIT_I_O2 0x00
+#define VEHICLE_DINIT_I_PLSM 0x00
+#define VEHICLE_DINIT_I_KAFUN 0x00
+#define VEHICLE_DINIT_I_SAFS 0x00
+#define VEHICLE_DINIT_R_ONSCRN 0x00
+#define VEHICLE_DINIT_I_HUM 0x00
+#define VEHICLE_DINIT_I_TMP_D 0x00
+#define VEHICLE_DINIT_I_TMP_P 0x00
+#define VEHICLE_DINIT_SL_ACDSP 0x00
+#define VEHICLE_DINIT_SL_DUSY 0x00
+#define VEHICLE_DINIT_SL_CIF 0x00
+#define VEHICLE_DINIT_SL_BLW_F 0x00
+#define VEHICLE_DINIT_SL_SRLVL 0x00
+#define VEHICLE_DINIT_SL_RR_IH 0x00
+#define VEHICLE_DINIT_SL_RAUTO 0x00
+#define VEHICLE_DINIT_SL_BLW_R 0x00
+#define VEHICLE_DINIT_SL_DST 0x00
+#define VEHICLE_DINIT_SL_WIPD 0x00
+#define VEHICLE_DINIT_SL_MRHT 0x00
+#define VEHICLE_DINIT_SL_AIRP 0x00
+#define VEHICLE_DINIT_SL_O2 0x00
+#define VEHICLE_DINIT_SL_PLSM 0x00
+#define VEHICLE_DINIT_SL_KAFUN 0x00
+#define VEHICLE_DINIT_SL_SWNG 0x00
+#define VEHICLE_DINIT_ST_CN_OK 0x00
+#define VEHICLE_DINIT_SL_RBLW 0x00
+#define VEHICLE_DINIT_SL_HUM 0x00
+#define VEHICLE_DINIT_R_INLVL 0x00
+#define VEHICLE_DINIT_I_INLVL 0x00
+#define VEHICLE_DINIT_I_AUT_RR 0x00
+#define VEHICLE_DINIT_I_AUT_RL 0x00
+#define VEHICLE_DINIT_I_CNT_IH 0x00
+#define VEHICLE_DINIT_I_RAUTO 0x00
+#define VEHICLE_DINIT_ST_BMN_R 0x00
+#define VEHICLE_DINIT_I_BLW_R 0x00
+#define VEHICLE_DINIT_R_RONSCR 0x00
+#define VEHICLE_DINIT_I_OLT_RR 0x00
+#define VEHICLE_DINIT_I_OLT_RL 0x00
+#define VEHICLE_DINIT_I_TMP_RR 0x00
+#define VEHICLE_DINIT_I_TMP_RL 0x00
+#define VEHICLE_DINIT_ACN_AMB 0x00
+#define VEHICLE_DINIT_AC_AMB05 0x00
+#define VEHICLE_DINIT_SOC_MON 0x00
+#define VEHICLE_DINIT_RDYIND 0x00
+#define VEHICLE_DINIT_HV_M2B 0x00
+#define VEHICLE_DINIT_HV_EP 0x00
+#define VEHICLE_DINIT_HV_EM 0x00
+#define VEHICLE_DINIT_RNRG 0x00
+#define VEHICLE_DINIT_HV_MP 0x00
+#define VEHICLE_DINIT_HV_MB 0x00
+#define VEHICLE_DINIT_HV_RG 0x00
+#define VEHICLE_DINIT_B_P 0x00
+#define VEHICLE_DINIT_B_R 0x00
+#define VEHICLE_DINIT_B_N 0x00
+#define VEHICLE_DINIT_B_D 0x00
+#define VEHICLE_DINIT_B_FC 0x0000
+#define VEHICLE_DINIT_R_DISP 0x00
+#define VEHICLE_DINIT_HVFLAG 0x00
+#define VEHICLE_DINIT_DVINF 0x00
+#define VEHICLE_DINIT_IN_FC 0x0000
+#define VEHICLE_DINIT_UNIT_0 0x00
+#define VEHICLE_DINIT_AS_SP 0x0000
+#define VEHICLE_DINIT_UNIT_1 0x00
+#define VEHICLE_DINIT_FC_SCL 0x00
+#define VEHICLE_DINIT_RANGE 0x0000
+#define VEHICLE_DINIT_UNIT_4 0x00
+#define VEHICLE_DINIT_TO_FC 0x0000
+#define VEHICLE_DINIT_UNIT_6 0x00
+#define VEHICLE_DINIT_AS_TM 0x0000
+#define VEHICLE_DINIT_ADIM_C 0x00
+#define VEHICLE_DINIT_LGCY 0x00
+#define VEHICLE_DINIT_BCTY 0x00
+#define VEHICLE_DINIT_RTRRQ 0x00
+#define VEHICLE_DINIT_DEST_BDB 0x00
+#define VEHICLE_DINIT_DS_PACK1 0x00
+#define VEHICLE_DINIT_DS_PACK2 0x00
+#define VEHICLE_DINIT_STRG_WHL 0x00
+#define VEHICLE_DINIT_TRIP_CNT 0x0000
+#define VEHICLE_DINIT_TIME_CNT 0x00000000
+#define VEHICLE_DINIT_TPM_VAR 0x00
+#define VEHICLE_DINIT_TPM_WA1 0x00
+#define VEHICLE_DINIT_TPM_TNUM 0x00
+#define VEHICLE_DINIT_TPM_REQ0 0x00
+#define VEHICLE_DINIT_TPM_TAN0 0x00
+#define VEHICLE_DINIT_TPM_FLPR 0x00
+#define VEHICLE_DINIT_TPM_FL0 0x00
+#define VEHICLE_DINIT_TPM_FRPR 0x00
+#define VEHICLE_DINIT_TPM_FR0 0x00
+#define VEHICLE_DINIT_TPM_RLPR 0x00
+#define VEHICLE_DINIT_TPM_RL0 0x00
+#define VEHICLE_DINIT_TPM_RRPR 0x00
+#define VEHICLE_DINIT_TPM_RR0 0x00
+#define VEHICLE_DINIT_TPM_SPPR 0x00
+#define VEHICLE_DINIT_TPM_SP0 0x00
+#define VEHICLE_DINIT_B_R2 0x00
+#define VEHICLE_DINIT_VSP0B 0x00
+#define VEHICLE_DINIT_EPBLOCK 0x00
+
+#define VEHICLE_DINIT_DESTINATION_DEST_BDB 0x00
+#define VEHICLE_DINIT_DESTINATION_DS_PACK1 0x00
+#define VEHICLE_DINIT_DESTINATION_DS_PACK2 0x00
+#define VEHICLE_DINIT_HV 0x00
+#define VEHICLE_DINIT_2WD4WD 0x00
+#define VEHICLE_DINIT_STEERING_WHEEL 0x00
+#define VEHICLE_DINIT_VB 0x00
+#define VEHICLE_DINIT_IG 0x00
+#define VEHICLE_DINIT_MIC 0x00
+#define VEHICLE_DINIT_TEST 0x00
+#define VEHICLE_DINIT_VTRADAPTER 0x00
+#define VEHICLE_DINIT_AUXADAPTER 0x00
+#define VEHICLE_DINIT_BACKDOOR 0x00
+#define VEHICLE_DINIT_PKB 0x00
+#define VEHICLE_DINIT_PKB_CAN 0x00
+#define VEHICLE_DINIT_ADIM 0x00
+#define VEHICLE_DINIT_ILL 0x00
+#define VEHICLE_DINIT_RHEOSTAT 0x00
+#define VEHICLE_DINIT_PANELTEMP 0x00
+#define VEHICLE_DINIT_SYSTEMP 0x0000
+#define VEHICLE_DINIT_SPEED_PULSE 0x0000
+#define VEHICLE_DINIT_SPEED_KMPH 0x0000
+#define VEHICLE_DINIT_GYRO_X 0x0000
+#define VEHICLE_DINIT_GYRO_Y 0x0000
+#define VEHICLE_DINIT_GYRO_Z 0x0000
+#define VEHICLE_DINIT_GYRO VEHICLE_DINIT_GYRO_X
+#define VEHICLE_DINIT_GSNS_X 0x0000
+#define VEHICLE_DINIT_GSNS_Y 0x0000
+#define VEHICLE_DINIT_GSNS_Z 0x0000
+#define VEHICLE_DINIT_REV 0x00
+#define VEHICLE_DINIT_VSC1S03_4 0x00
+#define VEHICLE_DINIT_VSC1S03_5 0x00
+#define VEHICLE_DINIT_VSC1S03_6 0x00
+#define VEHICLE_DINIT_VSC1S03_7 0x00
+#define VEHICLE_DINIT_ECO1S01_2 0x00
+#define VEHICLE_DINIT_ENG1F07_0 0x00
+#define VEHICLE_DINIT_ENG1F07_1 0x00
+#define VEHICLE_DINIT_ENG1S03_0 0x00
+#define VEHICLE_DINIT_ENG1S03_1 0x00
+#define VEHICLE_DINIT_ACN1S04_0 0x00
+#define VEHICLE_DINIT_ACN1S04_1 0x00
+#define VEHICLE_DINIT_ACN1S04_2 0x00
+#define VEHICLE_DINIT_ACN1S04_3 0x00
+#define VEHICLE_DINIT_ACN1S04_4 0x00
+#define VEHICLE_DINIT_ACN1S04_5 0x00
+#define VEHICLE_DINIT_ACN1S04_7 0x00
+#define VEHICLE_DINIT_ACN1S05_0 0x00
+#define VEHICLE_DINIT_ACN1S05_1 0x00
+#define VEHICLE_DINIT_ACN1S06_0 0x00
+#define VEHICLE_DINIT_ACN1S06_1 0x00
+#define VEHICLE_DINIT_ACN1S06_2 0x00
+#define VEHICLE_DINIT_ACN1S06_4 0x00
+#define VEHICLE_DINIT_ACN1S06_7 0x00
+#define VEHICLE_DINIT_ACN1S08_0 0x00
+#define VEHICLE_DINIT_ACN1S08_1 0x00
+#define VEHICLE_DINIT_ACN1S08_2 0x00
+#define VEHICLE_DINIT_ACN1S08_6 0x00
+#define VEHICLE_DINIT_ACN1S08_7 0x00
+#define VEHICLE_DINIT_ACN1S07_3 0x00
+#define VEHICLE_DINIT_ACN1S07_5 0x00
+#define VEHICLE_DINIT_EHV1S90_2 0x00
+#define VEHICLE_DINIT_EHV1S90_3 0x00
+#define VEHICLE_DINIT_EHV1S90_4 0x00
+#define VEHICLE_DINIT_EHV1S90_5 0x00
+#define VEHICLE_DINIT_EHV1S90_6 0x00
+#define VEHICLE_DINIT_EHV1S90_7 0x00
+#define VEHICLE_DINIT_ECT1S92_1 0x00
+#define VEHICLE_DINIT_ECT1S92_5 0x00
+#define VEHICLE_DINIT_ENG1S28_0 0x00
+#define VEHICLE_DINIT_ENG1S28_1 0x00
+#define VEHICLE_DINIT_BGM1S01_0 0x00
+#define VEHICLE_DINIT_ENG1F03_1 0x00
+#define VEHICLE_DINIT_ENG1F03_3 0x00
+#define VEHICLE_DINIT_MET1S01_5 0x00
+#define VEHICLE_DINIT_MET1S01_6 0x00
+#define VEHICLE_DINIT_MET1S01_7 0x00
+#define VEHICLE_DINIT_MET1S03_2 0x00
+#define VEHICLE_DINIT_MET1S03_3 0x00
+#define VEHICLE_DINIT_MET1S03_4 0x00
+#define VEHICLE_DINIT_MET1S04_4 0x00
+#define VEHICLE_DINIT_MET1S04_5 0x00
+#define VEHICLE_DINIT_MET1S04_6 0x00
+#define VEHICLE_DINIT_MET1S04_7 0x00
+#define VEHICLE_DINIT_MET1S05_5 0x00
+#define VEHICLE_DINIT_MET1S05_6 0x00
+#define VEHICLE_DINIT_MET1S05_7 0x00
+#define VEHICLE_DINIT_MET1S07_6 0x00
+#define VEHICLE_DINIT_MET1S07_7 0x00
+#define VEHICLE_DINIT_BDB1S01_4 0x00
+#define VEHICLE_DINIT_BDB1S01_5 0x00
+#define VEHICLE_DINIT_BDB1S03_4 0x00
+#define VEHICLE_DINIT_BDB1S08_2 0x00
+#define VEHICLE_DINIT_BDB1S08_3 0x00
+#define VEHICLE_DINIT_BDB1S08_4 0x00
+#define VEHICLE_DINIT_BDB1S08_5 0x00
+#define VEHICLE_DINIT_BDB1F03_2 0x00
+#define VEHICLE_DINIT_BDB1F03_3 0x00
+#define VEHICLE_DINIT_BDB1F03_4 0x00
+#define VEHICLE_DINIT_BDB1F03_5 0x00
+#define VEHICLE_DINIT_BDB1F03_6 0x00
+#define VEHICLE_DINIT_BDB1F03_7 0x00
+#define VEHICLE_DINIT_TPM1S02_2 0x00
+#define VEHICLE_DINIT_TPM1S02_5 0x00
+#define VEHICLE_DINIT_TPM1S03_2 0x00
+#define VEHICLE_DINIT_TPM1S03_3 0x00
+#define VEHICLE_DINIT_TPM1S03_4 0x00
+#define VEHICLE_DINIT_TPM1S03_5 0x00
+#define VEHICLE_DINIT_TPM1S03_6 0x00
+#define VEHICLE_DINIT_TPM1S03_7 0x00
+#define VEHICLE_DINIT_ENG1S92_3 0x00
+#define VEHICLE_DINIT_MMT1S52_0 0x00
+#define VEHICLE_DINIT_EPB1S01_0 0x00
+#define VEHICLE_DINIT_MINIJACK 0x00
+#define VEHICLE_DINIT_GPS_ANTENNA 0x00
+#define VEHICLE_DINIT_SNS_COUNTER 0x00
+#define VEHICLE_DINIT_GPS_COUNTER 0x00
+
+/* ++ PastModel002 support */
+#define VEHICLE_DINIT_GPS_UBLOX_NAV_POSLLH 0x00
+#define VEHICLE_DINIT_GPS_UBLOX_NAV_STATUS 0x00
+#define VEHICLE_DINIT_GPS_UBLOX_NAV_TIMEUTC 0x00
+#define VEHICLE_DINIT_GPS_UBLOX_NAV_VELNED 0x00
+#define VEHICLE_DINIT_GPS_UBLOX_NAV_DOP 0x00
+#define VEHICLE_DINIT_GPS_UBLOX_NAV_TIMEGPS 0x00
+#define VEHICLE_DINIT_GPS_UBLOX_NAV_SVINFO 0x00
+#define VEHICLE_DINIT_GPS_UBLOX_NAV_CLOCK 0x00
+#define VEHICLE_DINIT_GPS_UBLOX_MON_HW 0x00
+
+#define VEHICLE_DINIT_SPEED_PULSE_FLAG 0x00
+#define VEHICLE_DINIT_GPS_INTERRUPT_FLAG 0x00
+
+#define VEHICLE_DINIT_GYRO_TROUBLE 0x00 /* Gyro failure status undefined(GYRO_UNFIXED) */
+#define VEHICLE_DINIT_MAIN_GPS_INTERRUPT_SIGNAL 0x00
+#define VEHICLE_DINIT_SYS_GPS_INTERRUPT_SIGNAL 0x00
+#define VEHICLE_DINIT_GYRO_CONNECT_STATUS 0x00
+/* -- PastModel002 support */
+
+/* Size of the data(byte) */
+#define VEHICLE_DSIZE_DESTINATION 0x03
+#define VEHICLE_DSIZE_HV 0x01
+#define VEHICLE_DSIZE_2WD4WD 0x01
+#define VEHICLE_DSIZE_STEERING_WHEEL 0x01
+#define VEHICLE_DSIZE_VB 0x01
+#define VEHICLE_DSIZE_IG 0x01
+#define VEHICLE_DSIZE_MIC 0x01
+#define VEHICLE_DSIZE_TEST 0x01
+#define VEHICLE_DSIZE_VTRADAPTER 0x01
+#define VEHICLE_DSIZE_AUXADAPTER 0x01
+#define VEHICLE_DSIZE_BACKDOOR 0x01
+#define VEHICLE_DSIZE_PKB 0x01
+#define VEHICLE_DSIZE_ADIM 0x01
+#define VEHICLE_DSIZE_ILL 0x01
+#define VEHICLE_DSIZE_RHEOSTAT 0x01
+#define VEHICLE_DSIZE_PANELTEMP 0x01
+#define VEHICLE_DSIZE_SYSTEMP 0x02
+#define VEHICLE_DSIZE_SPEED_PULSE 0x14
+#define VEHICLE_DSIZE_SPEED_KMPH 0x02
+#define VEHICLE_DSIZE_GYRO_X 0x14
+#define VEHICLE_DSIZE_GYRO_Y 0x14
+#define VEHICLE_DSIZE_GYRO_Z 0x14
+#define VEHICLE_DSIZE_GYRO VEHICLE_DSIZE_GYRO_X
+#define VEHICLE_DSIZE_GYRO_TEMP 0x02
+#define VEHICLE_DSIZE_PULSE_TIME 0x84
+#define VEHICLE_DSIZE_GSNS_X 0x06
+#define VEHICLE_DSIZE_GSNS_Y 0x06
+#define VEHICLE_DSIZE_GSNS_Z 0x06
+#define VEHICLE_DSIZE_REV 0x01
+#define VEHICLE_DSIZE_VSC1S03 0x09 /* Internal extensions */
+#define VEHICLE_DSIZE_ECO1S01 0x05
+#define VEHICLE_DSIZE_ENG1F07 0x08
+#define VEHICLE_DSIZE_ENG1S03 0x08
+#define VEHICLE_DSIZE_ACN1S04 0x08
+#define VEHICLE_DSIZE_ACN1S05 0x02
+#define VEHICLE_DSIZE_ACN1S06 0x08
+#define VEHICLE_DSIZE_ACN1S08 0x08
+#define VEHICLE_DSIZE_ACN1S07 0x06
+#define VEHICLE_DSIZE_EHV1S90 0x08
+#define VEHICLE_DSIZE_ECT1S92 0x08
+#define VEHICLE_DSIZE_ENG1S28 0x02
+#define VEHICLE_DSIZE_BGM1S01 0x01
+#define VEHICLE_DSIZE_ENG1F03 0x08
+#define VEHICLE_DSIZE_CAA1N01 0x08
+#define VEHICLE_DSIZE_MET1S01 0x08
+#define VEHICLE_DSIZE_MET1S03 0x08
+#define VEHICLE_DSIZE_MET1S04 0x08
+#define VEHICLE_DSIZE_MET1S05 0x08
+#define VEHICLE_DSIZE_MET1S07 0x08
+#define VEHICLE_DSIZE_BDB1S01 0x08
+#define VEHICLE_DSIZE_BDB1S03 0x08
+#define VEHICLE_DSIZE_BDB1S08 0x08
+#define VEHICLE_DSIZE_BDB1F03 0x08
+#define VEHICLE_DSIZE_TPM1S02 0x08
+#define VEHICLE_DSIZE_TPM1S03 0x08
+#define VEHICLE_DSIZE_ENG1S92 0x08
+#define VEHICLE_DSIZE_MMT1S52 0x08
+#define VEHICLE_DSIZE_EPB1S01 0x03
+#define VEHICLE_DSIZE_MINIJACK 0x01
+#define VEHICLE_DSIZE_GPS_ANTENNA 0x01
+#define VEHICLE_DSIZE_SNS_COUNTER 0x01
+#define VEHICLE_DSIZE_GPS_COUNTER 0x01
+#define VEHICLE_DSIZE_SIRF_BINARY 360
+#define VEHICLE_DSIZE_RTC VEHICLE_DSIZE_GPS_FORMAT
+#define VEHICLE_DSIZE_GPS_VERSION VEHICLE_DSIZE_GPS_FORMAT
+#define VEHICLE_DSIZE_SATELLITE_STATUS VEHICLE_DSIZE_GPS_FORMAT
+#define VEHICLE_DSIZE_LOCATION VEHICLE_DSIZE_GPS_FORMAT
+/* ++ GPS _CWORD82_ support */
+#define VEHICLE_DSIZE_GPS__CWORD82___CWORD44_GP4 VEHICLE_DSIZE_GPS_FORMAT
+#define VEHICLE_DSIZE_GPS__CWORD82__NMEA 424
+#define VEHICLE_DSIZE_GPS__CWORD82__FULLBINARY VEHICLE_DSIZE_GPS_FORMAT
+/* -- GPS _CWORD82_ support */
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+#define VEHICLE_DSIZE_DATA_MASTER_FST 0x1200
+
+#define VEHICLE_DSIZE_GYRO_X_FST LSDRV_FSTSNS_DSIZE_GYRO_X
+#define VEHICLE_DSIZE_GYRO_Y_FST LSDRV_FSTSNS_DSIZE_GYRO_Y
+#define VEHICLE_DSIZE_GYRO_Z_FST LSDRV_FSTSNS_DSIZE_GYRO_Z
+#define VEHICLE_DSIZE_SPEED_PULSE_FST LSDRV_FSTSNS_DSIZE_SPEED
+#define VEHICLE_DSIZE_GSNSX_FST LSDRV_FSTSNS_DSIZE_GSENSOR_X
+#define VEHICLE_DSIZE_GSNSY_FST LSDRV_FSTSNS_DSIZE_GSENSOR_Y
+#define VEHICLE_DSIZE_GSNSZ_FST LSDRV_FSTSNS_DSIZE_GSENSOR_Z
+#define VEHICLE_DSIZE_GYROTEMP_FST LSDRV_FSTSNS_DSIZE_GYRO_TEMP
+#define VEHICLE_DSIZE_SPEED_PULSE_FLAG_FST LSDRV_FSTSNS_DSIZE_SPEED_FLG
+#define VEHICLE_DSIZE_REV_FST LSDRV_FSTSNS_DSIZE_REV
+
+#define VEHICLE_DSIZE_GYRO_EXT 0x500
+#define VEHICLE_DSIZE_SPEED_PULSE_EXT 0x500
+#define VEHICLE_DSIZE_GSNS_X_EXT 0x500
+#define VEHICLE_DSIZE_GSNS_Y_EXT 0x500
+#define VEHICLE_DSIZE_GSNS_Z_EXT 0x500
+#define VEHICLE_DSIZE_SNS_COUNTER_EXT 0x40
+#define VEHICLE_DSIZE_GYRO_TEMP_EXT 0x80
+#define VEHICLE_DSIZE_REV_EXT 0x40
+#define VEHICLE_DSIZE_PULSE_TIME_EXT 0x2100
+
+#define VEHICLE_DSIZE_GYRO_EXT_INIT 0x00 /* Gyro output extended data master registration number initial value */
+#define VEHICLE_DSIZE_SPEED_PULSE_EXT_INIT 0x00 /* Vehicle speed expansion data master registration number initial value */
+#define VEHICLE_DSIZE_GSNS_X_EXT_INIT 0x00 /* Initial value of G sensor (X-axis) extended data master registration number */
+#define VEHICLE_DSIZE_GSNS_Y_EXT_INIT 0x00 /* Initial value of G sensor (Y-axis) expansion data master registration number */
+#define VEHICLE_DSIZE_GSNS_Z_EXT_INIT 0x00 /* Initial value of G sensor (Z-axis) expansion data master registration number */
+#define VEHICLE_DSIZE_SNS_COUNTER_EXT_INIT 0x00 /* Initial value of register number of sensor counter extended data master */
+#define VEHICLE_DSIZE_REV_EXT_INIT 0x00 /* REV extended data master registration number initial value */
+#define VEHICLE_DSIZE_GYRO_TEMP_EXT_INIT 0x00 /* Gyro Temperature Extended Data Master Registration Number Initial Value */
+#define VEHICLE_DSIZE_PULSE_TIME_EXT_INIT 0x00 /* Extended data master registration number initial value between pulse time */
+
+#define VEHICLE_DSIZE_GYRO_TROUBLE 0x01
+#define VEHICLE_DSIZE_MAIN_GPS_INTERRUPT_SIGNAL 0x01
+#define VEHICLE_DSIZE_SYS_GPS_INTERRUPT_SIGNAL 0x01
+#define VEHICLE_DSIZE_GYRO_CONNECT_STATUS 0x01
+
+#define VEHICLE_DKEEP_MAX 64 /* Internal data retention count */
+
+/* Data storage location */
+#define VEHICLE_DATA_POS_00 0x00 /* Data storage position 0 */
+#define VEHICLE_DATA_POS_01 0x01 /* Data storage position 1 */
+#endif
+
+#define VEHICLE_DSIZE_GPS_FORMAT 1904
+
+/* ++ PastModel002 support */
+/* GPS_u-blox data size(Up to 208 bytes + 1 byte of sensor counter) */
+#define VEHICLE_DSIZE_GPS_UBLOX_FORMAT 212
+/* ++ PastModel002 support */
+
+/* NMEA data size */
+#define VEHICLE_DSIZE_GPS_NMEA_GGA 71 /* Positioning information(Fixed-length sentence 71 Byte) */
+#define VEHICLE_DSIZE_GPS_NMEA_DGGA 75 /* Double precision GGA - Positioning information(Fixed-length sentence 75 Byte) */
+#define VEHICLE_DSIZE_GPS_NMEA_VTG 37 /* Progress Direction,Velocity information(Fixed-length sentence 37 Byte) */
+#define VEHICLE_DSIZE_GPS_NMEA_RMC 61 /* RMC - Minimal information(Fixed-length sentence 61 Byte) */
+#define VEHICLE_DSIZE_GPS_NMEA_DRMC 67 /* Double RMC - Minimal information(Fixed-length sentence 67 Byte) */
+#define VEHICLE_DSIZE_GPS_NMEA_GLL 44 /* GLL - Geographical locality information(Fixed-length sentence 44 Byte) */
+#define VEHICLE_DSIZE_GPS_NMEA_DGLL 50 /* Double-precision GLL - Geographical locality information(Fixed-length sentence 50 Byte) */
+/* GSA - DOP information and positioning satellite information(Fixed-length sentence 66 Byte) */
+#define VEHICLE_DSIZE_GPS_NMEA_GSA 66
+#define VEHICLE_DSIZE_GPS_NMEA_GSV_1 70 /* GSV - Visual satellite information(Fixed-length sentence 70 Byte) */
+#define VEHICLE_DSIZE_GPS_NMEA_GSV_2 70 /* GSV - Visual satellite information(Fixed-length sentence 70 Byte) */
+#define VEHICLE_DSIZE_GPS_NMEA_GSV_3 70 /* GSV - Visual satellite information(Fixed-length sentence 70 Byte) */
+/* _CWORD44_,GP,3 - Visual satellite reception information */
+#define VEHICLE_DSIZE_GPS_NMEA_PJRDC_GP_3 78
+/* _CWORD44_,GP,4 - Receiver-specific information */
+#define VEHICLE_DSIZE_GPS_NMEA_PJRDC_GP_4 25
+
+/* FULLBINARY data size */
+/* Fully customized output */
+#define VEHICLE_DSIZE_GPS_FULLBINARY GPS_CMD_FULLBIN_SZ
+
+#if CONFIG_HW_PORTSET_TYPE_C
+#define VEHICLE_DSIZE_NMEA 0
+#define VEHICLE_DSIZE_GGA 0x00
+#define VEHICLE_DSIZE_GLL 0x00
+#define VEHICLE_DSIZE_GSA 0x00
+#define VEHICLE_DSIZE_GSV 0x00
+#define VEHICLE_DSIZE_RMC 0x00
+#define VEHICLE_DSIZE_VTG 0x00
+#endif
+
+/* ++ PastModel002 support */
+#define VEHICLE_DSIZE_GPS_UBLOX_HEADER_SIZE 0 /* UBX common header size */
+
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_CLOCK 0
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_DOP 0
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_POSLLH 0
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_STATUS 0
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_SVINFO 0 /* 8 + 12*numCh(For variable,Define only the fixed part) */
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_TIMEGPS 0
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_TIMEUTC 0
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_VELNED 0
+#define VEHICLE_DSIZE_GPS_UBLOX_MON_HW 0
+
+#define VEHICLE_DSIZE_SPEED_PULSE_FLAG 0x00
+#define VEHICLE_DSIZE_GPS_INTERRUPT_FLAG 0x00
+
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_SVINFO_CH_MAX 0 /* Maximum number of NAV_SVINFO channels */
+#define VEHICLE_DSIZE_GPS_UBLOX_NAV_SVINFO_ALONE_MAX 0 /* NAV_SVINFO channel:Maximum Single Data Size */
+/* -- PastModel002 support */
+
+/* Data received*/
+#define VEHICLE_RCVFLAG_ON 0x00
+#define VEHICLE_RCVFLAG_OFF 0x00
+
+/* Upper limit of number of data items stored between pulses */
+#define VEHICLE_SNS_INFO_PULSE_NUM 0
+
+/*------------------------------------------------------------------------------*
+ * NMEA reception flag *
+ -------------------------------------------------------------------------------*/
+/* Not supported by UBX_Protocol */
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+
+/*********************************************************************
+* TAG : VEHICLESENS_DATA_MASTER
+* ABSTRACT : Vehicle sensor data master structure
+***********************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_snscnt; /* Sensor Counter */
+ u_int8 uc_data[132]; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER;
+
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_reserve; /* Reserved */
+ u_int8 uc_data[8448]; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_EXT;
+
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 partition_flg; /* Fragmented Transmission Flag */
+ u_int8 uc_data[VEHICLE_DSIZE_DATA_MASTER_FST]; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_FST;
+
+#endif
+
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_reserve; /* Reserved */
+ u_int8 uc_data[VEHICLE_DSIZE_GPS_FORMAT]; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_GPS_FORMAT;
+
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_reserve; /* Reserved */
+ u_int8 uc_data[VEHICLE_DSIZE_SIRF_BINARY]; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_GPS_BINARY;
+
+/* ++ GPS _CWORD82_ support */
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_reserve; /* Reserved */
+ u_int8 uc_data[VEHICLE_DSIZE_GPS__CWORD82__NMEA]; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_GPS_NMEA_FORMAT;
+
+/* -- GPS _CWORD82_ support */
+#if CONFIG_HW_PORTSET_TYPE_C
+
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_reserve; /* Reserved */
+ u_int8 uc_data[VEHICLE_DSIZE_NMEA]; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_GPS_NMEA;
+#endif
+
+/* ++ PastModel002 support */
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_sensor_cnt; /* Sensor Counter */
+ u_int8 uc_gpscnt_flag; /* GPS counter flag */
+ u_int8 reserve[3]; /* reserve */
+ u_int8 uc_data[VEHICLE_DSIZE_GPS_UBLOX_FORMAT]; /* UBLOX_GPS data */
+} VEHICLESENS_DATA_MASTER_GPS_UBLOX_FORMAT;
+
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_reserve; /* Reserved */
+ u_int8 uc_data; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_GYRO_TROUBLE;
+
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_reserve; /* Reserved */
+ u_int8 uc_data; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_GPS_INTERRUPT_SIGNAL;
+
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_reserve; /* Reserved */
+ u_int8 uc_data; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_GYRO_CONNECT_STATUS;
+
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_size; /* Size of the data */
+ u_int8 uc_rcvflag; /* Receive flag */
+ u_int8 uc_sensor_cnt; /* Sensor Counter */
+ u_int8 uc_data; /* Vehicle sensor data */
+} VEHICLESENS_DATA_MASTER_GPS_ANTENNA_STATUS;
+
+/* ++ PastModel002 support */
+
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+/*********************************************************************
+* TAG : VEHICLESENS_PKG_DELIVERY_TEMP_EXT
+* ABSTRACT : Structure of Vehicle Sensor Initial Delivery Management Table
+***********************************************************************/
+typedef struct {
+ u_int16 us_gyro[10]; /* Gyro output */
+ u_int16 us_sp_pls[10]; /* Vehicle speed pulse */
+ u_int8 uc_sens_cnt; /* Sensor Counter */
+ u_int8 uc_reserve[3]; /* reserve */
+} VEHICLESENS_PKG_DELIVERY_TEMP_TBL;
+
+// for VEHICLESENS_PKG_DELIVERY_TEMP_EXT.start_point index
+enum VEHICLESENS_PKG_INDEX {
+ SNSCounter = 0,
+ SpeedPulse,
+ GyroExt,
+ GsnsX,
+ GsnsY,
+ Rev,
+ GyroTemp,
+ PulseTime,
+ GyroY,
+ GyroZ,
+ GsnsZ,
+ MAX
+};
+
+typedef struct {
+ uint16_t start_point[8]; /* Sequence reference start position */
+ uint16_t end_point; /* Array registration completion position */
+ uint16_t data_break; /* All data undelivered flag */
+} VEHICLESENS_PKG_DELIVERY_TEMP_EXT;
+
+/************************************************************************
+* External variable *
+************************************************************************/
+extern VEHICLESENS_PKG_DELIVERY_TEMP_EXT gstPkgTempExt; // NOLINT(readability/nolint)
+#endif
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+void VehicleSensInitDataMaster(void);
+void VehicleSensSetDataMasterLineSens(const LSDRV_LSDATA *, PFUNC_DMASTER_SET_N func, BOOL);
+void VehicleSensSetDataMasterLineSensG(const LSDRV_LSDATA_G *, PFUNC_DMASTER_SET_N func, BOOL);
+void VehicleSensSetDataMasterGps(SENSOR_MSG_GPSDATA_DAT *, PFUNC_DMASTER_SET_N func);
+void VehicleSensGetDataMaster(DID ul_did, u_int8, VEHICLESENS_DATA_MASTER *);
+void VehicleSensGetGpsDataMaster(DID ul_did, u_int8, SENSOR_MSG_GPSDATA_DAT *);
+void VehicleSensSetDataMasterData(const POS_MSGINFO *, PFUNC_DMASTER_SET_N func);
+
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+void VehicleSensSetDataMasterLineSensFst(const LSDRV_LSDATA_FST *pst_data, PFUNC_DMASTER_SET_N p_data_master_set_n);
+void VehicleSensSetDataMasterLineSensFstG(const LSDRV_MSG_LSDATA_DAT_FST *pst_data,
+ PFUNC_DMASTER_SET_N p_data_master_set_n);
+void VehicleSensGetDataMasterFst(DID ul_did, u_int8, VEHICLESENS_DATA_MASTER_FST *);
+void VehicleSensGetDataMasterExt(DID ul_did, u_int8, VEHICLESENS_DATA_MASTER_EXT *);
+#endif
+
+void VehicleSensSetDataMasterGyroTrouble(const LSDRV_MSG_LSDATA_DAT_GYRO_TROUBLE *pst_data,
+ PFUNC_DMASTER_SET_N p_data_master_set_n);
+void VehicleSensSetDataMasterSysGpsInterruptSignal(const LSDRV_MSG_LSDATA_DAT_GPS_INTERRUPT_SIGNAL *pst_data,
+ PFUNC_DMASTER_SET_SHARED_MEMORY p_data_master_set_shared_memory);
+void VehicleSensSetDataMasterMainGpsInterruptSignal(const SENSOR_MSG_GPSDATA_DAT *pst_data,
+ PFUNC_DMASTER_SET_SHARED_MEMORY p_data_master_set_shared_memory);
+void VehicleSensSetDataMasterGyroConnectStatus(const LSDRV_MSG_LSDATA_DAT_GYRO_CONNECT_STATUS *pst_data,
+ PFUNC_DMASTER_SET_SHARED_MEMORY p_data_master_set_shared_memory);
+void VehicleSensSetDataMasterGpsAntennaStatus(const LSDRV_MSG_LSDATA_DAT_GPS_ANTENNA_STATUS *pst_data,
+ PFUNC_DMASTER_SET_N p_data_master_set_n);
+
+void VehicleSensGetDataMasterGyroTrouble(DID ul_did, u_int8 uc_get_method,
+ VEHICLESENS_DATA_MASTER_GYRO_TROUBLE *pst_data);
+void VehicleSensGetDataMasterSysGpsInterruptSignal(DID ul_did, u_int8 uc_get_method,
+ VEHICLESENS_DATA_MASTER_GPS_INTERRUPT_SIGNAL *pst_data);
+void VehicleSensGetDataMasterMainGpsInterruptSignal(DID ul_did, u_int8 uc_get_method,
+ VEHICLESENS_DATA_MASTER_GPS_INTERRUPT_SIGNAL *pst_data);
+void VehicleSensGetDataMasterGyroConnectStatus(DID ul_did, u_int8 uc_get_method,
+ VEHICLESENS_DATA_MASTER_GYRO_CONNECT_STATUS *pst_data);
+void VehicleSensGetDataMasterGpsAntennaStatus(DID ul_did, u_int8 uc_get_method,
+ VEHICLESENS_DATA_MASTER_GPS_ANTENNA_STATUS *pst_data);
+
+void VehicleSensGetGsnsX(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitGsnsXl(void);
+u_int8 VehicleSensSetGsnsXl(const LSDRV_LSDATA *);
+void VehicleSensGetGsnsXl(VEHICLESENS_DATA_MASTER *);
+u_int8 VehicleSensSetGsnsXlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGsnsXFst(VEHICLESENS_DATA_MASTER_FST *, u_int8);
+void VehicleSensInitGsnsXFstl(void);
+u_int8 VehicleSensSetGsnsXFstG(const LSDRV_LSDATA_FST_GSENSOR_X *pst_data);
+void VehicleSensGetGsnsXFstl(VEHICLESENS_DATA_MASTER_FST *pst_data);
+
+void VehicleSensGetGsnsY(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitGsnsYl(void);
+u_int8 VehicleSensSetGsnsYl(const LSDRV_LSDATA *);
+void VehicleSensGetGsnsYl(VEHICLESENS_DATA_MASTER *);
+u_int8 VehicleSensSetGsnsYlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGsnsYFst(VEHICLESENS_DATA_MASTER_FST *, u_int8);
+void VehicleSensInitGsnsYFstl(void);
+u_int8 VehicleSensSetGsnsYFstG(const LSDRV_LSDATA_FST_GSENSOR_Y *pst_data);
+void VehicleSensGetGsnsYFstl(VEHICLESENS_DATA_MASTER_FST *pst_data);
+
+void VehicleSensGetGsnsZ(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitGsnsZl(void);
+u_int8 VehicleSensSetGsnsZl(const LSDRV_LSDATA *);
+void VehicleSensGetGsnsZl(VEHICLESENS_DATA_MASTER *);
+u_int8 VehicleSensSetGsnsZlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGsnsZFst(VEHICLESENS_DATA_MASTER_FST *, u_int8);
+void VehicleSensInitGsnsZFstl(void);
+u_int8 VehicleSensSetGsnsZFstG(const LSDRV_LSDATA_FST_GSENSOR_Z *pst_data);
+void VehicleSensGetGsnsZFstl(VEHICLESENS_DATA_MASTER_FST *pst_data);
+
+void VehicleSensGetGyroX(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitGyroXl(void);
+u_int8 VehicleSensSetGyroXl(const LSDRV_LSDATA *);
+u_int8 VehicleSensSetGyroXlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGyroXl(VEHICLESENS_DATA_MASTER *);
+
+void VehicleSensGetGyroY(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitGyroYl(void);
+u_int8 VehicleSensSetGyroYl(const LSDRV_LSDATA *);
+u_int8 VehicleSensSetGyroYlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGyroYl(VEHICLESENS_DATA_MASTER *);
+
+void VehicleSensGetGyroZ(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitGyroZl(void);
+u_int8 VehicleSensSetGyroZl(const LSDRV_LSDATA *);
+u_int8 VehicleSensSetGyroZlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGyroZl(VEHICLESENS_DATA_MASTER *);
+
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+void VehicleSensGetSpeedPulseFst(VEHICLESENS_DATA_MASTER_FST *, u_int8);
+void VehicleSensInitSpeedPulseFstl(void);
+u_int8 VehicleSensSetSpeedPulseFstl(const LSDRV_LSDATA_FST *);
+u_int8 VehicleSensSetSpeedPulseFstG(const LSDRV_LSDATA_FST_SPEED *);
+void VehicleSensGetSpeedPulseFstl(VEHICLESENS_DATA_MASTER_FST *);
+
+void VehicleSensGetGyroXFst(VEHICLESENS_DATA_MASTER_FST *, u_int8);
+void VehicleSensInitGyroXFstl(void);
+u_int8 VehicleSensSetGyroXFstl(const LSDRV_LSDATA_FST *);
+u_int8 VehicleSensSetGyroXFstG(const LSDRV_LSDATA_FST_GYRO_X *);
+void VehicleSensGetGyroXFstl(VEHICLESENS_DATA_MASTER_FST *);
+
+void VehicleSensGetGyroYFst(VEHICLESENS_DATA_MASTER_FST *, u_int8);
+void VehicleSensInitGyroYFstl(void);
+u_int8 VehicleSensSetGyroYFstl(const LSDRV_LSDATA_FST *);
+u_int8 VehicleSensSetGyroYFstG(const LSDRV_LSDATA_FST_GYRO_Y *);
+void VehicleSensGetGyroYFstl(VEHICLESENS_DATA_MASTER_FST *);
+
+void VehicleSensGetGyroYExt(VEHICLESENS_DATA_MASTER_EXT *, u_int8);
+void VehicleSensInitGyroYExtl(void);
+void VehicleSensSetGyroYExtlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGyroYExtl(VEHICLESENS_DATA_MASTER_EXT *);
+
+void VehicleSensGetGyroZFst(VEHICLESENS_DATA_MASTER_FST *, u_int8);
+void VehicleSensInitGyroZFstl(void);
+u_int8 VehicleSensSetGyroZFstl(const LSDRV_LSDATA_FST *);
+u_int8 VehicleSensSetGyroZFstG(const LSDRV_LSDATA_FST_GYRO_Z *);
+void VehicleSensGetGyroZFstl(VEHICLESENS_DATA_MASTER_FST *);
+
+void VehicleSensGetGyroZExt(VEHICLESENS_DATA_MASTER_EXT *, u_int8);
+void VehicleSensInitGyroZExtl(void);
+void VehicleSensSetGyroZExtlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGyroZExtl(VEHICLESENS_DATA_MASTER_EXT *);
+
+void VehicleSensGetSpeedPulseFlagFst(VEHICLESENS_DATA_MASTER_FST *, u_int8);
+void VehicleSensInitSpeedPulseFlagFstl(void);
+u_int8 VehicleSensSetSpeedPulseFlagFstl(const LSDRV_LSDATA_FST *);
+u_int8 VehicleSensSetSpeedPulseFlagFstG(const LSDRV_LSDATA_FST_SPEED_PULSE_FLAG *);
+void VehicleSensGetSpeedPulseFlagFstl(VEHICLESENS_DATA_MASTER_FST *);
+
+void VehicleSensGetRevFst(VEHICLESENS_DATA_MASTER_FST *, u_int8);
+void VehicleSensInitRevFstl(void);
+u_int8 VehicleSensSetRevFstl(const LSDRV_LSDATA_FST *);
+u_int8 VehicleSensSetRevFstG(const LSDRV_LSDATA_FST_REV *);
+void VehicleSensGetRevFstl(VEHICLESENS_DATA_MASTER_FST *);
+
+void VehicleSensGetGsnsXExt(VEHICLESENS_DATA_MASTER_EXT *, u_int8);
+void VehicleSensInitGsnsXExtl(void);
+void VehicleSensSetGsnsXExtl(const LSDRV_LSDATA *);
+void VehicleSensSetGsnsXExtlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGsnsXExtl(VEHICLESENS_DATA_MASTER_EXT *);
+
+void VehicleSensGetGsnsYExt(VEHICLESENS_DATA_MASTER_EXT *, u_int8);
+void VehicleSensInitGsnsYExtl(void);
+void VehicleSensSetGsnsYExtl(const LSDRV_LSDATA *);
+void VehicleSensSetGsnsYExtlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGsnsYExtl(VEHICLESENS_DATA_MASTER_EXT *);
+
+void VehicleSensGetGsnsZExt(VEHICLESENS_DATA_MASTER_EXT *, u_int8);
+void VehicleSensInitGsnsZExtl(void);
+void VehicleSensSetGsnsZExtl(const LSDRV_LSDATA *);
+void VehicleSensSetGsnsZExtlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGsnsZExtl(VEHICLESENS_DATA_MASTER_EXT *);
+
+void VehicleSensGetGyroExt(VEHICLESENS_DATA_MASTER_EXT *, u_int8);
+void VehicleSensInitGyroExtl(void);
+void VehicleSensSetGyroExtl(const LSDRV_LSDATA *);
+void VehicleSensSetGyroExtlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGyroExtl(VEHICLESENS_DATA_MASTER_EXT *);
+
+void VehicleSensGetGyroRev(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitGyroRevl(void);
+u_int8 VehicleSensSetGyroRevl(const LSDRV_LSDATA *);
+u_int8 VehicleSensSetGyroRevlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetGyroRevl(VEHICLESENS_DATA_MASTER *);
+
+void VehicleSensGetSpeedPulseExt(VEHICLESENS_DATA_MASTER_EXT *, u_int8);
+void VehicleSensInitSpeedPulseExtl(void);
+void VehicleSensSetSpeedPulseExtl(const LSDRV_LSDATA *);
+void VehicleSensSetSpeedPulseExtlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetSpeedPulseExtl(VEHICLESENS_DATA_MASTER_EXT *);
+
+void VehicleSensGetSnsCounterExt(VEHICLESENS_DATA_MASTER_EXT *, u_int8);
+void VehicleSensInitSnsCounterExtl(void);
+void VehicleSensSetSnsCounterExtl(const LSDRV_LSDATA *);
+void VehicleSensSetSnsCounterExtlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetSnsCounterExtl(VEHICLESENS_DATA_MASTER_EXT *);
+
+void VehicleSensGetRevExt(VEHICLESENS_DATA_MASTER_EXT *pst_data, u_int8 uc_get_method);
+void VehicleSensGetRevExtl(VEHICLESENS_DATA_MASTER_EXT *pst_data);
+void VehicleSensInitRevExtl(void);
+void VehicleSensSetRevExtlG(const LSDRV_LSDATA_G *pst_data);
+
+#endif
+
+void VehicleSensGetSpeedKmph(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitSpeedKmphl(void);
+u_int8 VehicleSensSetSpeedKmphl(const LSDRV_LSDATA *);
+u_int8 VehicleSensSetSpeedKmphlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetSpeedKmphl(VEHICLESENS_DATA_MASTER *);
+
+void VehicleSensGetGyroTemp(VEHICLESENS_DATA_MASTER *pst_data, u_int8 uc_get_method);
+void VehicleSensInitGyroTempl(void);
+u_int8 VehicleSensSetGyroTemplG(const LSDRV_LSDATA_G *pst_data);
+void VehicleSensGetGyroTempl(VEHICLESENS_DATA_MASTER *pst_data);
+
+void VehicleSensGetGyroTempFst(VEHICLESENS_DATA_MASTER_FST *pst_data, u_int8 uc_get_method);
+void VehicleSensInitGyroTempFstl(void);
+u_int8 VehicleSensSetGyroTempFstG(const LSDRV_LSDATA_FST_GYRO_TEMP *pst_data);
+void VehicleSensGetGyroTempFstl(VEHICLESENS_DATA_MASTER_FST *pst_data);
+
+void VehicleSensGetGyroTempExt(VEHICLESENS_DATA_MASTER_EXT *pst_data, u_int8 uc_get_method);
+void VehicleSensInitGyroTempExtl(void);
+void VehicleSensSetGyroTempExtlG(const LSDRV_LSDATA_G *pst_data);
+void VehicleSensGetGyroTempExtl(VEHICLESENS_DATA_MASTER_EXT *pst_data);
+
+void VehicleSensGetPulseTime(VEHICLESENS_DATA_MASTER *pst_data, u_int8 uc_get_method);
+void VehicleSensInitPulseTimel(void);
+u_int8 VehicleSensSetPulseTimelG(const LSDRV_LSDATA_G *pst_data);
+void VehicleSensGetPulseTimel(VEHICLESENS_DATA_MASTER *pst_data);
+
+void VehicleSensGetPulseTimeExt(VEHICLESENS_DATA_MASTER_EXT *pst_data, u_int8 uc_get_method);
+void VehicleSensInitPulseTimeExtl(void);
+void VehicleSensSetPulseTimeExtlG(const LSDRV_LSDATA_G *pst_data);
+void VehicleSensGetPulseTimeExtl(VEHICLESENS_DATA_MASTER_EXT *pst_data);
+
+void VehicleSensGetRev(VEHICLESENS_DATA_MASTER *, u_int8);
+
+void VehicleSensInitRevl(void);
+u_int8 VehicleSensSetRevl(const LSDRV_LSDATA *);
+void VehicleSensGetRevl(VEHICLESENS_DATA_MASTER *);
+u_int8 VehicleSensSetRevlG(const LSDRV_LSDATA_G *pst_data);
+void VehicleSensGetRevline(VEHICLESENS_DATA_MASTER *);
+
+void VehicleSensGetSpeedPulse(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitSpeedPulsel(void);
+u_int8 VehicleSensSetSpeedPulsel(const LSDRV_LSDATA *);
+u_int8 VehicleSensSetSpeedPulselG(const LSDRV_LSDATA_G *);
+void VehicleSensGetSpeedPulsel(VEHICLESENS_DATA_MASTER *);
+
+void VehicleSensGetGpsAntenna(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitGpsAntennal(void);
+u_int8 VehicleSensSetGpsAntennal(const LSDRV_LSDATA *);
+void VehicleSensGetGpsAntennal(VEHICLESENS_DATA_MASTER *);
+
+void VehicleSensGetSnsCounter(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitSnsCounterl(void);
+u_int8 VehicleSensSetSnsCounterl(const LSDRV_LSDATA *);
+u_int8 VehicleSensSetSnsCounterlG(const LSDRV_LSDATA_G *);
+void VehicleSensGetSnsCounterl(VEHICLESENS_DATA_MASTER *);
+
+void VehicleSensInitGpsCounterg(void);
+u_int8 VehicleSensSetGpsCounterg(const SENSOR_MSG_GPSDATA_DAT *);
+void VehicleSensGetGpsCounterg(SENSOR_MSG_GPSDATA_DAT *);
+
+/* ++ PastModel002 support */
+/* U-BLOX_GPS MON-HW */
+void VehicleSensInitMonHwG(void);
+u_int8 VehicleSensSetMonHwG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetMonHwG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* U-BLOX_GPS NAV-CLOCK */
+void VehicleSensInitNavClockG(void);
+u_int8 VehicleSensSetNavClockG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetNavClockG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* U-BLOX_GPS NAV-DOP */
+void VehicleSensInitNavDopG(void);
+u_int8 VehicleSensSetNavDopG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetNavDopG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* U-BLOX_GPS NAV-POSLLH */
+void VehicleSensInitNavPosllhG(void);
+u_int8 VehicleSensSetNavPosllhG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetNavPosllhG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* U-BLOX_GPS NAV-STATUS */
+void VehicleSensInitNavStatusG(void);
+u_int8 VehicleSensSetNavStatusG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetNavStatusG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* U-BLOX_GPS NAV-SVINFO */
+void VehicleSensInitNavSvInfoG(void);
+u_int8 VehicleSensSetNavSvInfoG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetNavSvInfoG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* U-BLOX_GPS NAV-TIMEGPS */
+void VehicleSensInitNavTimeGpsG(void);
+u_int8 VehicleSensSetNavTimeGpsG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetNavTimeGpsG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* U-BLOX_GPS NAV-TIMEUTC */
+void VehicleSensInitNavTimeUtcG(void);
+u_int8 VehicleSensSetNavTimeUtcG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetNavTimeUtcG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* U-BLOX_GPS NAV-VELNED */
+void VehicleSensInitNavVelnedG(void);
+u_int8 VehicleSensSetNavVelnedG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetNavVelnedG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* DR SPEED_PULSE_FLAG */
+void VehicleSensInitSpeedPulseFlag(void);
+u_int8 VehicleSensSetSpeedPulseFlag(const LSDRV_LSDATA_G *pst_data);
+void VehicleSensGetSpeedPulseFlag(VEHICLESENS_DATA_MASTER *);
+
+/* DR GPS_INTERRUPT_FLAG */
+void VehicleSensInitGpsInterruptFlag(void);
+u_int8 VehicleSensSetGpsInterruptFlag(const LSDRV_LSDATA_G *pst_data);
+void VehicleSensGetGpsInterruptFlag(VEHICLESENS_DATA_MASTER *);
+
+/* GYRO_TROUBLE */
+void VehicleSensInitGyroTrouble(void);
+u_int8 VehicleSensSetGyroTrouble(const LSDRV_MSG_LSDATA_DAT_GYRO_TROUBLE *pst_data);
+void VehicleSensGetGyroTrouble(VEHICLESENS_DATA_MASTER_GYRO_TROUBLE *pst_data);
+
+/* MAIN_GPS_INTERRUPT_SIGNAL */
+void VehicleSensInitMainGpsInterruptSignal(void);
+u_int8 VehicleSensSetMainGpsInterruptSignal(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetMainGpsInterruptSignal(VEHICLESENS_DATA_MASTER_GPS_INTERRUPT_SIGNAL *pst_data);
+
+/* SYS_GPS_INTERRUPT_SIGNAL */
+void VehicleSensInitSysGpsInterruptSignal(void);
+u_int8 VehicleSensSetSysGpsInterruptSignal(const LSDRV_MSG_LSDATA_DAT_GPS_INTERRUPT_SIGNAL *pst_data);
+void VehicleSensGetSysGpsInterruptSignal(VEHICLESENS_DATA_MASTER_GPS_INTERRUPT_SIGNAL *pst_data);
+
+/* GYRO_CONNECT_STATUS */
+void VehicleSensInitGyroConnectStatus(void);
+u_int8 VehicleSensSetGyroConnectStatus(const LSDRV_MSG_LSDATA_DAT_GYRO_CONNECT_STATUS *pst_data);
+void VehicleSensGetGyroConnectStatus(VEHICLESENS_DATA_MASTER_GYRO_CONNECT_STATUS *pst_data);
+
+/* GPS_ANTENNA_STATUS */
+void VehicleSensInitGpsAntennaStatus(void);
+u_int8 VehicleSensSetGpsAntennaStatus(const LSDRV_MSG_LSDATA_DAT_GPS_ANTENNA_STATUS *pst_data);
+void VehicleSensGetGpsAntennaStatus(VEHICLESENS_DATA_MASTER_GPS_ANTENNA_STATUS *pst_data);
+
+/* -- PastModel002 support */
+
+/* GPS__CWORD82__FULLBINARY */
+void VehicleSensInitGps_CWORD82_FullBinaryG(void);
+u_int8 VehicleSensSetGps_CWORD82_FullBinaryG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetGps_CWORD82_FullBinaryG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* GPS__CWORD82__FULLBINARY */
+void VehicleSensInitGps_CWORD82__CWORD44_Gp4G(void);
+u_int8 VehicleSensSetGps_CWORD82__CWORD44_Gp4G(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetGps_CWORD82__CWORD44_Gp4G(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* GPS__CWORD82__NMEA */
+void VehicleSensInitGps_CWORD82_NmeaG(void);
+u_int8 VehicleSensSetGps_CWORD82_NmeaG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetGps_CWORD82_NmeaG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* GPS_NMEA */
+void VehicleSensInitGpsNmeaG(void);
+u_int8 VehicleSensSetGpsNmeaG(const SENSOR_MSG_GPSDATA_DAT *pst_data);
+void VehicleSensGetGpsNmeaG(SENSOR_MSG_GPSDATA_DAT *pst_data);
+
+/* LOCATION_LONLAT */
+void VehicleSensGetLocationLonLat(VEHICLESENS_DATA_MASTER *pst_data, u_int8);
+void VehicleSensInitLocationLonLatG(void);
+u_int8 VehicleSensSetLocationLonLatG(const SENSORLOCATION_LONLATINFO_DAT*);
+void VehicleSensGetLocationLonLatG(VEHICLESENS_DATA_MASTER*);
+void VehicleSensInitLocationLonLatN(void);
+u_int8 VehicleSensSetLocationLonLatN(const SENSORLOCATION_LONLATINFO_DAT*);
+void VehicleSensGetLocationLonLatN(VEHICLESENS_DATA_MASTER*);
+void VehicleSensGetLocationLonLatnUnitCnv(VEHICLESENS_DATA_MASTER*);
+
+/* LOCATION_ALTITUDE */
+void VehicleSensGetLocationAltitude(VEHICLESENS_DATA_MASTER *pst_data, u_int8);
+void VehicleSensInitLocationAltitudeG(void);
+u_int8 VehicleSensSetLocationAltitudeG(const SENSORLOCATION_ALTITUDEINFO_DAT*);
+void VehicleSensGetLocationAltitudeG(VEHICLESENS_DATA_MASTER*);
+void VehicleSensInitLocationAltitudeN(void);
+u_int8 VehicleSensSetLocationAltitudeN(const SENSORLOCATION_ALTITUDEINFO_DAT*);
+void VehicleSensGetLocationAltitudeN(VEHICLESENS_DATA_MASTER*);
+
+/* MOTION_SPEED */
+void VehicleSensGetMotionSpeed(VEHICLESENS_DATA_MASTER *pst_data, u_int8);
+void VehicleSensInitMotionSpeedG(void);
+u_int8 VehicleSensSetMotionSpeedG(const SENSORMOTION_SPEEDINFO_DAT*);
+void VehicleSensGetMotionSpeedG(VEHICLESENS_DATA_MASTER*);
+void VehicleSensInitMotionSpeedN(void);
+u_int8 VehicleSensSetMotionSpeedN(const SENSORMOTION_SPEEDINFO_DAT*);
+void VehicleSensGetMotionSpeedN(VEHICLESENS_DATA_MASTER*);
+void VehicleSensInitMotionSpeedI(void);
+u_int8 VehicleSensSetMotionSpeedI(const SENSORMOTION_SPEEDINFO_DAT*);
+void VehicleSensGetMotionSpeedI(VEHICLESENS_DATA_MASTER*);
+
+/* MOTION_HEADING */
+void VehicleSensGetMotionHeading(VEHICLESENS_DATA_MASTER *pst_data, u_int8);
+void VehicleSensInitMotionHeadingG(void);
+u_int8 VehicleSensSetMotionHeadingG(const SENSORMOTION_HEADINGINFO_DAT*);
+void VehicleSensGetMotionHeadingG(VEHICLESENS_DATA_MASTER*);
+void VehicleSensInitMotionHeadingN(void);
+u_int8 VehicleSensSetMotionHeadingN(const SENSORMOTION_HEADINGINFO_DAT*);
+void VehicleSensGetMotionHeadingN(VEHICLESENS_DATA_MASTER*);
+void VehicleSensGetMotionHeadingnCnvData(VEHICLESENS_DATA_MASTER*);
+
+/* GPS_TIME */
+void VehicleSensGetGpsTime(SENSOR_MSG_GPSDATA_DAT*, u_int8);
+void VehicleSensInitGpsTimeG(void);
+u_int8 VehicleSensSetGpsTimeG(const SENSOR_MSG_GPSTIME*);
+void VehicleSensGetGpsTimeG(SENSOR_MSG_GPSDATA_DAT*);
+
+/* GPS_TIME_RAW */
+void VehicleSensGetGpsTimeRaw(SENSOR_MSG_GPSDATA_DAT*, u_int8);
+void VehicleSensInitGpsTimeRawG(void);
+u_int8 VehicleSensSetGpsTimeRawG(const SENSOR_GPSTIME_RAW*);
+void VehicleSensGetGpsTimeRawG(SENSOR_MSG_GPSDATA_DAT*);
+
+/* GPS_WKNROLLOVER */
+void VehicleSensGetWknRollover(VEHICLESENS_DATA_MASTER*, u_int8);
+void VehicleSensInitWknRolloverG(void);
+u_int8 VehicleSensSetWknRolloverG(const SENSOR_WKNROLLOVER*);
+void VehicleSensGetWknRolloverG(SENSOR_MSG_GPSDATA_DAT*);
+
+/* DIAG_GPS */
+void VehicleSensInitNaviinfoDiagGPSg(void);
+u_int8 VehicleSensSetNaviinfoDiagGPSg(const NAVIINFO_DIAG_GPS*);
+void VehicleSensGetNaviinfoDiagGPSg(SENSOR_MSG_GPSDATA_DAT*);
+
+/* SETTINGTIME */
+void VehicleSensGetSettingTime(VEHICLESENS_DATA_MASTER *, u_int8);
+void VehicleSensInitSettingTimeclock(void);
+u_int8 VehicleSensSetSettingTimeclock(const POS_DATETIME*);
+void VehicleSensGetSettingTimeclock(VEHICLESENS_DATA_MASTER*);
+
+/* GPS_CLOCK_DRIFT */
+void VehicleSensGetGpsClockDrift(SENSOR_MSG_GPSDATA_DAT *, u_int8);
+void VehicleSensInitGpsClockDriftG(void);
+u_int8 VehicleSensSetGpsClockDriftG(const int32_t*);
+void VehicleSensGetGpsClockDriftG(SENSOR_MSG_GPSDATA_DAT*);
+
+/* GPS_CLOCK_FREQ */
+void VehicleSensGetGpsClockFreq(SENSOR_MSG_GPSDATA_DAT *, u_int8);
+void VehicleSensInitGpsClockFreqG(void);
+u_int8 VehicleSensSetGpsClockFreqG(const uint32_t*);
+void VehicleSensGetGpsClockFreqG(SENSOR_MSG_GPSDATA_DAT*);
+
+/* LOCATION INFORMATION (NMEA) */
+void VehicleSens_GetLocationInfoNmea(VEHICLESENS_DATA_MASTER_GPS_FORMAT *, u_int8 );
+void VehicleSens_InitLocationInfoNmea_n(void);
+u_int8 VehicleSens_SetLocationInfoNmea_n( const POS_LOCATIONINFO_NMEA * );
+void VehicleSens_GetLocationInfoNmea_n(VEHICLESENS_DATA_MASTER_GPS_FORMAT * );
+
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_DATAMASTER_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/VehicleSens_DeliveryCtrl.h b/vehicleservice/positioning/server/include/Sensor/VehicleSens_DeliveryCtrl.h
new file mode 100644
index 00000000..3fb7056b
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/VehicleSens_DeliveryCtrl.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.
+ */
+
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_DELIVERYCTRL_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_DELIVERYCTRL_H_
+/******************************************************************************
+ * File name :VehicleSens_DeliveryCtrl.h
+ * System name :_CWORD107_
+ * Subsystem name :
+ ******************************************************************************/
+
+#include "Vehicle_API_Dummy.h"
+#include "Sensor_API.h"
+#include "Vehicle_API_private.h"
+#include "Sensor_API_private.h"
+#include "VehicleSens_SelectionItemList.h"
+#include "VehicleSens_DataMaster.h"
+#include "Dead_Reckoning_Local_Api.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+#define VEHICLESENS_CANID_EFFECTIVE 29 /* CAN ID Effective number */
+#define VEHICLESENS_CANID_RESERVE 11 /* CAN ID Reserved number */
+#define VEHICLESENS_SIGNAL VEHICLESENS_SELECTION_ITEM_LIST_LEN /* Number of vehicle signals */
+#define VEHICLESENS_DELIVERY 10 /* Number of delivery destinations */
+/* CAN ID Maximum number */
+#define VEHICLESENS_CANID_MAX (VEHICLESENS_CANID_EFFECTIVE + VEHICLESENS_CANID_RESERVE)
+/* Vehicle sensor information */
+#define VEHICLESENS_DELIVERY_INFO (VEHICLESENS_CANID_MAX + VEHICLESENS_SIGNAL)
+/* Maximum number of vehicle sensor information */
+#define VEHICLESENS_DELIVERY_INFO_MAX (VEHICLESENS_DELIVERY_INFO * VEHICLESENS_DELIVERY)
+/* Vehicle Sensor Information Valid Number */
+#define VEHICLESENS_DID_EFFECTIVE (VEHICLESENS_CANID_EFFECTIVE + VEHICLESENS_SIGNAL)
+#define VEHICLESENS_ACTION_TYPE_ADD 0 /* Vehicle sensor addition processing */
+#define VEHICLESENS_ACTION_TYPE_UPDATE 1 /* Vehicle sensor update processing */
+#define VEHICLESENS_LINK_INDEX_END 0xFFFF /* End of the link index */
+
+
+#define VEHICLESENS_PKG_DELIVERY_INFO_MAX 2560 /* Maximum number of vehicle sensor information */
+#define VEHICLESENS_DELIVERY_METHOD_NORMAL 0 /* Delivery system normal delivery */
+#define VEHICLESENS_DELIVERY_METHOD_PACKAGE 1 /* Delivery system package delivery */
+#define VEHICLESENS_PKG_EXT_SEND_MAX 10 /* Number of data master transmissions/onece */
+#define VEHICLESENS_PKG_EXT_SEND_MAX_10DATA 100 /* Number of data masters transmitted (GYRO),SPEED)/once */
+
+#define VEHICLESENS_DELIVERY_MAX_SIZE SENSOR_MSG_VSINFO_DSIZE /* Maximum Size of Delivery */
+#define VEHICLESENS_DELIVERY_FSTSNS_HDR_SIZE 8 /* Initial Sensor Data Delivery Data Header Size */
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+/*********************************************************************
+* TAG : VEHICLESENS_DELIVERY_LIST_CANID
+* ABSTRACT : CAN data delivery registration request information
+***********************************************************************/
+typedef struct {
+ u_int8 uc_can_num; /* CANID delivery registrations */
+ u_int8 uc_reserve[3];
+ u_int32 ul_can_id[VEHICLESENS_CANID_MAX]; /* Delivery registrationCANID */ /* CANIF_API deletion */
+} VEHICLESENS_DELIVERY_LIST_CANID;
+
+/*********************************************************************
+* TAG :VEHICLESENS_DELIVERY_CTRL_TBL_DATA
+* ABSTRACT : Structure of each data of the vehicle sensor delivery destination management table
+***********************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID */
+ PNO us_pno; /* Shipping PID */
+ u_int8 uc_chg_type; /* Delivery timing */
+ u_int8 uc_ctrl_flg; /* Delivery operation */
+ u_int16 us_link_idx; /* Link index */
+ u_int16 us_pkg_start_idx; /* Package Delivery Start Index */
+ u_int16 us_pkg_end_idx; /* Package delivery end index */
+ u_int8 uc_method; /* Delivery system */
+ u_int8 uc_reserve; /* reserve */
+ /* Modify to store the destination service name TODO */
+ /* Add handles as needed TODO */
+} VEHICLESENS_DELIVERY_CTRL_TBL_DATA;
+
+/*********************************************************************
+* TAG : VEHICLESENS_DELIVERY_CTRL_TBL
+* ABSTRACT : Vehicle Sensor Delivery Destination Management Table Structure
+***********************************************************************/
+typedef struct {
+ u_int16 us_dnum; /* Number of delivery destination management data items */
+ u_int8 uc_reserve[2]; /* Reserved */
+ /* Array of each data */
+ VEHICLESENS_DELIVERY_CTRL_TBL_DATA st_ctrl_data[VEHICLESENS_DELIVERY_INFO_MAX];
+} VEHICLESENS_DELIVERY_CTRL_TBL;
+
+/*********************************************************************
+* TAG : VEHICLESENS_DELIVERY_CTRL_TBL_MNG_DATA
+* ABSTRACT : Structure of each data of Vehicle Sensor Destination Management Table Management
+***********************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 us_start_idx; /* Start index */
+ u_int16 us_end_idx; /* End index */
+ u_int16 usdlvry_entry_num; /* Number of registered shipping addresses */
+ u_int8 uc_reserve[2]; /* Reserved */
+} VEHICLESENS_DELIVERY_CTRL_TBL_MNG_DATA;
+
+/*********************************************************************
+* TAG : VEHICLESENS_DELIVERY_CTRL_TBL_MNG
+* ABSTRACT : Structure of Vehicle Sensor Delivery Destination Management Table Management
+***********************************************************************/
+typedef struct {
+ u_int16 us_dnum; /* Number of data items */
+ u_int8 uc_reserve[2]; /* Reserved */
+ /* Array of each data */
+ VEHICLESENS_DELIVERY_CTRL_TBL_MNG_DATA st_ctrl_tbl_mng_data[VEHICLESENS_DELIVERY_INFO];
+} VEHICLESENS_DELIVERY_CTRL_TBL_MNG;
+
+/*********************************************************************
+* TAG : VEHICLESENS_PKG_DELIVERY_TBL_MNG_DATA
+* ABSTRACT : Structure of each data of the vehicle sensor package delivery management table
+***********************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int16 usdlvry_idx; /* Delivery data index */
+ u_int8 uc_reserve[2]; /* Reserved */
+} VEHICLESENS_PKG_DELIVERY_TBL_MNG_DATA;
+
+
+/*********************************************************************
+* TAG : VEHICLESENS_PKG_DELIVERY_TBL_MNG
+* ABSTRACT : Structure of Vehicle Sensor Package Delivery Management Table
+***********************************************************************/
+typedef struct {
+ u_int16 us_dnum; /* Number of data items */
+ u_int8 uc_reserve[2]; /* Reserved */
+ /* Array of each data */
+ VEHICLESENS_PKG_DELIVERY_TBL_MNG_DATA st_pkg_data[VEHICLESENS_PKG_DELIVERY_INFO_MAX];
+} VEHICLESENS_PKG_DELIVERY_TBL_MNG;
+
+/*********************************************************************
+* TAG : VEHICLESENS_DELIVERY_PNO_TBL
+* ABSTRACT : Vehicle Sensor Destination PNO Table
+***********************************************************************/
+typedef struct {
+ PNO us_pno; /* Thread ID */
+ u_int16 us_pkg_start_idx; /* Package Delivery Start Index */
+ u_int16 us_pkg_end_idx; /* Package delivery end index */
+ u_int8 uc_method; /* Delivery system */
+ u_int8 uc_reserve; /* reserve */
+} VEHICLESENS_DELIVERY_PNO_TBL_DAT;
+
+typedef struct {
+ u_int16 us_dnum; /* Number of data items */
+ u_int8 uc_reserve[2]; /* reserve */
+ VEHICLESENS_DELIVERY_PNO_TBL_DAT st_pno_data[VEHICLESENS_DELIVERY_INFO_MAX];
+} VEHICLESENS_DELIVERY_PNO_TBL;
+
+/*********************************************************************
+* TAG : VEHICLESENS_DELIVERY_HEADER
+* ABSTRACT : Delivery data header
+***********************************************************************/
+typedef struct {
+ DID did; /* Data ID */
+ u_int16 size; /* Size of the data */
+ u_int8 rcv_flag; /* Receive flag */
+ u_int8 sensor_cnt; /* Sensor Counter */
+} VEHICLESENS_DELIVERY_HEADER;
+
+/*********************************************************************
+* TAG : VEHICLESENS_DELIVERY_FORMAT
+* ABSTRACT : Delivery data format
+***********************************************************************/
+typedef struct {
+ VEHICLESENS_DELIVERY_HEADER header; /* Header */
+ u_int8 data[VEHICLESENS_DELIVERY_MAX_SIZE]; /* Data */
+} VEHICLESENS_DELIVERY_FORMAT;
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+void VehicleSensInitDeliveryCtrlTbl(void);
+void VehicleSensInitDeliveryCtrlTblMng(void);
+void VehicleSensInitPkgDeliveryTblMng(void);
+VEHICLE_RET_API VehicleSensEntryDeliveryCtrl(const VEHICLE_MSG_DELIVERY_ENTRY *);
+void VehicleSensAddDeliveryCtrlTbl(const VEHICLE_MSG_DELIVERY_ENTRY *);
+void VehicleSensUpdateDeliveryCtrlTbl(VEHICLESENS_DELIVERY_CTRL_TBL_MNG_DATA *);
+void VehicleSensUpdatePkgDeliveryCtrlTbl(u_int16, u_int16);
+void VehicleSensAddDeliveryCtrlTblMng(const VEHICLE_MSG_DELIVERY_ENTRY *);
+void VehicleSensUpdateDeliveryCtrlTblMng(VEHICLESENS_DELIVERY_CTRL_TBL_MNG_DATA *);
+void VehicleSensAddPkgDeliveryTblMng(const SENSOR_MSG_DELIVERY_ENTRY *);
+VEHICLE_RET_API VehicleSensEntryPkgDeliveryCtrl(const SENSOR_MSG_DELIVERY_ENTRY *, u_int8 uc_ext_chk);
+VEHICLESENS_DELIVERY_PNO_TBL* VehicleSensMakeDeliveryPnoTbl(DID ul_did, u_int8 change_type);
+void VehicleSensAddPnoTbl(u_int16);
+u_int8 VehicleSensDeliveryGPS(DID ul_did, u_int8 uc_get_method, u_int8 uc_current_get_method, int32 pno_index,
+ u_int32* cid, VEHICLESENS_DATA_MASTER* stmaster,
+ const VEHICLESENS_DELIVERY_PNO_TBL *pst_pno_tbl);
+u_int8 VehicleSensDeliveryFst(DID ul_did, u_int8 uc_get_method, int32 pno_index,
+ const VEHICLESENS_DELIVERY_PNO_TBL *pst_pno_tbl);
+u_int8 VehicleSensDeliveryGyro(DID ul_did, u_int8 uc_current_get_method, int32 pno_index,
+ const VEHICLESENS_DELIVERY_PNO_TBL *pst_pno_tbl);
+void VehicleSensDeliveryAntenna(DID ul_did, u_int8 uc_current_get_method, int32 pno_index,
+ const VEHICLESENS_DELIVERY_PNO_TBL *pst_pno_tbl);
+u_int8 VehicleSensDeliveryOther(DID ul_did, u_int8 uc_current_get_method, int32 pno_index,
+ u_int32* cid,
+ VEHICLESENS_DATA_MASTER* stmaster,
+ const VEHICLESENS_DELIVERY_PNO_TBL *pst_pno_tbl);
+void VehicleSensDeliveryProc(DID ul_did, u_int8 uc_chg_type, u_int8 uc_get_method);
+u_int8 VehicleSensFirstDeliverySens(PNO us_pno, DID ul_did, u_int8 uc_get_method,
+ VEHICLESENS_DATA_MASTER_FST* stmaster_fst,
+ VEHICLESENS_DATA_MASTER_FST* stmaster_fst_temp);
+u_int8 VehicleSensFirstDeliveryOther(PNO us_pno, DID ul_did, u_int8 uc_get_method,
+ u_int32* cid,
+ VEHICLESENS_DATA_MASTER* stmaster);
+void VehicleSensFirstDelivery(PNO us_pno, DID ul_did);
+void VehicleSensFirstPkgDelivery(const SENSOR_MSG_DELIVERY_ENTRY_DAT *);
+RET_API VehicleSensCanDeliveryEntry(void);
+void VehicleSensFirstPkgDelivery(const SENSOR_MSG_DELIVERY_ENTRY_DAT *);
+
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+void VehicleSensFirstPkgDeliveryExt(const SENSOR_MSG_DELIVERY_ENTRY_DAT *pst_data);
+#endif
+
+#if CONFIG_HW_PORTSET_TYPE_C
+void VehicleSensInitSeqNum(void);
+void VehicleSensDivideDeliveryProc(PNO, const void *);
+#endif
+
+/* ++ PastModel002 support DR */
+void VehicleSensInitDeliveryCtrlTblDR(void);
+void VehicleSensInitDeliveryCtrlTblMngDR(void);
+VEHICLE_RET_API VehicleSensEntryDeliveryCtrlDR(const DEADRECKONING_MSG_DELIVERY_ENTRY *);
+void VehicleSensAddDeliveryCtrlTblDR(const DEADRECKONING_MSG_DELIVERY_ENTRY *);
+void VehicleSensAddDeliveryCtrlTblMngDR(const DEADRECKONING_MSG_DELIVERY_ENTRY *);
+void VehicleSensUpdateDeliveryCtrlTblDR(VEHICLESENS_DELIVERY_CTRL_TBL_MNG_DATA *);
+void VehicleSensUpdateDeliveryCtrlTblMngDR(VEHICLESENS_DELIVERY_CTRL_TBL_MNG_DATA *);
+void VehicleSensDeliveryProcDR(DID ul_did, u_int8 uc_chg_type, u_int8 uc_get_method);
+VEHICLESENS_DELIVERY_PNO_TBL* VehicleSensMakeDeliveryPnoTblDR(DID ul_did, u_int8 change_type);
+void VehicleSensAddPnoTblDR(u_int16 us_index);
+void VehicleSensGetDebugDeliveryCtrlTbl(void* pbuf);
+void VehicleSensGetDebugDeliveryCtrlTblMng(void* pbuf);
+void VehicleSensGetDebugPkgDeliveryTblMng(void* pbuf);
+void VehicleSensGetDebugDeliveryPnoTbl(void* pbuf);
+/* -- PastModel002 supprt DR */
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_DELIVERYCTRL_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/VehicleSens_FromAccess.h b/vehicleservice/positioning/server/include/Sensor/VehicleSens_FromAccess.h
new file mode 100644
index 00000000..e58b0590
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/VehicleSens_FromAccess.h
@@ -0,0 +1,69 @@
+/*
+ * @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 POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_FROMACCESS_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_FROMACCESS_H_
+/******************************************************************************
+ * File name :VehicleSens_FromAccess.h
+ * System name :PastModel002
+ * Subsystem name :
+ ******************************************************************************/
+
+#include <stdio.h>
+#include <stdint.h>
+#include "Sensor_API.h"
+#include "SensorLocation_API.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+#define NV_FILE_VEHICLESENS "/fs/tmpfs/VehicleSens_nv_data.bin"
+#define NV_FILE_VEHICLESENS_TEMP "/fs/tmpfs/VehicleSens_nv_data_temp.bin"
+#define NV_FILE_VEHICLESENS2 "/fs/tmpfs/VehicleSens_nv_data_2nd.bin"
+#define NV_FILE_VEHICLESENS2_TEMP "/fs/tmpfs/VehicleSens_nv_data_2nd_temp.bin"
+#define NV_LOAD_WAIT_TIME_VEHICLESENS 100U
+#define NV_UPDATE_CYCLE_LONLAT 100U
+#define NV_UPDATE_CYCLE_LOCALTIME 10U
+
+/************************************************************************
+* Typedef definitions *
+************************************************************************/
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+typedef struct {
+ LOCALTIME localtime;
+ LONLAT lonlat;
+ int32 timediff;
+ u_int32 update_counter;
+ u_int8 reserve[2];
+ u_int8 cka;
+ u_int8 ckb;
+} NV_DATA_VEHICLESENS;
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+void VehicleSensFromAccessInitialize(void);
+RET_API VehicleSensRegistNvTag(void);
+RET_API VehicleSensReadNVLocalTime(LOCALTIME * local_time);
+RET_API VehicleSensReadNVLonLat(LONLAT * lonlat);
+RET_API VehicleSensReadNVTimeDiff(int32 * time_diff);
+void VehicleSensStoreLonlat(LONLAT * plonlat);
+RET_API VehicleSensWriteNVLocaltime(LOCALTIME * local_time, int32 * time_diff);
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_FROMACCESS_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/VehicleSens_SelectionItemList.h b/vehicleservice/positioning/server/include/Sensor/VehicleSens_SelectionItemList.h
new file mode 100644
index 00000000..15004e83
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/VehicleSens_SelectionItemList.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.
+ */
+
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_SELECTIONITEMLIST_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_SELECTIONITEMLIST_H_
+/****************************************************************************
+ * File name :VehicleSens_SelectionItemList.h
+ * System name :_CWORD107_
+ * Subsystem name :Vehicle sensor process
+ ****************************************************************************/
+
+#include "Vehicle_API_Dummy.h"
+#include "Vehicle_API_private.h"
+#include "VehicleSens_Common.h"
+#include "VehicleIf.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+/* ++ Addition of DID9 related to PastModel002 supported_UBX commands */
+/* ++ GPS _CWORD82_ support (To add the target DID 3) */
+#define VEHICLESENS_SELECTION_ITEM_LIST_LEN (87) /* Number of data in Vehicle Sensor Selection Item List */
+/* -- GPS _CWORD82_ support */
+#else
+#define VEHICLESENS_SELECTION_ITEM_LIST_LEN (63) /* Number of data in Vehicle Sensor Selection Item List */
+/* -- PastModel002 support */
+#endif
+/* Sum of bits 29 through 31*/
+#define VEHICLESENS_BIT31_29 (VEHICLESENS_BIT31 | VEHICLESENS_BIT30 | VEHICLESENS_BIT29)
+
+#define VEHICLESENS_ITEMLIST_APPLICATION 0x00 /* Application of electronic PF */
+#define VEHICLESENS_ITEMLIST_NON_APPLICATION 0x01 /* Electronic PF not applicable */
+#define VEHICLESENS_ITEMLIST_INVALID 0x02 /* Disabled */
+
+#define VEHICLE_COMM_WATCHTBL_DAT_NUM 64 /* Number of data held for communication discontinuation registration */
+#define VEHICLE_COMM_WATCHTBL_DID_NUM 2 /* Number of Disruption Monitoring Data Management */
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+
+/*********************************************************************
+* TAG : VEHICLESENS_SELECTION_ITEM_LIST
+* ABSTRACT : Managing a list of vehicle information choices
+***********************************************************************/
+
+typedef struct {
+ DID ul_did; /* Data ID */
+ u_int32 ul_canid; /* CAN ID */ /* CANIF_API deletion */
+ u_int8 uc_get_method; /* Data acquisition source category */
+ u_int8 reserve[3]; /* reserve */
+} VEHICLESENS_SELECTION_ITEM_LIST;
+
+/************************************************************************
+* TAG : VEHICLE_COMM_WATCH_TBL
+* ABSTRACT : Managing Vehicle Sensor Disruption Monitoring Data
+************************************************************************/
+typedef struct {
+ PNO us_pno; /* Destination PNO */
+ u_int16 us_watch_time; /* Interruption monitoring time(Units of 100 ms) */
+} VEHICLE_COMM_WATCH_DAT;
+
+typedef struct {
+ DID ul_did; /* Data ID corresponding to vehicle sensor information */
+ u_int8 uc_effective_flg; /* CANID Valid Flag */
+ u_int8 uc_vehicle_comm_watch_cnt; /* Vehicle Sensor Information Disruption Monitoring Request Count */
+ VEHICLE_COMM_WATCH_DAT st_comm_watch_dat[VEHICLE_COMM_WATCHTBL_DAT_NUM]; /* Communication disruption registration data */
+} VEHICLE_COMM_WATCH_TBL;
+
+/* ++ PastModel002 support */
+/************************************************************************
+* TAG : VEHICLE_MSG_WATCH_STOPPAGE
+* ABSTRACT : Vehicle Sensor Disruption Monitoring Message(-> Vehicle sensor)
+************************************************************************/
+typedef struct {
+ DID ul_did; /* Data ID corresponding to vehicle sensor information */
+ PNO us_pno; /* Destination PNO */
+ u_int16 us_watch_time; /* Interruption monitoring time(Units of 100 ms) */
+ u_int16 us_offset; /* Offset to shared memory storage area */
+ u_int16 us_size; /* Size of shared memory storage area */
+ EventID ul_eventid; /* Event ID */
+} VEHICLE_MSG_WATCH_STOPPAGE_DAT;
+
+typedef struct {
+ T_APIMSG_MSGBUF_HEADER st_hdr; /* Message header */
+ VEHICLE_MSG_WATCH_STOPPAGE_DAT st_data; /* Message data */
+} VEHICLE_MSG_WATCH_STOPPAGE;
+
+/* -- PastModel002 support */
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+void VehicleSensInitSelectionItemList(void);
+u_int8 VehicleSensGetSelectionItemList(DID);
+u_int32 VehicleSensGetSelectionItemListCanId(DID);
+BOOL VehicleSensSetSelectionItemListCanId(DID did, u_int32); /* CANIF_API deletion */
+void VehicleSensCommWatchTblInit(void);
+BOOL VehicleSensCommWatchTblSave(const VEHICLE_MSG_WATCH_STOPPAGE*);
+BOOL VehicleSensCommWatchTblRun(DID);
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_SELECTIONITEMLIST_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/VehicleSens_SharedMemory.h b/vehicleservice/positioning/server/include/Sensor/VehicleSens_SharedMemory.h
new file mode 100644
index 00000000..54878ec9
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/VehicleSens_SharedMemory.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.
+ */
+
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_SHAREDMEMORY_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_SHAREDMEMORY_H_
+/******************************************************************************
+ * File name :VehicleSens_SharedMemory.h
+ * System name :PastModel002
+ * Subsystem name :
+ ******************************************************************************/
+
+#include "Vehicle_API.h"
+#include "Sensor_Common_API.h"
+#include "VehicleSens_FromAccess.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+
+/************************************************************************
+* Typedef definitions *
+************************************************************************/
+
+/************************************************************************
+* Struct definitions *
+************************************************************************/
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+RET_API VehicleSensInitSharedMemory(void);
+void VehicleSensWriteSharedMemory(DID ul_did);
+RET_API VehicleSensWriteDataValidEphemerisNum(u_int8 valid_ephemer_isnum);
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_SHAREDMEMORY_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/VehicleSens_Thread.h b/vehicleservice/positioning/server/include/Sensor/VehicleSens_Thread.h
new file mode 100644
index 00000000..17a342d8
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/VehicleSens_Thread.h
@@ -0,0 +1,185 @@
+/*
+ * @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 POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_THREAD_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_THREAD_H_
+/******************************************************************************
+ * File name :VehicleSens_Thread.h
+ * System name :_CWORD107_
+ * Subsystem name :
+ ******************************************************************************/
+
+#include "Vehicle_API_Dummy.h"
+#include "Sensor_API.h"
+#include "Vehicle_API_private.h"
+#include "Sensor_API_private.h"
+#include "VehicleSens_Common.h"
+#include "VehicleSens_SelectionItemList.h"
+#include "VehicleSens_DataMaster.h"
+#include "VehicleSens_DeliveryCtrl.h"
+#include "VehicleSens_SharedMemory.h"
+#include "CanInput_API.h"
+#include "CanInput_API_private.h"
+#include "VehicleDebug_API.h"
+#include "VehicleSens_FromAccess.h"
+#include "ClockDataMng.h"
+#include "gps_hal.h"
+#include "positioning_hal.h"
+#include "CommonDefine.h"
+
+/* ++ DR support */
+#include "DeadReckoning_main.h"
+#include "Dead_Reckoning_Local_Api.h"
+/* -- DR support */
+
+#include "POS_common_private.h"
+
+/************************************************************************
+* Macro definitions *
+************************************************************************/
+
+/* ++ Porting from PastModel002 enabled APIs */
+#define CID_VEHICLEIF_GET_VEHICLE_DATA 0x0102 /* Vehicle sensor information acquisition CID */
+#define CID_VEHICLEIF_COMM_WATCH 0x0103 /* Vehicle Sensor Information Disruption Monitoring CID */
+#define CID_SENSORIF__CWORD82__REQUEST 0x0800 /* Vehicle sensor information setting CID */
+
+#define VEHICLE_RET_ERROR_OUTOF_MEMORY (-8) /* Shared memory allocation failure */
+#define VEHICLE_RET_ERROR_INVALID (-10) /* CANID undetermined */
+
+/* -- Porting from PastModel002 enabled APIs */
+
+
+/* NMEA */
+#define VEHICLESENS_NMEA_LF "\n"
+#define VEHICLESENS_NMEA_CR "\r"
+#define VEHICLESENS_NMEA_FIELDDELIMITER ","
+#define VEHICLESENS_NMEA_DECIMALPOINT "."
+#define VEHICLESENS_NMEA_ASTARISK "*"
+
+#define VEHICLESENS_NMEA_PASCD_LEN_MAX 256
+
+#define VEHICLESENS_NMEA_PASCD_ID "$PASCD"
+
+#define VEHICLESENS_NMEA_PASCD_TS_MAX 86400
+#define VEHICLESENS_NMEA_PASCD_TS_INT_LEN_MAX 6 /* max length of integer part of timestamp */
+#define VEHICLESENS_NMEA_PASCD_TS_FRA_LEN_MAX 3 /* max length of fractional part of timestamp */
+
+#define VEHICLESENS_NMEA_PASCD_SENSORTYPE_C "C" /* Combined left and right wheel speed sensors */
+
+#define VEHICLESENS_NMEA_PASCD_TMS_U "U" /* Unkonwn */
+#define VEHICLESENS_NMEA_PASCD_TMS_P "P" /* Park */
+#define VEHICLESENS_NMEA_PASCD_TMS_R "R" /* Reverse */
+#define VEHICLESENS_NMEA_PASCD_TMS_D "D" /* Driving forword */
+#define VEHICLESENS_NMEA_PASCD_TMS_N "N" /* Neutral */
+
+#define VEHICLESNES_NMEA_PASCD_SLIP "1" /* 1 = a wheel speed slippage was detected */
+#define VEHICLESNES_NMEA_PASCD_NOSLIP "0" /* 0 = no slip was detected */
+
+#define VEHICLESENS_NMEA_PASCD_TO_FRA_LEN_MAX 2 /* max length of fractional part of timeoffset */
+
+#define VEHICLESENS_NMEA_PASCD_SPD_FRA_LEN_MAX 3 /* max length of fractional part of speed */
+
+#define VEHICLESENS_NMEA_PASCD_SAMPLECOUNT_MAX 50
+
+/************************************************************************
+ * Struct definitions *
+ ************************************************************************/
+
+/*!
+ @brief Structure of Vehicle Speed and TimeSpec
+ */
+typedef struct {
+ timespec ts;
+ uint16_t speed; /* [0.01m/s] */
+} VEHICLESENS_VEHICLE_SPEED_DAT;
+
+/*!
+ @brief Structure of Vehilce Speeds and TimeSpecs
+ */
+typedef struct {
+ VEHICLESENS_VEHICLE_SPEED_DAT listSpd[VEHICLESENS_NMEA_PASCD_SAMPLECOUNT_MAX];
+ uint8_t sampleCount;
+} VEHICLESENS_VEHICLE_SPEED_INFO;
+
+/*!
+ @brief Structure for LUT to Derive Transmission State
+ */
+typedef struct {
+ uint8_t type; /* Transmission Type */
+ uint8_t shift; /* Shift Position from Vehicle */
+
+ uint8_t pkb; /* Parking Brake from Vehicle */
+ char state[8]; /* Transmission State for _CWORD27_ */
+} VEHICLESENS_TRANSMISSION_PKG;
+
+/************************************************************************
+ * TAG : VEHICLE_MSG_SEND_DAT
+ * ABSTRACT : Vehicle sensor information setting message(-> Vehicle sensor)
+ ************************************************************************/
+
+
+
+/************************************************************************
+* Function prototype *
+************************************************************************/
+EFrameworkunifiedStatus VehicleSensThread(HANDLE h_app);
+RET_API VehicleSensThreadInit(void);
+void VehicleSensDeliveryEntry(const VEHICLE_MSG_DELIVERY_ENTRY *);
+void VehicleSensGetVehicleData(const VEHICLE_MSG_GET_VEHICLE_DATA *);
+void VehicleSensWatchStopPage(const VEHICLE_MSG_WATCH_STOPPAGE *);
+void VehicleSensPkgDeliveryEntry(const SENSOR_MSG_DELIVERY_ENTRY *);
+void VehicleSensGetVehiclePkgData(const SENSOR_MSG_GET_SENSOR_DATA *);
+void VehicleSensLineSensDataDelivery(const LSDRV_MSG_LSDATA *, PFUNC_DMASTER_SET_N);
+void VehicleSensLineSensDataDeliveryG(const LSDRV_MSG_LSDATA_G *, PFUNC_DMASTER_SET_N);
+void VehicleSensLineSensDataDeliveryGyroTrouble(const LSDRV_MSG_LSDATA_GYRO_TROUBLE *msg,
+ PFUNC_DMASTER_SET_N p_datamaster_set_n);
+void VehicleSensLineSensDataDeliverySysGpsInterruptSignal(const LSDRV_MSG_LSDATA_GPS_INTERRUPT_SIGNAL *msg,
+ PFUNC_DMASTER_SET_SHARED_MEMORY p_datamaster_set_sharedmemory);
+void VehicleSensLineSensDataDeliveryGyroConnectStatus(const LSDRV_MSG_LSDATA_GYRO_CONNECT_STATUS *msg,
+ PFUNC_DMASTER_SET_SHARED_MEMORY p_datamaster_set_sharedmemory);
+void VehicleSensLineSensDataDeliveryGpsAntennaStatus(const LSDRV_MSG_LSDATA_GPS_ANTENNA_STATUS *msg,
+ PFUNC_DMASTER_SET_N p_datamaster_set_n);
+
+#if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
+void VehicleSensPkgDeliveryEntryExt(const SENSOR_MSG_DELIVERY_ENTRY *msg);
+void VehicleSensLineSensDataDeliveryFst(const LSDRV_MSG_LSDATA_FST *, PFUNC_DMASTER_SET_N);
+void VehicleSensLineSensDataDeliveryFstG(const LSDRV_MSG_LSDATA_FST *msg, PFUNC_DMASTER_SET_N p_datamaster_set_n);
+#else
+void VehicleSensPkgDeliveryEntryError(const SENSOR_MSG_DELIVERY_ENTRY *msg);
+#endif
+void VehicleSensGpsDataDelivery(SENSOR_MSG_GPSDATA *msg,
+ PFUNC_DMASTER_SET_N p_datamaster_set_n,
+ PFUNC_DMASTER_SET_SHARED_MEMORY p_datamaster_set_sharedmemory);
+
+void VehicleSensDataMasterSetN(DID did, u_int8 chg_type, u_int8 get_method);
+void VehicleSensDataMasterSetSharedMemory(DID did, u_int8 chg_type);
+/* ++ GPS _CWORD82_ support */
+void VehicleSensSetVehicleData(const VEHICLE_MSG_SEND *);
+/* -- GPS _CWORD82_ support */
+
+void VehicleSensDrDeliveryEntry(const VEHICLE_MSG_DELIVERY_ENTRY *);
+void VehicleSensGetLog(const VEHICLEDEBUG_MSG_BUF* msg);
+void VehicleSensSetLog(const VEHICLEDEBUG_MSG_BUF* msg);
+void VehicleSensWriteLocalTime(const CANINPUT_MSG_INFO *msg);
+void VehicleSensSetEphNumSharedMemory(const SENSOR_MSG_GPSDATA *msg);
+void VehicleSensDrRcvMsg(const DEAD_RECKONING_RCVDATA *msg);
+
+void VehicleSensCommonDataDelivery(const VEHICLE_MSG_BUF *msg, PFUNC_DMASTER_SET_N p_datamaster_set_n);
+void VehicleSensGpsTimeSndMsg(const POS_MSGINFO *pos_msg);
+void VehicleSensGpsTimeDelivery(const VEHICLE_MSG_BUF *msg);
+RET_API VehicleSensSendEvent(uint16_t snd_pno, int32_t event_val);
+void VehicleSensThreadStopProcess(void);
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_THREAD_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/VehicleSensor_Thread.h b/vehicleservice/positioning/server/include/Sensor/VehicleSensor_Thread.h
new file mode 100644
index 00000000..f40f2a71
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/VehicleSensor_Thread.h
@@ -0,0 +1,33 @@
+/*
+ * @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 name :vehiclesensor_thread.h
+ * System name :_CWORD107_
+ * Subsystem name :Vehicle sensor process
+ * Title :Prototype Declaration of Thread Entry Function of Vehicle Sensor Process
+ ****************************************************************************/
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENSOR_THREAD_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENSOR_THREAD_H_
+
+#include <vehicle_service/positioning_base_library.h>
+
+/***********************************************************************
+* Thread entry function prototype *
+************************************************************************/
+EFrameworkunifiedStatus VehicleSensThread(HANDLE h_app);
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENSOR_THREAD_H_
diff --git a/vehicleservice/positioning/server/include/Sensor/VehicleUtility.h b/vehicleservice/positioning/server/include/Sensor/VehicleUtility.h
new file mode 100644
index 00000000..e7ebef04
--- /dev/null
+++ b/vehicleservice/positioning/server/include/Sensor/VehicleUtility.h
@@ -0,0 +1,128 @@
+/*
+ * @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 VehicleUtility.h
+@detail Common processing function header file of Vehicle<BR>
+ Vehicle Common Functions Header Files
+*****************************************************************************/
+#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLEUTILITY_H_
+#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLEUTILITY_H_
+
+#include <stdint.h>
+#include <vehicle_service/positioning_base_library.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*------------------------------------------------------------------------------*
+ * Definition *
+ *------------------------------------------------------------------------------*/
+/* GPS-related timer value */
+#define TIMVAL_GPS_STARTUP 500 /* 5Sec Start confirmation monitoring timer */
+#define TIMVAL_GPS_RCVCYCLDAT 500 /* 5Sec Periodic reception data monitoring timer */
+#define TIMVAL_GPS_RCVACK 500 /* 5Sec ACK reception monitoring timer */
+#define TIMVAL_GPS_RCVDAT 500 /* 5Sec Data reception monitoring timer(Not used) */
+#define TIMVAL_GPS_NAVIFST 3000 /* 30sec Initial Navigation Monitoring Timer */
+#define TIMVAL_GPS_NAVICYCLE 300 /* 3sec Navi monitoring timer */
+#define TIMVAL_GPS_NAVIDISRPT 1000 /* 10Sec Navigation Monitoring Disruption Log Output Timer */
+#define TIMVAL_GPS_DIAGCLKGUARD 1000 /* 10sec Diag provision time guard monitoring timer */
+#define TIMVAL_GPS_NMEADATAGUARD 1000 /* 10sec NMEA data-providing guard monitoring timer */
+#define TIMVAL_GPS_RECOVERY 60000 /* 600sec GPS recovery timer */
+#define TIMVAL_GPS_RECEIVERERR 60000 /* 600sec GPS receiver anomaly detection timer */
+
+/* Sensor-related timer value */
+#define TIMVAL_SNS_RCVFSTDAT 3000 /* 30Sec Initial sensor data reception monitoring timer */
+#define TIMVAL_SNS_RCVCYCLDAT 300 /* 3Sec Cyclic sensor data reception monitoring timer */
+#define TIMVAL_SNS_RCVDISRPT 1000 /* 10Sec Cyclic sensor data interruption log output timer */
+
+/* Timer management table */
+#define TIM_NON 0x00 /* Timer counter initial value */
+#define TIM_CNTMIN 0x01 /* Timer counter minimum value */
+#define TIM_CNTMAX 0xff /* Maximum value of timer counter */
+#define TIMER_OFF 0 /* Timer enable flag OFF */
+#define TIMER_ON 1 /* Timer enable flag ON */
+
+/*------------------------------------------------------------------------------*
+ * Structure *
+ *------------------------------------------------------------------------------*/
+/*!
+ @brief Timer type
+ */
+typedef enum _VEHICLEUTILITY_TIM_KIND {
+ GPS_STARTUP_TIMER = 0, /* 0 Start confirmation monitoring timer */
+ GPS_CYCL_TIMER, /* 1 Cyclic GPS data reception monitoring timer */
+ GPS_RECV_ACK_TIMER, /* 2 ACK reception monitoring timer */
+ GPS_NAVIFST_TIMER, /* 3 Initial Navigation Monitoring Timer */
+ GPS_NAVICYCLE_TIMER, /* 4 Navi monitoring timer */
+ GPS_NAVIDISRPT_TIMER, /* 5 Navigation Monitoring Disruption Log Output Timer */
+ GPS_DIAGCLK_GUARDTIMER, /* 6 Diag provision time guard monitoring timer */
+ GPS_NMEADATA_GUARDTIMER, /* 7 NMEA data-providing guard monitoring timer */
+ GPS_RECOVERY_TIMER, /* 8 GPS recovery timer */
+ GPS_RECEIVERERR_TIMER, /* 9 GPS receiver anomaly detection timer */
+ SNS_FST_TIMER, /* 10 Initial sensor data reception monitoring timer */
+ SNS_CYCLE_TIMER, /* 11 Cyclic sensor data reception monitoring timer */
+ SNS_DISRPT_TIMER, /* 12 Cyclic sensor data interruption log output timer */
+ TIM_NUM /* 13 Number of timer types */
+} VEHICLEUTILITY_TIM_KIND;
+
+/*!
+ @brief Master status
+*/
+typedef struct {
+ u_int8 flag; /**< Timer flag OFF:Stop,ON:Start */
+ u_int8 cnt; /**< Start counter */
+ int8 rsv[2]; /**< Reserved */
+} VEHICLEUTILITY_TIM_STS;
+
+/*!
+ @brief Master status management table
+ */
+typedef struct {
+ VEHICLEUTILITY_TIM_STS sts[TIM_NUM]; /**< Master status */
+} VEHICLEUTILITY_TIM_MNG;
+
+/*!
+ @brief Timer setting information table
+*/
+typedef struct {
+ uint32_t timer_val; /**< Timer value */
+ PNO pno; /**< Event notification destination process number */
+} VEHICLEUTILITY_TIM_INFO;
+
+/*
+ Function prototype declaration
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+RET_API VehicleUtilitySndMsg(PNO pno, u_int16 size, void *msgbuf, u_int16 mode);
+RET_API VehicleUtilityRcvMsg(PNO pno, u_int16 size, void **msgbuf, u_int16 mode);
+void VehicleUtilityDiagCodePut(u_int32 err_id, u_int16 positioning_code);
+void VehicleUtilityInitTimer(void);
+BOOL VehicleUtilitySetTimer(VEHICLEUTILITY_TIM_KIND tim_kind);
+BOOL VehicleUtilityStopTimer(VEHICLEUTILITY_TIM_KIND tim_kind);
+BOOL VehicleUtilityTimeJdgKnd(uint16_t seqno);
+
+void LineSensDrvExtTermStsReq(void);
+RET_API DEVGpsSndBackupDataLoadReq(void);
+void DEVGpsGetDebugGpsFormatFailCnt(void* p_buf);
+u_int8 LineSensDrvGetSysRecvFlag(void);
+uint16_t DEVGpsGetWknRollover(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLEUTILITY_H_ */
diff --git a/vehicleservice/positioning/server/include/ServiceInterface/BackupMgrIf.h b/vehicleservice/positioning/server/include/ServiceInterface/BackupMgrIf.h
new file mode 100644
index 00000000..3e2e5e5c
--- /dev/null
+++ b/vehicleservice/positioning/server/include/ServiceInterface/BackupMgrIf.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
+ * BackupMgrIf.h
+ * @brief
+ * BackupMgr service-to-service interface
+ */
+#ifndef POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_BACKUPMGRIF_H_
+#define POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_BACKUPMGRIF_H_
+
+/*---------------------------------------------------------------------------------*
+ * Incluce *
+ *---------------------------------------------------------------------------------*/
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_framework_if.h>
+#include <native_service/ns_backup.h>
+#include <native_service/ns_backup_id.h>
+
+#include <vehicle_service/positioning_base_library.h>
+
+/*---------------------------------------------------------------------------------*
+ * Definition *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Typedef declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Struct declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Prototype Declaration *
+ *---------------------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+EFrameworkunifiedStatus BackupMgrIfNotifyOnBackupMgrAvailability(CbFuncPtr fp_on_cmd);
+void BackupMgrIfSetAvailability(BOOL b_is_available);
+BOOL BackupMgrIf_GetAvailability(void);
+EFrameworkunifiedStatus BackupMgrIfBackupDataRd(PCSTR tag_id, uint32_t ui_offset, \
+ void *pv_buf, uint32_t ui_size, BOOL* pb_is_available);
+EFrameworkunifiedStatus BackupMgrIfBackupDataWt(PCSTR tag_id, void *pv_buf, \
+ uint32_t ui_offset, uint32_t ui_size, BOOL* pb_is_available);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_BACKUPMGRIF_H_
diff --git a/vehicleservice/positioning/server/include/ServiceInterface/ClockIf.h b/vehicleservice/positioning/server/include/ServiceInterface/ClockIf.h
new file mode 100644
index 00000000..5a2e976a
--- /dev/null
+++ b/vehicleservice/positioning/server/include/ServiceInterface/ClockIf.h
@@ -0,0 +1,61 @@
+/*
+ * @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
+ * ClockIf.h
+ * @brief
+ * Clock service-to-service interface
+ */
+#ifndef POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_CLOCKIF_H_
+#define POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_CLOCKIF_H_
+
+/*---------------------------------------------------------------------------------*
+ * Incluce *
+ *---------------------------------------------------------------------------------*/
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_framework_if.h>
+
+#include <stub/DTime_Api.h>
+#include <vehicle_service/positioning_base_library.h>
+#include <vehicle_service/POS_gps_API.h>
+
+/*---------------------------------------------------------------------------------*
+ * Definition *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Typedef declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Struct declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Prototype Declaration *
+ *---------------------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+EFrameworkunifiedStatus ClockIfNotifyOnClockAvailability(CbFuncPtr fp_on_cmd);
+void ClockIfSetAvailability(BOOL b_is_available);
+EFrameworkunifiedStatus ClockIfDtimeSetGpsTime(const SENSOR_MSG_GPSTIME *pst_gps_time, BOOL* pb_is_available);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_CLOCKIF_H_
diff --git a/vehicleservice/positioning/server/include/ServiceInterface/CommUsbIf.h b/vehicleservice/positioning/server/include/ServiceInterface/CommUsbIf.h
new file mode 100644
index 00000000..cbc947c3
--- /dev/null
+++ b/vehicleservice/positioning/server/include/ServiceInterface/CommUsbIf.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.
+ */
+
+/**
+ * @file
+ * CommUsbIf.h
+ * @brief
+ * CommUSB service-to-service interface
+ */
+#ifndef POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_COMMUSBIF_H_
+#define POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_COMMUSBIF_H_
+
+/*---------------------------------------------------------------------------------*
+ * Incluce *
+ *---------------------------------------------------------------------------------*/
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_framework_if.h>
+#include <stub/commusb_api.h>
+#include <stub/commusb_notifications.h>
+
+#include <vehicle_service/positioning_base_library.h>
+
+/*---------------------------------------------------------------------------------*
+ * Definition *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Typedef declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Struct declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Prototype Declaration *
+ *---------------------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+EFrameworkunifiedStatus CommUsbIfAttachCallbacksToDispatcher( // NOLINT(readability/nolint)
+ _FrameworkunifiedProtocolCallbackHandler const* p_msg_handler,
+ unsigned int ui_handler_count);
+EFrameworkunifiedStatus CommUsbIfDetachCallbacksFromDispatcher(const PUI_32 pui_cmd_array, UI_32 ui_command_count);
+EFrameworkunifiedStatus CommUsbIfNotifyOnCommUSBAvailability(CbFuncPtr fp_on_cmd);
+void CommUsbIfSetAvailability(BOOL b_is_available);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_COMMUSBIF_H_
diff --git a/vehicleservice/positioning/server/include/ServiceInterface/DevDetectSrvIf.h b/vehicleservice/positioning/server/include/ServiceInterface/DevDetectSrvIf.h
new file mode 100644
index 00000000..88291231
--- /dev/null
+++ b/vehicleservice/positioning/server/include/ServiceInterface/DevDetectSrvIf.h
@@ -0,0 +1,69 @@
+/*
+ * @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
+ * DevDetectSrvIf.h
+ * @brief
+ * DevDetectSrv service-to-service interface
+ */
+#ifndef POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_DEVDETECTSRVIF_H_
+#define POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_DEVDETECTSRVIF_H_
+
+/*---------------------------------------------------------------------------------*
+ * Incluce *
+ *---------------------------------------------------------------------------------*/
+#include <native_service/frameworkunified_types.h>
+#include <system_service/ss_devicedetection_service_ifc.h>
+#include <system_service/ss_devicedetection_service_protocol.h>
+
+#include <vehicle_service/positioning_base_library.h>
+
+/*---------------------------------------------------------------------------------*
+ * Definition *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Typedef declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Struct declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Prototype Declaration *
+ *---------------------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+void DevDetectSrvIfSetAvailability(BOOL b_is_available);
+EFrameworkunifiedStatus DevDetectSrvIfInitialize(void);
+EFrameworkunifiedStatus DevDetectSrvIfNotifyOnDeviceDetectionAvailability(CbFuncPtr fp_call_back_fn);
+EFrameworkunifiedStatus DevDetectSrvIfNotifyOnOpenSessionAck(CbFuncPtr fp_call_back_fn, BOOL* pb_is_available);
+EFrameworkunifiedStatus DevDetectSrvIfNotifyOnCloseSessionAck(CbFuncPtr fp_call_back_fn, BOOL* pb_is_available);
+EFrameworkunifiedStatus DevDetectSrvIfOpenSessionRequest(BOOL* pb_is_available);
+EFrameworkunifiedStatus DevDetectSrvIfDecodeOpenSessionResponse(BOOL* pb_is_available);
+EFrameworkunifiedStatus DevDetectSrvIfRegisterForDeviceDetectionEvent(SS_DeviceDetectionServerEvents fe_dev_detect_event, \
+ CbFuncPtr fp_call_back_fn, PCSTR p_file_path, BOOL* pb_is_available);
+EFrameworkunifiedStatus DevDetectSrvIfUnRegisterForDeviceDetectionEvent(SS_DeviceDetectionServerEvents fe_dev_detect_event, \
+ BOOL* pb_is_available);
+EFrameworkunifiedStatus DevDetectSrvIfCloseSessionRequest(BOOL* pb_is_available);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_DEVDETECTSRVIF_H_
diff --git a/vehicleservice/positioning/server/include/ServiceInterface/DiagSrvIf.h b/vehicleservice/positioning/server/include/ServiceInterface/DiagSrvIf.h
new file mode 100644
index 00000000..a6bcd777
--- /dev/null
+++ b/vehicleservice/positioning/server/include/ServiceInterface/DiagSrvIf.h
@@ -0,0 +1,55 @@
+/*
+ * @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
+ * DiagSrvIf.h
+ * @brief
+ * DiagSrv service-to-service interface
+ */
+#ifndef POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_DIAGSRVIF_H_
+#define POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_DIAGSRVIF_H_
+
+/*---------------------------------------------------------------------------------*
+ * Incluce *
+ *---------------------------------------------------------------------------------*/
+#include <native_service/frameworkunified_types.h>
+#include <vehicle_service/positioning_base_library.h>
+
+/*---------------------------------------------------------------------------------*
+ * Definition *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Typedef declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Struct declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Prototype Declaration *
+ *---------------------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+void DiagSrvIfSetRegistrationPermission(BOOL b_is_true);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_DIAGSRVIF_H_
diff --git a/vehicleservice/positioning/server/include/ServiceInterface/PSMShadowIf.h b/vehicleservice/positioning/server/include/ServiceInterface/PSMShadowIf.h
new file mode 100644
index 00000000..8cdb1f81
--- /dev/null
+++ b/vehicleservice/positioning/server/include/ServiceInterface/PSMShadowIf.h
@@ -0,0 +1,58 @@
+/*
+ * @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
+ * PSMShadow.h
+ * @brief
+ * PSMShadow service-to-service interface
+ */
+#ifndef POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_PSMSHADOWIF_H_
+#define POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_PSMSHADOWIF_H_
+
+/*---------------------------------------------------------------------------------*
+ * Incluce *
+ *---------------------------------------------------------------------------------*/
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_framework_if.h>
+#include <vehicle_service/positioning_base_library.h>
+#include "ps_psmshadow_notifications.h"
+
+/*---------------------------------------------------------------------------------*
+ * Definition *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Typedef declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Struct declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Prototype Declaration *
+ *---------------------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+EFrameworkunifiedStatus PSMShadowIfNotifyOnPSMShadowAvailability(CbFuncPtr fp_on_cmd);
+EFrameworkunifiedStatus PSMShadowIfNotifyOnPSMShadowInitComp(CbFuncPtr fp_on_cmd);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_PSMSHADOWIF_H_
diff --git a/vehicleservice/positioning/server/include/ServiceInterface/VehicleIf.h b/vehicleservice/positioning/server/include/ServiceInterface/VehicleIf.h
new file mode 100644
index 00000000..28c05fb8
--- /dev/null
+++ b/vehicleservice/positioning/server/include/ServiceInterface/VehicleIf.h
@@ -0,0 +1,82 @@
+/*
+ * @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 POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_VEHICLEIF_H_
+#define POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_VEHICLEIF_H_
+
+/*---------------------------------------------------------------------------------*
+ * Incluce *
+ *---------------------------------------------------------------------------------*/
+#include <native_service/frameworkunified_types.h>
+#include <native_service/frameworkunified_framework_if.h>
+
+#include <vehicle_service/positioning_base_library.h>
+#include <stub/vehicle_notifications.h>
+#include <stub/Vehicle_Sensor_Common_API.h>
+
+/*---------------------------------------------------------------------------------*
+ * Definition *
+ *---------------------------------------------------------------------------------*/
+/* Transmission Type */
+#define VEHICLEIF_TRANSMISSION_TYPE_MT 0
+#define VEHICLEIF_TRANSMISSION_TYPE_AT 1
+#define VEHICLEIF_TRANSMISSION_TYPE_UNKNOWN 2
+#define VEHICLEIF_TRANSMISSION_TYPE_NUM 3 /* Number of Transmission Types */
+
+/* Shift Position (CAUTION: These values depend on Vehicle I/F) */
+#define VEHICLEIF_SHIFT_POSITION_U 0
+#define VEHICLEIF_SHIFT_POSITION_R 1
+#define VEHICLEIF_SHIFT_POSITION_P 2
+#define VEHICLEIF_SHIFT_POSITION_N 4
+#define VEHICLEIF_SHIFT_POSITION_D 8
+#define VEHICLEIF_SHIFT_POSITION_NUM 5 /* Number of Shift Position Types */
+
+/* Parking Brake (CAUTION: These values depend on Vehicle I/F) */
+#define VEHICLEIF_PKB_OFF 0
+#define VEHICLEIF_PKB_ON 1
+#define VEHICLEIF_PKB_UNKNOWN 2
+#define VEHICLEIF_PKB_NUM 3
+
+/*---------------------------------------------------------------------------------*
+ * Typedef declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Struct declaration *
+ *---------------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------------*
+ * Prototype Declaration *
+ *---------------------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+void VehicleIf_SetAvailability(BOOL bIsAvailable);
+
+//EFrameworkunifiedStatus VehicleIf_GetTypeOfTransmission(uint8_t* pType, BOOL* pbIsAvailable);
+EFrameworkunifiedStatus VehicleIf_GetTypeOfTransmission(uint8_t* pType, uint8_t* pPkb, BOOL* pbIsAvailable);
+EFrameworkunifiedStatus VehicleIf_GetShiftPosition(uint8_t* pShift, BOOL* pbIsAvailable);
+EFrameworkunifiedStatus VehicleIfAttachCallbacksToDispatcher( // NOLINT(readability/nolint)
+ _FrameworkunifiedProtocolCallbackHandler const* p_msg_handler,
+ unsigned int ui_handlercount);
+EFrameworkunifiedStatus VehicleIfDetachCallbacksFromDispatcher(const PUI_32 pui_cmd_array, UI_32 ui_command_count);
+EFrameworkunifiedStatus VehicleIfNotifyOnVehicleAvailability(CbFuncPtr fp_on_cmd);
+EFrameworkunifiedStatus VehicleIfDeliveryEntry(uint32_t ul_did);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_VEHICLEIF_H_
diff --git a/vehicleservice/positioning/server/include/ServiceInterface/ps_psmshadow_notifications.h b/vehicleservice/positioning/server/include/ServiceInterface/ps_psmshadow_notifications.h
new file mode 100644
index 00000000..24a513aa
--- /dev/null
+++ b/vehicleservice/positioning/server/include/ServiceInterface/ps_psmshadow_notifications.h
@@ -0,0 +1,62 @@
+/*
+ * @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 ps_psmshadow_notifications.h
+ */
+
+#ifndef PS_PSM_SHADOW_NOTIFICATIONS_H_ // NOLINT(build/header_guard)
+
+#include "agl_thread.h"
+
+/** @addtogroup BaseSystem
+ * @{
+ */
+/** @addtogroup peripheralservice
+ * @ingroup BaseSystem
+ * @{
+ */
+/** @addtogroup PS_PSMShadow
+ * @ingroup peripheralservice
+ * @{
+ */
+
+/**
+ * \~english PS_PSMShadow service availability notify.
+ */
+#define NTFY_PSMShadowService_Availability MN_PS_PSMSHADOW"/Availability"
+
+/**
+ * \~english init complete notify.
+ */
+#define NTFY_PSM_INITCOMP MN_PS_PSMSHADOW"/InitComp"
+
+/**
+ * \~english init complete2 notify.
+ */
+#define NTFY_PSM_INITCOMP2 MN_PS_PSMSHADOW"/InitComp2"
+
+// to be delete code.
+// Voltage, temperature and fan data to DIAG / HMI.
+#define NTFY_PSM_VTG_TEMP_FAN_DATA MN_PS_PSMSHADOW"/VolTempFanInfo"
+// Audio High Temp notification to Audio service.
+#define NTFY_PSM_AUDIO_HIGH_TEMP MN_PS_PSMSHADOW"/AudioHighTemp"
+
+/** @}*/ // end of PS_PSMShadow
+/** @}*/ // end of peripheralservice
+/** @}*/ // end of BaseSystem
+
+#endif // PS_PSM_SHADOW_NOTIFICATIONS_H_
diff --git a/vehicleservice/positioning/server/include/ServiceInterface/ps_version.h b/vehicleservice/positioning/server/include/ServiceInterface/ps_version.h
new file mode 100644
index 00000000..f28982f8
--- /dev/null
+++ b/vehicleservice/positioning/server/include/ServiceInterface/ps_version.h
@@ -0,0 +1,45 @@
+/*
+ * @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.
+ */
+
+/// \session
+/// \internal
+//////////////////////////////////////////////////////////////////////////////////////////////////
+/// \file ps_services.h
+/// \ingroup tag_PeripheralServices
+/// \brief Peripheral Services Version Information Support.
+///
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+// File name : ps_version.h
+// Module : PeripheralServices
+// Description : Peripheral Services Version Information Support.
+// Scope : PeripheralServices
+// Platform : Global Platform Framework (GPF)
+//
+// Customer : General
+// System : PosixBasedOS001
+// Reference : PeripheralServices
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef PS_VERSION_H_ // NOLINT(build/header_guard)
+
+#define PS_VERSION_MAJOR (1u)
+#define PS_VERSION_MINOR (0u)
+#define PS_VERSION_REV (0u)
+
+#endif /* PS_VERSION_H_ */
+
diff --git a/vehicleservice/positioning/server/include/nsfw/positioning_common.h b/vehicleservice/positioning/server/include/nsfw/positioning_common.h
new file mode 100644
index 00000000..538630d1
--- /dev/null
+++ b/vehicleservice/positioning/server/include/nsfw/positioning_common.h
@@ -0,0 +1,90 @@
+/*
+ * @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
+ * positioning_common.h
+ * @brief
+ * Positioing NSFW Dependency Section Common Headers
+ */
+#ifndef POSITIONING_SERVER_INCLUDE_NSFW_POSITIONING_COMMON_H_
+#define POSITIONING_SERVER_INCLUDE_NSFW_POSITIONING_COMMON_H_
+
+#include <positioning_hal.h>
+
+/*---------------------------------------------------------------------------------*
+ * Definition *
+ *---------------------------------------------------------------------------------*/
+/* Thread control command ID */
+#define CID_EXTTERM_REQ (0x0011) /* External pin status request */
+
+/* Internal thread activation status determination */
+#define THREAD_STS_MSK_POS_MAIN (0x01)
+#define THREAD_STS_MSK_POS_SENS (0x02)
+#define THREAD_STS_MSK_POS_GPS (0x04)
+#define THREAD_STS_MSK_POS_GPS_RECV (0x08)
+#define THREAD_STS_MSK_POS_GPS_ROLLOVER (0x10)
+
+
+/*---------------------------------------------------------------------------------*
+ * ENUMERATION *
+ *---------------------------------------------------------------------------------*/
+/*!
+ @brief Positioning operating status definitions
+*/
+typedef enum {
+ EPOS_EXE_STS_STOP = 0, /* Stopped */
+ EPOS_EXE_STS_RUNNING, /* Running (From FrameworkunifiedOnStart to FrameworkunifiedOnStop) */
+ EPOS_EXE_STS_RUNNING_COLDSTART /* Running after cold start */
+} EnumExeSts_POS;
+
+/*!
+ @brief Positioning Thread Startup Modes
+*/
+typedef enum {
+ EPOS_SETUP_MODE_NORMAL = 0, /* Normal start */
+ EPOS_SETUP_MODE_DATA_RESET /* Data reset start */ /* QAC 930 */
+} EnumSetupMode_POS;
+
+/*---------------------------------------------------------------------------------*
+ * STRUCTURE *
+ *---------------------------------------------------------------------------------*/
+/*!
+ @brief Thread activation information
+*/
+typedef struct {
+ EnumSetupMode_POS e_mode; /* Thread activation mode */
+} ST_THREAD_SETUP_INFO;
+
+/*---------------------------------------------------------------------------------*
+ * Prototype *
+ *---------------------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+ EnumSetupMode_POS PosSetupThread(HANDLE h_app, EnumTID_POS e_tid);
+ void PosTeardownThread(EnumTID_POS e_tid);
+#ifdef __cplusplus
+}
+#endif
+
+/*---------------------------------------------------------------------------------*
+ * Extern *
+ *---------------------------------------------------------------------------------*/
+extern BOOL g_thread_stop_req; /* Pos_Gps_Recv Thread Stop Flag */
+
+
+#endif // POSITIONING_SERVER_INCLUDE_NSFW_POSITIONING_COMMON_H_
diff --git a/vehicleservice/positioning/server/include/nsfw/vehicle_version.h b/vehicleservice/positioning/server/include/nsfw/vehicle_version.h
new file mode 100644
index 00000000..b397b686
--- /dev/null
+++ b/vehicleservice/positioning/server/include/nsfw/vehicle_version.h
@@ -0,0 +1,29 @@
+/*
+ * @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 POSITIONING_SERVER_INCLUDE_NSFW_VEHICLE_VERSION_H_
+#define POSITIONING_SERVER_INCLUDE_NSFW_VEHICLE_VERSION_H_
+
+#define MAJORNO 0x01
+#define MINORNO 0x00
+#define REVISION 0x00
+
+/*
+ * ChangeLog : This section describes all the changes done to the project.
+ *
+ * - Initial
+ */
+
+#endif // POSITIONING_SERVER_INCLUDE_NSFW_VEHICLE_VERSION_H_