Loading vehicle/2.0/Android.mk +38 −0 Original line number Original line Diff line number Diff line Loading @@ -662,6 +662,25 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) LOCAL_GENERATED_SOURCES += $(GEN) # # Build types.hal (VehicleIgnitionState) # GEN := $(intermediates)/android/hardware/vehicle/V2_0/VehicleIgnitionState.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) $(GEN): PRIVATE_CUSTOM_TOOL = \ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ -Ljava \ -randroid.hardware:hardware/interfaces \ -randroid.hidl:system/libhidl/transport \ android.hardware.vehicle@2.0::types.VehicleIgnitionState $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # # Build types.hal (VehicleInstrumentClusterType) # Build types.hal (VehicleInstrumentClusterType) # # Loading Loading @@ -1596,6 +1615,25 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) LOCAL_GENERATED_SOURCES += $(GEN) # # Build types.hal (VehicleIgnitionState) # GEN := $(intermediates)/android/hardware/vehicle/V2_0/VehicleIgnitionState.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) $(GEN): PRIVATE_CUSTOM_TOOL = \ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ -Ljava \ -randroid.hardware:hardware/interfaces \ -randroid.hidl:system/libhidl/transport \ android.hardware.vehicle@2.0::types.VehicleIgnitionState $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # # Build types.hal (VehicleInstrumentClusterType) # Build types.hal (VehicleInstrumentClusterType) # # Loading vehicle/2.0/default/impl/DefaultConfig.h +6 −0 Original line number Original line Diff line number Diff line Loading @@ -153,6 +153,12 @@ const VehiclePropConfig kVehicleProperties[] = { .maxInt32Value = 10 .maxInt32Value = 10 } } } } }, { .prop = VehicleProperty::IGNITION_STATE, .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, } } }; }; Loading vehicle/2.0/default/impl/DefaultVehicleHal.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -87,6 +87,9 @@ VehicleHal::VehiclePropValuePtr DefaultVehicleHal::get( case VehicleProperty::DRIVING_STATUS: case VehicleProperty::DRIVING_STATUS: v = pool.obtainInt32(toInt(VehicleDrivingStatus::UNRESTRICTED)); v = pool.obtainInt32(toInt(VehicleDrivingStatus::UNRESTRICTED)); break; break; case VehicleProperty::IGNITION_STATE: v = pool.obtainInt32(toInt(VehicleIgnitionState::ACC)); break; default: default: *outStatus = StatusCode::INVALID_ARG; *outStatus = StatusCode::INVALID_ARG; } } Loading vehicle/2.0/types.hal +41 −0 Original line number Original line Diff line number Diff line Loading @@ -309,6 +309,18 @@ enum VehicleProperty: int32_t { | VehiclePropertyType:INT32 | VehiclePropertyType:INT32 | VehicleArea:GLOBAL), | VehicleArea:GLOBAL), /* * Represents ignition state * * @change_mode VehiclePropertyChangeMode:ON_CHANGE * @access VehiclePropertyAccess:READ */ IGNITION_STATE = ( 0x0409 | VehiclePropertyGroup:SYSTEM | VehiclePropertyType:INT32 | VehicleArea:GLOBAL), /* /* * Fan speed setting * Fan speed setting * * Loading Loading @@ -2390,6 +2402,35 @@ struct VehiclePropValue { RawValue value; RawValue value; }; }; enum VehicleIgnitionState : int32_t { UNDEFINED = 0, /* Steering wheel is locked */ LOCK = 1, /* * Steering wheel is not locked, engine and all accessories are OFF. If * car can be in LOCK and OFF state at the same time than HAL must report * LOCK state. */ OFF, /* * Typically in this state accessories become available (e.g. radio). * Instrument cluster and engine are turned off */ ACC, /* * Ignition is in state ON. Accessories and instrument cluster available, * engine might be running or ready to be started. */ ON, /* Typically in this state engine is starting (cranking). */ START }; /* /* * Represent the operation where the current error has happened. * Represent the operation where the current error has happened. Loading Loading
vehicle/2.0/Android.mk +38 −0 Original line number Original line Diff line number Diff line Loading @@ -662,6 +662,25 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) LOCAL_GENERATED_SOURCES += $(GEN) # # Build types.hal (VehicleIgnitionState) # GEN := $(intermediates)/android/hardware/vehicle/V2_0/VehicleIgnitionState.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) $(GEN): PRIVATE_CUSTOM_TOOL = \ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ -Ljava \ -randroid.hardware:hardware/interfaces \ -randroid.hidl:system/libhidl/transport \ android.hardware.vehicle@2.0::types.VehicleIgnitionState $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # # Build types.hal (VehicleInstrumentClusterType) # Build types.hal (VehicleInstrumentClusterType) # # Loading Loading @@ -1596,6 +1615,25 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) LOCAL_GENERATED_SOURCES += $(GEN) # # Build types.hal (VehicleIgnitionState) # GEN := $(intermediates)/android/hardware/vehicle/V2_0/VehicleIgnitionState.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) $(GEN): PRIVATE_CUSTOM_TOOL = \ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ -Ljava \ -randroid.hardware:hardware/interfaces \ -randroid.hidl:system/libhidl/transport \ android.hardware.vehicle@2.0::types.VehicleIgnitionState $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # # Build types.hal (VehicleInstrumentClusterType) # Build types.hal (VehicleInstrumentClusterType) # # Loading
vehicle/2.0/default/impl/DefaultConfig.h +6 −0 Original line number Original line Diff line number Diff line Loading @@ -153,6 +153,12 @@ const VehiclePropConfig kVehicleProperties[] = { .maxInt32Value = 10 .maxInt32Value = 10 } } } } }, { .prop = VehicleProperty::IGNITION_STATE, .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, } } }; }; Loading
vehicle/2.0/default/impl/DefaultVehicleHal.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -87,6 +87,9 @@ VehicleHal::VehiclePropValuePtr DefaultVehicleHal::get( case VehicleProperty::DRIVING_STATUS: case VehicleProperty::DRIVING_STATUS: v = pool.obtainInt32(toInt(VehicleDrivingStatus::UNRESTRICTED)); v = pool.obtainInt32(toInt(VehicleDrivingStatus::UNRESTRICTED)); break; break; case VehicleProperty::IGNITION_STATE: v = pool.obtainInt32(toInt(VehicleIgnitionState::ACC)); break; default: default: *outStatus = StatusCode::INVALID_ARG; *outStatus = StatusCode::INVALID_ARG; } } Loading
vehicle/2.0/types.hal +41 −0 Original line number Original line Diff line number Diff line Loading @@ -309,6 +309,18 @@ enum VehicleProperty: int32_t { | VehiclePropertyType:INT32 | VehiclePropertyType:INT32 | VehicleArea:GLOBAL), | VehicleArea:GLOBAL), /* * Represents ignition state * * @change_mode VehiclePropertyChangeMode:ON_CHANGE * @access VehiclePropertyAccess:READ */ IGNITION_STATE = ( 0x0409 | VehiclePropertyGroup:SYSTEM | VehiclePropertyType:INT32 | VehicleArea:GLOBAL), /* /* * Fan speed setting * Fan speed setting * * Loading Loading @@ -2390,6 +2402,35 @@ struct VehiclePropValue { RawValue value; RawValue value; }; }; enum VehicleIgnitionState : int32_t { UNDEFINED = 0, /* Steering wheel is locked */ LOCK = 1, /* * Steering wheel is not locked, engine and all accessories are OFF. If * car can be in LOCK and OFF state at the same time than HAL must report * LOCK state. */ OFF, /* * Typically in this state accessories become available (e.g. radio). * Instrument cluster and engine are turned off */ ACC, /* * Ignition is in state ON. Accessories and instrument cluster available, * engine might be running or ready to be started. */ ON, /* Typically in this state engine is starting (cranking). */ START }; /* /* * Represent the operation where the current error has happened. * Represent the operation where the current error has happened. Loading