Skip to content

feat(bare_metal): Add someip polling processing feature#126

Open
FelicianoAngulo2 wants to merge 7 commits into
feature/phase21_api_symmetryfrom
feat/polled-bared-metal
Open

feat(bare_metal): Add someip polling processing feature#126
FelicianoAngulo2 wants to merge 7 commits into
feature/phase21_api_symmetryfrom
feat/polled-bared-metal

Conversation

@FelicianoAngulo2

@FelicianoAngulo2 FelicianoAngulo2 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces new modules and features to support bare-metal and polled operation modes.
Additionallly, several improvements and refactoring to enhance flexibility, configurability, and clarity across the codebase, especially around the E2E registry and SOME/IP header handling. The most significant changes are the introduction of const-generic parameters for the E2E registry, improved documentation, and a more robust and flexible approach to handling SOME/IP headers.

Halo integration:

https://github.com/luminartech/halo/pull/4767

E2E Registry Refactor and Improvements

  • Refactored E2ERegistry to use a const-generic CAP parameter, allowing consumers to specify the registry's capacity at instantiation time for better configurability and memory usage. Updated all usages and documentation to reflect this change. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]
  • Changed error handling in E2ERegistry::register to report the actual capacity used, not just the default constant, improving diagnostics. [1] [2]

SOME/IP Header Handling Enhancements

  • Introduced a HEADER_SIZE constant for the SOME/IP header, replacing magic numbers throughout the code for clarity and maintainability. Updated HeaderView and all relevant parsing, encoding, and documentation to use this constant. [1] [2] [3] [4] [5] [6] [7]
  • Added a new upper_header_bytes method to HeaderView for extracting bytes needed by E2E Profile 5, improving zero-copy access and documentation.

Feature Flags and Modularization

  • Improved feature gating in Cargo.toml and the codebase: clarified which features pull in allocator-backed conveniences, and added new features/modules for bare-metal and polled operation (bare_metal_poll, single_context_mutex, polled). [1] [2] [3]
  • Updated imports and usage patterns to respect feature flags, ensuring no-alloc builds do not pull in unnecessary dependencies. [1] [2]

Documentation Improvements

  • Enhanced documentation throughout, clarifying the purpose and usage of new parameters, constants, and features, and providing guidance for consumers on configuring the registry and using new modules. [1] [2] [3] [4] [5] [6]

These changes collectively make the codebase more flexible, maintainable, and better suited for both embedded and standard environments.

Feliciano Angulo added 5 commits June 8, 2026 10:48
…estCallback

Two related changes to land the no-alloc bare-metal server path:
1.  drop _alloc from the server feature and gate every alloc usage (use alloc::sync::Arc, Wrappable handles, SocketOptions, sd-protocol import, run_inner's 64 KiB vec! and new_with_deps/new_passive_with_deps' Arc-wrap constructors) so client+server+bare_metal builds with zero __rust_alloc/__rg_alloc symbol references. The Server struct's started latch is now a feature-gated StartedLatch type alias (Arc<AtomicBool> under _alloc, &'static AtomicBool on bare metal) passed through ServerStorage; the H/Hsd/Hep default generics use cfg'd DefaultSocketHandle/DefaultSdStateHandle/DefaultEventPublisherHandle aliases so Arc names don't need to resolve under no-alloc. StaticSubscriptionHandle returns core::future::Ready instead of alloc::boxed::Box::pin (the lock closures are synchronous).
2. Add NonSdRequestCallback fn-pointer on ServerStorage/Server, threaded through run_with_buffers/run_combined/recv_loop, invoked in place of the historical 'non-SD ignored' branch — surfaces method requests / fire-and-forget calls (e.g. halo's HWP1* requests) to the consumer FFI without requiring a ChannelFactory-backed ServerUpdates channel.
@FelicianoAngulo2 FelicianoAngulo2 self-assigned this Jun 8, 2026
@FelicianoAngulo2 FelicianoAngulo2 force-pushed the feat/polled-bared-metal branch from 6d4b507 to e7c956c Compare June 8, 2026 21:07
@FelicianoAngulo2 FelicianoAngulo2 force-pushed the feat/polled-bared-metal branch from 2844504 to 4c2531d Compare June 9, 2026 13:58
@FelicianoAngulo2 FelicianoAngulo2 changed the title Feat/polled bared metal feat(bare_metal): Add someip polling processing feature Jun 9, 2026
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