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

Add idea for handling Q quality #34522

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

Conversation

rbultman
Copy link
Contributor

No description provided.

Comment on lines 77 to 78
CHIP_IM_STATUS_CODE(SuppressReport , SUPPRESS_REPORT , 0xcd)
CHIP_IM_STATUS_CODE(ForceReport , FORCE_REPORT , 0xce)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the list of spec-defined status codes. We can't just randomly add things to it....

In particular, 0xCD and 0xCE are in fact defined in the 1.4 spec and just haven't been added here yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted. Seems like this would be useful to other clusters having Q-quality attributes and not using the AttibuteAccessInterface?

case PercentCurrent::Id: {
res = Status::Success;
// ReportRequiredByWhatever - Something that get's triggered on edges to force reporting
if (ReportRequiredByWhatever) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, but where do we store the state to compute this value? And at that point, it seems like it should also just store the last-reported PercentCurrent value and cluster users should call a cluster API to set the attribute instead of directly poking the attribute store....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that would be the next step. I had similar thoughts about local storage. Wanted to see if the overall approach (enforce in the PreAttributeChangeCallback with support from the IM for the actual reporting or not) seemed sane.

else
{
SomeTimeType currentTime = GetTimeNowSomehow();
if (currentTime - percentCurrentQTracking[ep].lastUpdateTime >= 1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic number, worth defining somewhere

bool moveStarted;
DataModel::Nullable<chip::Percent> startPercent;
DataModel::Nullable<chip::Percent> endPercent;
auto lastUpdateTime;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth explicitly initialising to zero in case we get a current update without a setting update

{
// need a report at the start of a move.
percentCurrentQTracking[ep].moveStarted = false;
percentCurrentQTracking[ep].lastUpdateTime = GetTimeNowSomehow();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to store this stuff out-of-band like this anyway, it's probably a good idea to use src/app/cluster-building-blocks/QuieterReporting.h bits to store a bunch of this state.

Copy link

github-actions bot commented Aug 14, 2024

PR #34522: Size comparison from 4205cc3 to 0231948

Full report (25 builds for bl602, bl702, bl702l, cc13x4_26x4, efr32, nxp, qpg, stm32)
platform target config section 4205cc3 0231948 change % change
bl602 lighting-app bl602 FLASH 1278128 1278128 0 0.0
RAM 95928 95928 0 0.0
bl602+mfd FLASH 1292238 1292238 0 0.0
RAM 96072 96072 0 0.0
bl602+rpc FLASH 1317092 1317092 0 0.0
RAM 104352 104352 0 0.0
bl702 lighting-app bl702 FLASH 943988 943988 0 0.0
RAM 15209 15209 0 0.0
bl702+mfd FLASH 946388 946388 0 0.0
RAM 15353 15353 0 0.0
bl702+rpc FLASH 1039044 1039044 0 0.0
RAM 24221 24221 0 0.0
bl706-eth FLASH 646706 646706 0 0.0
RAM 25305 25305 0 0.0
bl706-wifi FLASH 894312 894312 0 0.0
RAM 14525 14525 0 0.0
bl702l lighting-app bl702l FLASH 960392 960392 0 0.0
RAM 16868 16868 0 0.0
bl702l+mfd FLASH 963270 963270 0 0.0
RAM 17012 17012 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 803140 803140 0 0.0
RAM 117628 117628 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 818984 818984 0 0.0
RAM 125220 125220 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 811324 811324 0 0.0
RAM 119500 119500 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 763496 763496 0 0.0
RAM 113648 113648 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 747996 747996 0 0.0
RAM 113840 113840 0 0.0
efr32 lighting-app BRD4187C FLASH 930312 930304 -8 -0.0
RAM 135144 135144 0 0.0
lock-app BRD4338a FLASH 737468 737460 -8 -0.0
RAM 207864 207864 0 0.0
window-app BRD4187C FLASH 1015444 1015436 -8 -0.0
RAM 127084 127084 0 0.0
nxp contact k32w0+release FLASH 577372 577372 0 0.0
RAM 70468 70468 0 0.0
k32w1+release FLASH 592680 592680 0 0.0
RAM 74456 74456 0 0.0
light k32w0+release FLASH 612816 612816 0 0.0
RAM 69940 69940 0 0.0
k32w1+release FLASH 677640 677640 0 0.0
RAM 83232 83232 0 0.0
qpg lighting-app qpg6105+debug FLASH 655908 655908 0 0.0
RAM 105152 105152 0 0.0
lock-app qpg6105+debug FLASH 613248 613248 0 0.0
RAM 99636 99636 0 0.0
stm32 light STM32WB5MM-DK FLASH 478304 478304 0 0.0
RAM 144764 144764 0 0.0

Copy link

github-actions bot commented Aug 15, 2024

PR #34522: Size comparison from 4205cc3 to 586f291

Full report (75 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, psoc6, qpg, stm32, telink, tizen)
platform target config section 4205cc3 586f291 change % change
bl602 lighting-app bl602 FLASH 1278128 1278128 0 0.0
RAM 95928 95928 0 0.0
bl602+mfd FLASH 1292238 1292238 0 0.0
RAM 96072 96072 0 0.0
bl602+rpc FLASH 1317092 1317092 0 0.0
RAM 104352 104352 0 0.0
bl702 lighting-app bl702 FLASH 943988 943988 0 0.0
RAM 15209 15209 0 0.0
bl702+mfd FLASH 946388 946388 0 0.0
RAM 15353 15353 0 0.0
bl702+rpc FLASH 1039044 1039044 0 0.0
RAM 24221 24221 0 0.0
bl706-eth FLASH 646706 646706 0 0.0
RAM 25305 25305 0 0.0
bl706-wifi FLASH 894312 894312 0 0.0
RAM 14525 14525 0 0.0
bl702l lighting-app bl702l FLASH 960392 960392 0 0.0
RAM 16868 16868 0 0.0
bl702l+mfd FLASH 963270 963270 0 0.0
RAM 17012 17012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 613106 614230 1124 0.2
RAM 205404 205436 32 0.0
lock CC3235SF_LAUNCHXL FLASH 655074 655682 608 0.1
RAM 205620 205620 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 672289 672289 0 0.0
RAM 78348 78348 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 692149 692149 0 0.0
RAM 80980 80980 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 692149 692149 0 0.0
RAM 80980 80980 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 649077 649077 0 0.0
RAM 73416 73416 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 610721 610721 0 0.0
RAM 71340 71340 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 630349 630349 0 0.0
RAM 73892 73892 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 630349 630349 0 0.0
RAM 73892 73892 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 628185 628769 584 0.1
RAM 74356 74356 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 647893 648477 584 0.1
RAM 76908 76908 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 647893 648477 584 0.1
RAM 76908 76908 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 601717 601717 0 0.0
RAM 68388 68388 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 621577 621577 0 0.0
RAM 71020 71020 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 621577 621577 0 0.0
RAM 71020 71020 0 0.0
efr32 lighting-app BRD4187C FLASH 930312 930304 -8 -0.0
RAM 135144 135144 0 0.0
lock-app BRD4338a FLASH 737468 738028 560 0.1
RAM 207864 207864 0 0.0
window-app BRD4187C FLASH 1015444 1015340 -104 -0.0
RAM 127084 127084 0 0.0
esp32 all-clusters-app c3devkit DRAM 94176 94200 24 0.0
FLASH 1533510 1534052 542 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115104 115136 32 0.0
FLASH 1543238 1543758 520 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4624 4624 0 0.0
FLASH 2754557 2759753 5196 0.2
RAM 128408 128544 136 0.1
all-clusters-app debug unknown 5408 5408 0 0.0
FLASH 6036614 6038960 2346 0.0
RAM 509704 509840 136 0.0
all-clusters-minimal-app debug unknown 5304 5304 0 0.0
FLASH 5375666 5378364 2698 0.1
RAM 240072 240208 136 0.1
bridge-app debug unknown 5288 5288 0 0.0
FLASH 4728354 4728354 0 0.0
RAM 216952 216952 0 0.0
chip-tool debug unknown 5832 5832 0 0.0
FLASH 12488030 12488030 0 0.0
RAM 557202 557202 0 0.0
chip-tool-ipv6only arm64 unknown 20312 20312 0 0.0
FLASH 11163548 11163548 0 0.0
RAM 607272 607272 0 0.0
fabric-admin debug unknown 5672 5672 0 0.0
FLASH 11199267 11216423 17156 0.2
RAM 554706 555018 312 0.1
fabric-bridge-app debug unknown 4520 4520 0 0.0
FLASH 4539296 4539296 0 0.0
RAM 203456 203456 0 0.0
lighting-app debug+rpc+ui unknown 5936 5936 0 0.0
FLASH 5662913 5662913 0 0.0
RAM 228008 228008 0 0.0
lock-app debug unknown 5224 5224 0 0.0
FLASH 4783102 4783920 818 0.0
RAM 203736 203736 0 0.0
ota-provider-app debug unknown 4600 4600 0 0.0
FLASH 4423174 4423174 0 0.0
RAM 197720 197720 0 0.0
ota-requestor-app debug unknown 4536 4536 0 0.0
FLASH 4561792 4561792 0 0.0
RAM 202256 202256 0 0.0
shell debug unknown 4176 4176 0 0.0
FLASH 3076093 3078621 2528 0.1
RAM 159200 159336 136 0.1
thermostat-no-ble arm64 unknown 9352 9352 0 0.0
FLASH 4363444 4363444 0 0.0
RAM 242416 242416 0 0.0
tv-app debug unknown 5496 5496 0 0.0
FLASH 6006453 6006453 0 0.0
RAM 582968 582968 0 0.0
tv-casting-app debug unknown 5168 5168 0 0.0
FLASH 10691933 10691933 0 0.0
RAM 644280 644280 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 909012 909488 476 0.1
RAM 142255 142279 24 0.0
nrf7002dk_nrf5340_cpuapp FLASH 880932 881232 300 0.0
RAM 140394 140418 24 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 840848 841324 476 0.1
RAM 141074 141098 24 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1639108 1639684 576 0.0
RAM 210952 210976 24 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1543892 1544468 576 0.0
RAM 207672 207704 32 0.0
light cy8ckit_062s2_43012 FLASH 1463796 1463796 0 0.0
RAM 200776 200776 0 0.0
lock cy8ckit_062s2_43012 FLASH 1462460 1463020 560 0.0
RAM 225112 225112 0 0.0
qpg lighting-app qpg6105+debug FLASH 655908 655908 0 0.0
RAM 105152 105152 0 0.0
lock-app qpg6105+debug FLASH 613248 613784 536 0.1
RAM 99636 99636 0 0.0
stm32 light STM32WB5MM-DK FLASH 478304 478304 0 0.0
RAM 144764 144764 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 620118 620118 0 0.0
RAM 50940 50940 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 680630 681118 488 0.1
RAM 149592 149616 24 0.0
all-clusters-minimal-app tlsr9528a FLASH 773898 774386 488 0.1
RAM 110752 110776 24 0.0
bridge-app tlsr9258a FLASH 678806 678806 0 0.0
RAM 91636 91636 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621714 621714 0 0.0
RAM 50980 50980 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 707596 707596 0 0.0
RAM 74320 74320 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 620640 620640 0 0.0
RAM 145580 145580 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 806726 806726 0 0.0
RAM 99504 99504 0 0.0
lock-app-dfu tlsr9528a FLASH 654586 654686 100 0.0
RAM 67016 67016 0 0.0
ota-requestor-app tlsr9258a FLASH 696822 696822 0 0.0
RAM 91320 91320 0 0.0
pump-app-usb tlsr9518adk80d FLASH 631102 631102 0 0.0
RAM 55760 55760 0 0.0
pump-controller-app tlsr9518adk80d FLASH 608612 608612 0 0.0
RAM 53004 53004 0 0.0
shell tlsr9518adk80d FLASH 466810 466810 0 0.0
RAM 68660 68660 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 628502 628502 0 0.0
RAM 52700 52700 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 652482 652482 0 0.0
RAM 56640 56640 0 0.0
thermostat tlsr9518adk80d FLASH 633666 633666 0 0.0
RAM 53400 53400 0 0.0
window-covering tlsr9118bdk40d FLASH 522646 522646 0 0.0
RAM 98540 98540 0 0.0
tizen all-clusters-app arm unknown 4808 4808 0 0.0
FLASH 1700832 1702512 1680 0.1
RAM 89348 89472 124 0.1
chip-tool-ubsan arm unknown 10236 10236 0 0.0
FLASH 17306958 17306958 0 0.0
RAM 7560464 7560464 0 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants