modality-probe header-gen
Command: modality-probe header-gen <component path>
Generate header files with event and probe ID constants from component definition files. The component definition files are created by scanning your code for instrumentation points with the manifest-gen command. Generated header files then need to be included in your source so that probe and event names get their numeric definitions.
# Example
$ modality-probe header-gen --lang c --output-path src/include/component_definitions.h src/test-component
Generated definitions for component test-component in src/include/component-definitions.h
# Options
<component path>
- Path to the component definition files.
--include-guard-prefix <include-guard-prefix>
- C header include guard prefix. Defaults to MODALITY_PROBE
.
-l, --lang <lang>
- Language to output the source in, either c
or rust
. Defaults to c
.
-o, --output-path <output-path>
- Write output to file instead of stdout.
--rust-u32-types
- When generating Rust definitions, use bare u32 types instead of ProbeId/EventId types.