pub struct PidRead {
pub pid: u32,
pub length: usize,
pub end: bool,
pub must_understand: bool,
pub impl_extension: bool,
pub reserved: bool,
pub ignore: bool,
/* private fields */
}Expand description
A parameter header as read.
Fields§
§pid: u32The parameter id, with the flag bits removed.
length: usizeThe value’s unpadded length.
end: boolWhether this is the list’s end.
must_understand: boolWhether the writer set the must-understand flag. Cyclone sets it on every parameter and Fast DDS on none; both are streams this project reads.
impl_extension: boolWhether the writer set FLAG_IMPL_EXTENSION.
XTypes 1.3 §7.4.1.2.2: the parameter is the writing implementation’s own, and a user-defined member “will never set the FLAG_IMPL_EXTENSION bit”. The flag used to be masked off with the rest, which made a vendor-private parameter indistinguishable from the user member sharing its low fourteen bits — and the vendor’s payload was then read into that member with no error.
reserved: boolWhether the id is inside the reserved range, which no member has.
§7.4.1.2.2 reserves 0x3F01 to 0x3FFF. PID_EXTENDED and
PID_LIST_END are handled before this field is ever read; what
is left is PID_IGNORE and the range above it, and none of them
is a member id. A short parameter carrying one used to be matched
against a member declared with that number through the extended
header, where it is a legal id.
ignore: boolPID_IGNORE, which §7.4.1.2.2 says every consumer shall ignore.
Kept apart from PidRead::reserved because it outranks
PidRead::must_understand: the clause has no exception in it,
so a reader that discarded the sample over the flag would refuse
a stream the clause tells it to accept.
Implementations§
Source§impl PidRead
impl PidRead
Sourcepub const fn is_user_member(&self) -> bool
pub const fn is_user_member(&self) -> bool
Whether this parameter can be one of the reading type’s members.
False for a vendor-private parameter and for one whose id is in the reserved range. Both are streams a conforming writer may send, and neither is any member of the type being read, so both take the unknown-parameter path — skipped, or the sample discarded if the writer set must-understand. XTypes 1.3 §7.4.1.2.2, §7.2.2.4.4.4.6.