common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / vehicleservice / positioning / server / include / Sensor / VehicleSens_SelectionItemList.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
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  ****************************************************************************/
24
25 #include "Vehicle_API_Dummy.h"
26 #include "Vehicle_API_private.h"
27 #include "VehicleSens_Common.h"
28 #include "VehicleIf.h"
29
30 /************************************************************************
31 *            Macro definitions                                                    *
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 */
38 #else
39 #define VEHICLESENS_SELECTION_ITEM_LIST_LEN    (63)        /* Number of data in Vehicle Sensor Selection Item List  */
40 /* -- PastModel002 support */
41 #endif
42 /* Sum of bits 29 through 31*/
43 #define VEHICLESENS_BIT31_29    (VEHICLESENS_BIT31 | VEHICLESENS_BIT30 | VEHICLESENS_BIT29)
44
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                */
48
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        */
51
52 /************************************************************************
53 *            Struct definitions                                                    *
54 ************************************************************************/
55
56 /*********************************************************************
57 * TAG       : VEHICLESENS_SELECTION_ITEM_LIST
58 * ABSTRACT  : Managing a list of vehicle information choices
59 ***********************************************************************/
60
61 typedef struct {
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;
67
68 /************************************************************************
69 * TAG       : VEHICLE_COMM_WATCH_TBL
70 * ABSTRACT  : Managing Vehicle Sensor Disruption Monitoring Data
71 ************************************************************************/
72 typedef struct {
73     PNO            us_pno;                                            /* Destination PNO                        */
74     u_int16     us_watch_time;                                    /* Interruption monitoring time(Units of 100 ms)            */
75 } VEHICLE_COMM_WATCH_DAT;
76
77 typedef struct {
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;
83
84 /* ++ PastModel002 support */
85 /************************************************************************
86 * TAG       : VEHICLE_MSG_WATCH_STOPPAGE
87 * ABSTRACT  : Vehicle Sensor Disruption Monitoring Message(-> Vehicle sensor)
88 ************************************************************************/
89 typedef struct {
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;
97
98 typedef struct {
99     T_APIMSG_MSGBUF_HEADER                st_hdr;        /* Message header    */
100     VEHICLE_MSG_WATCH_STOPPAGE_DAT        st_data;        /* Message data    */
101 } VEHICLE_MSG_WATCH_STOPPAGE;
102
103 /* -- PastModel002 support */
104
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);
115
116 #endif  // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLESENS_SELECTIONITEMLIST_H_