pub fn status_step(
shown: &mut Option<AgentStatus>,
now: Option<AgentStatus>,
after_snapshot: bool,
) -> Option<Option<AgentStatus>>Expand description
Whether a feed sends a status event now, given the state it last sent
(shown, updated here) and the state now: Some(Some(_)) sends a state,
Some(None) sends state: null so the device drops a chip it shows, None
sends nothing. Right after a snapshot (after_snapshot) a known state is
always sent; otherwise only a change of state or since_ms is. An agent
that has never had a state gets no event at all.