ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::mqtt::SubackCounter Class Reference

SUBACKs received on the current connection. More...

#include <mqtt_subscription_fingerprint.h>

Public Member Functions

void reset ()
 
void add (uint8_t return_code)
 
uint16_t received () const
 
SubackTally tally (uint16_t sent) const
 Compares the SUBACKs received with the number of SUBSCRIBEs sent on this connection.
 

Protected Attributes

std::atomic< uint16_t > received_ {0}
 
std::atomic< uint16_t > granted_ {0}
 

Detailed Description

SUBACKs received on the current connection.

Written only by the context that delivers broker events (so plain loads and stores, no read-modify-write), read by the main loop.

Definition at line 38 of file mqtt_subscription_fingerprint.h.

Member Function Documentation

◆ add()

void esphome::mqtt::SubackCounter::add ( uint8_t return_code)
inline

Definition at line 44 of file mqtt_subscription_fingerprint.h.

◆ received()

uint16_t esphome::mqtt::SubackCounter::received ( ) const
inline

Definition at line 50 of file mqtt_subscription_fingerprint.h.

◆ reset()

void esphome::mqtt::SubackCounter::reset ( )
inline

Definition at line 40 of file mqtt_subscription_fingerprint.h.

◆ tally()

SubackTally esphome::mqtt::SubackCounter::tally ( uint16_t sent) const
inline

Compares the SUBACKs received with the number of SUBSCRIBEs sent on this connection.

Definition at line 52 of file mqtt_subscription_fingerprint.h.

Field Documentation

◆ granted_

std::atomic<uint16_t> esphome::mqtt::SubackCounter::granted_ {0}
protected

Definition at line 64 of file mqtt_subscription_fingerprint.h.

◆ received_

std::atomic<uint16_t> esphome::mqtt::SubackCounter::received_ {0}
protected

Definition at line 63 of file mqtt_subscription_fingerprint.h.


The documentation for this class was generated from the following file: