-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Adding MRP analytics delegate #37439
base: master
Are you sure you want to change the base?
Conversation
This is a starting point for MRP events to be sent to some sort of delegate interested. The design is intentionally done in this way to reduce code size within the SDK and is meant for applications such as a controller to registers a delegate for MRP events allowing for it to construct analytics.
kRetransmission, | ||
kAcknowledged, | ||
kFailed, | ||
kUndefined, /* Should be last element in enum */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be the first element 🤷
@@ -511,6 +546,22 @@ void ReliableMessageMgr::CalculateNextRetransTime(RetransTableEntry & entry) | |||
peerIsActive = sessionHandle->AsUnauthenticatedSession()->IsPeerActive(); | |||
} | |||
|
|||
// For initial send the packet has already been submitted to transport layer successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do people feel about the location of this and how re-transmission has technically not taken place yet
PR #37439: Size comparison from a38f2aa to 1942b8c Full report (3 builds for cc32xx, stm32)
|
PR #37439: Size comparison from a38f2aa to 2c393c9 Full report (64 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, psoc6, qpg, stm32, telink, tizen)
|
// reason, so saying we have sent re-transmit here is a little presumptuous. | ||
if (mAnalyticsDelegate) | ||
{ | ||
ReliableMessageAnalyticsDelegate::TransmitEvent event = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO needs to move outside of CHIP_PROGRESS_LOGGING
@@ -155,6 +155,17 @@ void ReliableMessageMgr::ExecuteActions() | |||
Transport::GetSessionTypeString(session), fabricIndex, ChipLogValueX64(destination), | |||
CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS); | |||
|
|||
if (mAnalyticsDelegate) | |||
{ | |||
ReliableMessageAnalyticsDelegate::TransmitEvent event = { .nodeId = destination, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO needs to move outside of CHIP_PROGRESS_LOGGING
This is a starting point for MRP events to be sent to some sort of delegate for analytic purposes.
The design is intentionally done in this way to reduce code size within the SDK and is meant for applications such as a controller to registers a delegate so code size create but adding this in is completely up to the application to make
Testing
./scripts/build/build_examples.py --target linux-x64-tests build