Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.

feat: port drivers to the #00 framework (nested API + owner capability)#9

Merged
jBernavaPrah merged 1 commit into
mainfrom
feat/00-nested-api
Jun 30, 2026
Merged

feat: port drivers to the #00 framework (nested API + owner capability)#9
jBernavaPrah merged 1 commit into
mainfrom
feat/00-nested-api

Conversation

@jBernavaPrah

Copy link
Copy Markdown
Contributor

What

Ports the 5 component drivers (bno085, ddsm115, oak_d_lite, vl53l1x, zed_f9p) onto the plan #00 framework surface — satisfying #00 DoD #1 (no flat component bus API remains).

How

  • git bridge to the #00 framework (not yet released to crates.io): phoxal + phoxal-api pinned at framework rev e8c4ce8. Each crate adds phoxal-api.
  • import use phoxal_api::y2026_1 as api; (was phoxal::api).
  • nested contract types: motor::Command, encoder::Sample, imu::Sample, accelerometer::Sample, gyroscope::Sample, camera::Frame/Encoding, depth::Frame/Encoding/InvalidSamplePolicy, range::Sample/Limits, gnss::Sample. No flat api::component::<Name> left. SensorHealth is now per-capability (imu::SensorHealth, range::SensorHealth).
  • owner capability (L2): a driver owns its component capabilities, so every topic is acquired via api::topic::internal::new(cap).component(i).<kind>(c).<leaf>() with let cap = ctx.owner_capability();. ddsm115 subscribes motor::Command (command role) + publishes encoder::Sample (state); sensors publish their *::sample/*::frame (state).

Verification

Workflow (implement + independent verify), then codex cross-review (verdict: ok). Green: cargo build/test/clippy -D warnings/fmt (11 tests pass). Both flat-signal greps + phoxal::api are empty; handle directions match roles; per-capability SensorHealth and camera/depth/range field fidelity confirmed against the framework structs.

Note

The git-bridge dep is a temporary bridge until the #00 framework is released to crates.io, at which point a 1-line switch pins the published version.

🤖 Generated with Claude Code

Bring the component drivers onto the plan #00 framework surface (DoD #1): the
nested component API, the `phoxal-api` crate, and the L2 owner capability.

- depend on the #00 framework via a pinned git bridge (until it is released to
  crates.io): `phoxal` and `phoxal-api` at framework rev e8c4ce8. Each crate adds
  `phoxal-api = { workspace = true }`.
- import `use phoxal_api::y2026_1 as api;` (was `phoxal::api`).
- nested contract types: `api::component::motor::Command`,
  `encoder::Sample`, `imu::Sample`, `accelerometer::Sample`, `gyroscope::Sample`,
  `camera::Frame` + `camera::Encoding`, `depth::Frame` + `depth::Encoding` +
  `depth::InvalidSamplePolicy`, `range::Sample` + `range::Limits`, `gnss::Sample`
  (no flat `api::component::<Name>` left). `SensorHealth` is now per-capability
  (`imu::SensorHealth`, `range::SensorHealth`).
- a driver OWNS its component capabilities, so every topic is acquired through the
  L2 owner builder `api::topic::internal::new(cap).component(i).<kind>(c).<leaf>()`
  with `let cap = ctx.owner_capability();`. ddsm115 subscribes `motor::Command`
  (command role) and publishes `encoder::Sample` (state); sensor drivers publish
  their `*::sample` / `*::frame` (state).

Green: cargo build/test/clippy -D warnings/fmt against the #00 framework.
@jBernavaPrah jBernavaPrah merged commit 66eef6d into main Jun 30, 2026
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant