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 an adapter iterator class to bluez #4838

Merged
merged 8 commits into from
Feb 12, 2021

Conversation

andy31415
Copy link
Contributor

Problem

Python code needs the ability to list available bluez interfaces from code (and likely this would also be very useful within native application code).

Summary of Changes

Adds an 'AdapterIterator' class that is a ble to list available bluez interfaces.

src/platform/Linux/CHIPBluezHelper.cpp Outdated Show resolved Hide resolved
src/platform/Linux/CHIPBluezHelper.h Outdated Show resolved Hide resolved
src/platform/Linux/CHIPBluezHelper.cpp Outdated Show resolved Hide resolved
src/platform/Linux/CHIPBluezHelper.h Show resolved Hide resolved
src/platform/Linux/CHIPBluezHelper.h Outdated Show resolved Hide resolved
@boring-cyborg boring-cyborg bot added the lib label Feb 12, 2021
src/platform/Linux/CHIPBluezHelper.h Outdated Show resolved Hide resolved
src/platform/Linux/CHIPBluezHelper.h Outdated Show resolved Hide resolved
src/platform/Linux/CHIPBluezHelper.h Outdated Show resolved Hide resolved
struct
{
uint32_t index;
char address[kMaxAddressLength];
Copy link
Contributor

Choose a reason for hiding this comment

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

std::string?

I'd posit that we're wasting our time when we try to apply the same constraints we have on tightly constrained code to the Linux port.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. I have a hard time figuring out when I should/should not use constrained stuff so I default to uglier code.

I would prefer to leave as is for this PR because less changes and CI takes a long time. Will take it into account if I touch this later.

@andy31415 andy31415 force-pushed the 01_list_bluez_interfaces branch from befba4d to 02aeafe Compare February 12, 2021 20:19
@andy31415 andy31415 merged commit db4799d into project-chip:master Feb 12, 2021
@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from ca099a2

File Section File VM
chip-lock.elf text 16 16
chip-lock.elf rodata 8 8
chip-shell.elf rodata 8 8
chip-shell.elf text -4 -4
chip-shell.elf log_const_sections -12 -12
chip-lighting.elf text 16 16
chip-lighting.elf rodata 8 8
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize
.debug_line,0,3796
.symtab,0,16
text,16,16
.strtab,0,13
rodata,8,8
.shstrtab,0,-1
.debug_aranges,0,-8
.debug_frame,0,-24
.debug_ranges,0,-72
.debug_str,0,-137
.debug_loc,0,-215
.debug_abbrev,0,-3080
.debug_info,0,-16196

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

sections,vmsize,filesize
.debug_line,0,799
.symtab,0,16
.strtab,0,13
rodata,8,8
.shstrtab,0,3
text,-4,-4
.debug_aranges,0,-8
log_const_sections,-12,-12
.debug_frame,0,-24
.debug_ranges,0,-72
.debug_str,0,-88
.debug_loc,0,-272
.debug_abbrev,0,-2259
.debug_info,0,-15788

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

sections,vmsize,filesize
.debug_line,0,3794
.symtab,0,16
text,16,16
.strtab,0,13
rodata,8,8
.shstrtab,0,-1
.debug_aranges,0,-8
.debug_frame,0,-24
.debug_ranges,0,-72
.debug_str,0,-137
.debug_loc,0,-215
.debug_abbrev,0,-3079
.debug_info,0,-16195


@github-actions
Copy link

Size increase report for "esp32-example-build" from ca099a2

File Section File VM
chip-pigweed-app.elf .flash.rodata 4 4
chip-pigweed-app.elf .flash.text -28 -28
chip-all-clusters-app.elf .flash.text -24 -24
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
.strtab,0,16
.flash.rodata,4,4
.xt.prop._ZSt9__find_ifIPKSt4byteN9__gnu_cxx5__ops10_Iter_predIPFbS0_EEEET_S9_S9_T0_St26random_access_iterator_tag,0,1
[Unmapped],0,-4
.debug_aranges,0,-8
.debug_ranges,0,-8
.debug_frame,0,-24
.flash.text,-28,-28
.debug_loc,0,-97
.debug_line,0,-2087
.debug_abbrev,0,-2161
.debug_str,0,-5590
.debug_info,0,-31242

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

sections,vmsize,filesize
.debug_line,0,10759
.strtab,0,16
.xt.prop._ZTVN4chip11DeviceLayer37DeviceNetworkProvisioningDelegateImplE,0,-2
.debug_aranges,0,-8
.debug_ranges,0,-8
.debug_frame,0,-24
.flash.text,-24,-24
.debug_loc,0,-37
.debug_str,0,-121
.debug_abbrev,0,-3902
.debug_info,0,-33061


@andy31415 andy31415 deleted the 01_list_bluez_interfaces branch October 28, 2021 14:02
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.

5 participants