Class Pipeline

Class Documentation

class Pipeline

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

Public Types

using AutoCalibrationMode = PipelineAutoCalibrationMode
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

inline void setDefaultDeviceProperties(DeviceProperties deviceProperties)

Sets default device properties

inline void setDefaultDevicePropertiesRef(DeviceProperties *deviceProperties)

Sets default device properties reference. The properties should live at least as long as the pipeline.

inline std::optional<DeviceProperties> getDefaultDeviceProperties() const

Gets a copy of default device properties. If pipeline is in host only mode, returns host properties, otherwise returns device properties

PipelineSchema getPipelineSchema(SerializationType type = DEFAULT_SERIALIZATION_TYPE, bool includePipelineDebugging = true) const
Returns:

Pipeline schema

PipelineSchema getDevicePipelineSchema(SerializationType type = DEFAULT_SERIALIZATION_TYPE, bool includePipelineDebugging = true) const
Returns:

Device pipeline schema (without host only nodes and connections)

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 is available on the device

Returns:

true - calib data is available

Returns:

false - calib data is not available

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 setCameraTuningBlobPath(CameraBoardSocket socket, const fs::path &path)

Set a camera IQ (Image Quality) tuning blob, used for specific board socket.

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 void setAutoCalibration(AutoCalibrationMode mode)

Sets implicit automatic calibration policy for this pipeline.

inline AutoCalibrationMode getAutoCalibration() const

Gets implicit automatic calibration policy for this pipeline.

inline void setAutoCalibrationMode(AutoCalibrationMode mode)

Sets implicit automatic calibration policy for this pipeline.

inline AutoCalibrationMode getAutoCalibrationMode() const

Gets implicit automatic calibration policy for this pipeline.

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 buildDevice()
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)
bool isHolisticRecordEnabled() const
bool isHolisticReplayEnabled() const
void enablePipelineDebugging(bool enable = true)

Pipeline debugging.

bool isPipelineDebuggingEnabled() const
std::shared_ptr<MessageQueue> getPipelineStateOut() const
std::shared_ptr<InputQueue> getPipelineStateRequest() const
PipelineStateApi getPipelineState()