|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
What a caller asks of one exchange's attempts: a plain cap on tries (today's shape), or a read kind whose plan the engine builds for the request (ExchangeEngine::plan_read()). More...
#include <hub_decisions.h>
Public Member Functions | |
| AttemptRequest ()=default | |
| AttemptRequest (uint8_t tries) | |
| AttemptRequest | with_wake_preamble_first () const |
| Mark the read as aimed at the moment the receiver has just come to rest: to a low-power target every attempt sends the wake-up preamble, which a resting receiver hears, whatever the wake belief says (ADR 0077). | |
| AttemptRequest | with_state_unknown () const |
| Mark a status read as made without trustworthy news of the receiver: activity the hub may have missed can have set it moving since its last report, so a recent "stopped" report does not prove it rests. | |
| bool | is_progress_look () const |
| True for a look at a device that is probably still busy: one attempt, the ladder is the retry (ReadKind::PROGRESS, or a count of SCHEDULED_POLL_MAX_TRIES). | |
Static Public Member Functions | |
| static AttemptRequest | of_kind (ReadKind read_kind) |
Public Attributes | |
| uint8_t | max_tries {EXCHANGE_RETRY_COUNT} |
| Cap on attempts; ignored once kind is set. | |
| bool | planned {false} |
| True: build the plan for kind instead of using a count. | |
| ReadKind | kind {ReadKind::COMMAND} |
| What the read is for; only read when planned. | |
| bool | wake_preamble_first {false} |
| True for the read at a moving cover's predicted end of travel (with_wake_preamble_first()). | |
| bool | state_unknown {false} |
| True for a read whose evidence about the receiver may be stale (with_state_unknown()). | |
What a caller asks of one exchange's attempts: a plain cap on tries (today's shape), or a read kind whose plan the engine builds for the request (ExchangeEngine::plan_read()).
Converts implicitly from a number of tries, so callers that only name a count are unchanged.
Definition at line 640 of file hub_decisions.h.
|
default |
|
inline |
| tries | Cap on attempts (the max_tries form of ExchangeEngine::send_and_receive()). |
Definition at line 651 of file hub_decisions.h.
|
inlinenodiscard |
True for a look at a device that is probably still busy: one attempt, the ladder is the retry (ReadKind::PROGRESS, or a count of SCHEDULED_POLL_MAX_TRIES).
Definition at line 684 of file hub_decisions.h.
|
inlinestaticnodiscard |
| read_kind | What the read is for. |
Definition at line 654 of file hub_decisions.h.
|
inlinenodiscard |
Mark a status read as made without trustworthy news of the receiver: activity the hub may have missed can have set it moving since its last report, so a recent "stopped" report does not prove it rests.
The wake belief is then UNKNOWN unless fresh moving evidence says AWAKE (wake_belief()), and a settling read leads with one short attempt before the wake-up attempts. Only a planned read (of_kind) carries it to the engine; without effect for a target that is not low-power, for a command, and wherever the belief is not applied: a fixed preamble (with_wake_preamble_first() wins) or low_power_wake_belief switched off.
Definition at line 677 of file hub_decisions.h.
|
inlinenodiscard |
Mark the read as aimed at the moment the receiver has just come to rest: to a low-power target every attempt sends the wake-up preamble, which a resting receiver hears, whatever the wake belief says (ADR 0077).
Without effect for a target that is not low-power.
Definition at line 664 of file hub_decisions.h.
| ReadKind esphome::home_io_control::decisions::AttemptRequest::kind {ReadKind::COMMAND} |
What the read is for; only read when planned.
Definition at line 643 of file hub_decisions.h.
| uint8_t esphome::home_io_control::decisions::AttemptRequest::max_tries {EXCHANGE_RETRY_COUNT} |
Cap on attempts; ignored once kind is set.
Definition at line 641 of file hub_decisions.h.
| bool esphome::home_io_control::decisions::AttemptRequest::planned {false} |
True: build the plan for kind instead of using a count.
Definition at line 642 of file hub_decisions.h.
| bool esphome::home_io_control::decisions::AttemptRequest::state_unknown {false} |
True for a read whose evidence about the receiver may be stale (with_state_unknown()).
Definition at line 647 of file hub_decisions.h.
| bool esphome::home_io_control::decisions::AttemptRequest::wake_preamble_first {false} |
True for the read at a moving cover's predicted end of travel (with_wake_preamble_first()).
Definition at line 645 of file hub_decisions.h.