Re-organized sub-directory by category
[staging/basesystem.git] / service / vehicle / positioning / client / include / VehicleDebug_API.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 name        : VehicleDebug_API.h
19  * System name        : PastModel002
20  * Sub System name    : VehicleDebug_API library
21  ******************************************************************************/
22 #ifndef POSITIONING_CLIENT_INCLUDE_VEHICLEDEBUG_API_H_
23 #define POSITIONING_CLIENT_INCLUDE_VEHICLEDEBUG_API_H_
24
25 /************************************************************************
26  *            Include                                                   *
27  ***********************************************************************/
28
29 /************************************************************************
30 *            Definition                                                 *
31 ************************************************************************/
32 /*----------------------------------------------------------------------*
33  *    VEHICLEDEBUG_RET_API Definition                                   *
34  *----------------------------------------------------------------------*/
35 /* Normal */
36 #define VEHICLEDEBUG_RET_NORMAL         0       /* Successful completion    */
37
38 /* Abnormal */
39 #define VEHICLEDEBUG_RET_ERROR          (-1)    /* An error has occurred    */
40 #define VEHICLEDEBUG_RET_ERROR_PARAM    (-2)    /* Parameter error            */
41
42 /*----------------------------------------------------------------------*
43  *    Message Definition                                                    *
44  *----------------------------------------------------------------------*/
45 /* Command ID */
46 #define CID_VEHICLEDEBUG_LOG_SET        0x020D
47 #define CID_VEHICLEDEBUG_LOG_GET        0x020E
48
49 /* Message Length */
50 #define VEHICLEDEBUG_MSGBUF_DSIZE       36U
51
52 /*----------------------------------------------------------------------*
53  *    Log Kind Definition                                               *
54  *----------------------------------------------------------------------*/
55 #define LOG_KIND_NUM                    32U
56
57 /*----------------------------------------------------------------------*
58  *    Log Mask Definition                                               *
59  *----------------------------------------------------------------------*/
60 #define LOG_MASK_LOCATION_LOG           0x00000001UL
61
62 /*----------------------------------------------------------------------*
63  *    Log Severity Definition                                           *
64  *----------------------------------------------------------------------*/
65 /* Unused */
66
67 /************************************************************************
68 *            type Definition                                            *
69 ************************************************************************/
70 typedef RET_API VEHICLEDEBUG_RET_API;           /* API return value    */
71
72 /************************************************************************
73 *            struct Definition                                            *
74 ************************************************************************/
75 /************************************************************************
76  * TAG         : VEHICLEDEBUG_MSG_LOGINFO_DAT
77  * ABSTRACT     : Log data structure
78  * NOTE         :
79  ************************************************************************/
80 typedef struct {
81     u_int32                   log_sw;                             /* Kind of log   */
82     u_int8                    severity[LOG_KIND_NUM];             /* Output level(unused)    */
83 } VEHICLEDEBUG_MSG_LOGINFO_DAT;
84
85 /*****************************************************************************
86  * TAG         : VEHICLEDEBUG_MSG_BUF
87  * ABSTRACT     : VehicleDebug_API message buffer structure
88  * NOTE         : Message structure
89  *****************************************************************************/
90 typedef struct {
91     T_APIMSG_MSGBUF_HEADER    hdr;                                /* Message header        */
92     u_int8                    data[VEHICLEDEBUG_MSGBUF_DSIZE];    /* Message data            */
93 } VEHICLEDEBUG_MSG_BUF;
94
95 /************************************************************************
96  *            Function prototypes                                              *
97  ************************************************************************/
98 #ifdef __cplusplus
99 extern "C" {
100 #endif
101
102 /*[VehicleDebug_API Public API]*/
103 VEHICLEDEBUG_RET_API SensorGetLogSetting(PNO pno, u_int32 *log_sw, u_int8 *severity);
104 VEHICLEDEBUG_RET_API SensorSetLogStatus(PNO pno, u_int32 log_sw, u_int8 *severity);
105
106 #ifdef __cplusplus
107 }
108 #endif
109
110 #endif  // POSITIONING_CLIENT_INCLUDE_VEHICLEDEBUG_API_H_