Use DynamicViralPostingInvoker in at/detachStimBuffDeviceCReq
This commit is contained in:
@@ -452,11 +452,13 @@ attachByCreatingProducer(
|
||||
|
||||
} // namespace
|
||||
|
||||
sscl::co::ViralNonPostingInvoker<StimBuffDeviceOpResult>
|
||||
sscl::co::DynamicViralPostingInvoker<StimBuffDeviceOpResult>
|
||||
livoxGen1_attachDeviceCReq(
|
||||
[[maybe_unused]] sscl::co::ExplicitPostTarget postTarget,
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec> &desc,
|
||||
const std::shared_ptr<sscl::ComponentThread> &componentThread)
|
||||
{
|
||||
(void)postTarget;
|
||||
if (!livoxProto1.livoxProto1_getOrCreateDeviceCReq)
|
||||
{
|
||||
throw std::runtime_error(
|
||||
@@ -482,10 +484,12 @@ livoxGen1_attachDeviceCReq(
|
||||
co_return co_await attachByCreatingProducer(desc, componentThread);
|
||||
}
|
||||
|
||||
sscl::co::ViralNonPostingInvoker<StimBuffDeviceOpResult>
|
||||
sscl::co::DynamicViralPostingInvoker<StimBuffDeviceOpResult>
|
||||
livoxGen1_detachDeviceCReq(
|
||||
[[maybe_unused]] sscl::co::ExplicitPostTarget postTarget,
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec> &desc)
|
||||
{
|
||||
(void)postTarget;
|
||||
// Case 1: Check if StimBuffer doesn't exist (early return)
|
||||
auto stimProducerBase = getStimulusProducer(desc);
|
||||
if (!stimProducerBase) {
|
||||
|
||||
@@ -46,10 +46,16 @@ bool ensureStimBufferAttachedWithoutDuplicates(
|
||||
|
||||
sscl::co::ViralNonPostingInvoker<int> livoxGen1_initializeCInd();
|
||||
sscl::co::ViralNonPostingInvoker<int> livoxGen1_finalizeCInd();
|
||||
sscl::co::ViralNonPostingInvoker<StimBuffDeviceOpResult> livoxGen1_attachDeviceCReq(
|
||||
|
||||
sscl::co::DynamicViralPostingInvoker<StimBuffDeviceOpResult>
|
||||
livoxGen1_attachDeviceCReq(
|
||||
sscl::co::ExplicitPostTarget postTarget,
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec> &desc,
|
||||
const std::shared_ptr<sscl::ComponentThread> &componentThread);
|
||||
sscl::co::ViralNonPostingInvoker<StimBuffDeviceOpResult> livoxGen1_detachDeviceCReq(
|
||||
|
||||
sscl::co::DynamicViralPostingInvoker<StimBuffDeviceOpResult>
|
||||
livoxGen1_detachDeviceCReq(
|
||||
sscl::co::ExplicitPostTarget postTarget,
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec> &desc);
|
||||
|
||||
} // namespace smo::stim_buff
|
||||
|
||||
Reference in New Issue
Block a user