diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index bbc1c68a4b87b8..f89c8bee528fa9 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -617,6 +617,7 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload, // a subscription and have a valid value for mMaxInterval which the function // relies on. // + mpCallback.RefreshLiveness(*this); err = RefreshLivenessCheckTimer(); } } diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 3d66f5deab02cb..ebe4de89988f7e 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -83,6 +83,15 @@ class ReadClient : public Messaging::ExchangeDelegate virtual ~Callback() = default; + /** + * Used to notify a (maybe empty) report data is received from peer and the subscription and the peer is alive. + * + * This object MUST continue to exist after this call is completed. The application shall wait until it + * receives an OnDone call to destroy the object. + * + */ + virtual void RefreshLiveness(const ReadClient & apReadClient) {} + /** * Used to signal the commencement of processing of the first attribute or event report received in a given exchange. *