Repository navigation
Commit de96db7
committed
cyphal: encapsulate libudpard in CyphalUDPInterface (issue-61)
Encapsulate libudpard behind jarnax::cyphal::Interface so applications
no longer touch udpard directly. Uses the new
CyphalUDPInterface.*pp files as the implementation boundary.
jarnax-cyphal-udp:
- Move O1HeapPool from nucleo-cyphal app into the module, implement
core::Allocator, provide UdpardMemoryResource/UdpardRxMemoryResources
factories backed by a single 64 KiB arena.
- Add CyphalUDPSocket abstraction (udp::Endpoint, DatagramHandler,
Socket with Join/Leave/Send) and MicrosecondClock so the generic
module stays host-testable without cortex headers.
- Implement CyphalUDPInterface (Interface + Loopable +
DatagramHandler): pooled subscriptions (8), RPC ports (8), per-port
transfer-ID counters (16), remembered request TIDs (8), Nominal
priority, TX queue drain via Socket, RX dispatch via
udpardGather into a MaxExtent scratch buffer, and TransportStatistics.
nucleo-cyphal:
- Depend on jarnax-cyphal-udp instead of raw o1heap/udpard, switch
CyphalApp to jarnax::cyphal::O1HeapPool.
Tests/mocks:
- gtest-cyphal-o1heappool: allocator and Udpard callback coverage.
- gtest-cyphal-udpinterface (12 tests): Listen/Remove/IsListening
lifecycle, Join-once service group, publish/request/respond,
TX-error stats, subject and RPC round-trips via a local UdpardTx
producer (no hand-built wire formats), unknown-group/bad-datagram
handling.
- MockUDPSocket (gmock) mirroring the socket abstraction.
- Fix stale over-alignment expectation (o1heap serves at max_align_t).
Build: on-host-native-llvm 21/21, on-host-native-clang 21/21,
on-target-cortex-m4/m7 (GCC) all pass; 62/62 in jarnax-cyphal.
Human work: issue #61 spec, initial O1HeapPool scaffolding, hardware
requirements, review of GOTCHAS/PLAN.
AI work: socket/interface design, implementation, GoogleTests/mocks,
CMake wiring, verification and commit.
AI: opencode/muse-spark-1.2-contributor-free (Meta Muse Spark 1.2,
contributor-free tier; ~128k context).
Refs #611 parent 69fd209 commit de96db7
16 files changed
Lines changed: 1399 additions & 138 deletions
File tree
- applications/nucleo-cyphal
- include
- source
- modules/jarnax
- include/jarnax/cyphal
- source
- cyphal
- include/jarnax/services
- services
- tests
- mocks/jarnax/services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 78 | | |
90 | 79 | | |
91 | 80 | | |
| |||
288 | 277 | | |
289 | 278 | | |
290 | 279 | | |
291 | | - | |
| 280 | + | |
292 | 281 | | |
293 | 282 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
| 283 | + | |
299 | 284 | | |
300 | 285 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 286 | + | |
307 | 287 | | |
308 | 288 | | |
309 | 289 | | |
| |||
328 | 308 | | |
329 | 309 | | |
330 | 310 | | |
331 | | - | |
| 311 | + | |
332 | 312 | | |
333 | 313 | | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 314 | + | |
347 | 315 | | |
348 | 316 | | |
349 | 317 | | |
| |||
513 | 481 | | |
514 | 482 | | |
515 | 483 | | |
516 | | - | |
517 | | - | |
| 484 | + | |
| 485 | + | |
518 | 486 | | |
519 | 487 | | |
520 | 488 | | |
| |||
540 | 508 | | |
541 | 509 | | |
542 | 510 | | |
543 | | - | |
| 511 | + | |
544 | 512 | | |
545 | 513 | | |
546 | 514 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
171 | | - | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments