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_SELECTIONITEMLIST_H_
18 #define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_SELECTIONITEMLIST_H_
19 /****************************************************************************
20 * File name :VehicleSens_SelectionItemList.h
21 * System name :_CWORD107_
22 * Subsystem name :Vehicle sensor process
23 ****************************************************************************/
25 #include "Vehicle_API_Dummy.h"
26 #include "Vehicle_API_private.h"
27 #include "VehicleSens_Common.h"
28 #include "VehicleIf.h"
30 /************************************************************************
32 ************************************************************************/
33 #if CONFIG_SENSOR_EXT_VALID /* Initial Sensor Support */
34 /* ++ Addition of DID9 related to PastModel002 supported_UBX commands */
35 /* ++ GPS _CWORD82_ support (To add the target DID 3) */
36 #define VEHICLESENS_SELECTION_ITEM_LIST_LEN (87) /* Number of data in Vehicle Sensor Selection Item List */
37 /* -- GPS _CWORD82_ support */
39 #define VEHICLESENS_SELECTION_ITEM_LIST_LEN (63) /* Number of data in Vehicle Sensor Selection Item List */
40 /* -- PastModel002 support */
42 /* Sum of bits 29 through 31*/
43 #define VEHICLESENS_BIT31_29 (VEHICLESENS_BIT31 | VEHICLESENS_BIT30 | VEHICLESENS_BIT29)
45 #define VEHICLESENS_ITEMLIST_APPLICATION 0x00 /* Application of electronic PF */
46 #define VEHICLESENS_ITEMLIST_NON_APPLICATION 0x01 /* Electronic PF not applicable */
47 #define VEHICLESENS_ITEMLIST_INVALID 0x02 /* Disabled */
49 #define VEHICLE_COMM_WATCHTBL_DAT_NUM 64 /* Number of data held for communication discontinuation registration */
50 #define VEHICLE_COMM_WATCHTBL_DID_NUM 2 /* Number of Disruption Monitoring Data Management */
52 /************************************************************************
53 * Struct definitions *
54 ************************************************************************/
56 /*********************************************************************
57 * TAG : VEHICLESENS_SELECTION_ITEM_LIST
58 * ABSTRACT : Managing a list of vehicle information choices
59 ***********************************************************************/
62 DID ul_did; /* Data ID */
63 u_int32 ul_canid; /* CAN ID */ /* CANIF_API deletion */
64 u_int8 uc_get_method; /* Data acquisition source category */
65 u_int8 reserve[3]; /* reserve */
66 } VEHICLESENS_SELECTION_ITEM_LIST;
68 /************************************************************************
69 * TAG : VEHICLE_COMM_WATCH_TBL
70 * ABSTRACT : Managing Vehicle Sensor Disruption Monitoring Data
71 ************************************************************************/
73 PNO us_pno; /* Destination PNO */
74 u_int16 us_watch_time; /* Interruption monitoring time(Units of 100 ms) */
75 } VEHICLE_COMM_WATCH_DAT;
78 DID ul_did; /* Data ID corresponding to vehicle sensor information */
79 u_int8 uc_effective_flg; /* CANID Valid Flag */
80 u_int8 uc_vehicle_comm_watch_cnt; /* Vehicle Sensor Information Disruption Monitoring Request Count */
81 VEHICLE_COMM_WATCH_DAT st_comm_watch_dat[VEHICLE_COMM_WATCHTBL_DAT_NUM]; /* Communication disruption registration data */
82 } VEHICLE_COMM_WATCH_TBL;
84 /* ++ PastModel002 support */
85 /************************************************************************
86 * TAG : VEHICLE_MSG_WATCH_STOPPAGE
87 * ABSTRACT : Vehicle Sensor Disruption Monitoring Message(-> Vehicle sensor)
88 ************************************************************************/
90 DID ul_did; /* Data ID corresponding to vehicle sensor information */
91 PNO us_pno; /* Destination PNO */
92 u_int16 us_watch_time; /* Interruption monitoring time(Units of 100 ms) */
93 u_int16 us_offset; /* Offset to shared memory storage area */
94 u_int16 us_size; /* Size of shared memory storage area */
95 EventID ul_eventid; /* Event ID */
96 } VEHICLE_MSG_WATCH_STOPPAGE_DAT;
99 T_APIMSG_MSGBUF_HEADER st_hdr; /* Message header */
100 VEHICLE_MSG_WATCH_STOPPAGE_DAT st_data; /* Message data */
101 } VEHICLE_MSG_WATCH_STOPPAGE;
103 /* -- PastModel002 support */
105 /************************************************************************
106 * Function prototype *
107 ************************************************************************/
108 void VehicleSensInitSelectionItemList(void);
109 u_int8 VehicleSensGetSelectionItemList(DID);
110 u_int32 VehicleSensGetSelectionItemListCanId(DID);
111 BOOL VehicleSensSetSelectionItemListCanId(DID did, u_int32); /* CANIF_API deletion */
112 void VehicleSensCommWatchTblInit(void);
113 BOOL VehicleSensCommWatchTblSave(const VEHICLE_MSG_WATCH_STOPPAGE*);
114 BOOL VehicleSensCommWatchTblRun(DID);
116 #endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_SELECTIONITEMLIST_H_