Commit ab4abf6
Make AimX remote access spawn free (#118)
* Refactor WS Client Connector to Use Nested FuturesUnordered
- Updated the WS client connector to eliminate the use of tokio::spawn for background tasks.
- Introduced a nested FuturesUnordered to manage the read, write, keepalive, and reconnect loops.
- The connect method now returns a tuple containing the connector and its associated future.
- Enhanced the reconnect watcher to send new loop information to the outer future, allowing for seamless reconnections without spawning new tasks.
- Updated documentation to reflect changes in the connector's architecture and task management.
* refactor: make AimX remote-access and WS client connector spawn-free
* chore: update embassy subproject to latest commit
* refactor: remove subscription_queue_size and update AimxConfig for spawn-free design
* refactor: replace AtomicBool with Notify for immediate subscription cancellation
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>1 parent 9f1a060 commit ab4abf6
15 files changed
Lines changed: 1588 additions & 485 deletions
File tree
- _external
- aimdb-core
- src
- remote
- aimdb-websocket-connector
- src/client
- docs/design
- examples/remote-access-demo/src
- embassy-executor/CHANGELOG.md+1
- embassy-stm32-wpan/Cargo.toml+5-4
- embassy-stm32-wpan/src/bluetooth/gap/aci_gap.rs+52
- embassy-stm32-wpan/src/bluetooth/gap/advertiser.rs+21-11
- embassy-stm32-wpan/src/bluetooth/gap/types.rs+5
- embassy-stm32-wpan/src/bluetooth/gap_init.rs+28-15
- embassy-stm32-wpan/src/bluetooth/mod.rs+13-5
- embassy-stm32-wpan/src/bluetooth/security/mod.rs+384-3
- embassy-stm32-wpan/src/net/control.rs+4-5
- embassy-stm32-wpan/src/net/iface.rs+6-11
- embassy-stm32-wpan/src/net/mod.rs+6-7
- embassy-stm32-wpan/src/net/runner.rs+6-21
- embassy-stm32-wpan/src/net/util.rs+13-90
- embassy-stm32-wpan/src/wb/cmd.rs+64-29
- embassy-stm32-wpan/src/wb/consts.rs+1
- embassy-stm32-wpan/src/wb/evt.rs+54-37
- embassy-stm32-wpan/src/wb/mod.rs+58-27
- embassy-stm32-wpan/src/wb/sub/ble.rs+36-28
- embassy-stm32-wpan/src/wb/sub/mac.rs+17-21
- embassy-stm32-wpan/src/wb/sub/mod.rs+2
- embassy-stm32-wpan/src/wb/sub/sys.rs+17-2
- embassy-stm32-wpan/src/wb/sub/thread.rs+212
- embassy-stm32-wpan/src/wb/tables.rs+20
- embassy-stm32-wpan/src/wba/linklayer_plat.rs+107-31
- embassy-stm32-wpan/src/wba/ll_sys/ll_sys_dp_slp.rs+22-22
- embassy-stm32-wpan/src/wba/ll_sys/ll_sys_startup.rs+27-9
- embassy-stm32-wpan/src/wba/ll_sys_if.rs+5-5
- embassy-stm32-wpan/src/wba/mac_sys_if.rs+2-2
- embassy-stm32-wpan/src/wba/mod.rs+1-1
- embassy-stm32-wpan/src/wba/platform.rs+5
- embassy-stm32/src/adc/v4.rs+1-3
- embassy-stm32/src/can/bxcan/mod.rs+2-2
- embassy-stm32/src/can/fdcan.rs+2-2
- embassy-sync/CHANGELOG.md+13
- embassy-sync/src/waitqueue/atomic_waker.rs+322-8
- embassy-sync/src/waitqueue/critical_section_waker.rs+28
- embassy-sync/src/waitqueue/mod.rs+3
- examples/stm32wb/Cargo.toml+8-3
- examples/stm32wb/src/bin/fus_update.rs+2-2
- examples/stm32wb/src/bin/mac_ffd.rs+8-16
- examples/stm32wb/src/bin/mac_rfd.rs+7-14
- examples/stm32wb/src/bin/tl_mbox.rs+1-1
- examples/stm32wb/src/bin/tl_mbox_mac.rs+2-2
- examples/stm32wba/Cargo.toml+1-1
- examples/stm32wba/src/bin/ble_secure.rs+8-11
- examples/stm32wba6-lp/Cargo.toml+9
- examples/stm32wba6-lp/src/bin/ble_advertiser_lp.rs+180
- examples/stm32wba6/Cargo.toml+1-1
- examples/stm32wba6/src/bin/ble_bonding.rs+361
- examples/stm32wba6/src/bin/ble_secure.rs+8-11
- examples/stm32wba6/verify_rpa.py+74
- fmtall.ps1+11
- tests/stm32/Cargo.toml+1-1
- tests/stm32/src/bin/wpan_ble.rs+1-1
- tests/stm32/src/bin/wpan_mac.rs+4-8
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
12 | 25 | | |
13 | 26 | | |
14 | 27 | | |
| |||
36 | 49 | | |
37 | 50 | | |
38 | 51 | | |
39 | | - | |
| 52 | + | |
40 | 53 | | |
41 | 54 | | |
42 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1327 | 1327 | | |
1328 | 1328 | | |
1329 | 1329 | | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | 1330 | | |
1480 | 1331 | | |
1481 | 1332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | | - | |
23 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| |||
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | | - | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
48 | | - | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
| |||
206 | 212 | | |
207 | 213 | | |
208 | 214 | | |
209 | | - | |
| 215 | + | |
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
| |||
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
220 | | - | |
| 226 | + | |
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
225 | 231 | | |
226 | | - | |
| 232 | + | |
227 | 233 | | |
228 | 234 | | |
229 | 235 | | |
| |||
0 commit comments