Add logic for VHAL versions > 2.0 to forward property information to 2.0
Use this infrastructure to move OBD2_LIVE_FRAME support over to the Vehicle HAL 2.0 layer. This is useful in DefaultVehicleHal 2.0 to let the Emulator layer send/receive information about properties defined by later VehicleHal versions. Additionally, support the notion that a custom property thusly defined might have logic more intricate than simply a property Id and an area Id, via a custom handler object that supports get() and set() operations. A default handler object simply falls back to a stored VehiclePropValue, but more complex implementations are possible. Test: manual testing in Python: import vhal_consts_2_0 as c from vhal_emulator import Vhal v = Vhal(c.vhal_types_2_0) v.getConfig(c.VEHICLE_PROPERTY_HVAC_TEMPERATURE_SET) print v.rxMsg() v.setProperty(c.VEHICLE_PROPERTY_HVAC_TEMPERATURE_SET, c.VEHICLE_ZONE_ROW_1_LEFT, 70) print v.rxMsg() v.getProperty(c.VEHICLE_PROPERTY_HVAC_TEMPERATURE_SET, c.VEHICLE_ZONE_ROW_1_LEFT) print v.rxMsg() v.getProperty(0x11e00d00, 0) print v.rxMsg() plus runtest Obd2LiveFrame.java Change-Id: I9c342e6e2c9ff581beacd238a42780ca10f96d9c
Loading
Please register or sign in to comment