StimBuff: Make virtual so we can dynamic_cast in getOrCreateStimBuff

This commit is contained in:
2025-11-16 02:23:53 -04:00
parent addd2e275d
commit c5ed453bb4
6 changed files with 162 additions and 12 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ public:
ringBufferConstraints)
{}
~StimulusBuffer() = default;
virtual ~StimulusBuffer() = default;
// Non-copyable, movable
StimulusBuffer(const StimulusBuffer&) = delete;
+4 -1
View File
@@ -69,13 +69,16 @@ public:
void allowNextStimulusFrame()
{ frameAssemblyRateLimiter.release(); }
std::shared_ptr<StimulusBuffer> getAttachedStimulusBuffer(
virtual std::shared_ptr<StimulusBuffer> getAttachedStimulusBuffer(
const std::shared_ptr<device::DeviceAttachmentSpec>& spec) const;
virtual std::shared_ptr<StimulusBuffer> getOrCreateAttachedStimulusBuffer(
const std::shared_ptr<device::DeviceAttachmentSpec>& deviceAttachmentSpec,
int histbuffMs) = 0;
// Check if any attached buffer has the specified qualeIfaceApi
bool hasBufferWithQualeIfaceApi(const std::string& qualeIfaceApi) const;
protected:
SpinLock frameAssemblyRateLimiter;