Rename StimulusBuffer=>StimulusProducer

Next we'll split the StimulusBuffer-related stuff into a new class
StimulusBuffer.
This commit is contained in:
2025-11-14 19:50:51 -04:00
parent 74e3896ae4
commit 70c0175a8b
6 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
add_library(attachmentSupport SHARED
stimulusBuffer.cpp
stimulusProducer.cpp
)
target_include_directories(attachmentSupport PUBLIC
@@ -8,12 +8,12 @@
#include <opts.h>
#include <componentThread.h>
#include <spinLock.h>
#include <user/stimulusBuffer.h>
#include <user/stimulusProducer.h>
namespace smo {
namespace stim_buff {
void StimulusBuffer::stop()
void StimulusProducer::stop()
{
{
SpinLock::Guard lock(shouldContinueLock);
@@ -23,11 +23,11 @@ void StimulusBuffer::stop()
// Cancel timer immediately
timer.cancel();
std::cout << __func__ << ": Stopped stimulus buffer for device "
std::cout << __func__ << ": Stopped stimulus producer for device "
<< deviceAttachmentSpec->deviceSelector << std::endl;
}
void StimulusBuffer::scheduleNextTimeout(int delayMs)
void StimulusProducer::scheduleNextTimeout(int delayMs)
{
if (!shouldContinue)
{ return; }
@@ -38,10 +38,10 @@ void StimulusBuffer::scheduleNextTimeout(int delayMs)
timer.async_wait(
std::bind(
&StimulusBuffer::onTimeout, this, std::placeholders::_1));
&StimulusProducer::onTimeout, this, std::placeholders::_1));
}
void StimulusBuffer::onTimeout(const boost::system::error_code& error)
void StimulusProducer::onTimeout(const boost::system::error_code& error)
{
// Timer was cancelled, which is expected when stopping
if (error == boost::asio::error::operation_aborted) {
@@ -50,7 +50,7 @@ void StimulusBuffer::onTimeout(const boost::system::error_code& error)
if (error)
{
std::cerr << "StimulusBuffer: Timer error: " << error.message()
std::cerr << "StimulusProducer: Timer error: " << error.message()
<< std::endl;
return;
}