diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index df8e1c443ea366..103b20756bc41a 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -217,6 +217,10 @@ class ReadHandler : public Messaging::ExchangeDelegate uint16_t mMinIntervalFloorSeconds = 0; uint16_t mMaxIntervalCeilingSeconds = 0; SessionHolder mSessionHandle; + // mHoldReport is used to prevent subscription data delivery while we are + // waiting for the min reporting interval to elapse. If we have to send a + // report immediately due to an urgent event being queued, + // UnblockUrgentEventDelivery can be used to force mHoldReport to false. bool mHoldReport = false; bool mDirty = false; bool mActiveSubscription = false; @@ -226,8 +230,12 @@ class ReadHandler : public Messaging::ExchangeDelegate NodeId mInitiatorNodeId = kUndefinedNodeId; AttributePathExpandIterator mAttributePathExpandIterator = AttributePathExpandIterator(nullptr); bool mIsFabricFiltered = false; - bool mHoldSync = false; - uint32_t mLastWrittenEventsBytes = 0; + // mHoldSync is used to prevent subscription empty report delivery while we + // are waiting for the max reporting interval to elaps. When mHoldSync + // becomes false, we are allowed to send an empty report to keep the + // subscription alive on the client. + bool mHoldSync = false; + uint32_t mLastWrittenEventsBytes = 0; SubjectDescriptor mSubjectDescriptor; // The detailed encoding state for a single attribute, used by list chunking feature. AttributeValueEncoder::AttributeEncodeState mAttributeEncoderState;