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

Read General Diagnostics attributes from platform #9930

Merged
merged 4 commits into from
Sep 26, 2021
Merged

Read General Diagnostics attributes from platform #9930

merged 4 commits into from
Sep 26, 2021

Conversation

yufengwangca
Copy link
Contributor

@yufengwangca yufengwangca commented Sep 23, 2021

Problem

What is being fixed? Examples:

  • Currently, the General Diagnostic attributes are fully managed by the attribute store, we can only specify the default values in its xml definitions. We need to populate those attributes with the actual value from platform in run-time.

Change overview

Read General Diagnostics attributes from platform

To help your review, I split the auto-gen code to separate commits.

Testing

How was this tested? (at least one bullet point required)

  • chip-device-ctrl > zclread GeneralDiagnostics RebootCount 12344321 0 0
[1632421194.134329][539639:539647] CHIP:IN: Prepared plaintext message 0x2886d88 to 0x0000000000000000 of type 0x30 and protocolId (0, 0) on exchange 28835i with MessageCounter:3593217848.
[1632421194.134361][539639:539647] CHIP:IN: Sending plaintext msg 0x2886d88 with MessageCounter:3593217848 to 0x0000000000000000 at monotonic time: 642136639 msec
[1632421194.134481][539639:539647] CHIP:IN: Prepared encrypted message 0x2886da0 to 0x0000000000BC5C01 of type 0x2 and protocolId (0, 1) on exchange 28836i with MessageCounter:2.
[1632421194.134490][539639:539647] CHIP:IN: Sending encrypted msg 0x2886da0 with MessageCounter:2 to 0x0000000000BC5C01 at monotonic time: 642136639 msec
[1632421194.152707][539639:539647] CHIP:EM: Received message of type 0x31 with protocolId (0, 0) and MessageCounter:3475020009 on exchange 28835i
[1632421194.153888][539639:539647] CHIP:IN: Prepared plaintext message 0x2886d88 to 0x0000000000000000 of type 0x32 and protocolId (0, 0) on exchange 28835i with MessageCounter:3593217849.
[1632421194.153961][539639:539647] CHIP:IN: Sending plaintext msg 0x2886d88 with MessageCounter:3593217849 to 0x0000000000000000 at monotonic time: 642136659 msec
[1632421194.154375][539639:539647] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:2 on exchange 28836i
[1632421194.155028][539639:539647] CHIP:ZCL: ReadAttributesResponse:
[1632421194.155037][539639:539647] CHIP:ZCL:   ClusterId: 0x0000_0033
[1632421194.155045][539639:539647] CHIP:ZCL:   attributeId: 0x0000_0001
[1632421194.155049][539639:539647] CHIP:ZCL:   status: Success                (0x0000)
[1632421194.155077][539639:539647] CHIP:ZCL:   attribute TLV Type: 0x04
[1632421194.155094][539639:539647] CHIP:ZCL:   attributeValue: 1

src/platform/Linux/ConfigurationManagerImpl.cpp Outdated Show resolved Hide resolved
src/platform/Linux/PlatformManagerImpl.cpp Outdated Show resolved Hide resolved
src/platform/Linux/PlatformManagerImpl.cpp Outdated Show resolved Hide resolved
src/platform/Linux/PlatformManagerImpl.cpp Outdated Show resolved Hide resolved
src/platform/Linux/PlatformManagerImpl.cpp Outdated Show resolved Hide resolved
src/platform/Linux/PlatformManagerImpl.cpp Outdated Show resolved Hide resolved
@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from 45715cc

File Section File VM
chip-qpg6100-lighting-example.out .text 436 436
chip-qpg6100-lighting-example.out .bss 0 32
chip-qpg6100-lighting-example.out .data 4 4
chip-qpg6100-lighting-example.out .heap 0 -40
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_info,0,61959
.debug_line,0,6052
.debug_abbrev,0,4106
.debug_loc,0,2828
.strtab,0,1197
.debug_str,0,1139
.symtab,0,672
.debug_ranges,0,568
.text,436,436
.debug_frame,0,256
.debug_aranges,0,128
.bss,32,0
[ELF Program Headers],0,32
.data,4,4
.shstrtab,0,-1
.heap,-40,0
[Unmapped],0,-468


@github-actions
Copy link

Size increase report for "esp32-example-build" from 45715cc

File Section File VM
chip-all-clusters-app.elf .flash.text 376 376
chip-all-clusters-app.elf .flash.rodata 88 88
chip-all-clusters-app.elf .dram0.bss 0 24
chip-all-clusters-app.elf .dram0.heap_start 0 8
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,182233
.debug_line,0,7176
.debug_abbrev,0,5781
.debug_loc,0,2058
.debug_str,0,1181
.strtab,0,961
.debug_ranges,0,480
.flash.text,376,376
.debug_frame,0,260
.symtab,0,240
.debug_aranges,0,128
.flash.rodata,88,88
.dram0.bss,24,0
.dram0.data,0,8
.dram0.heap_start,8,0
.shstrtab,0,3
.riscv.attributes,0,-1
[Unmapped],0,-472


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 45715cc

File Section File VM
chip-lock.elf text 348 348
chip-lock.elf rodata 88 84
chip-lock.elf bss 0 32
chip-lock.elf init_array 4 4
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,2134
.debug_str,0,738
.debug_loc,0,286
.debug_line,0,146
.debug_frame,0,64
.debug_aranges,0,32
.debug_ranges,0,32

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,65256
.debug_line,0,5837
.debug_abbrev,0,4303
.debug_loc,0,2821
.strtab,0,1197
.debug_str,0,1111
.symtab,0,672
.debug_ranges,0,568
text,348,348
.debug_frame,0,256
.debug_aranges,0,128
rodata,84,88
bss,32,0
init_array,4,4
.shstrtab,0,3


@yufengwangca yufengwangca merged commit 4bafdcf into project-chip:master Sep 26, 2021
@yufengwangca yufengwangca deleted the pr/cluster/general branch September 29, 2021 23:38
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