Init basesystem source codes.
[staging/basesystem.git] / vehicleservice / positioning / server / src / Sensor / VehicleSens_Did_GsnsZ.cpp
1 /*
2  * @copyright Copyright (c) 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    :VehicleSens_Did_GsnsY.cpp
19  *  Subsystem name  :Vehicle sensor process
20  *  Program name  :Vehicle sensor data master(VEHICLE_DID_GSNS_Z)
21  *  Module configuration  :VehicleSensGetGsnsZ()    Vehicle sensor GSNS_Z GET function
22  ******************************************************************************/
23
24 #include "VehicleSens_DataMaster.h"
25
26 /*************************************************/
27 /*           Global variable                      */
28 /*************************************************/
29
30 /*******************************************************************************
31 * MODULE    : VehicleSensGetGsnsZ
32 * ABSTRACT  : Vehicle sensor GSNS_Z GET function
33 * FUNCTION  : Provide the GSNS_Z data master
34 * ARGUMENT  : *pst_data    : Pointer to the data master acquisition destination
35 *             uc_get_method  : Acquisition method(Direct Line or CAN)
36 * NOTE      :
37 * RETURN    : void
38 ******************************************************************************/
39 void VehicleSensGetGsnsZ(VEHICLESENS_DATA_MASTER *pst_data, u_int8 uc_get_method) {
40     switch (uc_get_method) {  // LCOV_EXCL_BR_LINE 6:VEHICLESENS_GETMETHOD_CAN cannot to pass in
41         case VEHICLESENS_GETMETHOD_CAN:
42         {
43             /* When acquiring from CAN data */
44             AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
45             break;  // LCOV_EXCL_LINE 8: dead code
46         }
47         case VEHICLESENS_GETMETHOD_LINE:
48         {
49             /* To acquire from LineSensor */
50             VehicleSensGetGsnsZl(pst_data);
51             break;
52         }
53         default:
54             break;
55     }
56 }
57
58 #if CONFIG_SENSOR_EXT_VALID        /* Initial Sensor Support */
59 /*******************************************************************************
60 * MODULE    : VehicleSensGetGsnsZExt
61 * ABSTRACT  : Vehicle sensor GSNS_Z GET function
62 * FUNCTION  : Provide the GSNS_Z data master
63 * ARGUMENT  : *pst_data    : Pointer to the data master acquisition destination
64 *             uc_get_method  : Acquisition method(Direct Line or CAN)
65 * NOTE      :
66 * RETURN    : void
67 ******************************************************************************/
68 void VehicleSensGetGsnsZExt(VEHICLESENS_DATA_MASTER_EXT *pst_data, u_int8 uc_get_method) {
69     switch (uc_get_method) {  // LCOV_EXCL_BR_LINE 6:VEHICLESENS_GETMETHOD_CAN cannot to pass in
70         case VEHICLESENS_GETMETHOD_CAN:
71         {
72             /* When acquiring from CAN data */
73             AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
74             break;  // LCOV_EXCL_LINE 8: dead code
75         }
76         case VEHICLESENS_GETMETHOD_LINE:
77         {
78             /* To acquire from LineSensor */
79             VehicleSensGetGsnsZExtl(pst_data);
80             break;
81         }
82         default:
83             break;
84     }
85 }
86 #endif
87
88 /**
89  * @brief
90  *   Vehicle sensor GSNS_Z GET function
91  *
92  *   Provide the GSNS_Z data master
93  *
94  * @param[in]  *pst_data: Pointer to the data master acquisition destination
95  * @param[in]  uc_get_method: Acquisition method(Direct Line or CAN)
96  */
97 void VehicleSensGetGsnsZFst(VEHICLESENS_DATA_MASTER_FST *pst_data, u_int8 uc_get_method) {
98     switch (uc_get_method) {  // LCOV_EXCL_BR_LINE 6:VEHICLESENS_GETMETHOD_CAN cannot to pass in
99         case VEHICLESENS_GETMETHOD_CAN:
100         {
101             /* When acquiring from CAN data */
102             AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
103             break;  // LCOV_EXCL_LINE 8: dead code
104         }
105
106         case VEHICLESENS_GETMETHOD_LINE:
107         {
108             /* To acquire from LineSensor */
109             VehicleSensGetGsnsZFstl(pst_data);
110             break;
111         }
112
113         default:
114             break;
115     }
116 }