Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / vehicleservice / positioning / server / include / nsfw / positioning_common.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 /**
18  * @file
19  *      positioning_common.h
20  * @brief
21  *  Positioing NSFW Dependency Section Common Headers
22  */
23 #ifndef POSITIONING_SERVER_INCLUDE_NSFW_POSITIONING_COMMON_H_
24 #define POSITIONING_SERVER_INCLUDE_NSFW_POSITIONING_COMMON_H_
25
26 #include <positioning_hal.h>
27
28 /*---------------------------------------------------------------------------------*
29  * Definition                                                                      *
30  *---------------------------------------------------------------------------------*/
31 /* Thread control command ID */
32 #define CID_EXTTERM_REQ               (0x0011) /* External pin status request     */
33
34 /* Internal thread activation status determination */
35 #define THREAD_STS_MSK_POS_MAIN            (0x01)
36 #define THREAD_STS_MSK_POS_SENS            (0x02)
37 #define THREAD_STS_MSK_POS_GPS             (0x04)
38 #define THREAD_STS_MSK_POS_GPS_RECV        (0x08)
39 #define THREAD_STS_MSK_POS_GPS_ROLLOVER    (0x10)
40
41
42 /*---------------------------------------------------------------------------------*
43  * ENUMERATION                                                                     *
44  *---------------------------------------------------------------------------------*/
45 /*!
46    @brief   Positioning operating status definitions
47 */
48 typedef enum {
49   EPOS_EXE_STS_STOP = 0,             /* Stopped                               */
50   EPOS_EXE_STS_RUNNING,              /* Running (From FrameworkunifiedOnStart to FrameworkunifiedOnStop) */
51   EPOS_EXE_STS_RUNNING_COLDSTART     /* Running after cold start             */
52 } EnumExeSts_POS;
53
54 /*!
55    @brief   Positioning Thread Startup Modes
56 */
57 typedef enum {
58   EPOS_SETUP_MODE_NORMAL = 0,        /* Normal start           */
59   EPOS_SETUP_MODE_DATA_RESET         /* Data reset start */ /* QAC 930 */
60 } EnumSetupMode_POS;
61
62 /*---------------------------------------------------------------------------------*
63  * STRUCTURE                                                                       *
64  *---------------------------------------------------------------------------------*/
65 /*!
66    @brief   Thread activation information
67 */
68 typedef struct {
69   EnumSetupMode_POS e_mode;           /* Thread activation mode */
70 } ST_THREAD_SETUP_INFO;
71
72 /*---------------------------------------------------------------------------------*
73  * Prototype                                                                       *
74  *---------------------------------------------------------------------------------*/
75 #ifdef __cplusplus
76 extern "C" {
77 #endif
78     EnumSetupMode_POS PosSetupThread(HANDLE h_app, EnumTID_POS e_tid);
79     void PosTeardownThread(EnumTID_POS e_tid);
80 #ifdef __cplusplus
81 }
82 #endif
83
84 /*---------------------------------------------------------------------------------*
85  * Extern                                                                          *
86  *---------------------------------------------------------------------------------*/
87 extern BOOL g_thread_stop_req; /* Pos_Gps_Recv Thread Stop Flag */
88
89
90 #endif  // POSITIONING_SERVER_INCLUDE_NSFW_POSITIONING_COMMON_H_