Re-organized sub-directory by category
[staging/basesystem.git] / service / vehicle / positioning / server / src / Sensor / VehicleSens_Did_PulseTime.cpp
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  *  VehicleSens_Did_PulseTime.cpp
20  * @brief
21  *  Vehicle sensor data master(VEHICLE_DID_PULSE_TIME)
22  */
23
24 #include <vehicle_service/positioning_base_library.h>
25 #include "VehicleSens_DataMaster.h"
26
27 /*************************************************/
28 /*           Global variable                      */
29 /*************************************************/
30
31 /**
32  * @brief
33  *   Vehicle sensor pulse time GET function
34  *
35  *   Provide interpulse time data master
36  *
37  * @param[in]   *pst_data: Pointer to the data master acquisition destination
38  * @param[in]   uc_get_method: Acquisition method(Direct Line or CAN)
39  */
40 void VehicleSensGetPulseTime(VEHICLESENS_DATA_MASTER *pst_data, u_int8 uc_get_method) {
41     switch (uc_get_method) {  // LCOV_EXCL_BR_LINE 6:VEHICLESENS_GETMETHOD_CAN cannot to pass in
42         case VEHICLESENS_GETMETHOD_CAN:
43         {
44             /* When acquiring from CAN data */
45             AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
46             break;  // LCOV_EXCL_LINE 8: dead code
47         }
48         case VEHICLESENS_GETMETHOD_LINE:
49         {
50             /* To acquire from LineSensor */
51             VehicleSensGetPulseTimel(pst_data);
52             break;
53         }
54         default:
55             break;
56     }
57 }
58
59 /**
60  * @brief
61  *   Vehicle sensor inter-pulse time (initial delivery) GET function
62  *
63  *   Provide interpulse time data master
64  *
65  * @param[in]   *pst_data: Pointer to the data master acquisition destination
66  * @param[in]   uc_get_method: Acquisition method(Direct Line or CAN)
67  */
68 void VehicleSensGetPulseTimeExt(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
77         case VEHICLESENS_GETMETHOD_LINE:
78         {
79             /* To acquire from LineSensor */
80             VehicleSensGetPulseTimeExtl(pst_data);
81             break;
82         }
83         default:
84             break;
85     }
86 }
87
88 /**
89  * @brief
90  *   Vehicle sensor pulse time (initial sensor) GET function
91  *
92  *   Provide interpulse time 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
98 void VehicleSensGetPulseTimeFst(VEHICLESENS_DATA_MASTER_FST *pst_data, u_int8 uc_get_method) {  // LCOV_EXCL_START 8: dead code  // NOLINT(whitespace/line_length)
99     AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
100     switch (uc_get_method) {
101         case VEHICLESENS_GETMETHOD_CAN:
102         {
103             /* When acquiring from CAN data */
104             break;
105         }
106         case VEHICLESENS_GETMETHOD_LINE:
107         {
108             /* To acquire from LineSensor */
109             break;
110         }
111         default:
112             break;
113     }
114 }
115 // LCOV_EXCL_STOP