Public Types | Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
dai::Node::Input Class Reference

#include <Node.hpp>

Public Types

enum  Type { Type::SReceiver, Type::MReceiver }
 

Public Member Functions

bool getBlocking () const
 
NodegetParent ()
 
const NodegetParent () const
 
int getQueueSize () const
 
bool getReusePreviousMessage () const
 
bool getWaitForMessage () const
 
 Input (Node &par, std::string group, std::string n, Type t, bool blocking, int queueSize, bool waitForMessage, std::vector< DatatypeHierarchy > types)
 Constructs Input with specified blocking and queueSize as well as additional options. More...
 
 Input (Node &par, std::string n, Type t, bool blocking, int queueSize, bool waitForMessage, std::vector< DatatypeHierarchy > types)
 Constructs Input with specified blocking and queueSize as well as additional options. More...
 
 Input (Node &par, std::string n, Type t, bool blocking, int queueSize, std::vector< DatatypeHierarchy > types)
 Constructs Input with specified blocking and queueSize options. More...
 
 Input (Node &par, std::string n, Type t, std::vector< DatatypeHierarchy > types)
 Constructs Input with default blocking and queueSize options. More...
 
void setBlocking (bool blocking)
 
void setQueueSize (int size)
 
void setReusePreviousMessage (bool reusePreviousMessage)
 
void setWaitForMessage (bool waitForMessage)
 
std::string toString () const
 Input to string representation. More...
 

Public Attributes

tl::optional< bool > blocking
 
bool defaultBlocking {true}
 
int defaultQueueSize {8}
 
bool defaultWaitForMessage {false}
 
std::string group = ""
 
std::string name
 
std::vector< DatatypeHierarchypossibleDatatypes
 
tl::optional< int > queueSize
 
Type type
 
tl::optional< bool > waitForMessage
 

Private Attributes

Nodeparent
 

Friends

class Output
 

Detailed Description

Definition at line 147 of file Node.hpp.

Member Enumeration Documentation

◆ Type

Enumerator
SReceiver 
MReceiver 

Definition at line 151 of file Node.hpp.

Constructor & Destructor Documentation

◆ Input() [1/4]

dai::Node::Input::Input ( Node par,
std::string  n,
Type  t,
std::vector< DatatypeHierarchy types 
)
inline

Constructs Input with default blocking and queueSize options.

Definition at line 166 of file Node.hpp.

◆ Input() [2/4]

dai::Node::Input::Input ( Node par,
std::string  n,
Type  t,
bool  blocking,
int  queueSize,
std::vector< DatatypeHierarchy types 
)
inline

Constructs Input with specified blocking and queueSize options.

Definition at line 170 of file Node.hpp.

◆ Input() [3/4]

dai::Node::Input::Input ( Node par,
std::string  n,
Type  t,
bool  blocking,
int  queueSize,
bool  waitForMessage,
std::vector< DatatypeHierarchy types 
)
inline

Constructs Input with specified blocking and queueSize as well as additional options.

Definition at line 174 of file Node.hpp.

◆ Input() [4/4]

dai::Node::Input::Input ( Node par,
std::string  group,
std::string  n,
Type  t,
bool  blocking,
int  queueSize,
bool  waitForMessage,
std::vector< DatatypeHierarchy types 
)
inline

Constructs Input with specified blocking and queueSize as well as additional options.

Definition at line 184 of file Node.hpp.

Member Function Documentation

◆ getBlocking()

bool dai::Node::Input::getBlocking ( ) const

Get input queue behavior

Returns
True blocking, false overwriting

Definition at line 98 of file Node.cpp.

◆ getParent() [1/2]

Node& dai::Node::Input::getParent ( )
inline

Definition at line 194 of file Node.hpp.

◆ getParent() [2/2]

const Node& dai::Node::Input::getParent ( ) const
inline

Definition at line 197 of file Node.hpp.

◆ getQueueSize()

int dai::Node::Input::getQueueSize ( ) const

Get input queue size.

Returns
Maximum input queue size

Definition at line 109 of file Node.cpp.

◆ getReusePreviousMessage()

bool dai::Node::Input::getReusePreviousMessage ( ) const

Equivalent to getWaitForMessage but with inverted logic.

Definition at line 128 of file Node.cpp.

◆ getWaitForMessage()

bool dai::Node::Input::getWaitForMessage ( ) const

Get behavior whether to wait for this input when a Node processes certain data or not

Returns
Whether to wait for message to arrive to this input or not

Definition at line 120 of file Node.cpp.

◆ setBlocking()

void dai::Node::Input::setBlocking ( bool  blocking)

Overrides default input queue behavior.

Parameters
blockingTrue blocking, false overwriting

Definition at line 94 of file Node.cpp.

◆ setQueueSize()

void dai::Node::Input::setQueueSize ( int  size)

Overrides default input queue size. If queue size fills up, behavior depends on blocking attribute

Parameters
sizeMaximum input queue size

Definition at line 105 of file Node.cpp.

◆ setReusePreviousMessage()

void dai::Node::Input::setReusePreviousMessage ( bool  reusePreviousMessage)

Equivalent to setWaitForMessage but with inverted logic.

Definition at line 124 of file Node.cpp.

◆ setWaitForMessage()

void dai::Node::Input::setWaitForMessage ( bool  waitForMessage)

Overrides default wait for message behavior. Applicable for nodes with multiple inputs. Specifies behavior whether to wait for this input when a Node processes certain data or not.

Parameters
waitForMessageWhether to wait for message to arrive to this input or not

Definition at line 116 of file Node.cpp.

◆ toString()

std::string dai::Node::Input::toString ( ) const

Input to string representation.

Definition at line 51 of file Node.cpp.

Friends And Related Function Documentation

◆ Output

friend class Output
friend

Definition at line 162 of file Node.hpp.

Member Data Documentation

◆ blocking

tl::optional<bool> dai::Node::Input::blocking

Definition at line 157 of file Node.hpp.

◆ defaultBlocking

bool dai::Node::Input::defaultBlocking {true}

Definition at line 155 of file Node.hpp.

◆ defaultQueueSize

int dai::Node::Input::defaultQueueSize {8}

Definition at line 156 of file Node.hpp.

◆ defaultWaitForMessage

bool dai::Node::Input::defaultWaitForMessage {false}

Definition at line 161 of file Node.hpp.

◆ group

std::string dai::Node::Input::group = ""

Definition at line 152 of file Node.hpp.

◆ name

std::string dai::Node::Input::name

Definition at line 153 of file Node.hpp.

◆ parent

Node& dai::Node::Input::parent
private

Definition at line 148 of file Node.hpp.

◆ possibleDatatypes

std::vector<DatatypeHierarchy> dai::Node::Input::possibleDatatypes

Definition at line 163 of file Node.hpp.

◆ queueSize

tl::optional<int> dai::Node::Input::queueSize

Definition at line 158 of file Node.hpp.

◆ type

Type dai::Node::Input::type

Definition at line 154 of file Node.hpp.

◆ waitForMessage

tl::optional<bool> dai::Node::Input::waitForMessage

Definition at line 160 of file Node.hpp.


The documentation for this class was generated from the following files:


depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:20