Repository navigation
Format plugins, bank conversions, and Python phaser_bank_py - #20
Merged
Merged
Conversation
Expose ros_avro_record encoding (message stamp plus length-prefixed ROS wire bytes), bank conversion helpers, and a pybind11 module for conversions and ROS connection metadata. Extend avro with record-byte writers for non-OCF payloads.
Move columnar and wire conversions into phaser/plugins with generator and runtime hooks, and expose registered formats, conversion edges, message properties, and per-plugin submodules from phaser_bank_py.
Pass an explicit byte span for ROS payload bytes so a string literal is not sized with its null terminator.
Add valgrind.supp as a py_test data dependency so run_under can open suppressions from runfiles, and set the phaser module version to 3.1.0.
dallison
marked this pull request as ready for review
October 27, 2026 21:04
Replace per-plugin MessageCodegen friend classes with MessageCodegenHost, move ROS codegen helpers into the ROS plugin, and wire each format plugin through local Emit hooks.
Keep ROS and protobuf frontends in the core generator; plugins emit wire APIs through MessageCodegenHost so message_gen no longer owns format-specific serialization.
Drop the conversion plugin, ros_avro_record runtime, and Python helpers; keep ros_connection_metadata on message properties for bank introspection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
phaser/plugins/<format>/with separate generator (gen/codegen.cc→GeneratorPlugin) and runtime (runtime/, optional:conversionand:pybind) trees. Coremessage_genand thephasercompiler call plugin hooks instead of hard-coding each format; ROS and protobuf frontends stay in core while wire codegen lives in plugins (MessageCodegenHost).PhaserBankRegisterConversionPlugin. Supported edges (by format name):phaser→ros;protobuf↔rosphaser→protobufphaser→avro/parquet;protobuf→avro/parquetCallMessageProperty/message_propertyfor ROS and protobuf metadata by message full name (ros-datatype,ros-md5,ros-definition,protobuf-full-name,protobuf-name).//phaser/runtime:phaser_bank_py: genericconvert(), named conversion helpers, ROS connection metadata, format constants,registered_formats()/has_conversion()/conversion_edges(), and per-plugin submodules (arrow,avro,parquet,protobuf,ros) registered viaRegisterPluginPybind.phaser/plugins/ros/gen/ros_codegen_helpers.*; Bazel aliases preserve existing//phaser/plugins:*deps.Test plan
bazel test //phaser/runtime:phaser_bank_py_testbazel test //phaser:arrow_test //phaser:columnar_test //phaser/runtime:columnar_testbazel test //phaser:ros_wire_conversion_test //phaser:ros_metadata_protobuf_frontend_test //phaser:ros_metadata_ros_frontend_testbazel test //phaser/runtime:message_test //phaser:ros_compile_test