Skip to content

Format plugins, bank conversions, and Python phaser_bank_py - #20

Merged
dallison merged 7 commits into
mainfrom
dave/avro-stamped-ros-record-bank-py
Oct 28, 2026
Merged

dallison merged 7 commits into
mainfrom
dave/avro-stamped-ros-record-bank-py

Conversation

@dallison

@dallison dallison commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Move Arrow, Avro, Parquet, protobuf wire, and ROS wire support into phaser/plugins/<format>/ with separate generator (gen/codegen.cc → GeneratorPlugin) and runtime (runtime/, optional :conversion and :pybind) trees. Core message_gen and the phaser compiler call plugin hooks instead of hard-coding each format; ROS and protobuf frontends stay in core while wire codegen lives in plugins (MessageCodegenHost).
  • Refactor Phaser bank wire conversion onto PhaserBankRegisterConversionPlugin. Supported edges (by format name):
    • ROS: phaser → ros; protobuf ↔ ros
    • Protobuf wire: phaser → protobuf
    • Avro / Parquet (one-way): phaser → avro / parquet; protobuf → avro / parquet
  • Add CallMessageProperty / message_property for ROS and protobuf metadata by message full name (ros-datatype, ros-md5, ros-definition, protobuf-full-name, protobuf-name).
  • Add //phaser/runtime:phaser_bank_py: generic convert(), named conversion helpers, ROS connection metadata, format constants, registered_formats() / has_conversion() / conversion_edges(), and per-plugin submodules (arrow, avro, parquet, protobuf, ros) registered via RegisterPluginPybind.
  • Shared ROS codegen helpers in phaser/plugins/ros/gen/ros_codegen_helpers.*; Bazel aliases preserve existing //phaser/plugins:* deps.

Test plan

  • bazel test //phaser/runtime:phaser_bank_py_test
  • bazel test //phaser:arrow_test //phaser:columnar_test //phaser/runtime:columnar_test
  • bazel test //phaser:ros_wire_conversion_test //phaser:ros_metadata_protobuf_frontend_test //phaser:ros_metadata_ros_frontend_test
  • bazel test //phaser/runtime:message_test //phaser:ros_compile_test
  • CI green on PR

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.
@dallison dallison changed the title Add stamped ROS-bytes Avro records and Python bank bindings Format plugins, bank conversions, and Python phaser_bank_py Oct 27, 2026
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
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.
@dallison
dallison merged commit 6d66569 into main Oct 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant