• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 The Android Open Source Project
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  * DO NOT EDIT MANUALLY!!!
19  *
20  * Generated by tools/generate_annotation_enums.py.
21  */
22 
23 // clang-format off
24 
25 #pragma once
26 
27 #define addSupportedValues(EnumType) \
28 { \
29 constexpr auto values = ndk::internal::enum_values<EnumType>; \
30 for (size_t i = 0; i < values.size(); i++) { \
31     supportedValues.insert(static_cast<int64_t>(values[i])); \
32 } \
33 }
34 
35 #include <VehicleHalTypes.h>
36 #include <aidl/android/hardware/automotive/vehicle/VehicleProperty.h>
37 
38 #include <unordered_set>
39 
40 namespace aidl::android::hardware::automotive::vehicle {
getSupportedEnumValuesForProperty(VehicleProperty propertyId)41 std::unordered_set<int64_t> getSupportedEnumValuesForProperty(VehicleProperty propertyId) {
42     std::unordered_set<int64_t> supportedValues;
43     switch (propertyId) {
44         case VehicleProperty::INFO_FUEL_TYPE:
45             addSupportedValues(FuelType)
46             break;
47         case VehicleProperty::INFO_EV_CONNECTOR_TYPE:
48             addSupportedValues(EvConnectorType)
49             break;
50         case VehicleProperty::INFO_FUEL_DOOR_LOCATION:
51             addSupportedValues(PortLocationType)
52             break;
53         case VehicleProperty::INFO_EV_PORT_LOCATION:
54             addSupportedValues(PortLocationType)
55             break;
56         case VehicleProperty::INFO_DRIVER_SEAT:
57             addSupportedValues(VehicleAreaSeat)
58             break;
59         case VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS:
60             addSupportedValues(PortLocationType)
61             break;
62         case VehicleProperty::INFO_VEHICLE_SIZE_CLASS:
63             addSupportedValues(VehicleSizeClass)
64             break;
65         case VehicleProperty::ENGINE_OIL_LEVEL:
66             addSupportedValues(VehicleOilLevel)
67             break;
68         case VehicleProperty::IMPACT_DETECTED:
69             addSupportedValues(ImpactSensorLocation)
70             break;
71         case VehicleProperty::GEAR_SELECTION:
72             addSupportedValues(VehicleGear)
73             break;
74         case VehicleProperty::CURRENT_GEAR:
75             addSupportedValues(VehicleGear)
76             break;
77         case VehicleProperty::TURN_SIGNAL_STATE:
78             addSupportedValues(VehicleTurnSignal)
79             break;
80         case VehicleProperty::IGNITION_STATE:
81             addSupportedValues(VehicleIgnitionState)
82             break;
83         case VehicleProperty::EV_STOPPING_MODE:
84             addSupportedValues(EvStoppingMode)
85             break;
86         case VehicleProperty::ELECTRONIC_STABILITY_CONTROL_STATE:
87             addSupportedValues(ElectronicStabilityControlState)
88             addSupportedValues(ErrorState)
89             break;
90         case VehicleProperty::TURN_SIGNAL_LIGHT_STATE:
91             addSupportedValues(VehicleTurnSignal)
92             break;
93         case VehicleProperty::TURN_SIGNAL_SWITCH:
94             addSupportedValues(VehicleTurnSignal)
95             break;
96         case VehicleProperty::HVAC_FAN_DIRECTION:
97             addSupportedValues(VehicleHvacFanDirection)
98             break;
99         case VehicleProperty::HVAC_TEMPERATURE_DISPLAY_UNITS:
100             addSupportedValues(VehicleUnit)
101             break;
102         case VehicleProperty::HVAC_FAN_DIRECTION_AVAILABLE:
103             addSupportedValues(VehicleHvacFanDirection)
104             break;
105         case VehicleProperty::DISTANCE_DISPLAY_UNITS:
106             addSupportedValues(VehicleUnit)
107             break;
108         case VehicleProperty::FUEL_VOLUME_DISPLAY_UNITS:
109             addSupportedValues(VehicleUnit)
110             break;
111         case VehicleProperty::TIRE_PRESSURE_DISPLAY_UNITS:
112             addSupportedValues(VehicleUnit)
113             break;
114         case VehicleProperty::EV_BATTERY_DISPLAY_UNITS:
115             addSupportedValues(VehicleUnit)
116             break;
117         case VehicleProperty::VEHICLE_SPEED_DISPLAY_UNITS:
118             addSupportedValues(VehicleUnit)
119             break;
120         case VehicleProperty::HW_ROTARY_INPUT:
121             addSupportedValues(RotaryInputType)
122             break;
123         case VehicleProperty::HW_CUSTOM_INPUT:
124             addSupportedValues(CustomInputType)
125             break;
126         case VehicleProperty::SEAT_FOOTWELL_LIGHTS_STATE:
127             addSupportedValues(VehicleLightState)
128             break;
129         case VehicleProperty::SEAT_FOOTWELL_LIGHTS_SWITCH:
130             addSupportedValues(VehicleLightSwitch)
131             break;
132         case VehicleProperty::SEAT_AIRBAGS_DEPLOYED:
133             addSupportedValues(VehicleAirbagLocation)
134             break;
135         case VehicleProperty::SEAT_OCCUPANCY:
136             addSupportedValues(VehicleSeatOccupancyState)
137             break;
138         case VehicleProperty::WINDSHIELD_WIPERS_STATE:
139             addSupportedValues(WindshieldWipersState)
140             break;
141         case VehicleProperty::WINDSHIELD_WIPERS_SWITCH:
142             addSupportedValues(WindshieldWipersSwitch)
143             break;
144         case VehicleProperty::HEADLIGHTS_STATE:
145             addSupportedValues(VehicleLightState)
146             break;
147         case VehicleProperty::HIGH_BEAM_LIGHTS_STATE:
148             addSupportedValues(VehicleLightState)
149             break;
150         case VehicleProperty::FOG_LIGHTS_STATE:
151             addSupportedValues(VehicleLightState)
152             break;
153         case VehicleProperty::HAZARD_LIGHTS_STATE:
154             addSupportedValues(VehicleLightState)
155             break;
156         case VehicleProperty::HEADLIGHTS_SWITCH:
157             addSupportedValues(VehicleLightSwitch)
158             break;
159         case VehicleProperty::HIGH_BEAM_LIGHTS_SWITCH:
160             addSupportedValues(VehicleLightSwitch)
161             break;
162         case VehicleProperty::FOG_LIGHTS_SWITCH:
163             addSupportedValues(VehicleLightSwitch)
164             break;
165         case VehicleProperty::HAZARD_LIGHTS_SWITCH:
166             addSupportedValues(VehicleLightSwitch)
167             break;
168         case VehicleProperty::CABIN_LIGHTS_STATE:
169             addSupportedValues(VehicleLightState)
170             break;
171         case VehicleProperty::CABIN_LIGHTS_SWITCH:
172             addSupportedValues(VehicleLightSwitch)
173             break;
174         case VehicleProperty::READING_LIGHTS_STATE:
175             addSupportedValues(VehicleLightState)
176             break;
177         case VehicleProperty::READING_LIGHTS_SWITCH:
178             addSupportedValues(VehicleLightSwitch)
179             break;
180         case VehicleProperty::STEERING_WHEEL_LIGHTS_STATE:
181             addSupportedValues(VehicleLightState)
182             break;
183         case VehicleProperty::STEERING_WHEEL_LIGHTS_SWITCH:
184             addSupportedValues(VehicleLightSwitch)
185             break;
186         case VehicleProperty::ELECTRONIC_TOLL_COLLECTION_CARD_TYPE:
187             addSupportedValues(ElectronicTollCollectionCardType)
188             break;
189         case VehicleProperty::ELECTRONIC_TOLL_COLLECTION_CARD_STATUS:
190             addSupportedValues(ElectronicTollCollectionCardStatus)
191             break;
192         case VehicleProperty::FRONT_FOG_LIGHTS_STATE:
193             addSupportedValues(VehicleLightState)
194             break;
195         case VehicleProperty::FRONT_FOG_LIGHTS_SWITCH:
196             addSupportedValues(VehicleLightSwitch)
197             break;
198         case VehicleProperty::REAR_FOG_LIGHTS_STATE:
199             addSupportedValues(VehicleLightState)
200             break;
201         case VehicleProperty::REAR_FOG_LIGHTS_SWITCH:
202             addSupportedValues(VehicleLightSwitch)
203             break;
204         case VehicleProperty::EV_CHARGE_STATE:
205             addSupportedValues(EvChargeState)
206             break;
207         case VehicleProperty::EV_REGENERATIVE_BRAKING_STATE:
208             addSupportedValues(EvRegenerativeBrakingState)
209             break;
210         case VehicleProperty::TRAILER_PRESENT:
211             addSupportedValues(TrailerState)
212             break;
213         case VehicleProperty::GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT:
214             addSupportedValues(GsrComplianceRequirementType)
215             break;
216         case VehicleProperty::SHUTDOWN_REQUEST:
217             addSupportedValues(VehicleApPowerStateShutdownParam)
218             break;
219         case VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL:
220             addSupportedValues(VehicleAutonomousState)
221             break;
222         case VehicleProperty::VEHICLE_DRIVING_AUTOMATION_TARGET_LEVEL:
223             addSupportedValues(VehicleAutonomousState)
224             break;
225         case VehicleProperty::CAMERA_SERVICE_CURRENT_STATE:
226             addSupportedValues(CameraServiceState)
227             break;
228         case VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE:
229             addSupportedValues(AutomaticEmergencyBrakingState)
230             addSupportedValues(ErrorState)
231             break;
232         case VehicleProperty::FORWARD_COLLISION_WARNING_STATE:
233             addSupportedValues(ForwardCollisionWarningState)
234             addSupportedValues(ErrorState)
235             break;
236         case VehicleProperty::BLIND_SPOT_WARNING_STATE:
237             addSupportedValues(BlindSpotWarningState)
238             addSupportedValues(ErrorState)
239             break;
240         case VehicleProperty::LANE_DEPARTURE_WARNING_STATE:
241             addSupportedValues(LaneDepartureWarningState)
242             addSupportedValues(ErrorState)
243             break;
244         case VehicleProperty::LANE_KEEP_ASSIST_STATE:
245             addSupportedValues(LaneKeepAssistState)
246             addSupportedValues(ErrorState)
247             break;
248         case VehicleProperty::LANE_CENTERING_ASSIST_COMMAND:
249             addSupportedValues(LaneCenteringAssistCommand)
250             break;
251         case VehicleProperty::LANE_CENTERING_ASSIST_STATE:
252             addSupportedValues(LaneCenteringAssistState)
253             addSupportedValues(ErrorState)
254             break;
255         case VehicleProperty::EMERGENCY_LANE_KEEP_ASSIST_STATE:
256             addSupportedValues(EmergencyLaneKeepAssistState)
257             addSupportedValues(ErrorState)
258             break;
259         case VehicleProperty::CRUISE_CONTROL_TYPE:
260             addSupportedValues(CruiseControlType)
261             addSupportedValues(ErrorState)
262             break;
263         case VehicleProperty::CRUISE_CONTROL_STATE:
264             addSupportedValues(CruiseControlState)
265             addSupportedValues(ErrorState)
266             break;
267         case VehicleProperty::CRUISE_CONTROL_COMMAND:
268             addSupportedValues(CruiseControlCommand)
269             break;
270         case VehicleProperty::HANDS_ON_DETECTION_DRIVER_STATE:
271             addSupportedValues(HandsOnDetectionDriverState)
272             addSupportedValues(ErrorState)
273             break;
274         case VehicleProperty::HANDS_ON_DETECTION_WARNING:
275             addSupportedValues(HandsOnDetectionWarning)
276             addSupportedValues(ErrorState)
277             break;
278         case VehicleProperty::DRIVER_DROWSINESS_ATTENTION_STATE:
279             addSupportedValues(DriverDrowsinessAttentionState)
280             addSupportedValues(ErrorState)
281             break;
282         case VehicleProperty::DRIVER_DROWSINESS_ATTENTION_WARNING:
283             addSupportedValues(DriverDrowsinessAttentionWarning)
284             addSupportedValues(ErrorState)
285             break;
286         case VehicleProperty::DRIVER_DISTRACTION_STATE:
287             addSupportedValues(DriverDistractionState)
288             addSupportedValues(ErrorState)
289             break;
290         case VehicleProperty::DRIVER_DISTRACTION_WARNING:
291             addSupportedValues(DriverDistractionWarning)
292             addSupportedValues(ErrorState)
293             break;
294         case VehicleProperty::LOW_SPEED_COLLISION_WARNING_STATE:
295             addSupportedValues(LowSpeedCollisionWarningState)
296             addSupportedValues(ErrorState)
297             break;
298         case VehicleProperty::CROSS_TRAFFIC_MONITORING_WARNING_STATE:
299             addSupportedValues(CrossTrafficMonitoringWarningState)
300             addSupportedValues(ErrorState)
301             break;
302         case VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_STATE:
303             addSupportedValues(LowSpeedAutomaticEmergencyBrakingState)
304             addSupportedValues(ErrorState)
305             break;
306 
307         default:
308             // Do nothing.
309             break;
310     }
311     return supportedValues;
312 }
313 }  // aidl::android::hardware::automotive::vehicle
314