From e9b4e15b79f3335f12abe57358784d00685b3410 Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Sat, 25 Oct 2025 18:56:30 -0400 Subject: [PATCH] Add base class StimulusBuffer --- include/user/stimulusBuffer.h | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 include/user/stimulusBuffer.h diff --git a/include/user/stimulusBuffer.h b/include/user/stimulusBuffer.h new file mode 100644 index 0000000..b7e2f97 --- /dev/null +++ b/include/user/stimulusBuffer.h @@ -0,0 +1,43 @@ +#ifndef _STIMULUS_BUFFER_H +#define _STIMULUS_BUFFER_H + +#include +#include +#include +#include +#include +#include "stimFrame.h" + +namespace smo { +namespace stim_buff { + +/** + * StimulusBuffer manages a collection of stimulus frames with simultaneity stamps. + * + * This buffer is designed to hold stimulus frames that have been assembled + * from raw sensor data (e.g., Livox Avia point cloud data) and are ready + * for processing by the mind layer. + * + * The buffer provides thread-safe operations for adding frames, retrieving + * frames, and managing the buffer state. + */ +class StimulusBuffer +{ +public: + explicit StimulusBuffer(); + ~StimulusBuffer(); + + // Non-copyable, movable + StimulusBuffer(const StimulusBuffer&) = delete; + StimulusBuffer& operator=(const StimulusBuffer&) = delete; + StimulusBuffer(StimulusBuffer&&) = default; + StimulusBuffer& operator=(StimulusBuffer&&) = default; + +private: + std::vector frames_; +}; + +} // namespace stim_buff +} // namespace smo + +#endif // _STIMULUS_BUFFER_H