Skip to main content

Module service_inbox

Module service_inbox 

Source
Expand description

phase-461 W2 – the caller-owned service inbox, stated once and RMW-agnostically.

A service server is a queryable, and every queryable needs somewhere for a request to land between the transport’s read task (the producer) and the executor’s spin (the consumer). Until phase-461 the backend owned that ring and every family paid the same geometry: on the safety island 26 queryables x 4 slots x 1,024 B = 115,128 B, 24 of them parameter services whose worst well-formed request is 669 B and whose clients are sequential (issue 1352).

W1 made the zenoh ring a HEADER over storage its owner supplies. This module is the other half of that seam: the description a caller hands the backend, in the one crate both the runtime (nros-node) and every backend already depend on. Two types:

  • CallerInboxStorage – the backing a family declares as a static, DEPTH slots of SLOT_BYTES bytes with one InboxEntry each;
  • CallerInbox – the Copy header over it (geometry plus two pointers), which is what crosses the seam and what an ABI slot would carry.

Which backends accept one. Session::SUPPORTS_CALLER_INBOX is a const, so the caller picks at compile time and a family that cannot bring its own ring says so in a const rather than falling back silently (RFC-0052: no dropped knob). Every backend in tree answers false today and the reason is per backend, stated at each one: Cyclone holds requests in reader history, XRCE in a C req_ring, and nros-rmw-cffi FORWARDS over a C vtable that has no slot to carry a ring through. zenoh’s own ring is already caller-visible (nros_rmw_zenoh::InboxStorage, W1) and answers true the moment that vtable can reach it – see this module’s note on CallerInbox for what that costs.

Structs§

CallerInbox
The header a caller hands the backend: a ring’s geometry and where its bytes are.
CallerInboxStorage
Backing storage for one queryable’s request ring: DEPTH slots of SLOT_BYTES bytes, plus one InboxEntry each.
InboxEntry
One ring entry’s bookkeeping: how many bytes of its slot are valid, the reply-correlation token the backend replies against, and whether the request that arrived was larger than the slot.

Enums§

ServiceInboxSpec
Which inbox a service server receives through.