2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_FROMACCESS_H_
18 #define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_FROMACCESS_H_
19 /******************************************************************************
20 * File name :VehicleSens_FromAccess.h
21 * System name :PastModel002
23 ******************************************************************************/
27 #include "Sensor_API.h"
28 #include "SensorLocation_API.h"
30 /************************************************************************
32 ************************************************************************/
33 #define NV_FILE_VEHICLESENS "/fs/tmpfs/VehicleSens_nv_data.bin"
34 #define NV_FILE_VEHICLESENS_TEMP "/fs/tmpfs/VehicleSens_nv_data_temp.bin"
35 #define NV_FILE_VEHICLESENS2 "/fs/tmpfs/VehicleSens_nv_data_2nd.bin"
36 #define NV_FILE_VEHICLESENS2_TEMP "/fs/tmpfs/VehicleSens_nv_data_2nd_temp.bin"
37 #define NV_LOAD_WAIT_TIME_VEHICLESENS 100U
38 #define NV_UPDATE_CYCLE_LONLAT 100U
39 #define NV_UPDATE_CYCLE_LOCALTIME 10U
41 /************************************************************************
42 * Typedef definitions *
43 ************************************************************************/
45 /************************************************************************
46 * Struct definitions *
47 ************************************************************************/
52 u_int32 update_counter;
56 } NV_DATA_VEHICLESENS;
58 /************************************************************************
59 * Function prototype *
60 ************************************************************************/
61 void VehicleSensFromAccessInitialize(void);
62 RET_API VehicleSensRegistNvTag(void);
63 RET_API VehicleSensReadNVLocalTime(LOCALTIME * local_time);
64 RET_API VehicleSensReadNVLonLat(LONLAT * lonlat);
65 RET_API VehicleSensReadNVTimeDiff(int32 * time_diff);
66 void VehicleSensStoreLonlat(LONLAT * plonlat);
67 RET_API VehicleSensWriteNVLocaltime(LOCALTIME * local_time, int32 * time_diff);
69 #endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_FROMACCESS_H_