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 ZCL reporting plugin to be compiled in various examples #3608

Conversation

vivien-apple
Copy link
Contributor

Problem

In order to makes it easier to move forward on #3464, I'm trying to extract the parts that are not fully dependent on ZAP.
It should makes it easier to understand the scope of various changes from #3464

This PR is the part of #3464 that includes the reporting plugin inside various examples beside wifi-echo
This is the reason why some of the reporting plugin callbacks have been made extern "C"

Summary of Changes

  • Add reporting.c and reporting-default-configuration.cpp to the lock-app and lighting-app examples
  • Remove the reporting callback stubs from all the examples
  • Move the declaration and definition of the stubs directly inside the reporting plugin

@vivien-apple vivien-apple force-pushed the Cluster_CompileReportingExamples branch from 5ed3cbc to d02dacc Compare November 5, 2020 15:37
@github-actions
Copy link

github-actions bot commented Nov 5, 2020

Size increase report for "nrfconnect-example-build" from 99aaed7

File Section File VM
chip-lighting.elf text 1716 1716
chip-lighting.elf rodata 424 424
chip-lighting.elf bss 0 87
chip-lighting.elf datas 4 4
chip-lighting.elf devices -4 -4
chip-lighting.elf shell_root_cmds_sections -4 -4
chip-lighting.elf [LOAD #3 [RW]] 0 -23
chip-lock.elf text 1716 1716
chip-lock.elf rodata 424 420
chip-lock.elf bss 0 91
chip-lock.elf datas 4 4
chip-lock.elf devices -4 -4
chip-lock.elf shell_root_cmds_sections -4 -4
chip-lock.elf [LOAD #3 [RW]] 0 -27
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize
.debug_info,0,30070
.debug_line,0,7178
.debug_abbrev,0,3864
.debug_loc,0,2680
.debug_str,0,2268
text,1716,1716
.symtab,0,816
.strtab,0,722
.debug_ranges,0,600
.debug_frame,0,468
rodata,424,424
.debug_aranges,0,200
bss,87,0
datas,4,4
.shstrtab,0,2
devices,-4,-4
shell_root_cmds_sections,-4,-4
[LOAD #3 [RW]],-23,0

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

sections,vmsize,filesize
.debug_info,0,30070
.debug_line,0,7162
.debug_abbrev,0,3864
.debug_loc,0,2672
.debug_str,0,2268
text,1716,1716
.symtab,0,816
.strtab,0,722
.debug_ranges,0,600
.debug_frame,0,468
rodata,420,424
.debug_aranges,0,200
bss,91,0
datas,4,4
.shstrtab,0,-2
devices,-4,-4
shell_root_cmds_sections,-4,-4
[LOAD #3 [RW]],-27,0

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

sections,vmsize,filesize


@bzbarsky-apple bzbarsky-apple merged commit 52466a9 into project-chip:master Nov 5, 2020
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Jan 20, 2021
 #### Problem

In project-chip#3608 I have moved a bunch of callbacks from `callback-stub.c` to `src/app/reporting/reporting.cpp`. But I also moved the `*ReportingResponseCallback` while those still needs to be generated.
This PR moves them back to the `gen/` folders.
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Jan 27, 2021
 #### Problem

In project-chip#3608 I have moved a bunch of callbacks from `callback-stub.c` to `src/app/reporting/reporting.cpp`. But I also moved the `*ReportingResponseCallback` while those still needs to be generated.
This PR moves them back to the `gen/` folders.
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Feb 1, 2021
 #### Problem

In project-chip#3608 I have moved a bunch of callbacks from `callback-stub.c` to `src/app/reporting/reporting.cpp`. But I also moved the `*ReportingResponseCallback` while those still needs to be generated.
This PR moves them back to the `gen/` folders.
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Feb 2, 2021
…in InitDataModelHandler

 #### Problem

In project-chip#3608, many reporting specific callbacks has been moved from `gen/callback-stub.cpp` to `src/app/reporting/`. The PR has been a bit overzealous since all the `*ReportingResponseCallback` declarations and definitions has been moved while those still needs to be part of the `gen/` content if one wants to override them.
Also, the server specific stack status callbacks are called for both the client and the server, while those only needs to be called by the reporter.

 #### Summary of changes
  * Move back `*ReportingResponseCallback` to the `gen/` folder
  * Update the `#ifdef` in `src/app/server/DataModelHandler.cpp` to only call the stack status callbacks for the server side
  * Update `HandleDataModelMessage` signature by only passing a `NodeId` for the first argument and remove the last one which is unused.
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Feb 2, 2021
 #### Problem

In project-chip#3608, many reporting specific callbacks has been moved from `gen/callback-stub.cpp` to `src/app/reporting/`. The PR has been a bit overzealous since all the `*ReportingResponseCallback` declarations and definitions has been moved while those still needs to be part of the `gen/` content if one wants to override them.
Also, the server specific stack status callbacks are called for both the client and the server, while those only needs to be called by the reporter.

Those issues prevents to write a client application that consumes a `.zap` configuration file.

 #### Summary of changes
  * Move back `*ReportingResponseCallback` to the `gen/` folder
  * Update the `#ifdef` in `src/app/server/DataModelHandler.cpp` to only call the stack status callbacks for the server side
  * Update `HandleDataModelMessage` signature by only passing a `NodeId` for the first argument and remove the last one which is unused.
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Feb 2, 2021
 #### Problem

In project-chip#3608 I have moved a bunch of callbacks from `callback-stub.c` to `src/app/reporting/reporting.cpp`. But I also moved the `*ReportingResponseCallback` while those still needs to be generated.
This PR moves them back to the `gen/` folders.
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Feb 3, 2021
 #### Problem

In project-chip#3608 I have moved a bunch of callbacks from `callback-stub.c` to `src/app/reporting/reporting.cpp`. But I also moved the `*ReportingResponseCallback` while those still needs to be generated.
This PR moves them back to the `gen/` folders.
woody-apple pushed a commit that referenced this pull request Feb 3, 2021
…ion (#4604)

#### Problem

In #3608, many reporting specific callbacks has been moved from `gen/callback-stub.cpp` to `src/app/reporting/`. The PR has been a bit overzealous since all the `*ReportingResponseCallback` declarations and definitions has been moved while those still needs to be part of the `gen/` content if one wants to override them.
Also, the server specific stack status callbacks are called for both the client and the server, while those only needs to be called by the reporter.

Those issues prevents to write a client application that consumes a `.zap` configuration file.

 #### Summary of changes
  * Move back `*ReportingResponseCallback` to the `gen/` folder
  * Update the `#ifdef` in `src/app/server/DataModelHandler.cpp` to only call the stack status callbacks for the server side
  * Update `HandleDataModelMessage` signature by only passing a `NodeId` for the first argument and remove the last one which is unused.
kpschoedel pushed a commit to kpschoedel/connectedhomeip that referenced this pull request Feb 3, 2021
…ion (project-chip#4604)

#### Problem

In project-chip#3608, many reporting specific callbacks has been moved from `gen/callback-stub.cpp` to `src/app/reporting/`. The PR has been a bit overzealous since all the `*ReportingResponseCallback` declarations and definitions has been moved while those still needs to be part of the `gen/` content if one wants to override them.
Also, the server specific stack status callbacks are called for both the client and the server, while those only needs to be called by the reporter.

Those issues prevents to write a client application that consumes a `.zap` configuration file.

 #### Summary of changes
  * Move back `*ReportingResponseCallback` to the `gen/` folder
  * Update the `#ifdef` in `src/app/server/DataModelHandler.cpp` to only call the stack status callbacks for the server side
  * Update `HandleDataModelMessage` signature by only passing a `NodeId` for the first argument and remove the last one which is unused.
austinh0 pushed a commit to austinh0/connectedhomeip that referenced this pull request Feb 3, 2021
…ion (project-chip#4604)

#### Problem

In project-chip#3608, many reporting specific callbacks has been moved from `gen/callback-stub.cpp` to `src/app/reporting/`. The PR has been a bit overzealous since all the `*ReportingResponseCallback` declarations and definitions has been moved while those still needs to be part of the `gen/` content if one wants to override them.
Also, the server specific stack status callbacks are called for both the client and the server, while those only needs to be called by the reporter.

Those issues prevents to write a client application that consumes a `.zap` configuration file.

 #### Summary of changes
  * Move back `*ReportingResponseCallback` to the `gen/` folder
  * Update the `#ifdef` in `src/app/server/DataModelHandler.cpp` to only call the stack status callbacks for the server side
  * Update `HandleDataModelMessage` signature by only passing a `NodeId` for the first argument and remove the last one which is unused.
austinh0 pushed a commit to austinh0/connectedhomeip that referenced this pull request Feb 3, 2021
…ion (project-chip#4604)

#### Problem

In project-chip#3608, many reporting specific callbacks has been moved from `gen/callback-stub.cpp` to `src/app/reporting/`. The PR has been a bit overzealous since all the `*ReportingResponseCallback` declarations and definitions has been moved while those still needs to be part of the `gen/` content if one wants to override them.
Also, the server specific stack status callbacks are called for both the client and the server, while those only needs to be called by the reporter.

Those issues prevents to write a client application that consumes a `.zap` configuration file.

 #### Summary of changes
  * Move back `*ReportingResponseCallback` to the `gen/` folder
  * Update the `#ifdef` in `src/app/server/DataModelHandler.cpp` to only call the stack status callbacks for the server side
  * Update `HandleDataModelMessage` signature by only passing a `NodeId` for the first argument and remove the last one which is unused.
austinh0 pushed a commit to austinh0/connectedhomeip that referenced this pull request Feb 4, 2021
…ion (project-chip#4604)

#### Problem

In project-chip#3608, many reporting specific callbacks has been moved from `gen/callback-stub.cpp` to `src/app/reporting/`. The PR has been a bit overzealous since all the `*ReportingResponseCallback` declarations and definitions has been moved while those still needs to be part of the `gen/` content if one wants to override them.
Also, the server specific stack status callbacks are called for both the client and the server, while those only needs to be called by the reporter.

Those issues prevents to write a client application that consumes a `.zap` configuration file.

 #### Summary of changes
  * Move back `*ReportingResponseCallback` to the `gen/` folder
  * Update the `#ifdef` in `src/app/server/DataModelHandler.cpp` to only call the stack status callbacks for the server side
  * Update `HandleDataModelMessage` signature by only passing a `NodeId` for the first argument and remove the last one which is unused.
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.

6 participants