Class ThreadedNode

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class ThreadedNode : public dai::Node

Subclassed by dai::DeviceNode, dai::node::ThreadedHostNode

Public Functions

ThreadedNode()
virtual ~ThreadedNode()
inline virtual void onStart()

Function called at the beginning of the start function.

This function may be overridden by the user to perform any needed tasks prior to starting this node’s main thread.

inline virtual void onStop()

Function called at the end of the stop function.

This function may be overridden by the user to perform any needed tasks directly after stopping this node’s main thread.

virtual void start() override

Start node execution.

virtual void wait() override

Wait for node to finish execution.

virtual void stop() override

Stop node execution.

virtual void run() = 0
bool isRunning() const
bool mainLoop()
virtual void setLogLevel(dai::LogLevel level)

Sets the logging severity level for this node.

Parameters:

level – Logging severity level

virtual dai::LogLevel getLogLevel() const

Gets the logging severity level for this node.

Returns:

Logging severity level

utility::PipelineEventDispatcherInterface::BlockPipelineEvent inputBlockEvent(bool startNow = true)

Creates a scoped event that sends start and end events for the getting inputs state.

utility::PipelineEventDispatcherInterface::BlockPipelineEvent outputBlockEvent(bool startNow = true)

Creates a scoped event that sends start and end events for the sending outputs state.

utility::PipelineEventDispatcherInterface::BlockPipelineEvent blockEvent(PipelineEvent::Type type, const std::string &source, bool startNow = true)

Creates a scoped event that sends start and end events for a custom block event.

Parameters:
  • type – Type of the event

  • source – Source name of the event

Node(const Node&) = delete
Node(Node&&) = delete
Node() = default
Node(bool conf)

Public Members

Output pipelineEventOutput = {*this, {"pipelineEventOutput", DEFAULT_GROUP, {{{DatatypeEnum::PipelineEvent, false}}}}}
spimpl::impl_ptr<Impl> pimpl

Friends

friend class utility::PipelineImplHelper