Stimulus[Buffer|Frame]: initial impl, unoptimized for mem use
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#define _ATTACHMENT_SUPPORT_STIMULUS_FRAME_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <user/stagingBuffer.h>
|
||||
#include <user/sequenceLock.h>
|
||||
|
||||
namespace smo {
|
||||
namespace stim_buff {
|
||||
@@ -61,7 +63,32 @@ typedef uint64_t SimultaneityStamp;
|
||||
class StimulusFrame
|
||||
{
|
||||
public:
|
||||
/** EXPLANATION:
|
||||
* Default constructor creates uninitialized frame.
|
||||
* Must be properly initialized using placement new with the parameterized constructor.
|
||||
*/
|
||||
StimulusFrame() = default;
|
||||
|
||||
StimulusFrame(
|
||||
const StagingBuffer::IOEngineConstraints& inputEngineConstraints,
|
||||
const StagingBuffer::IOEngineConstraints& outputEngineConstraints,
|
||||
size_t nSlots)
|
||||
: stagingBuffer(
|
||||
inputEngineConstraints, outputEngineConstraints, nSlots)
|
||||
{}
|
||||
|
||||
~StimulusFrame() = default;
|
||||
|
||||
// Non-copyable, movable
|
||||
StimulusFrame(const StimulusFrame&) = delete;
|
||||
StimulusFrame& operator=(const StimulusFrame&) = delete;
|
||||
StimulusFrame(StimulusFrame&&) = default;
|
||||
StimulusFrame& operator=(StimulusFrame&&) = default;
|
||||
|
||||
public:
|
||||
SequenceLock lock;
|
||||
SimultaneityStamp simultaneityStamp;
|
||||
StagingBuffer stagingBuffer;
|
||||
};
|
||||
|
||||
} // namespace stim_buff
|
||||
|
||||
Reference in New Issue
Block a user