Commit Graph

85 Commits

Author SHA1 Message Date
hayodea e446d42b3c StimBuff: Deferral: print message at start and end; timestamp too 2025-11-13 01:09:30 -04:00
hayodea 7e672bcc9a UdpCmdDemux: formatting 2025-11-12 17:25:55 -04:00
hayodea 1a9c96c857 whitespace 2025-11-12 15:09:15 -04:00
hayodea 116a642a9f StimBuff: Add opportunity for early lock release 2025-11-12 15:08:44 -04:00
hayodea 4dbb27fd1f StimulusBuffer: properly serialize timeslices
We previously unintentionally allowed multiple production operations
to occur in the same timeslice because we were calling for production
even when deferring timeslices.
2025-11-12 12:31:37 -04:00
hayodea 5bb9c9e90b Dbg: Useful printfs for the raspi5 2025-11-10 01:05:20 -04:00
hayodea 1afa085fd4 livoxProto1:Device: Spinlock guard heartbeat stop() for races 2025-11-07 21:36:00 -04:00
hayodea 7b092956c0 UdpCmdDemux: Guard start() w/spinlock for races 2025-11-07 21:12:40 -04:00
hayodea e0c0976e0b BcastListener: Guard start() w/spinlock for races 2025-11-07 21:12:05 -04:00
hayodea 887fa1ab6f Bug:UdpCmdDemux: Add SpinLock for races around stop() 2025-11-07 20:45:16 -04:00
hayodea 7d2cb58200 Bug:BcastListener: Add SpinLock for races around stop() 2025-11-07 20:44:44 -04:00
hayodea b598ca8594 libs: Add smohook for getting cmdline opts 2025-11-07 14:59:28 -04:00
hayodea f3a4c69597 StimBuff: DevAttSpec should be a sh_ptr, not a plain ref 2025-11-04 00:47:01 -04:00
hayodea 9a4f80a9d6 libAttachmentSupport: convert into shared lib
This ensures that the support routines in this library will be
exposed at the same vaddr to each object in the vaddrspace.
2025-11-04 00:22:25 -04:00
hayodea 7a55a65589 LivoxProto1: Rename pcloudDataSocketDesc=>pcloudDataFdDesc 2025-11-03 23:22:50 -04:00
hayodea 14b97a52ed IoUringAsmEngn: Use pcloudDataSocket from UdpCmdDemux 2025-11-03 23:10:24 -04:00
hayodea 5845f1a41d Bug:Boost: Use shlibs instead of header-only for call_stack::top_
This symbol is defined as a static member object inside of a
boost detail header. When boost headers are used in a project
that uses Boost in both the main binary as well as dlopen()'d
shlibs, the top_ symbol gets duplicated and the metadata gets
partitioned.

We use the Boost shlib to unify both the main binary and the
shlibs to use the same memory address for top_.

This involves marking the templated object call_stack::top_ as
"extern" and then declaring to Boost that we intend to use the
shlibs.
2025-11-03 22:59:52 -04:00
hayodea 121b7db045 CMake:attachmentSupport: Don't link against Boost_LIBRARIES 2025-11-03 21:09:55 -04:00
hayodea d88dd2cf44 livoxGen1: Make use of livoxProto1_getPcloudDataFdDesc 2025-11-02 19:16:22 -04:00
hayodea b3bf0e2cb9 StimBuff,commonLibs: Add libattachmentSupport, move fnptrs into .cpp files
We move the methods in StimulusBuffer whose addresses are taken during
program execution into a separate static lib. This guarantees that
they'll have their own, single vaddr at runtime, at least within
each independent code module.
2025-11-02 19:12:28 -04:00
hayodea 45ad5c83ee livoxProto1: Open pcloudDataSocket in UdpCmdDemux
The pcloudData socket is now opened by UdpCommandDemuxer, when
libLivoxProto1 is initialized. We can now just pick up the socket
and be certain it'll be there if the lib is being executed.
2025-11-01 22:41:58 -04:00
hayodea c8474edad7 livox: rename handshakeTimeoutMs=>commandTimeoutMs 2025-11-01 02:45:24 -04:00
hayodea 13a948a2d3 Formatting: use early continue pattern 2025-10-31 08:57:37 -04:00
hayodea f658e97ed0 livoxProto1: export getReturnModeReq; cache result in Device 2025-10-31 08:57:37 -04:00
hayodea b65b0f2370 UdpCmdDemux: remove stop-"responsiveness" timer
I think it's best to remove the timer tick from UdpCommandDemuxer.
I looked at it again and it doesn't actually help with responsiveness.
Whatever it contributes is no different from what stop() does.
They both just call timer.cancel and cmdsocket.cancel.
So if that doesn't stop the socket in stop(), it won't magically
stop it more effectively if I call it from a timer handler.
2025-10-31 08:20:27 -04:00
hayodea 9e83a99c9c LivoxProto1:Device: Refcount num stimbuffs attached 2025-10-25 23:03:00 -04:00
hayodea 6650664529 LivoxProto1: Move data members to one place 2025-10-25 14:43:51 -04:00
hayodea 92399ba283 Use piecemeal boost headers 2025-10-25 12:55:19 -04:00
hayodea 6f4a2dd649 LivoxGen/Proto1: Move en/disablePcloudData call to Gen1
We no longer try to enable pcloud data as part of the connectReq()
sequence. Instead we separate them so that a device can be connected
but not be issuing pcloud data.
2025-10-25 12:55:19 -04:00
hayodea 266cabcddb LivoxGen1: Add get/setReturnModeReq() 2025-10-25 00:19:06 -04:00
hayodea 444555e9b6 LivoxProto1: Remove superfluous proto methods 2025-10-24 22:23:59 -04:00
hayodea 3373393755 LivoxGen1: Add Get/SetReturn rate proto headers 2025-10-24 22:11:31 -04:00
hayodea 452d1966fc LivoxProto1: Document UDP demuxer purpose & use cases
Also fix bug in transient resource transfer from continuation
to Device object.
2025-10-24 03:09:17 -04:00
hayodea f7dcb7307d LivoxProto1: registerUdpHandler: enforce overwriting
Enforce handler overwriting in the devicesUnderConstruction
collection, for combos of cmd_set+cmd_id that pre-exist the
current invocation
2025-10-24 02:42:50 -04:00
hayodea bd0118531f LivoxProto1: Pcloud socket is set up transiently in contin 2025-10-24 02:05:32 -04:00
hayodea 4bfcdf37da LivoxProto1:enPcloudData: reorder success case here 2025-10-24 01:46:08 -04:00
hayodea 2b8f6b6ad5 Formatting 2025-10-24 01:45:03 -04:00
hayodea a5cf996ed2 LivoxProto1: Get rid of raw FD for pcloudData recv 2025-10-24 01:44:19 -04:00
hayodea 71c2b855ec LivoxProto1: Device: misc logging, cleanup, bugfix 2025-10-24 01:29:18 -04:00
hayodea bede123691 LivoxProto1: Print when Lidar isn't ready for work 2025-10-24 00:51:28 -04:00
hayodea 83c937ae8f LivoxProto1: Cancel async contin branch cbs in oracle fn
We were canceling the registered handler CBs in their branch
segments instead of in the unifying oracle fn.
This caused a bug where handlers were left behind in the
udpCmdDemuxer and thus a handler was invoked twice when a UDP
msg came in.
2025-10-24 00:46:13 -04:00
hayodea d39dfb5334 livoxProto1: connectReq: Add 5ms delay before Sample enable msg 2025-10-23 01:27:35 -04:00
hayodea 44cfd7ab69 LivoxProto1: Add 105ms delay before Sample msg 2025-10-23 01:06:34 -04:00
hayodea 5db1cfdac8 LivoxProto1: Pcloud data stream now working 2025-10-23 00:24:23 -04:00
hayodea a4d99e5d4d LivoxProto1: ExecuteHandshake uses udpCommandDemuxer
UdpCommandDemuxer also now supports devices "under construction".
2025-10-22 22:13:38 -04:00
hayodea 01ad1ff073 LivoxProto1: udpCmdDemux: use piecemeal boost.asio headers 2025-10-22 13:37:54 -04:00
hayodea 8e1d609ca1 livoxProto1: udpCmdDemux now consults per-device handler registry
Device class objects now have a per-Device unordered_map of handlers
keyed by cmd_set+cmd_id.
2025-10-22 07:28:00 -04:00
hayodea 10afec2532 LivoxProto1: Add UdpCommandDemuxer.
We haven't genericized it with an unordered_map or integrated it
into device.cpp's async methods yet.
2025-10-22 06:17:42 -04:00
hayodea 66a9db13c3 LivoxProto1: invoke enablePcloudDataReq
Sadly we don't get to immediately see the results of our
work because we have to do a unified dispatcher for the incoming
UDP messages on the command channel.
2025-10-22 01:59:04 -04:00
hayodea d9042c6510 LivoxProto1: Add en/disablePcloudDataReq()
Untested, but this should enable us to enable and disable data
from the device.
2025-10-22 01:21:35 -04:00