commit | 1d565629a5e4acf48e5e175140078c3a337b3064 | [log] [tgz] |
---|---|---|
author | Nirav Atre <natre@google.com> | Fri Jul 13 15:41:21 2018 -0700 |
committer | Nirav Atre <natre@google.com> | Mon Jul 16 12:39:38 2018 -0700 |
tree | 041aeb55e5e75629f90684fca490ec65ea442810 | |
parent | 2e57f01d9721a260b5c745957d25cb9320bb3f3a [diff] |
Fix parcelling code for structs containing interfaces This change implements the proper parcel serialization/deserialization functionality for structs containing interfaces; previously, structs containing interfaces+{arrays,strings,vectors} would not be handled correctly. The compile-time error was of the form: // Here, the member variable ("array") of a struct ("swi") is referenced // using the member access operator. However, this results in an invalid // identifier name. error: expected ';' at end of declaration size_t _hidl_swi.array_parent; ^ Also updated the C++ and Java hidl_test suites. Bug: 111019943 Test: Ran the hidl_test suite, including the new test-case Change-Id: Ibcd6517737ed9038832884df11f4274e0dd8970c
Full documentation can be found here: https://source.android.com/devices/architecture/hidl/
hidl-gen is a compiler for the HIDL (HAL Interface Design Language) which generates C++ and Java endpoints for RPC mechanisms. The main userspace libraries which this compiler uses can be found at system/libhidl.
m hidl-gen
Note that options for hidl-gen expected to be invoked by the build system are marked with 'internal' in the help menu.
hidl-gen -h hidl-gen -o output -L c++-impl -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
Some defaults for package roots are also provided
hidl-gen -o output -L c++-impl android.hardware.nfc@1.0 hidl-gen -o output -L vts android.hardware.nfc@1.0 hidl-gen -L hash android.hardware.nfc@1.0
Example command for vendor project
hidl-gen -L c++-impl -r vendor.foo:vendor/foo/interfaces vendor.foo.nfc@1.0
See update-makefiles-helper.sh and update-all-google-makefiles.sh for examples of how to generate HIDL makefiles (using the -Landroidbp option).
This is a helper tool to convert C headers to valid .hal files.
m c2hal && c2hal -h
This tool generates html documentation for hal interfaces.
m hidl-doc && hidl-doc -h