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

✨ (ble): Add Service Device Information #529

Merged
merged 2 commits into from
Mar 11, 2022

Conversation

YannLocatelli
Copy link
Member

No description provided.

@YannLocatelli YannLocatelli self-assigned this Mar 5, 2022
@codecov
Copy link

codecov bot commented Mar 5, 2022

Codecov Report

Merging #529 (fe0fbd6) into develop (ba76e76) will not change coverage.
The diff coverage is 100.00%.

❗ Current head fe0fbd6 differs from pull request most recent head 57d2cb9. Consider uploading reports for the commit 57d2cb9 to get more accurate results

@@            Coverage Diff            @@
##           develop      #529   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       103    +1     
  Lines         1602      1588   -14     
=========================================
- Hits          1602      1588   -14     
Impacted Files Coverage Δ
libs/BLEKit/include/BLEServiceDeviceInformation.h 100.00% <100.00%> (ø)
libs/FileSystemKit/source/File.cpp 100.00% <0.00%> (ø)
libs/FileSystemKit/include/FileSystemKit.h 100.00% <0.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@github-actions
Copy link

github-actions bot commented Mar 5, 2022

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 138964 (53%) 123180 (46%) 29360 (5%)
os 174340 (11%) 1390332 (88%) 23512 (4%)
Click to show memory sections
| -          |      Hex |     Bytes |  KiB |
|------------|---------:|----------:|-----:|
| Flash      | 0x200000 | 2 097 152 | 2048 |
| SRAM       |  0x80000 |   524 288 |  512 |
| Bootloader |  0x40000 |   262 144 |  256 |
| Header     |   0x1000 |     4 096 |    4 |
| OS         | 0x17E000 | 1 564 672 | 1528 |
| Tail       |   0x1000 |     4 096 |    4 |
| Scratch    |  0x40000 |   262 144 |  256 |

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 174340 (8%) ø 23512 (4%) ø
bootloader ✔️ 138964 (6%) ø 29360 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 250624 (11%) ø 29240 (5%) ø
certs_emc_ble_led_motors ✔️ 174568 (8%) ø 24952 (4%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 148840 (7%) ø 22528 (4%) ø
certs_emc_lcd_led_motors ✔️ 91928 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 177960 (8%) ø 24360 (4%) ø
spike_lk_ble ✔️ 173380 (8%)
173940 (8%)
📈
560 (0%)
23504 (4%)
23904 (4%)
📈
400 (1%)
spike_lk_bluetooth ✔️ 73256 (3%) ø 11448 (2%) ø
spike_lk_cg_animations ✔️ 141112 (6%) ø 24464 (4%) ø
spike_lk_color_kit ✔️ 65584 (3%) ø 13624 (2%) ø
spike_lk_coreled ✔️ 76164 (3%) ø 13688 (2%) ø
spike_lk_event_queue ✔️ 74736 (3%) ø 12072 (2%) ø
spike_lk_file_reception ✔️ 326904 (15%) ø 27576 (5%) ø
spike_lk_filesystem_kit ✔️ 103476 (4%) ø 14048 (2%) ø
spike_lk_flash_memory ✔️ 63880 (3%) ø 11448 (2%) ø
spike_lk_lcd ✔️ 136976 (6%) ø 24024 (4%) ø
spike_lk_led ✔️ 65744 (3%) ø 13392 (2%) ø
spike_lk_led_kit ✔️ 100428 (4%) ø 14640 (2%) ø
spike_lk_log_kit ✔️ 68528 (3%) ø 11912 (2%) ø
spike_lk_motors ✔️ 62528 (2%) ø 11488 (2%) ø
spike_lk_rfid ✔️ 73072 (3%) ø 11448 (2%) ø
spike_lk_sensors_battery ✔️ 78196 (3%) ø 12568 (2%) ø
spike_lk_sensors_light ✔️ 60056 (2%) ø 11440 (2%) ø
spike_lk_sensors_microphone ✔️ 72496 (3%) ø 11504 (2%) ø
spike_lk_sensors_temperature_humidity ✔️ 66968 (3%) ø 11424 (2%) ø
spike_lk_sensors_touch ✔️ 68600 (3%) ø 11432 (2%) ø
spike_lk_ticker_timeout ✔️ 69052 (3%) ø 11632 (2%) ø
spike_lk_update_process_app_base ✔️ 122724 (5%) ø 15288 (2%) ø
spike_lk_update_process_app_update ✔️ 77632 (3%) ø 12352 (2%) ø
spike_lk_wifi ✔️ 116392 (5%) ø 14808 (2%) ø
spike_mbed_blinky ✔️ 57968 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 63208 (3%) ø 12448 (2%) ø
spike_stl_cxxsupport ✔️ 58456 (2%) ø 11400 (2%) ø

🗺️ Map files diff output

Click to show diff list
spike_lk_ble (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_ble-map.txt	2022-03-11 15:10:02.316259448 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_ble-map.txt	2022-03-11 15:10:02.608275815 +0000
@@ -1,16 +1,16 @@
 | Module                 |           .text |       .data |          .bss |
 |------------------------|-----------------|-------------|---------------|
-| [fill]                 |       356(+356) |     11(+11) |       72(+72) |
+| [fill]                 |       334(+334) |     13(+13) |       68(+68) |
 | [lib]/BLEKit.a         |     1154(+1154) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/c.a              |   26128(+26128) | 2472(+2472) |       58(+58) |
 | [lib]/gcc.a            |     7084(+7084) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a | 118704(+118704) |   689(+689) | 19084(+19084) |
 | [lib]/misc             |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a          |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a         |     4116(+4116) |       8(+8) |       28(+28) |
-| main.cpp.obj           |     1078(+1078) |       8(+8) |     754(+754) |
-| Subtotals              | 159044(+159044) | 3192(+3192) | 20024(+20024) |
-Total Static RAM memory (data + bss): 23216(+23216) bytes
-Total Flash memory (text + data): 162236(+162236) bytes
+| main.cpp.obj           |     1548(+1548) |     70(+70) |   1094(+1094) |
+| Subtotals              | 159492(+159492) | 3256(+3256) | 20360(+20360) |
+Total Static RAM memory (data + bss): 23616(+23616) bytes
+Total Flash memory (text + data): 162748(+162748) bytes
 
Flash used: 173940&nbsp;(8%) / total: 2097152
SRAM used: 23904&nbsp;(4%) / total: 524288

@github-actions
Copy link

github-actions bot commented Mar 5, 2022

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 138964 (53%) 123180 (46%) 29360 (5%)
os 183784 (11%) 1380888 (88%) 29528 (5%)
Click to show memory sections
| -          |      Hex |     Bytes |  KiB |
|------------|---------:|----------:|-----:|
| Flash      | 0x200000 | 2 097 152 | 2048 |
| SRAM       |  0x80000 |   524 288 |  512 |
| Bootloader |  0x40000 |   262 144 |  256 |
| Header     |   0x1000 |     4 096 |    4 |
| OS         | 0x17E000 | 1 564 672 | 1528 |
| Tail       |   0x1000 |     4 096 |    4 |
| Scratch    |  0x40000 |   262 144 |  256 |

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 183784 (8%) ø 29528 (5%) ø
bootloader ✔️ 138964 (6%) ø 29360 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 258168 (12%) ø 35272 (6%) ø
certs_emc_ble_led_motors ✔️ 191600 (9%) ø 30976 (5%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 165248 (7%) ø 28680 (5%) ø
certs_emc_lcd_led_motors ✔️ 91928 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 194032 (9%) ø 30384 (5%) ø
spike_lk_ble ✔️ 182664 (8%)
183224 (8%)
📈
560 (0%)
29456 (5%)
29856 (5%)
📈
400 (1%)
spike_lk_bluetooth ✔️ 91192 (4%) ø 17472 (3%) ø
spike_lk_cg_animations ✔️ 149384 (7%) ø 30464 (5%) ø
spike_lk_color_kit ✔️ 88800 (4%) ø 19624 (3%) ø
spike_lk_coreled ✔️ 88556 (4%) ø 19632 (3%) ø
spike_lk_event_queue ✔️ 84664 (4%) ø 18136 (3%) ø
spike_lk_file_reception ✔️ 331612 (15%) ø 33536 (6%) ø
spike_lk_filesystem_kit ✔️ 127580 (6%) ø 20216 (3%) ø
spike_lk_flash_memory ✔️ 87352 (4%) ø 17512 (3%) ø
spike_lk_lcd ✔️ 149792 (7%) ø 30096 (5%) ø
spike_lk_led ✔️ 88808 (4%) ø 19400 (3%) ø
spike_lk_led_kit ✔️ 109636 (5%) ø 20648 (3%) ø
spike_lk_log_kit ✔️ 92000 (4%) ø 18168 (3%) ø
spike_lk_motors ✔️ 86576 (4%) ø 17552 (3%) ø
spike_lk_rfid ✔️ 91008 (4%) ø 17472 (3%) ø
spike_lk_sensors_battery ✔️ 87600 (4%) ø 18584 (3%) ø
spike_lk_sensors_light ✔️ 84584 (4%) ø 17512 (3%) ø
spike_lk_sensors_microphone ✔️ 85336 (4%) ø 17512 (3%) ø
spike_lk_sensors_temperature_humidity ✔️ 90896 (4%) ø 17496 (3%) ø
spike_lk_sensors_touch ✔️ 92248 (4%) ø 17632 (3%) ø
spike_lk_ticker_timeout ✔️ 83224 (3%) ø 17592 (3%) ø
spike_lk_update_process_app_base ✔️ 145204 (6%) ø 21352 (4%) ø
spike_lk_update_process_app_update ✔️ 100968 (4%) ø 18472 (3%) ø
spike_lk_wifi ✔️ 131280 (6%) ø 20832 (3%) ø
spike_mbed_blinky ✔️ 57968 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 84688 (4%) ø 18448 (3%) ø
spike_stl_cxxsupport ✔️ 84000 (4%) ø 17536 (3%) ø

🗺️ Map files diff output

Click to show diff list
spike_lk_ble (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_ble-map.txt	2022-03-11 15:11:01.868275283 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_ble-map.txt	2022-03-11 15:11:02.176276881 +0000
@@ -1,18 +1,18 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       354(+354) |     11(+11) |       76(+76) |
+| [fill]                  |       332(+332) |     13(+13) |       72(+72) |
 | [lib]/BLEKit.a          |     1154(+1154) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a  |       172(+172) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/c.a               |   26152(+26152) | 2472(+2472) |       58(+58) |
 | [lib]/gcc.a             |     7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/m.a               |       360(+360) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  | 122244(+122244) |   689(+689) | 19120(+19120) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |     5424(+5424) |       8(+8) |       44(+44) |
-| main.cpp.obj            |     3248(+3248) |       8(+8) |   6650(+6650) |
-| Subtotals               | 166484(+166484) | 3192(+3192) | 25976(+25976) |
-Total Static RAM memory (data + bss): 29168(+29168) bytes
-Total Flash memory (text + data): 169676(+169676) bytes
+| main.cpp.obj            |     3718(+3718) |     70(+70) |   6990(+6990) |
+| Subtotals               | 166932(+166932) | 3256(+3256) | 26312(+26312) |
+Total Static RAM memory (data + bss): 29568(+29568) bytes
+Total Flash memory (text + data): 170188(+170188) bytes
 
Flash used: 183224&nbsp;(8%) / total: 2097152
SRAM used: 29856&nbsp;(5%) / total: 524288

@YannLocatelli YannLocatelli force-pushed the yann/feature/ble/add-device-information-service branch from dcaa774 to 89cd222 Compare March 5, 2022 21:36
Copy link
Member

@ladislas ladislas left a comment

Choose a reason for hiding this comment

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

ça me semble bon, juste une question : ça serait pas mieux que le service il utilise un CoreSN qui lui fournit le serial number plutôt que d'avoir à le setSerialNumber puisqu'il faudra de toute manière le récupérer à un endroit ?

en attendant d'avoir le CoreSN, on peut lui donner une valeur par défaut genre 00000...000

@YannLocatelli
Copy link
Member Author

Ca reste un service BLE, et de la même manière qu'on a décidé de ne pas mettre un CoreBattery ou un BatteryKit dans le service Battery du BLE, je trouve qu'il est important de ne pas mélanger des choses aussi distantes que BLE/Battery ou BLE/SN.

En dehors de mettre du CoreSN dans le service BLE, oui on peut faire un CoreSN pour chercher, "synthetiser" et retourner le S/N, mais je ne pense pas que ça s'intègre dans l'objet de cette PR.

@YannLocatelli YannLocatelli force-pushed the yann/feature/ble/add-device-information-service branch from 89cd222 to 8b1b929 Compare March 10, 2022 08:24
Copy link
Member

@ladislas ladislas left a comment

Choose a reason for hiding this comment

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

petite typo + proposition de simplification, après c'est good pour moi

libs/BLEKit/include/BLEServiceDeviceInformation.h Outdated Show resolved Hide resolved
libs/BLEKit/include/BLEServiceDeviceInformation.h Outdated Show resolved Hide resolved
@YannLocatelli YannLocatelli force-pushed the yann/feature/ble/add-device-information-service branch 3 times, most recently from 9b441d8 to e0efa2a Compare March 11, 2022 10:25
@ladislas ladislas force-pushed the yann/feature/ble/add-device-information-service branch from e0efa2a to 2ab2557 Compare March 11, 2022 10:41
@YannLocatelli YannLocatelli force-pushed the yann/feature/ble/add-device-information-service branch 3 times, most recently from fe0fbd6 to af15b9a Compare March 11, 2022 14:59
YannLocatelli and others added 2 commits March 11, 2022 16:02
Co-Authored-By: Ladislas de Toldi <ladislas@detoldi.me>
Co-Authored-By: Ladislas de Toldi <ladislas@detoldi.me>
@YannLocatelli YannLocatelli force-pushed the yann/feature/ble/add-device-information-service branch from af15b9a to 57d2cb9 Compare March 11, 2022 15:02
@sonarcloud
Copy link

sonarcloud bot commented Mar 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@ladislas ladislas merged commit 92370b5 into develop Mar 11, 2022
@ladislas ladislas deleted the yann/feature/ble/add-device-information-service branch March 11, 2022 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants