livoxProto1: Rn Device::nAttachedStimBuffs=>nAttachedStimulusProducers
More semantically precise name.
This commit is contained in:
@@ -230,7 +230,7 @@ void DeviceManager::destroyDeviceReq(
|
||||
std::shared_ptr<Device> device = getDevice(dev->discoveredDevice).
|
||||
value_or(nullptr);
|
||||
|
||||
if (!device || device->nAttachedStimBuffs > 0)
|
||||
if (!device || device->nAttachedStimulusProducers > 0)
|
||||
{
|
||||
callback.callbackFn(false);
|
||||
return;
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
public:
|
||||
comms::DiscoveredDevice discoveredDevice;
|
||||
std::atomic<size_t> nAttachedStimBuffs;
|
||||
std::atomic<size_t> nAttachedStimulusProducers;
|
||||
|
||||
// Configuration
|
||||
std::shared_ptr<smo::ComponentThread> componentThread;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user