mctp: wire real I2C transport into server loop (Phase 6 Step 3)
Replace NoopSender with I2cSender<IpcI2cClient> and add inbound
slave-notification handling to the MCTP server main loop.
Changes:
- Add imports: IpcI2cClient, I2cTargetClient, I2cSender, MctpI2cReceiver,
BusIndex, TargetMessage; add OWN_EID and OWN_I2C_ADDR constants
- Register slave notification via register_notification(BUS_0) at startup
- Replace single object_wait(MCTP) loop with a WaitGroup that multiplexes
two sources:
user_data=0: IPC from a client (MCTP channel READABLE) -> dispatch
user_data=1: I2C slave notification (I2C channel USER) ->
get_pending_messages -> MctpI2cReceiver::decode ->
server.inbound()
- Remove NoopSender struct and its Sender impl
The OpenPRoT Technical Charter can be found at https://github.com/OpenPRoT/.github/blob/main/GOVERNANCE.md
This project uses cargo-xtask for build automation and project management.
You can run tasks using cargo xtask <task-name>:
cargo xtask build - Build the projectcargo xtask test - Run all testscargo xtask check - Run cargo checkcargo xtask clippy - Run clippy lintscargo xtask fmt - Format code with rustfmtcargo xtask clean - Clean build artifactscargo xtask dist - Build a distribution (release build)cargo xtask docs - Build documentation with mdbookcargo xtask cargo-lock - Manage Cargo.lock filecargo xtask precheckin - Run all pre-checkin validation checkscargo xtask header-check - Check license headers in source filescargo xtask header-fix - Fix missing license headers in source files# Build the project cargo xtask build # Run tests cargo xtask test # Create a distribution cargo xtask dist # Format code cargo xtask fmt # Run clippy cargo xtask clippy # Build documentation cargo xtask docs # Run all pre-checkin validation checks cargo xtask precheckin # Check license headers cargo xtask header-check # Fix missing license headers cargo xtask header-fix
The project is structured as a Cargo workspace with two main components:
openprot/ - The main applicationxtask/ - Build automation scriptsThe xtask workflow allows you to add custom build steps, automation, and project management tasks written in Rust, making them cross-platform and easy to maintain.
No additional tools are required - everything is handled through Cargo and the xtask scripts.