pub fn encode_subscribe_request<A, E>(
buf: &mut [u8],
attribute_paths: A,
event_paths: E,
min_interval_floor_s: u16,
max_interval_ceiling_s: u16,
keep_subscriptions: bool,
fabric_filtered: bool,
) -> Result<&[u8]>Expand description
Writes a SubscribeRequestMessage (§10.7.5).
The client’s half of §8.5. The two intervals are a request: §8.5.3.2 lets the server
answer with a MaxInterval of its own inside the SubscribeResponse, and a client that
assumed its ceiling had been honoured would call a live subscription dead.
keep_subscriptions is the one field with teeth. §8.5.2.3: “If KeepSubscriptions is FALSE,
all existing or pending subscriptions on the publisher for this subscriber SHALL be
terminated.” — which is what a controller wants after a restart, and exactly what it does
not want when adding a second subscription to a node it is already watching.