tree: 0fc725e604dbb32e0d9550b2e058c0092f32fb2c [path history] [tgz]
  1. .clang-format
  2. AST.cpp
  3. AST.h
  4. Android.bp
  5. Annotation.cpp
  6. Annotation.h
  7. ArrayType.cpp
  8. ArrayType.h
  9. CleanSpec.mk
  10. CompoundType.cpp
  11. CompoundType.h
  12. ConstantExpression.cpp
  13. ConstantExpression.h
  14. Coordinator.cpp
  15. Coordinator.h
  16. DeathRecipientType.cpp
  17. DeathRecipientType.h
  18. DocComment.cpp
  19. DocComment.h
  20. EnumType.cpp
  21. EnumType.h
  22. FmqType.cpp
  23. FmqType.h
  24. HandleType.cpp
  25. HandleType.h
  26. Hash.cpp
  27. HidlTypeAssertion.cpp
  28. HidlTypeAssertion.h
  29. Interface.cpp
  30. Interface.h
  31. Location.cpp
  32. Location.h
  33. MODULE_LICENSE_APACHE2
  34. MemoryType.cpp
  35. MemoryType.h
  36. Method.cpp
  37. Method.h
  38. NOTICE
  39. NamedType.cpp
  40. NamedType.h
  41. OWNERS
  42. PREUPLOAD.cfg
  43. PointerType.cpp
  44. PointerType.h
  45. README.md
  46. RefType.cpp
  47. RefType.h
  48. Reference.h
  49. ScalarType.cpp
  50. ScalarType.h
  51. Scope.cpp
  52. Scope.h
  53. StringType.cpp
  54. StringType.h
  55. Type.cpp
  56. Type.h
  57. TypeDef.cpp
  58. TypeDef.h
  59. VectorType.cpp
  60. VectorType.h
  61. build/
  62. c2hal/
  63. docs/
  64. generateCpp.cpp
  65. generateCppAdapter.cpp
  66. generateCppImpl.cpp
  67. generateJava.cpp
  68. generateVts.cpp
  69. hidl-gen_l.h
  70. hidl-gen_l.ll
  71. hidl-gen_y.yy
  72. include_hash/
  73. main.cpp
  74. scripts/
  75. test/
  76. update-all-google-makefiles.sh
  77. update-makefiles-helper.sh
  78. utils/
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