Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / vehicleservice / positioning / server / include / Sensor / DeadReckoning_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 #ifndef POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_COMMON_H_
18 #define POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_COMMON_H_
19 /****************************************************************************
20  * File name    :DeadReckoning_Common.h
21  * System name    :PastModel002
22  * Subsystem name  :
23  ****************************************************************************/
24
25 #include "Dead_Reckoning_Local_Api.h"
26
27 /************************************************************************
28 *      Macro definitions                          *
29 ************************************************************************/
30 #define DEADRECKONING_ZERO          0
31 #define DEADRECKONING_BIT0          0x00000001
32 #define DEADRECKONING_BIT1          0x00000002
33 #define DEADRECKONING_BIT2          0x00000004
34 #define DEADRECKONING_BIT3          0x00000008
35 #define DEADRECKONING_BIT4          0x00000010
36 #define DEADRECKONING_BIT5          0x00000020
37 #define DEADRECKONING_BIT6          0x00000040
38 #define DEADRECKONING_BIT7          0x00000080
39 #define DEADRECKONING_BIT29         0x20000000
40 #define DEADRECKONING_BIT30         0x40000000
41 #define DEADRECKONING_BIT31         0x80000000
42 #define DEADRECKONING_NEQ           1
43 #define DEADRECKONING_EQ            0
44 #define DEADRECKONING_INVALID       0
45 #define DEADRECKONING_EFFECTIVE     1
46 #define DEADRECKONING_CHGTYPE_NCHG  DEADRECKONING_EQ
47 #define DEADRECKONING_CHGTYPE_CHG   DEADRECKONING_NEQ
48 #define DEADRECKONING_GETMETHOD_DR  4  /* Data collection way: DR */
49
50 /* Offset value of normal data of vehicle sensor */
51 #define  DEADRECKONING_OFFSET_NORMAL      4
52
53 /************************************************************************
54 *      Typedef definitions                          *
55 ************************************************************************/
56
57 /* Data Master Set Notification Function */
58 typedef  void (*PFUNC_DR_DMASTER_SET_N) (DID, u_int8, u_int8);
59
60 /************************************************************************
61 *      Struct definitions                          *
62 ************************************************************************/
63 /*********************************************************************
64 * TAG    : DEADRECKONING_DID_OFFSET_TBL
65 * ABSTRACT  : Vehicle sensor data ID,Structure of each data in the offset table
66 ***********************************************************************/
67 typedef struct {
68     DID      ul_did;                /* Data ID      */
69     u_int16  us_offset;              /* Offset value    */
70     u_int8   uc_reserve[2];            /* Reserved      */
71 } DEADRECKONING_DID_OFFSET_TBL;
72
73 /*********************************************************************
74 * TAG    :
75 * ABSTRACT  :
76 ***********************************************************************/
77
78 /************************************************************************
79 *      Function prototype                        *
80 ************************************************************************/
81 u_int8 DeadReckoningMemcmp(const void *, const void *, size_t);
82 int32 DeadReckoningCheckDid(DID);
83 u_int16  DeadReckoningGetDataMasterOffset(DID);
84 #endif  // POSITIONING_SERVER_INCLUDE_SENSOR_DEADRECKONING_COMMON_H_