From 188b09319ccf7e391d09958d7dc12bd394297ec8 Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Sat, 15 Nov 2025 00:56:20 -0400 Subject: [PATCH] livoxProto1: Rn Device::nAttachedStimBuffs=>nAttachedStimulusProducers More semantically precise name. --- commonLibs/livoxProto1/core.cpp | 2 +- commonLibs/livoxProto1/device.cpp | 2 +- commonLibs/livoxProto1/device.h | 2 +- stimBuffApis/livoxGen1/livoxGen1.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commonLibs/livoxProto1/core.cpp b/commonLibs/livoxProto1/core.cpp index 3323bbe..6359f92 100644 --- a/commonLibs/livoxProto1/core.cpp +++ b/commonLibs/livoxProto1/core.cpp @@ -230,7 +230,7 @@ void DeviceManager::destroyDeviceReq( std::shared_ptr device = getDevice(dev->discoveredDevice). value_or(nullptr); - if (!device || device->nAttachedStimBuffs > 0) + if (!device || device->nAttachedStimulusProducers > 0) { callback.callbackFn(false); return; diff --git a/commonLibs/livoxProto1/device.cpp b/commonLibs/livoxProto1/device.cpp index 4a613c6..377c13f 100644 --- a/commonLibs/livoxProto1/device.cpp +++ b/commonLibs/livoxProto1/device.cpp @@ -98,7 +98,7 @@ Device::Device(const std::string &deviceIdentifier, deviceIdentifier, comms::DeviceType::Mid40, // Initialize empty. IP will be set upon successful connection. ""), -nAttachedStimBuffs(0), +nAttachedStimulusProducers(0), componentThread(componentThread), commandTimeoutMs(commandTimeoutMs), retryDelayMs(retryDelayMs), smoIp(smoIp), detectedSmoListeningIp(""), smoSubnetNbits(smoSubnetNbits), diff --git a/commonLibs/livoxProto1/device.h b/commonLibs/livoxProto1/device.h index a066eb9..2e5659e 100644 --- a/commonLibs/livoxProto1/device.h +++ b/commonLibs/livoxProto1/device.h @@ -150,7 +150,7 @@ public: public: comms::DiscoveredDevice discoveredDevice; - std::atomic nAttachedStimBuffs; + std::atomic nAttachedStimulusProducers; // Configuration std::shared_ptr componentThread; diff --git a/stimBuffApis/livoxGen1/livoxGen1.cpp b/stimBuffApis/livoxGen1/livoxGen1.cpp index 91272f0..1bc47fd 100644 --- a/stimBuffApis/livoxGen1/livoxGen1.cpp +++ b/stimBuffApis/livoxGen1/livoxGen1.cpp @@ -206,7 +206,7 @@ public: context->spec, context->deviceTmp, formatDesc, 30); context->stimProducer = pcloudDataProducer; - context->deviceTmp->nAttachedStimBuffs++; + context->deviceTmp->nAttachedStimulusProducers++; attachedStimulusProducers.push_back(pcloudDataProducer); pcloudDataProducer->start(); @@ -345,7 +345,7 @@ public: context->stimProducer->stop(); // Remove stimulus producer from collection before destroying device - context->stimProducer->device->nAttachedStimBuffs--; + context->stimProducer->device->nAttachedStimulusProducers--; auto it = std::find( attachedStimulusProducers.begin(), attachedStimulusProducers.end(), context->stimProducer);