The Configurable Publisher Registry library lets you create custom telemetry publishers and register them with the Telemetry service through the Configurable Publisher Registry. The library abstracts away the underlying Binder interface and data serialization and deserialization.
API surface overview
The library provides language-specific interfaces in Java and Rust for interacting with the underlying Configurable Publisher Registry. The library is responsible for the following areas:
- Publisher definition: Provides base classes in Java or traits in Rust to
define the behavior of a publisher.
- Metadata definition: Describes your publisher, including its name
and the protobuf
FileDescriptorSetthat defines the published messages. For more information, see Self-describing Messages. If you use Java, the Java protobuf descriptor generator tool can help you generate the protobuf descriptor metadata. - Data production: Handles logic for producing data on a subscription basis or on demand.
- Configuration handling: Processes optional configuration arguments configured by a metrics campaign when producing data.
- Metadata definition: Describes your publisher, including its name
and the protobuf
- Data encoding and decoding: Offers mechanisms to convert messages and
configurations to and from the wire format.
- Codecs: Includes built-in and custom codecs for data serialization and deserialization.
- Publisher registration and lifecycle: Manages the connection between the publisher and the Telemetry service.
For detailed samples and complete, compilable applications demonstrating the
full lifecycle, see the respective README.md files in the source tree:
Java library:
system/software_defined_vehicle/telemetry/sdk/java/configurable_publisher_registry/README.mdJava sample:
samples/telemetry/publishers/java/sample_ivi_sdk_publisher/README.mdRust library:
system/software_defined_vehicle/telemetry/sdk/rust/configurable_publisher_registry/README.mdRust sample:
samples/telemetry/publishers/rust/sample_getter_publisher/README.md