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

Set exchange delegate for app message send #6027

Merged
merged 1 commit into from
Apr 15, 2021

Conversation

pan-apple
Copy link
Contributor

Problem

The command's response from the device is not being sent.

Summary of Changes

#5938 introduced concept of exchange message dispatch. During rework of the code, the default dispatch object was removed. The app-sender need to set the delegate explicitly to be able to send the message thru default dispatch.

Also, removed a log that got added as part of debugging.

@boring-cyborg boring-cyborg bot added the app label Apr 14, 2021
@todo
Copy link

todo bot commented Apr 14, 2021

This is a placeholder delegate for exchange context created in Device::SendMessage()

// TODO: This is a placeholder delegate for exchange context created in Device::SendMessage()
// Delete this class when Device::SendMessage() is obsoleted.
class DeviceExchangeDelegate : public Messaging::ExchangeDelegate
{
void OnMessageReceived(Messaging::ExchangeContext * ec, const PacketHeader & packetHeader, const PayloadHeader & payloadHeader,
System::PacketBufferHandle payload) override
{}
void OnResponseTimeout(Messaging::ExchangeContext * ec) override {}
};
extern SecureSessionMgr & SessionManager();


This comment was generated by todo based on a TODO comment in 8adbc6b in #6027. cc @pan-apple.

@woody-apple woody-apple added the hotfix urgent fix needed, can bypass review label Apr 15, 2021
@woody-apple
Copy link
Contributor

This is breaking the build, tagging.

@woody-apple woody-apple merged commit 9eaec87 into project-chip:master Apr 15, 2021
@pan-apple pan-apple deleted the device-send-fail branch April 15, 2021 00:09
@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 362c5f2

File Section File VM
chip-lighting.elf text 20 20
chip-lighting.elf device_handles 12 12
chip-lighting.elf rodata -8 -8
chip-lock.elf text 20 20
chip-lock.elf device_handles 12 12
chip-lock.elf rodata -8 -12
chip-shell.elf device_handles 8 8
chip-shell.elf text -24 -24
chip-shell.elf rodata -40 -40
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,2631
.debug_str,0,532
.debug_loc,0,516
.debug_line,0,402
.strtab,0,389
.debug_abbrev,0,271
.debug_ranges,0,224
.symtab,0,144
.debug_frame,0,104
.debug_aranges,0,48
text,20,20
device_handles,12,12
.shstrtab,0,-1
rodata,-8,-8

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

sections,vmsize,filesize
.debug_info,0,2631
.debug_str,0,532
.debug_loc,0,516
.debug_line,0,402
.strtab,0,389
.debug_abbrev,0,271
.debug_ranges,0,224
.symtab,0,144
.debug_frame,0,104
.debug_aranges,0,48
text,20,20
device_handles,12,12
.shstrtab,0,-1
rodata,-12,-8

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

sections,vmsize,filesize
device_handles,8,8
.debug_line,0,-2
text,-24,-24
.symtab,0,-32
rodata,-40,-40
.debug_info,0,-54


@github-actions
Copy link

Size increase report for "esp32-example-build" from 362c5f2

File Section File VM
chip-all-clusters-app.elf .flash.text 40 40
chip-all-clusters-app.elf .flash.rodata -8 -8
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

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

sections,vmsize,filesize
.debug_info,0,2612
.debug_line,0,683
.debug_str,0,532
.shstrtab,0,487
.debug_loc,0,459
.strtab,0,389
.debug_abbrev,0,257
.symtab,0,208
.xt.prop._ZN4chip22DeviceExchangeDelegate17OnMessageReceivedEPNS_9Messaging15ExchangeContextERKNS_12PacketHeaderERKNS_13PayloadHeaderENS_6System18PacketBufferHandleE,0,156
.debug_frame,0,144
.debug_ranges,0,120
.xt.prop._ZN4chip22DeviceExchangeDelegate17OnResponseTimeoutEPNS_9Messaging15ExchangeContextE,0,76
.xt.prop._ZN4chip22DeviceExchangeDelegateD0Ev,0,76
.xt.prop._ZN4chip22DeviceExchangeDelegateD2Ev,0,76
.xt.prop._ZTVN4chip22DeviceExchangeDelegateE,0,52
.debug_aranges,0,48
.flash.text,40,40
[Unmapped],0,8
.xt.prop._ZTVN4chip9Transport3BLEE,0,1
.flash.rodata,-8,-8


yunhanw-google added a commit to yunhanw-google/connectedhomeip that referenced this pull request Apr 15, 2021
yunhanw-google added a commit to yunhanw-google/connectedhomeip that referenced this pull request Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app hotfix urgent fix needed, can bypass review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants