Add base class StimulusBuffer
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#ifndef _STIMULUS_BUFFER_H
|
||||
#define _STIMULUS_BUFFER_H
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <cstdint>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#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<StimFrame> frames_;
|
||||
};
|
||||
|
||||
} // namespace stim_buff
|
||||
} // namespace smo
|
||||
|
||||
#endif // _STIMULUS_BUFFER_H
|
||||
Reference in New Issue
Block a user