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).
|
std::shared_ptr<Device> device = getDevice(dev->discoveredDevice).
|
||||||
value_or(nullptr);
|
value_or(nullptr);
|
||||||
|
|
||||||
if (!device || device->nAttachedStimBuffs > 0)
|
if (!device || device->nAttachedStimulusProducers > 0)
|
||||||
{
|
{
|
||||||
callback.callbackFn(false);
|
callback.callbackFn(false);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ Device::Device(const std::string &deviceIdentifier,
|
|||||||
deviceIdentifier, comms::DeviceType::Mid40,
|
deviceIdentifier, comms::DeviceType::Mid40,
|
||||||
// Initialize empty. IP will be set upon successful connection.
|
// Initialize empty. IP will be set upon successful connection.
|
||||||
""),
|
""),
|
||||||
nAttachedStimBuffs(0),
|
nAttachedStimulusProducers(0),
|
||||||
componentThread(componentThread),
|
componentThread(componentThread),
|
||||||
commandTimeoutMs(commandTimeoutMs), retryDelayMs(retryDelayMs),
|
commandTimeoutMs(commandTimeoutMs), retryDelayMs(retryDelayMs),
|
||||||
smoIp(smoIp), detectedSmoListeningIp(""), smoSubnetNbits(smoSubnetNbits),
|
smoIp(smoIp), detectedSmoListeningIp(""), smoSubnetNbits(smoSubnetNbits),
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
comms::DiscoveredDevice discoveredDevice;
|
comms::DiscoveredDevice discoveredDevice;
|
||||||
std::atomic<size_t> nAttachedStimBuffs;
|
std::atomic<size_t> nAttachedStimulusProducers;
|
||||||
|
|
||||||
// Configuration
|
// Configuration
|
||||||
std::shared_ptr<smo::ComponentThread> componentThread;
|
std::shared_ptr<smo::ComponentThread> componentThread;
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ public:
|
|||||||
context->spec, context->deviceTmp, formatDesc, 30);
|
context->spec, context->deviceTmp, formatDesc, 30);
|
||||||
|
|
||||||
context->stimProducer = pcloudDataProducer;
|
context->stimProducer = pcloudDataProducer;
|
||||||
context->deviceTmp->nAttachedStimBuffs++;
|
context->deviceTmp->nAttachedStimulusProducers++;
|
||||||
attachedStimulusProducers.push_back(pcloudDataProducer);
|
attachedStimulusProducers.push_back(pcloudDataProducer);
|
||||||
|
|
||||||
pcloudDataProducer->start();
|
pcloudDataProducer->start();
|
||||||
@@ -345,7 +345,7 @@ public:
|
|||||||
|
|
||||||
context->stimProducer->stop();
|
context->stimProducer->stop();
|
||||||
// Remove stimulus producer from collection before destroying device
|
// Remove stimulus producer from collection before destroying device
|
||||||
context->stimProducer->device->nAttachedStimBuffs--;
|
context->stimProducer->device->nAttachedStimulusProducers--;
|
||||||
auto it = std::find(
|
auto it = std::find(
|
||||||
attachedStimulusProducers.begin(), attachedStimulusProducers.end(),
|
attachedStimulusProducers.begin(), attachedStimulusProducers.end(),
|
||||||
context->stimProducer);
|
context->stimProducer);
|
||||||
|
|||||||
Reference in New Issue
Block a user