Commit Graph

72 Commits

Author SHA1 Message Date
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
latentprion edd223b083 Remove unnecessary componentThread.h #includes
Since componentThread #includes boost::asio components, removing
it should improve compile times.
2025-10-16 02:15:16 -04:00
latentprion 945c5b397b Build: remove superfluous io_service.hpp #includes 2025-10-16 01:08:05 -04:00
latentprion 5017bf5f92 Build: use piecemeal boost headers.
Reduces compile time on a 4-core ARM Rpi5 from 1m12s wallclock
(i.e: "real") time to 0m55s; and from 4m+ "user" time to 3m8s.
2025-10-16 01:00:48 -04:00
hayodea eb5875fe0d Rename: Sense API => Stim Buff API 2025-10-01 20:03:47 -04:00
hayodea 65b9460a3a LivoxProto1:connectReq: Remove retryDelay; DevReattacher replaces
The new DeviceReattacher daemon in DeviceManager makes this retry
delay feature obsolete.
2025-09-29 01:18:36 -04:00
hayodea 782bcd4567 Async: add sh_ptr<ContinuationChainLink> to Callback<>
This change enables us to finally implement the tracing of
continuations backward from the point of acquisition for deadlock
debugging.
2025-09-27 18:30:09 -04:00
hayodea 816a047920 Async: new hierachy; manages reply posting and unlocking
Async: Use new [Non]PostedAsyncCont and callOriginalCb

This new hierarchy of classes gives us a central mechanism for
managing both reply-posting and lockSpec unlocking.

* callOriginalCb: Now uses a modern C++ variadic template design
  enabling it to handle both direct calling and std::bind()
  re-binding of an arbitrary number of arguments from the caller.

This enables us to mostly eliminate the repeated, bespoke
definitions of callOriginalCb littered throughout the codebase.

We've also propagated these changes throughout the codebase in
this patch.
2025-09-17 16:38:48 -04:00
hayodea 9e00cd1530 Formatting, indentation 2025-09-16 18:36:11 -04:00
hayodea 77acbdd8de Indentation 2025-09-15 13:10:30 -04:00
hayodea b8c931397d Async: add TargetedContinuation
This class enables us to consistently represent continuations
that are intended to be posted on a particular target handling
thread. It hols a sh_ptr to the caller so that the target thread
can re-enqueue the response on the caller after processing the
REQ/IND op.
2025-09-11 18:37:48 -04:00
hayodea b4102e6ee1 CMake: enable livoxGen1 and xcbWindow by default 2025-09-10 19:51:34 -04:00
hayodea 20034513ad CMake: fix usage of cmake_dependent_option 2025-09-10 19:44:17 -04:00
hayodea 01da06b051 Rename this file 2025-09-10 15:10:10 -04:00