2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_VEHICLEIF_H_
18 #define POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_VEHICLEIF_H_
20 /*---------------------------------------------------------------------------------*
22 *---------------------------------------------------------------------------------*/
23 #include <native_service/frameworkunified_types.h>
24 #include <native_service/frameworkunified_framework_if.h>
26 #include <vehicle_service/positioning_base_library.h>
27 #include <stub/vehicle_notifications.h>
28 #include <stub/Vehicle_Sensor_Common_API.h>
30 /*---------------------------------------------------------------------------------*
32 *---------------------------------------------------------------------------------*/
33 /* Transmission Type */
34 #define VEHICLEIF_TRANSMISSION_TYPE_MT 0
35 #define VEHICLEIF_TRANSMISSION_TYPE_AT 1
36 #define VEHICLEIF_TRANSMISSION_TYPE_UNKNOWN 2
37 #define VEHICLEIF_TRANSMISSION_TYPE_NUM 3 /* Number of Transmission Types */
39 /* Shift Position (CAUTION: These values depend on Vehicle I/F) */
40 #define VEHICLEIF_SHIFT_POSITION_U 0
41 #define VEHICLEIF_SHIFT_POSITION_R 1
42 #define VEHICLEIF_SHIFT_POSITION_P 2
43 #define VEHICLEIF_SHIFT_POSITION_N 4
44 #define VEHICLEIF_SHIFT_POSITION_D 8
45 #define VEHICLEIF_SHIFT_POSITION_NUM 5 /* Number of Shift Position Types */
47 /* Parking Brake (CAUTION: These values depend on Vehicle I/F) */
48 #define VEHICLEIF_PKB_OFF 0
49 #define VEHICLEIF_PKB_ON 1
50 #define VEHICLEIF_PKB_UNKNOWN 2
51 #define VEHICLEIF_PKB_NUM 3
53 /*---------------------------------------------------------------------------------*
54 * Typedef declaration *
55 *---------------------------------------------------------------------------------*/
57 /*---------------------------------------------------------------------------------*
58 * Struct declaration *
59 *---------------------------------------------------------------------------------*/
61 /*---------------------------------------------------------------------------------*
62 * Prototype Declaration *
63 *---------------------------------------------------------------------------------*/
67 void VehicleIf_SetAvailability(BOOL bIsAvailable);
69 //EFrameworkunifiedStatus VehicleIf_GetTypeOfTransmission(uint8_t* pType, BOOL* pbIsAvailable);
70 EFrameworkunifiedStatus VehicleIf_GetTypeOfTransmission(uint8_t* pType, uint8_t* pPkb, BOOL* pbIsAvailable);
71 EFrameworkunifiedStatus VehicleIf_GetShiftPosition(uint8_t* pShift, BOOL* pbIsAvailable);
72 EFrameworkunifiedStatus VehicleIfAttachCallbacksToDispatcher( // NOLINT(readability/nolint)
73 _FrameworkunifiedProtocolCallbackHandler const* p_msg_handler,
74 unsigned int ui_handlercount);
75 EFrameworkunifiedStatus VehicleIfDetachCallbacksFromDispatcher(const PUI_32 pui_cmd_array, UI_32 ui_command_count);
76 EFrameworkunifiedStatus VehicleIfNotifyOnVehicleAvailability(CbFuncPtr fp_on_cmd);
77 EFrameworkunifiedStatus VehicleIfDeliveryEntry(uint32_t ul_did);
82 #endif // POSITIONING_SERVER_INCLUDE_SERVICEINTERFACE_VEHICLEIF_H_