1# Copyright 2017 Google Inc. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15 16""" 17 This file contains constants defined in hardware/interfaces/vehicle/2.0/types.hal 18 19 Constants in this file are parsed from: 20 out/soong/.intermediates/hardware/interfaces/automotive/vehicle/2.0/android.hardware.automotive.vehicle@2.0_genc++_headers/gen/android/hardware/automotive/vehicle/2.0/types.h 21 22 Currently, there is no script to auto-generate this constants file. The file is generated by 23 copying enum fields into an editor and running a macro to format it. The elements being used 24 are shown in the following table: 25 26 type.h file: this file: 27 VehiclePropertyType enum --> VEHICLE_VALUE_TYPE_* 28 VehicleProperty enum --> VEHICLE_PROPERTY_* 29 VehicleAreaZone enum --> VEHICLE_ZONE_* 30 VehiclePropertyType enum --> class vhal_types_2_0 31""" 32 33# Vehicle Property ID 34VEHICLE_PROPERTY_INFO_VIN = 286261504 35VEHICLE_PROPERTY_INFO_MAKE = 286261505 36VEHICLE_PROPERTY_INFO_MODEL = 286261506 37VEHICLE_PROPERTY_INFO_MODEL_YEAR = 289407235 38VEHICLE_PROPERTY_INFO_FUEL_CAPACITY = 291504388 39VEHICLE_PROPERTY_PERF_ODOMETER = 291504644 40VEHICLE_PROPERTY_PERF_VEHICLE_SPEED = 291504647 41VEHICLE_PROPERTY_ENGINE_COOLANT_TEMP = 291504897 42VEHICLE_PROPERTY_ENGINE_OIL_TEMP = 291504900 43VEHICLE_PROPERTY_ENGINE_RPM = 291504901 44VEHICLE_PROPERTY_GEAR_SELECTION = 289408000 45VEHICLE_PROPERTY_CURRENT_GEAR = 289408001 46VEHICLE_PROPERTY_PARKING_BRAKE_ON = 287310850 47VEHICLE_PROPERTY_DRIVING_STATUS = 289408004 48VEHICLE_PROPERTY_FUEL_LEVEL_LOW = 287310853 49VEHICLE_PROPERTY_NIGHT_MODE = 287310855 50VEHICLE_PROPERTY_TURN_SIGNAL_STATE = 289408008 51VEHICLE_PROPERTY_IGNITION_STATE = 289408009 52VEHICLE_PROPERTY_HVAC_FAN_SPEED = 306185472 53VEHICLE_PROPERTY_HVAC_FAN_DIRECTION = 306185473 54VEHICLE_PROPERTY_HVAC_TEMPERATURE_CURRENT = 308282626 55VEHICLE_PROPERTY_HVAC_TEMPERATURE_SET = 308282627 56VEHICLE_PROPERTY_HVAC_DEFROSTER = 320865540 57VEHICLE_PROPERTY_HVAC_AC_ON = 304088325 58VEHICLE_PROPERTY_HVAC_MAX_AC_ON = 304088326 59VEHICLE_PROPERTY_HVAC_MAX_DEFROST_ON = 304088327 60VEHICLE_PROPERTY_HVAC_RECIRC_ON = 304088328 61VEHICLE_PROPERTY_HVAC_DUAL_ON = 304088329 62VEHICLE_PROPERTY_HVAC_AUTO_ON = 304088330 63VEHICLE_PROPERTY_HVAC_SEAT_TEMPERATURE = 356517131 64VEHICLE_PROPERTY_HVAC_SIDE_MIRROR_HEAT = 339739916 65VEHICLE_PROPERTY_HVAC_STEERING_WHEEL_TEMP = 289408269 66VEHICLE_PROPERTY_HVAC_TEMPERATURE_UNITS = 306185486 67VEHICLE_PROPERTY_HVAC_ACTUAL_FAN_SPEED_RPM = 306185487 68VEHICLE_PROPERTY_HVAC_FAN_DIRECTION_AVAILABLE = 306185489 69VEHICLE_PROPERTY_HVAC_POWER_ON = 304088336 70VEHICLE_PROPERTY_ENV_OUTSIDE_TEMPERATURE = 291505923 71VEHICLE_PROPERTY_ENV_CABIN_TEMPERATURE = 291505924 72VEHICLE_PROPERTY_RADIO_PRESET = 289474561 73VEHICLE_PROPERTY_AUDIO_FOCUS = 289474816 74VEHICLE_PROPERTY_AUDIO_FOCUS_EXT_SYNC = 289474832 75VEHICLE_PROPERTY_AUDIO_VOLUME = 289474817 76VEHICLE_PROPERTY_AUDIO_VOLUME_EXT_SYNC = 289474833 77VEHICLE_PROPERTY_AUDIO_VOLUME_LIMIT = 289474818 78VEHICLE_PROPERTY_AUDIO_ROUTING_POLICY = 289474819 79VEHICLE_PROPERTY_AUDIO_HW_VARIANT = 289409284 80VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_HINT = 289474821 81VEHICLE_PROPERTY_AUDIO_STREAM_STATE = 289474822 82VEHICLE_PROPERTY_AUDIO_PARAMETERS = 286263559 83VEHICLE_PROPERTY_AP_POWER_STATE = 2560 84VEHICLE_PROPERTY_DISPLAY_BRIGHTNESS = 289409537 85VEHICLE_PROPERTY_AP_POWER_BOOTUP_REASON = 289409538 86VEHICLE_PROPERTY_HW_KEY_INPUT = 289475088 87VEHICLE_PROPERTY_INSTRUMENT_CLUSTER_INFO = 289475104 88VEHICLE_PROPERTY_UNIX_TIME = 290458160 89VEHICLE_PROPERTY_CURRENT_TIME_IN_SECONDS = 289409585 90VEHICLE_PROPERTY_DOOR_POS = 373295872 91VEHICLE_PROPERTY_DOOR_MOVE = 373295873 92VEHICLE_PROPERTY_DOOR_LOCK = 371198722 93VEHICLE_PROPERTY_MIRROR_Z_POS = 339741504 94VEHICLE_PROPERTY_MIRROR_Z_MOVE = 339741505 95VEHICLE_PROPERTY_MIRROR_Y_POS = 339741506 96VEHICLE_PROPERTY_MIRROR_Y_MOVE = 339741507 97VEHICLE_PROPERTY_MIRROR_LOCK = 287312708 98VEHICLE_PROPERTY_MIRROR_FOLD = 287312709 99VEHICLE_PROPERTY_SEAT_MEMORY_SELECT = 356518784 100VEHICLE_PROPERTY_SEAT_MEMORY_SET = 356518785 101VEHICLE_PROPERTY_SEAT_BELT_BUCKLED = 354421634 102VEHICLE_PROPERTY_SEAT_BELT_HEIGHT_POS = 356518787 103VEHICLE_PROPERTY_SEAT_BELT_HEIGHT_MOVE = 356518788 104VEHICLE_PROPERTY_SEAT_FORE_AFT_POS = 356518789 105VEHICLE_PROPERTY_SEAT_FORE_AFT_MOVE = 356518790 106VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_1_POS = 356518791 107VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_1_MOVE = 356518792 108VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_2_POS = 356518793 109VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_2_MOVE = 356518794 110VEHICLE_PROPERTY_SEAT_HEIGHT_POS = 356518795 111VEHICLE_PROPERTY_SEAT_HEIGHT_MOVE = 356518796 112VEHICLE_PROPERTY_SEAT_DEPTH_POS = 356518797 113VEHICLE_PROPERTY_SEAT_DEPTH_MOVE = 356518798 114VEHICLE_PROPERTY_SEAT_TILT_POS = 356518799 115VEHICLE_PROPERTY_SEAT_TILT_MOVE = 356518800 116VEHICLE_PROPERTY_SEAT_LUMBAR_FORE_AFT_POS = 356518801 117VEHICLE_PROPERTY_SEAT_LUMBAR_FORE_AFT_MOVE = 356518802 118VEHICLE_PROPERTY_SEAT_LUMBAR_SIDE_SUPPORT_POS = 356518803 119VEHICLE_PROPERTY_SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 356518804 120VEHICLE_PROPERTY_SEAT_HEADREST_HEIGHT_POS = 289409941 121VEHICLE_PROPERTY_SEAT_HEADREST_HEIGHT_MOVE = 356518806 122VEHICLE_PROPERTY_SEAT_HEADREST_ANGLE_POS = 356518807 123VEHICLE_PROPERTY_SEAT_HEADREST_ANGLE_MOVE = 356518808 124VEHICLE_PROPERTY_SEAT_HEADREST_FORE_AFT_POS = 356518809 125VEHICLE_PROPERTY_SEAT_HEADREST_FORE_AFT_MOVE = 356518810 126VEHICLE_PROPERTY_WINDOW_POS = 289409984 127VEHICLE_PROPERTY_WINDOW_MOVE = 289409985 128VEHICLE_PROPERTY_WINDOW_VENT_POS = 289409986 129VEHICLE_PROPERTY_WINDOW_VENT_MOVE = 289409987 130VEHICLE_PROPERTY_WINDOW_LOCK = 287312836 131VEHICLE_PROPERTY_VEHICLE_MAPS_DATA_SERVICE = 299895808 132VEHICLE_PROPERTY_OBD2_LIVE_FRAME = 299896064 133VEHICLE_PROPERTY_OBD2_FREEZE_FRAME = 299896065 134 135# Vehicle Value Type 136VEHICLE_VALUE_TYPE_STRING = 0x00100000 137VEHICLE_VALUE_TYPE_BOOLEAN = 0x00200000 138VEHICLE_VALUE_TYPE_INT32 = 0x00400000 139VEHICLE_VALUE_TYPE_INT32_VEC = 0x00410000 140VEHICLE_VALUE_TYPE_INT64 = 0x00500000 141VEHICLE_VALUE_TYPE_FLOAT = 0x00600000 142VEHICLE_VALUE_TYPE_FLOAT_VEC = 0x00610000 143VEHICLE_VALUE_TYPE_BYTES = 0x00700000 144VEHICLE_VALUE_TYPE_COMPLEX = 0x00E00000 145 146# Vehicle zone / area definitions 147VEHICLE_ZONE_ROW_1_LEFT = 0x00000001 148VEHICLE_ZONE_ROW_1_CENTER = 0x00000002 149VEHICLE_ZONE_ROW_1_RIGHT = 0x00000004 150VEHICLE_ZONE_ROW_1_ALL = 0x00000008 151VEHICLE_ZONE_ROW_2_LEFT = 0x00000010 152VEHICLE_ZONE_ROW_2_CENTER = 0x00000020 153VEHICLE_ZONE_ROW_2_RIGHT = 0x00000040 154VEHICLE_ZONE_ROW_2_ALL = 0x00000080 155VEHICLE_ZONE_ROW_3_LEFT = 0x00000100 156VEHICLE_ZONE_ROW_3_CENTER = 0x00000200 157VEHICLE_ZONE_ROW_3_RIGHT = 0x00000400 158VEHICLE_ZONE_ROW_3_ALL = 0x00000800 159VEHICLE_ZONE_ROW_4_LEFT = 0x00001000 160VEHICLE_ZONE_ROW_4_CENTER = 0x00002000 161VEHICLE_ZONE_ROW_4_RIGHT = 0x00004000 162VEHICLE_ZONE_ROW_4_ALL = 0x00008000 163VEHICLE_ZONE_ALL = 0x80000000 164 165# Create a container of value_type constants to be used by vhal_emulator 166class vhal_types_2_0: 167 TYPE_STRING = [VEHICLE_VALUE_TYPE_STRING] 168 TYPE_BYTES = [VEHICLE_VALUE_TYPE_BYTES] 169 TYPE_INT32 = [VEHICLE_VALUE_TYPE_BOOLEAN, 170 VEHICLE_VALUE_TYPE_INT32] 171 TYPE_INT64 = [VEHICLE_VALUE_TYPE_INT64] 172 TYPE_FLOAT = [VEHICLE_VALUE_TYPE_FLOAT] 173 TYPE_INT32S = [VEHICLE_VALUE_TYPE_INT32_VEC] 174 TYPE_FLOATS = [VEHICLE_VALUE_TYPE_FLOAT_VEC] 175 176