ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
mqtt_subscription_fingerprint.h File Reference

Go to the source code of this file.

Data Structures

class  esphome::mqtt::SubackCounter
 SUBACKs received on the current connection. More...
 

Namespaces

namespace  esphome
 
namespace  esphome::mqtt
 

Enumerations

enum class  esphome::mqtt::SubackTally : uint8_t { esphome::mqtt::SUBACK_TALLY_PENDING , esphome::mqtt::SUBACK_TALLY_ALL_GRANTED , esphome::mqtt::SUBACK_TALLY_NOT_ALL_GRANTED }
 

Functions

uint32_t esphome::mqtt::add_subscription_fingerprint (uint32_t fingerprint, const char *topic, uint8_t qos)
 Adds one subscription to a fingerprint of a set of subscriptions; the order they are added in does not matter.
 
constexpr bool esphome::mqtt::session_has_subscriptions (bool session_present, uint32_t trusted, uint32_t current)
 True when a resumed session holds in full the subscriptions it is trusted with, and they are the current ones.
 
constexpr bool esphome::mqtt::subscribe_granted (uint8_t return_code)
 True when a SUBACK return code grants the subscription.
 
constexpr bool esphome::mqtt::subscribe_fits (uint16_t sent, uint16_t answered, size_t free_slots, size_t slots_per_subscribe=INBOUND_SLOTS_PER_SUBSCRIBE)
 Whether one more SUBSCRIBE fits; wrap safe.
 
constexpr uint16_t esphome::mqtt::rebase_sent (uint16_t sent, uint16_t answered)
 The sent count raised to the SUBACKs counted, so stray SUBACKs give no credit; wrap safe.