#include "livoxGen1Proto1CpsBridge.h" #include namespace smo::stim_buff { sscl::co::ViralNonPostingInvoker coAwaitGetOrCreateDevice( const std::shared_ptr &componentThread, const std::string &deviceIdentifier, const LivoxProviderParams ¶ms) { if (!livoxProto1.livoxProto1_getOrCreateDeviceReq) { throw std::runtime_error("coAwaitGetOrCreateDevice: proto1 function missing"); } auto result = co_await adapters::smo::getGetOrCreateDeviceReqAReqAwaiter( componentThread->getIoService(), livoxProto1.livoxProto1_getOrCreateDeviceReq, deviceIdentifier, componentThread, params.commandTimeoutMs, params.retryDelayMs, params.smoIp, params.smoSubnetNbits, params.dataPort, params.cmdPort, params.imuPort); co_return result; } sscl::co::ViralNonPostingInvoker coAwaitGetReturnMode( const std::shared_ptr &componentThread, const std::shared_ptr &device) { if (!livoxProto1.livoxProto1_device_getReturnModeReq) { throw std::runtime_error("coAwaitGetReturnMode: proto1 function missing"); } co_return co_await adapters::smo::getDeviceGetReturnModeReqAReqAwaiter( componentThread->getIoService(), livoxProto1.livoxProto1_device_getReturnModeReq, device); } sscl::co::ViralNonPostingInvoker coAwaitEnablePcloudData( const std::shared_ptr &componentThread, const std::shared_ptr &device) { if (!livoxProto1.livoxProto1_device_enablePcloudDataReq) { throw std::runtime_error("coAwaitEnablePcloudData: proto1 function missing"); } co_return co_await adapters::smo::getDeviceEnablePcloudDataReqAReqAwaiter( componentThread->getIoService(), livoxProto1.livoxProto1_device_enablePcloudDataReq, device); } sscl::co::ViralNonPostingInvoker coAwaitDisablePcloudData( const std::shared_ptr &componentThread, const std::shared_ptr &device) { if (!livoxProto1.livoxProto1_device_disablePcloudDataReq) { throw std::runtime_error("coAwaitDisablePcloudData: proto1 function missing"); } co_return co_await adapters::smo::getDeviceDisablePcloudDataReqAReqAwaiter( componentThread->getIoService(), livoxProto1.livoxProto1_device_disablePcloudDataReq, device); } sscl::co::ViralNonPostingInvoker coAwaitDestroyDevice( const std::shared_ptr &componentThread, const std::shared_ptr &device) { if (!livoxProto1.livoxProto1_destroyDeviceReq) { throw std::runtime_error("coAwaitDestroyDevice: proto1 function missing"); } co_return co_await adapters::smo::getDestroyDeviceReqAReqAwaiter( componentThread->getIoService(), livoxProto1.livoxProto1_destroyDeviceReq, device); } } // namespace smo::stim_buff