Class Pipeline

Class Documentation

class Pipeline

Represents the pipeline, set of nodes and connections between them.

Public Types

using NodeConnectionMap = PipelineImpl::NodeConnectionMap

Public Functions

inline PipelineImpl *impl()
inline const PipelineImpl *impl() const
inline std::vector<std::shared_ptr<Node>> getSourceNodes()
explicit Pipeline(bool createImplicitDevice = true)

Creates a pipeline

Parameters:

createImplicitDevice – If true, creates a default device (default = true)

explicit Pipeline(std::shared_ptr<Device> device)

Creates a pipeline with specified device

explicit Pipeline(std::shared_ptr<PipelineImpl> pimpl)

Creates a pipeline with specified device

inline GlobalProperties getGlobalProperties() const
Returns:

Global properties of current pipeline

inline void setGlobalProperties(GlobalProperties globalProperties)

Sets global properties of pipeline

PipelineSchema getPipelineSchema(SerializationType type = DEFAULT_SERIALIZATION_TYPE) const
Returns:

Pipeline schema

inline void serialize(PipelineSchema &schema, Assets &assets, std::vector<std::uint8_t> &assetStorage) const
inline nlohmann::json serializeToJson(bool includeAssests = true) const

Returns whole pipeline represented as JSON.

template<class N, typename ...Args>
inline std::shared_ptr<N> create(Args&&... args)

Creates and adds a node to the pipeline.

Node is specified by template argument N

inline void add(std::shared_ptr<Node> node)

Adds an existing node to the pipeline

inline void remove(std::shared_ptr<Node> node)

Removes a node from pipeline.

inline std::vector<std::shared_ptr<Node>> getAllNodes() const

Get a vector of all nodes.

inline std::shared_ptr<const Node> getNode(Node::Id id) const

Get node with id if it exists, nullptr otherwise.

inline std::shared_ptr<Node> getNode(Node::Id id)

Get node with id if it exists, nullptr otherwise.

inline std::vector<Node::Connection> getConnections() const

Get all connections.

inline NodeConnectionMap getConnectionMap() const
inline const AssetManager &getAssetManager() const

Get pipelines AssetManager as reference.

inline AssetManager &getAssetManager()

Get pipelines AssetManager as reference.

inline void setOpenVINOVersion(OpenVINO::Version version)

Set a specific OpenVINO version to use with this pipeline.

inline void setCalibrationData(CalibrationHandler calibrationDataHandler)

Sets the calibration in pipeline which overrides the calibration data in eeprom

Parameters:

calibrationDataHandlerCalibrationHandler object which is loaded with calibration information.

inline CalibrationHandler getCalibrationData() const

gets the calibration data which is set through pipeline

Returns:

the calibrationHandler with calib data in the pipeline

inline bool isCalibrationDataAvailable() const

check if calib data has been set or the default will be returned

Returns:

true - calib data has been set

Returns:

false - calib data has not been set - default will be returned

inline std::optional<EepromData> getEepromData() const

gets the eeprom data from the pipeline

Returns:

eepromData from the the pipeline

inline void setEepromData(std::optional<EepromData> eepromData)

Sets the eeprom data in pipeline

Parameters:

eepromDataEepromData object that is loaded in the pipeline.

inline uint32_t getEepromId() const

Gets the eeprom id from the pipeline

Returns:

eeprom id from the pipeline

inline void setCameraTuningBlobPath(const fs::path &path)

Set a camera IQ (Image Quality) tuning blob, used for all cameras.

inline void setXLinkChunkSize(int sizeBytes)

Set chunk size for splitting device-sent XLink packets, in bytes. A larger value could increase performance, with 0 disabling chunking. A negative value won’t modify the device defaults - configured per protocol, currently 64*1024 for both USB and Ethernet.

inline void setSippBufferSize(int sizeBytes)

SIPP (Signal Image Processing Pipeline) internal memory pool. SIPP is a framework used to schedule HW filters, e.g. ISP, Warp, Median filter etc. Changing the size of this pool is meant for advanced use cases, pushing the limits of the HW. By default memory is allocated in high speed CMX memory. Setting to 0 will allocate in DDR 256 kilobytes. Units are bytes.

inline void setSippDmaBufferSize(int sizeBytes)

SIPP (Signal Image Processing Pipeline) internal DMA memory pool. SIPP is a framework used to schedule HW filters, e.g. ISP, Warp, Median filter etc. Changing the size of this pool is meant for advanced use cases, pushing the limits of the HW. Memory is allocated in high speed CMX memory Units are bytes.

inline void setBoardConfig(BoardConfig board)

Sets board configuration.

inline BoardConfig getBoardConfig() const

Gets board configuration.

inline Device::Config getDeviceConfig() const

Get device configuration needed for this pipeline.

inline bool isRunning() const
inline bool isBuilt() const
inline void build()
inline void start()
inline void wait()
inline void stop()
inline void processTasks(bool waitForTasks = false, double timeoutSeconds = -1.0)
inline void run()
inline std::shared_ptr<Device> getDefaultDevice()
inline void addTask(std::function<void()> task)
void enableHolisticRecord(const RecordConfig &config)

Record and Replay.

void enableHolisticReplay(const std::string &pathToRecording)