Commit graph

70 commits

Author SHA1 Message Date
chrisweir
01247f9508 CAN Configurator Service
Configurator service for the CAN HAL and extracting some of the CAN HAL
configuration logic into a library for the various tools to share.

Bug: 142653776
Test: Manual
Change-Id: Id33871da851bcb442a7f851919f713ec913830ff
(cherry picked from commit 33ce7505d1)
2020-03-26 18:30:31 +00:00
chrisweir
740c3d53c0 Add libc++fs for auto
Add a temporary version of libc++fs for a couple of auto features. This
will need to be switched out when libc++fs merges, possibly in S.

Bug: 152067309
Bug: 142654031
Test: Manual
Change-Id: Ibb495af8140470b79e73fd104fd5061f7e3ad8a9
2020-03-24 20:00:11 +00:00
Tomasz Wasilczyk
f154585376 Convert CAN bus HAL VTS to parametrized gtest
Test: VTS
Bug: 150312861
Change-Id: Ib106a5d075d3189a57306f2b7283293e448a147d
2020-02-26 15:32:04 -08:00
Tomasz Wasilczyk
793fab0b07 Add ICanController BAD_SERVICE_NAME error
Bug: 137798319
Test: VTS
Change-Id: I4722346239728f3ab359688658c23441e83671a8
2020-02-20 17:10:23 +00:00
Tomasz Wasilczyk
f3da9b6c1b Simplify bus configuration.
Previous bus configuration struct was meant for flexibility, but it
turned out that the only dimension that flexibility would go was a
serial number parameter. Let's rotate that configuration matrix by 90
degrees and just go a straightforward route of discriminating against
interface type.

Test: VTS
Bug: 135918744
Change-Id: I08967d0f78c998b0582958eb51bd387f9dbe15fe
2020-02-19 16:29:25 -08:00
chrisweir
204b8f9206 Refactor baudrate to bitrate
Refactoring baudrate to bitrate to be consistent with terminology in
the broader literature.

Bug: 147448388
Test: Manual + VTS
Change-Id: I161b39727a3fd50ea5eddafed6fbd4924ccd149f
2020-01-11 01:05:59 +00:00
chrisweir
39187dbbff Add support for registering existing interfaces
This adds support for native and slcan interfaces which are already
configured up to be registered in the CAN bus HAL.

Bug: 142655647
Test: manual
Change-Id: Ifd129db14dbf473bb627ebc9b9d13f5cb945b611
2020-01-07 15:49:15 -08:00
chrisweir
f53a4e2ff3 Add VTS tests for EFF/RTR
Remote transmission request, and extended format id's require testing to
verify that the feature works correctly.

Also included is a fix which correctly sets the EFF and RTR flags of the
canfd_frame object based on the state of the CanMessage object.

A readability change is made to the types.hal which improves clarity of
the way filters are defined.

Bug: 146173498
Test: run the VTS tests in vts/functional - verify that they pass
Change-Id: I9892a2e2465b8c381774e7ee277bfa8660f25028
2020-01-06 10:05:25 -08:00
Tomasz Wasilczyk
f9e869e277 CAN bus HAL VTS: read interface names from device manifest
Bug: 143635976
Test: VTS
Change-Id: I99dc0de992dff8ffef03572fd38f57f38b7975ab
2020-01-02 14:31:29 -08:00
Tomasz Wasilczyk
55f21936e9 Migrate CAN bus HAL to nested namespaces
Test: it builds
Change-Id: I83d9ef4f1fff1585e6487c95f09b55b1aa5b3e63
2019-12-20 09:20:24 -08:00
chrisweir
bee3d2c3c9 Add support for error, RTR, and EFF frames
Error frames, remote transmission request, and extended format frames
require some changes to the way that we set up our sockets.

Bug: 142655821
Bug: 144774939
Test: manual
Change-Id: I06212cb852d480c1c7093e8c509ca8aa9f85f81f
2019-12-12 14:21:38 -08:00
Tomasz Wasilczyk
201734e551 Fix sp<> crash on stack-allocated service object.
Bug: 145609858
Test: build, boot
Change-Id: Ia705750c77ee8ba950d19eae9bbd208b0dac2310
2019-12-05 13:54:50 -08:00
chrisweir
cf36cea092 Add support for SLCAN
* Adding support for SLCAN type interfaces
* Made some of the formatting more consistent

Bug: 142656299
Test: Manually with canhalctrl, canhaldump, and canhalsend
Change-Id: Ifa4c234beb75f8a0ea93bfd75555c5ed8d68dca4
2019-11-13 09:42:27 -08:00
Tomasz Wasilczyk
4255862bb0 Merge "Improve error handling with separate ICanErrorListener" 2019-11-07 15:22:52 +00:00
Tomasz Wasilczyk
a90619662b Improve error handling with separate ICanErrorListener
Error handling highlights:
- moved onError from ICanMessageListener to ICanErrorListener
- added isFatal callback argument to request client disconnect
- don't down interface that's already down

Also:
- don't crash if it's not possible to unregister ICanBus
- don't crash while trying to down interface that failed
- make hidl-utils available to vendor libraries

Bug: 143779011
Test: implemented a VHAL service prototype that communicates with this HAL
Change-Id: I98d054da9da0ead5ef952aebc086e052ac996212
2019-11-06 14:52:07 -08:00
Steven Moreland
82b84148c7 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I878a4d04e65ef13f3a0ebaf64177f673958d213c
2019-10-02 12:50:29 -07:00
Tomasz Wasilczyk
0ec8d63d5d Test CAN bus HAL
Bug: 135918744
Test: VTS
Change-Id: I7b45a24b6a1142cf74c1d215658792835553d169
2019-08-06 12:30:53 -07:00
Tomasz Wasilczyk
1b2c6efe46 Implement CAN bus HAL tools
These tools are for manual interaction with CAN bus HAL instances.
Meant primarily for testing/debugging, not useful in user builds.

Bug: 135918744
Test: adb shell <tool name>
Change-Id: I1dfbe94c0006f69954806c395cd888f3bf2a4249
2019-08-06 12:30:53 -07:00
Tomasz Wasilczyk
873296702f Default implementation for CAN bus HAL
This implementation supports SocketCAN interfaces.

Bug: 135918744
Test: VTS (separate new change)
Change-Id: I12b93e37fa64e341bee2c64eaf130b39977fcef5
2019-08-06 12:30:47 -07:00
Tomasz Wasilczyk
a27d4e435a Define CAN bus HAL.
Bug: 135918744
Test: VTS (separate new change)
Change-Id: Ia4de5ee441834c7870e33481e982960a1593de28
2019-08-02 09:50:22 -07:00