Libspinscale: Initial top-level SMO port to coroutine framework

We haven't ported everything. Just the top-level methods. We'll
dig in to the leaf stuff later. Surprisingly, this all went without
any real difficulties.

Runs like a charm on first try.
This commit is contained in:
2026-05-24 16:12:29 -04:00
parent c539e6e924
commit cde2737876
44 changed files with 1296 additions and 1530 deletions
+6 -6
View File
@@ -1,6 +1,6 @@
#include <boostAsioLinkageFix.h>
#include <stdexcept>
#include <spinscale/callback.h>
#include <spinscale/cps/callback.h>
#include <boost/asio/posix/stream_descriptor.hpp>
#include "livoxProto1.h"
#include "device.h"
@@ -16,7 +16,7 @@ void livoxProto1_getOrCreateDeviceReq(
int commandTimeoutMs, int retryDelayMs,
const std::string& smoIp, uint8_t smoSubnetNbits,
uint16_t dataPort, uint16_t cmdPort, uint16_t imuPort,
sscl::Callback<livoxProto1_getOrCreateDeviceReqCbFn> callback
sscl::cps::Callback<livoxProto1_getOrCreateDeviceReqCbFn> callback
)
{
// Get the global DeviceManager instance
@@ -39,7 +39,7 @@ void livoxProto1_getOrCreateDeviceReq(
void livoxProto1_destroyDeviceReq(
std::shared_ptr<livoxProto1::Device> device,
sscl::Callback<livoxProto1_destroyDeviceReqCbFn> callback
sscl::cps::Callback<livoxProto1_destroyDeviceReqCbFn> callback
)
{
auto& protoState = livoxProto1::getProtoState();
@@ -67,7 +67,7 @@ void livoxProto1_exit(void)
void livoxProto1_device_enablePcloudDataReq(
std::shared_ptr<livoxProto1::Device> device,
sscl::Callback<livoxProto1_device_enablePcloudDataReqCbFn> callback
sscl::cps::Callback<livoxProto1_device_enablePcloudDataReqCbFn> callback
)
{
if (!device)
@@ -81,7 +81,7 @@ void livoxProto1_device_enablePcloudDataReq(
void livoxProto1_device_disablePcloudDataReq(
std::shared_ptr<livoxProto1::Device> device,
sscl::Callback<livoxProto1_device_disablePcloudDataReqCbFn> callback
sscl::cps::Callback<livoxProto1_device_disablePcloudDataReqCbFn> callback
)
{
if (!device)
@@ -95,7 +95,7 @@ void livoxProto1_device_disablePcloudDataReq(
void livoxProto1_device_getReturnModeReq(
std::shared_ptr<livoxProto1::Device> device,
sscl::Callback<livoxProto1_device_getReturnModeReqCbFn> callback
sscl::cps::Callback<livoxProto1_device_getReturnModeReqCbFn> callback
)
{
if (!device)