#[repr(C)]pub struct rmw_message_info_t {
pub source_timestamp: rmw_time_point_value_t,
pub received_timestamp: rmw_time_point_value_t,
pub publication_sequence_number: u64,
pub reception_sequence_number: u64,
pub publisher_gid: rmw_gid_t,
pub from_intra_process: bool,
}Expand description
Per-sample metadata — upstream rmw_message_info_t, field for field.
Phase 376 W4. Today this metadata reaches Rust callers through
MESSAGE_INFO_TABLE, a side table in nros-rmw-cffi keyed on the
subscription’s backend_data ADDRESS. That table is a workaround, not a
design, and it never crosses the seam it exists for: only the Rust
trampoline writes it, so a C or C++ backend has no symbol to call and
message info is permanently absent for them. It also claims a pool slot per
subscription and never releases it, so a reused handle address inherits the
previous subscription’s metadata.
Passing the struct by pointer on the take call — which is what upstream does — removes all of that: the caller owns the storage, it lives exactly as long as the call, and every backend can fill it.
Retiring the side table is NOT part of this change; the take_with_info
slots are the mechanism that makes retiring it possible.
Fields§
§source_timestamp: rmw_time_point_value_tPublisher’s clock at publication, ns. 0 = no source timestamp.
received_timestamp: rmw_time_point_value_tSubscriber’s clock at reception, ns. 0 = receptions are not stamped.
publication_sequence_number: u64Publisher-side sequence, or
RMW_MESSAGE_INFO_SEQUENCE_NUMBER_UNSUPPORTED. Whether this is real is
what feature_supported answers.
reception_sequence_number: u64Subscriber-side reception count, or the same sentinel.
publisher_gid: rmw_gid_tWhich publisher sent it. All-zero data = unknown.
from_intra_process: boolTrue when the sample never left the image (Zephyr’s
Z_FEATURE_LOCAL_SUBSCRIBER, DDS intra-process).
Trait Implementations§
Source§impl Clone for rmw_message_info_t
impl Clone for rmw_message_info_t
Source§fn clone(&self) -> rmw_message_info_t
fn clone(&self) -> rmw_message_info_t
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more