Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[icd] create callback to indicate an alive subscription #31319

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/ReadClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
lpbeliveau-silabs marked this conversation as resolved.
Show resolved Hide resolved
err = RefreshLivenessCheckTimer();
}
}
Expand Down
9 changes: 9 additions & 0 deletions src/app/ReadClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
yunhanw-google marked this conversation as resolved.
Show resolved Hide resolved

/**
* Used to signal the commencement of processing of the first attribute or event report received in a given exchange.
*
Expand Down
Loading