StimBuff: make start/stop virtual;

We can now have the derived StimBuff class implement its own
start()/stop() preamble and epilogue.
This commit is contained in:
2025-11-01 22:03:28 -04:00
parent 05515743c5
commit 10e615e75e
3 changed files with 22 additions and 2 deletions
+2 -2
View File
@@ -67,7 +67,7 @@ public:
StimulusBuffer& operator=(StimulusBuffer&&) = default;
// Control methods
void start()
virtual void start()
{
std::cout << __func__ << ": Starting stimulus buffer for device "
<< deviceAttachmentSpec.deviceSelector << std::endl;
@@ -76,7 +76,7 @@ public:
scheduleNextTimeout();
}
void stop();
virtual void stop();
protected:
// Virtual functions for derived classes to override
@@ -32,6 +32,22 @@ ioUringAssemblyEngine(*this)
{
}
void PcloudStimulusBuffer::start()
{
// Call ioUringAssemblyEngine setup() as the final step
// ioUringAssemblyEngine.setup();
// Call base class start() as the final step
StimulusBuffer::start();
}
void PcloudStimulusBuffer::stop()
{
// Call base class stop() as the first step
StimulusBuffer::stop();
// Call ioUringAssemblyEngine stop() as the final step
// ioUringAssemblyEngine.finalize();
}
void PcloudStimulusBuffer::stimFrameProductionTimesliceInd()
{
// Release the spinlock for now
@@ -40,6 +40,10 @@ public:
PcloudStimulusBuffer(PcloudStimulusBuffer&&) = default;
PcloudStimulusBuffer& operator=(PcloudStimulusBuffer&&) = default;
// Control methods
void start() override;
void stop() override;
protected:
void stimFrameProductionTimesliceInd() override;