Skip to content

feat(uds_services, uds_on_ip): mutable transport and entity access between events - #93

Merged
FelicianoAngulo2 merged 7 commits into
feat/doip-entity-staticfrom
feat/uds-services-mut-access
Nov 5, 2026
Merged

FelicianoAngulo2 merged 7 commits into
feat/doip-entity-staticfrom
feat/uds-services-mut-access

Conversation

@FelicianoAngulo2

@FelicianoAngulo2 FelicianoAngulo2 commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

A server's transport can be reached mutably between events (Server::transport_mut, None while a response awaits its confirmation), and DoIpTransport::start_discovery starts the discovery of an entity built as a static, so an application can start discovery on the server it already owns. start_discovery sits behind uds_on_ip's new off-by-default connection feature. The embedded probe also measures a server built at run time, against its own size baseline.

Depends on #92.

Issue URL

Towards https://github.com/luminartech/halo/issues/5100

Testing

Run on this branch with the commits of the PRs below it, each commit alone and on the stack's top:

  • tool self-tests, validate, governance, the Sphinx needs build, and prose (plain and CI's --strict crates/uds_c)
  • cargo test --workspace --all-features; clippy on the host and for thumbv7em-none-eabihf
  • just embedded builds on 1.91 for both targets and the size check (matches the baseline)
  • cargo doc with -D warnings; pre-commit run --all-files
  • On the stack's top also the uds_c Miri job from ci.yml and cargo package -p uds_c --no-verify

@JustinKovacich JustinKovacich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stack review of #92–#96, this PR's part: 3 Required, 2 Question, 1 Optional.

Gate: fmt clean; clippy pedantic 0 hits; all tests pass; cargo hack workspace powerset clean (neither changed crate has features); cargo doc with -D missing_docs clean; the size check matches the re-recorded baseline (text 55688, data 9560, bss 156, main frame 1552).

Skills run for this review: rust-quality-gate, rust-principles, rust-api-design, rust-embedded, rust-design-review (change-scoped), /code-review, writing-for-customers.

Comment thread crates/uds_on_ip/src/transport.rs Resolved
Comment thread crates/uds_services/src/server.rs Resolved
Comment thread crates/uds_on_ip/src/transport.rs Resolved
Comment thread crates/uds_on_ip/CHANGELOG.md Resolved
@FelicianoAngulo2
FelicianoAngulo2 force-pushed the feat/uds-services-mut-access branch from f549b90 to 00e106d Compare October 28, 2026 01:09

@JustinKovacich JustinKovacich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every point from the first round is fixed:

  • entity_mut is replaced by DoIpTransport::start_discovery, behind the connection feature.
  • transport_mut is None while a session change or reset awaits its confirmation, with a test.
  • The probe's run-time configuration keeps just size measuring a server built in main.
  • check_size.py counts data as flash.
  • The changelog qualifier is back.

One effect lands in #96: uds_c now needs uds_on_ip's connection feature, which crates.io does not have yet. #96's package job now packages the two together (03de923).

No comments.

Gates at this head, run locally: cargo fmt --check, clippy pedantic on the workspace (0 hits), cargo test --workspace --all-features, the cargo hack powerset (depth 2), cargo doc with -D missing_docs and broken links denied, and just embedded with both size baselines. All clean.

Skills: rust-quality-gate, rust-principles, rust-api-design, rust-embedded, rust-design-review (change-scoped) and writing-for-customers. /code-review not run: the fixups are small, and I read each line by hand.

Security Audit is red on main too (RUSTSEC-2026-0110 and RUSTSEC-2026-0386), so its failure here is not this PR's.

@FelicianoAngulo2
FelicianoAngulo2 enabled stacked auto-merge (squash) November 5, 2026 00:46
…tween events

Server::transport_mut and DoIpTransport::entity_mut let a target that builds its server in place as a static configure the entity before the first step, starting the discovery of one built by Entity::new_discovery_later once it knows its identity. Each says what must not change while a response awaits its confirmation. The embedded probe builds its server that way, in a ConstStaticCell, as the sensor does: main's frame drops from 9216 to 1552 bytes, and the server's 9560 bytes move from bss to data, an initializer image in flash. The baseline records it.
…cess between events

The probe's run-time configuration builds the server in main, and size-baseline-run-time.json records it: text 56564, data 0, bss 9716, main frame 9200. The default configuration's baseline is unchanged.
@FelicianoAngulo2
FelicianoAngulo2 force-pushed the feat/uds-services-mut-access branch from 00e106d to 26ddf51 Compare November 5, 2026 02:15
@FelicianoAngulo2
FelicianoAngulo2 merged commit 5834785 into main Nov 5, 2026
35 of 62 checks passed
@FelicianoAngulo2
FelicianoAngulo2 deleted the feat/uds-services-mut-access branch November 5, 2026 02:28
FelicianoAngulo2 added a commit that referenced this pull request Nov 5, 2026
… its response (#94)

A session change asks the application to prepare it before the positive
response, with the active and target sessions, and the application can
refuse it or answer pending; `MAY_RESPOND_PENDING` becomes required, so
this is a breaking change for implementers of
`DiagnosticSessionControl`. A change that was prepared but not made
(refused later, unconfirmed, link closed, tS3 first, mid-request
transport error, step dropped) is reported through `abandon`, on
`DiagnosticSessionControl` and `EcuReset`, empty by default;
`EcuReset::reset` also gets the active session. `Server::step` and `run`
return a `StepError`: `Recoverable` where the transport failed between
requests, keeping a change that awaits its confirmation and letting the
server be stepped again, `Terminal` otherwise.

Depends on #93.

## Issue URL

Towards luminartech/halo#5100

## Testing

Run on this branch with the commits of the PRs below it, each commit
alone and on the stack's top:
- tool self-tests, `validate`, `governance`, the Sphinx needs build, and
prose (plain and CI's `--strict crates/uds_c`)
- `cargo test --workspace --all-features`; clippy on the host and for
`thumbv7em-none-eabihf`
- `just embedded` builds on 1.91 for both targets and the size check
(matches the baseline)
- `cargo doc` with `-D warnings`; `pre-commit run --all-files`
- On the stack's top also the uds_c Miri job from `ci.yml` and `cargo
package -p uds_c --no-verify`
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.

2 participants