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

Move RendezvousServer and CommissionManager to a single class #9709

Merged
merged 6 commits into from
Sep 16, 2021

Conversation

pan-apple
Copy link
Contributor

Problem

Change overview

Consolidate code for the two classes, RendezvousServer and CommissionManager, in a single class CommissioningWindowManager.

Testing

Run cluster tests app with chip-tool to test different commissioning modes.
Test using m5stack and chip-tool to ensure that commissioning over BLE is working.

@woody-apple
Copy link
Contributor

src/app/server/CommissioningWindowManager.cpp Outdated Show resolved Hide resolved
src/app/server/CommissioningWindowManager.cpp Outdated Show resolved Hide resolved
src/app/server/CommissioningWindowManager.cpp Outdated Show resolved Hide resolved
src/app/server/CommissioningWindowManager.cpp Show resolved Hide resolved
src/app/server/CommissioningWindowManager.cpp Show resolved Hide resolved
@todo
Copy link

todo bot commented Sep 15, 2021

Verify that the device supports BLE if the advertisementMode is kBLE

// TODO: Verify that the device supports BLE if the advertisementMode is kBLE
// If not, then return an error.
#if CONFIG_NETWORK_LAYER_BLE
SetBLE(advertisementMode == chip::CommissioningWindowAdvertisement::kBle);
#else
SetBLE(false);
#endif // CONFIG_NETWORK_LAYER_BLE
if (resetFabrics == ResetFabrics::kYes)
{
mServer->GetFabricTable().DeleteAllFabrics();


This comment was generated by todo based on a TODO comment in 608f728 in #9709. cc @pan-apple.

@todo
Copy link

todo bot commented Sep 15, 2021

Don't use BLE for commissioning additional fabrics on a device

// TODO: Don't use BLE for commissioning additional fabrics on a device
SetBLE(true);
#else
SetBLE(false);
#endif
uint16_t keyID = 0;
CHIP_ERROR err = CHIP_NO_ERROR;
SuccessOrExit(err = SetTemporaryDiscriminator(discriminator));
SuccessOrExit(err = PrepareCommissioningWindow(commissioningTimeoutSeconds, keyID));


This comment was generated by todo based on a TODO comment in 608f728 in #9709. cc @pan-apple.

@todo
Copy link

todo bot commented Sep 15, 2021

Don't use BLE for commissioning additional fabrics on a device

// TODO: Don't use BLE for commissioning additional fabrics on a device
SetBLE(true);
#else
SetBLE(false);
#endif
uint16_t keyID = 0;
CHIP_ERROR err = CHIP_NO_ERROR;
SuccessOrExit(err = SetTemporaryDiscriminator(discriminator));
SuccessOrExit(err = PrepareCommissioningWindow(commissioningTimeoutSeconds, keyID));


This comment was generated by todo based on a TODO comment in ef59edb in #9709. cc @pan-apple.

@pan-apple
Copy link
Contributor Author

rebased

Copy link
Contributor

@msandstedt msandstedt left a comment

Choose a reason for hiding this comment

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

I had a couple comments inline, but in general this seems like some nice cleanup.

@todo
Copy link

todo bot commented Sep 15, 2021

Don't use BLE for commissioning additional fabrics on a device

// TODO: Don't use BLE for commissioning additional fabrics on a device
SetBLE(true);
#else
SetBLE(false);
#endif
uint16_t keyID = 0;
CHIP_ERROR err = CHIP_NO_ERROR;
SuccessOrExit(err = SetTemporaryDiscriminator(discriminator));
SuccessOrExit(err = PrepareCommissioningWindow(commissioningTimeoutSeconds, keyID));


This comment was generated by todo based on a TODO comment in 4c1cae2 in #9709. cc @pan-apple.

@todo
Copy link

todo bot commented Sep 15, 2021

Don't use BLE for commissioning additional fabrics on a device

// TODO: Don't use BLE for commissioning additional fabrics on a device
SetBLE(true);
#else
SetBLE(false);
#endif
uint16_t keyID = 0;
CHIP_ERROR err = CHIP_NO_ERROR;
SuccessOrExit(err = SetTemporaryDiscriminator(discriminator));
SuccessOrExit(err = PrepareCommissioningWindow(commissioningTimeoutSeconds, keyID));


This comment was generated by todo based on a TODO comment in 3bf486e in #9709. cc @pan-apple.

@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from 4763c91

File Section File VM
chip-qpg6100-lighting-example.out .heap 0 24
chip-qpg6100-lighting-example.out .bss 0 -24
chip-qpg6100-lighting-example.out .text -532 -532
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
[Unmapped],0,532
.heap,24,0
.bss,-24,0
.debug_aranges,0,-56
.debug_frame,0,-124
.symtab,0,-272
.strtab,0,-300
.text,-532,-532
.debug_ranges,0,-768
.debug_loc,0,-2039
.debug_abbrev,0,-4083
.debug_str,0,-4331
.debug_line,0,-6621
.debug_info,0,-54390


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 4763c91

File Section File VM
chip-lock.elf rodata 0 -4
chip-lock.elf bss 0 -32
chip-lock.elf text -528 -528
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

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

sections,vmsize,filesize
rodata,-4,0
bss,-32,0
.debug_aranges,0,-56
.debug_frame,0,-124
.symtab,0,-272
.strtab,0,-300
text,-528,-528
.debug_ranges,0,-824
.debug_loc,0,-2043
.debug_abbrev,0,-4154
.debug_str,0,-4349
.debug_line,0,-6338
.debug_info,0,-55392


@todo
Copy link

todo bot commented Sep 15, 2021

Don't use BLE for commissioning additional fabrics on a device

// TODO: Don't use BLE for commissioning additional fabrics on a device
SetBLE(true);
#else
SetBLE(false);
#endif
uint16_t keyID = 0;
CHIP_ERROR err = CHIP_NO_ERROR;
SuccessOrExit(err = SetTemporaryDiscriminator(discriminator));
SuccessOrExit(err = PrepareCommissioningWindow(commissioningTimeoutSeconds, keyID));


This comment was generated by todo based on a TODO comment in d1cd02a in #9709. cc @pan-apple.

@github-actions
Copy link

Size increase report for "esp32-example-build" from 4763c91

File Section File VM
chip-all-clusters-app.elf .flash.rodata 8 8
chip-all-clusters-app.elf .dram0.heap_start 0 -8
chip-all-clusters-app.elf .dram0.bss 0 -24
chip-all-clusters-app.elf .flash.text -524 -524
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
.flash.rodata,8,8
.riscv.attributes,0,-1
.dram0.heap_start,-8,0
.dram0.bss,-24,0
.debug_aranges,0,-56
.debug_frame,0,-124
.symtab,0,-128
.strtab,0,-248
.flash.text,-524,-524
.debug_ranges,0,-648
.debug_loc,0,-898
[Unmapped],0,-3580
.debug_str,0,-4365
.debug_abbrev,0,-5967
.debug_line,0,-8738
.debug_info,0,-164359


@bzbarsky-apple bzbarsky-apple merged commit 2815a10 into project-chip:master Sep 16, 2021
@pan-apple pan-apple deleted the issue9701 branch September 16, 2021 11:54
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.

RendezvousServer and CommissionManager have circular dependency
5 participants