Merge "Make sure comments in current.txt files are tested."
tree: 2e63ba479281c970eb7ed20d20852d91138f0b73
  1. c2hal/
  2. include_hash/
  3. test/
  4. utils/
  5. .clang-format
  6. Android.bp
  7. Annotation.cpp
  8. Annotation.h
  9. ArrayType.cpp
  10. ArrayType.h
  11. AST.cpp
  12. AST.h
  13. CleanSpec.mk
  14. CompoundType.cpp
  15. CompoundType.h
  16. ConstantExpression.cpp
  17. ConstantExpression.h
  18. Coordinator.cpp
  19. Coordinator.h
  20. DeathRecipientType.cpp
  21. DeathRecipientType.h
  22. EnumType.cpp
  23. EnumType.h
  24. FmqType.cpp
  25. FmqType.h
  26. generateCpp.cpp
  27. generateCppAdapter.cpp
  28. generateCppImpl.cpp
  29. generateJava.cpp
  30. generateVts.cpp
  31. HandleType.cpp
  32. HandleType.h
  33. Hash.cpp
  34. hidl-gen_l.ll
  35. hidl-gen_y.yy
  36. HidlTypeAssertion.cpp
  37. HidlTypeAssertion.h
  38. Interface.cpp
  39. Interface.h
  40. Location.cpp
  41. Location.h
  42. main.cpp
  43. MemoryType.cpp
  44. MemoryType.h
  45. Method.cpp
  46. Method.h
  47. MODULE_LICENSE_APACHE2
  48. NamedType.cpp
  49. NamedType.h
  50. NOTICE
  51. OWNERS
  52. PointerType.cpp
  53. PointerType.h
  54. PREUPLOAD.cfg
  55. README.md
  56. Reference.h
  57. RefType.cpp
  58. RefType.h
  59. ScalarType.cpp
  60. ScalarType.h
  61. Scope.cpp
  62. Scope.h
  63. StringType.cpp
  64. StringType.h
  65. Type.cpp
  66. Type.h
  67. TypeDef.cpp
  68. TypeDef.h
  69. update-all-google-makefiles.sh
  70. update-makefiles-helper.sh
  71. VectorType.cpp
  72. VectorType.h
README.md

hidl-gen user guide

1. Build

croot
make hidl-gen

2. Run

hidl-gen -o output-path -L language (-r interface-root) fqname

output-path: directory to store the output files.
language: output file for given language. e.g.c++, vts..

fqname: fully qualified name of the input files.
For singe file input, follow the format: package@version::fileName
For directory input, follow the format: package@version

interface-root(optional): prefix and root path for fqname.
If not set, use the default prefix: android.hardware and default root path
defined in $TOP.

examples:

croot
hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal
hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
hidl-gen -L hash -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0