Commit graph

396 commits

Author SHA1 Message Date
Pavel Maltsev
72aebeb3ec Remove dependency to libbinder in VHAL
Also, removed per property ACL as it was based on client UID

Test: mm -j ; verified Car Service works

Bug: b/36649684
Change-Id: I7625a013dda8e3ebce5b86a253a8c1befe267c11
2017-03-28 16:32:00 -07:00
Steven Moreland
561b602a99 Update makefiles for hwtypes.h
Test: pass
Change-Id: I8e17eb8fec5d2f04c526476a866c8dd54ccb556c
2017-03-28 15:18:20 +00:00
Enrico Granata
15e12268ff 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
2017-03-21 15:11:16 -07:00
Pavel Maltsev
7005f9f643 Fix typo CELCIUS -> CELSIUS in Vehicle HAL
Test: typo in comments only.
Change-Id: I1610beb9cb44b3b50e9a86fcff41d3421c6ad849
2017-03-15 10:49:28 -07:00
Pavel Maltsev
3fc25be745 Fix config map in default Vehicle HAL impl
Test: tested through VTS
Change-Id: Ibcf607d0ad5cc39291b0d8a159ca3ad849bea8ce
2017-03-14 12:15:46 -07:00
Pavel Maltsev
fb6617935a Fix HvacPowerOn vehicle property
Test: VTS test is now passing
Change-Id: I815645310822bf24c8ee3a37f00c9d78a1e9b666
2017-03-14 11:58:22 -07:00
Pavel Maltsev
8e92b749f4 Merge "Fix static properties to comply with VTS" 2017-03-10 01:18:49 +00:00
Pavel Maltsev
ff89b0ed42 Treat warnings as errors in VHAL unit test
Test: mm -j

Change-Id: Ic174d0550d621ef8508377db97db33f813c06ab1
Fix: b/34901911
2017-03-08 15:16:24 -08:00
Steven Moreland
ce9967834a Remove warning: vehicle RecurrentTimer_test.cpp
0xdeadbeef is exactly 32 bits, so it is interpretted as an unsigned
integer which was causing a warning. Since it's a test value, I changed
it to 0xdead which is interpretted as a signed integer.

Test: pass
Change-Id: Ibb75b23461700d77158e2337b8a472e87629ad61
2017-03-08 08:34:49 -08:00
Pavel Maltsev
4b0c5abe76 Fix static properties to comply with VTS
Test: VTS is passing

Bug: b/32021794
Change-Id: I0bc0cd98f27ec8b059df283a52fbe18d88962e35
2017-03-07 20:26:13 -08:00
TreeHugger Robot
f410228abc Merge "Add continuous property infrastructure to VHAL" 2017-03-07 02:10:05 +00:00
TreeHugger Robot
5d6a91ccce Merge "Fix sensor event in vehicle HAL emulator" 2017-03-07 00:59:24 +00:00
Pavel Maltsev
8ab96e3874 Add continuous property infrastructure to VHAL
Implemented RecurrentTimer class that can be used in VHAL
implementations to trigger an event every X amount of time.
This make sense for continous properties.
Also added linkToDeath for VHAL listeners.

Test: unit tests added and ran

Change-Id: I4a2e0607ff6b15b3e7babbe3fbb9fff8d4e28838
2017-03-06 10:55:06 -08:00
Bryan Eyler
da0d1a1d01 Merge "Add a continuous property to default implementation." 2017-03-03 22:06:47 +00:00
Antonio Cortes Perez
bf827a9898 Merge "Post-O. Move VMS property to hal 2.1." 2017-03-03 15:11:24 +00:00
Antonio Cortes
dd1b9d395d Post-O. Move VMS property to hal 2.1.
Test: build and flash Mojave board with TARGET_USES_CAR_FUTURE_FEATURES=true.
Test: check that the property is displayed in the logs during startup.
Bug: 35628104

Change-Id: I8b5327ae255cd94ac78a0436aac06b32e3168c28
2017-03-02 15:59:51 -08:00
Pavel Maltsev
1ba0d5ee05 Fix sensor event in vehicle HAL emulator
Test: verified events are now gets propagated to CarSensorManager
(toggle day/night mode in Emulator UI)

Change-Id: Ifc4a755c5f6d31f41ab26ebc873c66c43d9e234a
Fix: b/35926101
2017-03-02 14:58:26 -08:00
Bryan Eyler
1c386b5899 Add default behavior for HVAC power
Add properties to HVAC_POWER_ON config string
Return NOT_AVAILABLE for properties in HVAC_POWER_ON config string when
power is off.

Change-Id: Icfa06aa169345e973d2e152aa6dbd8c14f3a5d17
2017-03-01 14:17:00 -08:00
TreeHugger Robot
bbcd49ad86 Merge "Add CarSensor properties to DefaultVehicleHal" 2017-02-28 20:53:47 +00:00
Steve Paik
746c89fa9b Add CarSensor properties to DefaultVehicleHal
Test:  Run python vhal_emulator_test
Change-Id: I1ebab23942397c5043840ea4ea1dc8e515f38c29
2017-02-28 10:38:36 -08:00
Steve Paik
62abcb399a Merge "Add pipe interface to DefaultVehicleHal" 2017-02-28 04:44:39 +00:00
Steve Paik
a59644ac8e Add pipe interface to DefaultVehicleHal
- Create base communications interface
- Refactor socket calls to use SocketComm class

Test: Use python scripts and custom emulator to test communications

Change-Id: Ia401587223035e748991516a2285cc31cb71a9c9
2017-02-27 17:27:18 -08:00
Yifan Hong
4c13f2da75 Merge "Car HAL uses "default" service name" 2017-02-24 20:58:53 +00:00
TreeHugger Robot
dbd6d31f62 Merge "Move OBD2 support to Vehicle HAL 2.1." 2017-02-23 22:45:30 +00:00
Enrico Granata
7debe91a97 Move OBD2 support to Vehicle HAL 2.1.
For O-MR1.
Test: build
Bug: 34746908
Change-Id: I369e6531b8957d8e03154fdf5d732e8242a3c245
2017-02-23 13:06:41 -08:00
Chris Phoenix
018a4d47a8 Car HAL uses "default" service name
the getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934

Change-Id: I1fc92a29178befc1b2232cfcc4b13058d57cd798
2017-02-22 18:47:14 -08:00
Tri Vo
d94a7d2df9 Remove .vts spec files
Test: mmma hardware/interfaces
Change-Id: Idae97ce60a6368cfa685ae6b2d71b9ad163e8605
2017-02-22 12:53:52 -08:00
Bryan Eyler
fd03d46680 Add a continuous property to default implementation.
Just a sample.  It's supposed to be ON_CHANGE as well, but that's a much
larger change.

Change-Id: Idd8c2a8346cb78efeae3d72bab5bd9d8f36cb5f2
2017-02-17 14:49:25 -08:00
Bryan Eyler
b7387b78b8 Remove unused OFF/MIN/MAX constants from HAL.
Change-Id: I8b2b0d94872fdfcb60d2791ee14be85cccd35129
2017-02-17 14:44:43 -08:00
Pavel Maltsev
c5344ac04c Initial submit of Vehicle HAL 2.1
Major changes / decisions:

- created empty IVehicle@2.1 interface to distinguish HAL impls
  from client's (Car Service) perspective;
- created default 2.1 implementation that currently delegates all
  calls to existing 2.0 implementation
- had to refactor a little bit 2.0 thus components could be esily
  imported in 2.1

TOOD:
- move OBD and VMS code to 2.1
- decouple "DefaultVehicleHal.cpp"
- rename "DefaultVehicleHal" to Emulator (let's call things by their names)

b/34716856

Test: todo

Change-Id: Ib23650ca1277f0dfb24e5c789d65a19dce8b1abc
2017-02-14 16:07:11 -08:00
Zhuoyao Zhang
f008f8fdc4 Merge "Update .vts files on master based on the latest .hal file and hidl-gen" 2017-02-14 18:51:27 +00:00
Asaf Rosenfeld
ba1460f25f Merge "update vms hal index" 2017-02-14 16:45:37 +00:00
asafro
056d220bdb update vms hal index
Test: tested in VmsServiceHal tests (new test in a separate cl)
Bug: 35313387
Change-Id: I18379fed2b8e59b21cfe732e3a81f63e611cdd36
2017-02-14 00:45:42 -08:00
Zhuoyao Zhang
3bef939f94 Update .vts files on master based on the latest .hal file and hidl-gen
Test: mma
Change-Id: I9558f300505db83e26f7c241c5cf729cd005a07b
2017-02-13 18:03:06 -08:00
Steven Moreland
a0da1a1c3d Move hidl shims to the vendor partition. (2/2)
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.

Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
2017-02-13 15:03:41 -08:00
TreeHugger Robot
86fa244c12 Merge "Update makefiles to use filgroup syntax." 2017-02-10 23:25:52 +00:00
TreeHugger Robot
fb75f8faac Merge "Post-O. Finalize Vehicle HAL support for OBD2 diagnostics." 2017-02-10 21:22:43 +00:00
Tri Vo
85120c9490 Update makefiles to use filgroup syntax.
Test: mmma hardware/interfaces
Change-Id: I9f4457c78b7820c242d46359f0debe05d1b3e482
2017-02-10 12:45:19 -08:00
TreeHugger Robot
2300481962 Merge "Fix warning in Vehicle HAL" 2017-02-10 19:56:25 +00:00
Pavel Maltsev
308515f65f Fix warning in Vehicle HAL
Test: mm -j

Change-Id: Ifc0654e912f3b592af90246af6d87324c469a8d3
Fix: b/34901911
2017-02-09 20:58:42 -08:00
Andreas Huber
d38f147c35 Updated makefiles
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.

Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
2017-02-09 17:20:45 -08:00
Enrico Granata
37e69d773b Post-O. Finalize Vehicle HAL support for OBD2 diagnostics.
Add OBD2_DTC_INFO property to VHAL. This property returns a list of timestamps for which freeze frames are available to be read.
Make OBD2_FREEZE_FRAME indexed on timestamp, such that one has to pass a timestamp to retrieve the freeze frame at that timestamp.
Add OBD2_DTC_CLEAR to delete some or all of the freeze frames stored.

Test: build
Change-Id: I30344ffd6e7527f076b3382c32f5507973c9985b
2017-02-09 17:12:12 -08:00
Steve Paik
f53dfca395 Merge "Enable vehicle HAL to be controlled via ADB" 2017-02-09 00:27:32 +00:00
Steve Paik
56c0c84dd7 Enable vehicle HAL to be controlled via ADB
Add emulator functionality to DefaultVehicleHal:

- Create default list of properties based upon DefaultConfig.h
- Add socket that is reachable via ADB to set/get vehicle properties.

BUG: 29601815
Test: Tested with Python interface from host.
Change-Id: I6f8e4cba37d927565e10797875eb8f5a1840a94f
2017-02-08 08:40:17 -08:00
Tri Vo
ce608bec74 Migrate driver/profiler to test/vts-testcase/hal.
Bug: 34893894
Test: mmma hardware/interfaces

Change-Id: Ic72716577a5f93700c5056986aff55a76b170b5d
2017-02-07 19:13:28 -08:00
Pavel Maltsev
2579fb792b Move Vehicle HAL under automotive package
Test: verified unit tests and VTS are passing

Bug: b/33200203
Change-Id: I69cc4bc0d4cbc1a6bf2f77564a8f70412fe06947
2017-02-05 16:48:12 -08:00