Commit graph

63 commits

Author SHA1 Message Date
Scott Randolph
6c0855895a Add VTS tests for EVS HAL
Note:  This change list was developed as ag/2031642 on master, but
cherry picks are broken at the moment, so reapplying directly to oc-dev.
The change in master will be abandoned in favor of the auto-merger.

Test:  Run them against the default (mock) driver on bat_land
Change-Id: I7ae523eb6a18ce6a1d0dcd8494f335ffa77f34f1
2017-03-31 16:26:16 -07:00
Scott Randolph
de9880eece Simplify EVS HAL and move to "agressive opens"
This adapts the API implementation to allow a duplicate "open" operation
to automatically close any previous connections to the device.  This
works around a binder level issue that can cause destructors triggered
by remote clients to be delivered out of order to the server.

This was originally change ag/1969959 on master, but has been
recreated on oc-dev (cherry-picking was broken at the time).
The original master change will be abandoned in favor of this getting
merged down from oc-dev.

Test:  Run Vts test (added in following change)
Change-Id: I7b417998e59a4d592fbb91811c4101f39097c5dd
2017-03-30 14:04:12 -07:00
Andreas Huber
40d3a9bd8c Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: mma
Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
2017-03-29 08:53:58 -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
Steven Moreland
54cc198022 update-makefiles for transisitive dependencies
Test: pass
Bug: 36162559
Change-Id: I4f5fddaef9811f0da1d69fa26a5d34830a1a9634
2017-03-20 07:13:46 -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
Steven Moreland
25197e9240 EvsCamera: %zd -> %zu for size_t print
%zd doesn't throw a warning, but %zu is technically correct.

Change-Id: I3762d01cc424ecf84e73c21afe5a5a3d295fe782
2017-03-10 21:05:09 -08:00
Pavel Maltsev
8e92b749f4 Merge "Fix static properties to comply with VTS" 2017-03-10 01:18:49 +00:00
TreeHugger Robot
54b2e5e9c8 Merge "Treat warnings as errors in VHAL unit test" 2017-03-10 01:12:07 +00:00
Steven Moreland
6ac7efc85e EvsCamera: %lu -> %zd for size_t print
lu causes a warning when size_t isn't 64-bit

Test: pass
Change-Id: If8f5c45273713e67478226db66ce73bd64f4e063
2017-03-08 22:18:47 -08:00
Steven Moreland
48c52249e4 hidl_default to all targets.
find hardware/interfaces -type f -not -path "*/.git/*" \
-exec sed -i -e '/cc_[A-Za-z_]\+/ { N; s/$/\n    defaults:
\["hidl_defaults"\],/ }' {} \;
./hardware/interfaces/update-makefiles.sh

Test: pass
Bug: 35840847
Change-Id: If10c464d2f000b85c8d698fe11a4f3fc4cfad282
2017-03-08 19:31:53 -08:00
Antonio Cortes Perez
2102b7e765 Merge "Placeholder for future implementation of VMS property in the default hal." 2017-03-08 23:26:01 +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
TreeHugger Robot
b5bec3d243 Merge "Remove warning: vehicle RecurrentTimer_test.cpp" 2017-03-08 18:29:03 +00: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
20bb6cc808 Merge "Move EVS HAL under automotive folder" 2017-03-08 01:17:38 +00:00
Antonio Cortes
10ccd94f7f Placeholder for future implementation of VMS property in the default hal.
Test: build and flash Mojave board.
Bug: 35628104
Change-Id: I865d943b00b46ca1dd632ff3803702faec38f3f4
2017-03-07 10:51:54 -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
Scott Randolph
8342279a79 Move EVS HAL under automotive folder
Test:  Build locally
Change-Id: I76aa7eb52497169d0edcb6d756e0a7ca31bb0b46
2017-03-06 15:59:50 -08: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
Pavel Maltsev
15e9a8f967 Vehicle Hal 2.1: register with the default name
b/35811488

Test: verified Car Service connected to VHAL 2.1
Change-Id: I5d287b2dc71f62bba501ab872f9a14196d5dabb7
2017-02-27 17:49:37 -08: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
TreeHugger Robot
d86b0f1f76 Merge "Make vehicle HAL 2.1 proprietary module" 2017-02-22 00:22:04 +00:00
Pavel Maltsev
59f79d0985 Make vehicle HAL 2.1 proprietary module
Bug: b/34716856

Test: make -j ; manually verified Car Service is able to connect
Change-Id: I88cbc7426cf2c41a36d970c4238e5a36d0c1f926
2017-02-21 12:57:41 -08:00
Bryan Eyler
c7f5f76bfd Merge "Remove unused OFF/MIN/MAX constants from HAL." 2017-02-18 00:55:00 +00: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
d99798219b Regenerate make files for Vehicle HAL 2.1
Test: m -j32 ; manually verified Car Service is able to connect to HAL

Bug: b/34716856
Change-Id: I544fa67181ef1d5212c6476100728edaa9aa6c7e
2017-02-16 16:55:06 -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