Rename StimulusBuffer=>StimulusProducer
Next we'll split the StimulusBuffer-related stuff into a new class StimulusBuffer.
This commit is contained in:
@@ -28,10 +28,10 @@ const SmoCallbacks* smoHooksPtr = nullptr;
|
||||
static SmoThreadingModelDesc smoThreadingModelDesc;
|
||||
|
||||
// Local collection of stimulus producers
|
||||
static std::vector<std::shared_ptr<StimulusBuffer>> attachedDataProducers;
|
||||
static std::vector<std::shared_ptr<StimulusProducer>> attachedDataProducers;
|
||||
|
||||
// Get stimulus producer by device attachment spec
|
||||
static std::shared_ptr<StimulusBuffer>
|
||||
static std::shared_ptr<StimulusProducer>
|
||||
getDataProducer(const std::shared_ptr<smo::device::DeviceAttachmentSpec>& spec)
|
||||
{
|
||||
for (const auto& dataProducer : attachedDataProducers)
|
||||
@@ -194,8 +194,8 @@ public:
|
||||
}
|
||||
|
||||
// Create and add PcloudDataProducer to collection now that device is ready
|
||||
StimulusBuffer::PcloudFormatDesc formatDesc;
|
||||
formatDesc.format = StimulusBuffer::PcloudFormatDesc::Format::XYZI;
|
||||
StimulusProducer::PcloudFormatDesc formatDesc;
|
||||
formatDesc.format = StimulusProducer::PcloudFormatDesc::Format::XYZI;
|
||||
auto pcloudDataProducer = std::make_shared<PcloudDataProducer>(
|
||||
context->spec, context->deviceTmp, formatDesc, histbuffMs, 30);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ PcloudDataProducer::PcloudDataProducer(
|
||||
const PcloudFormatDesc& formatDesc,
|
||||
int histbuffMs,
|
||||
size_t nDgramsPerStagingBufferFrame)
|
||||
: StimulusBuffer(
|
||||
: StimulusProducer(
|
||||
deviceAttachmentSpec,
|
||||
static_cast<size_t>(histbuffMs / CONFIG_STIMBUFF_FRAME_PERIOD_MS),
|
||||
openClInputConstraints,
|
||||
@@ -87,13 +87,13 @@ void PcloudDataProducer::start()
|
||||
}
|
||||
|
||||
// Call base class start() as the final step
|
||||
StimulusBuffer::start();
|
||||
StimulusProducer::start();
|
||||
}
|
||||
|
||||
void PcloudDataProducer::stop()
|
||||
{
|
||||
// Call base class stop() as the first step
|
||||
StimulusBuffer::stop();
|
||||
StimulusProducer::stop();
|
||||
// Call ioUringAssemblyEngine stop() as the final step
|
||||
openClCollatingAndMeshingEngine.finalize();
|
||||
ioUringAssemblyEngine.finalize();
|
||||
@@ -211,9 +211,9 @@ void PcloudDataProducer::produceFrameReq(
|
||||
smo::Callback<produceFrameReqCbFn> callback)
|
||||
{
|
||||
/** EXPLANATION:
|
||||
* We shouldn't acquire the StimulusBuffer::shouldContinueLock here because
|
||||
* We shouldn't acquire the StimulusProducer::shouldContinueLock here because
|
||||
* this function is called from
|
||||
* StimulusBuffer::stimFrameProductionTimesliceInd(), which is already
|
||||
* StimulusProducer::stimFrameProductionTimesliceInd(), which is already
|
||||
* holding the lock.
|
||||
*/
|
||||
auto caller = smoHooksPtr->ComponentThread_getSelf();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <functional>
|
||||
#include <atomic>
|
||||
#include <user/stimulusBuffer.h>
|
||||
#include <user/stimulusProducer.h>
|
||||
#include <livoxProto1/device.h>
|
||||
#include <asynchronousContinuation.h>
|
||||
#include <callback.h>
|
||||
@@ -15,15 +15,15 @@ namespace smo {
|
||||
namespace stim_buff {
|
||||
|
||||
/**
|
||||
* PcloudDataProducer is a specialized StimulusBuffer for point cloud data.
|
||||
* PcloudDataProducer is a specialized StimulusProducer for point cloud data.
|
||||
*
|
||||
* This class extends StimulusBuffer to handle point cloud-specific stimulus
|
||||
* This class extends StimulusProducer to handle point cloud-specific stimulus
|
||||
* frames, particularly those generated from LiDAR point cloud data. It
|
||||
* provides additional functionality for managing point cloud frame metadata
|
||||
* and processing.
|
||||
*/
|
||||
class PcloudDataProducer
|
||||
: public StimulusBuffer
|
||||
: public StimulusProducer
|
||||
{
|
||||
public:
|
||||
explicit PcloudDataProducer(
|
||||
|
||||
Reference in New Issue
Block a user