Commit Graph

9 Commits

Author SHA1 Message Date
Allen Hill 56936aed10 Switch to using references where possible 2026-07-17 14:31:54 -07:00
Allen Hill 5208e083f3 Redesign (simplify) top-level avclan interface to use expected/nullable unique_ptr
- Peripheral::read/send now return `expected<unique_ptr<Frame>, Error>`
for a unified success/error interface.
- Peripheral::route returns `expected<unique_ptr<Frame>, Error>` to
distinguish intent: (intentional) non-response vs unable to respond
- Other functions with optional message semantics (handle,poll,react)
return a unique_ptr whose ownership-state indicates response intent
(i.e. send new message)

Bundled necessary changes:
- Switch Frame allocation from global to local (enabled via member
  function new/delete)
- Add new header-library tl::expected to shim avr-libstdcpp

Unrelated: Defensive `continue` added after `route`, to reduce Bus
activity check latency

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 14:47:47 -07:00
Allen Hill 200a225add Unify frame metadata setting (addrs and owning_device) 2026-07-16 13:35:25 -07:00
Allen Hill 9fd8c5636e Finalize C <=> C++ interface 2026-07-06 19:39:49 -07:00
Allen Hill 554fca0582 Shift Device/Action enums to avclan.h 2026-07-06 15:50:09 -07:00
Allen Hill a0c6601cda Unify Send/Read error enums 2026-07-06 13:36:53 -07:00
Allen Hill 82cbb126a9 Fix (centralize) setting of controller/peripheral addrs 2026-07-06 13:05:58 -07:00
Allen Hill e878a61313 Port Frame object to C++ 2026-07-05 19:35:58 -07:00
Allen Hill 66bbf8639e Parameterise Peripheral by its Devices and add CDChanger as one 2026-06-27 10:29:34 -07:00