Class Node::Input

Nested Relationships

This class is a nested type of Class Node.

Inheritance Relationships

Base Type

Class Documentation

class Input : public dai::MessageQueue

Public Types

enum class Type

Values:

enumerator SReceiver
enumerator MReceiver

Public Functions

~Input() override
inline explicit Input(Node &par, InputDescription desc, bool ref = true)
inline const Node &getParent() const

Get the parent node

inline Node &getParent()

Get the parent node

inline Type getType() const

Get type

std::string toString() const

Input to string representation

void 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:

waitForMessage – Whether to wait for message to arrive to this input or not

bool 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

std::vector<DatatypeHierarchy> getPossibleDatatypes() const

Get possible datatypes that can be received

void setPossibleDatatypes(std::vector<DatatypeHierarchy> types)

Set possible datatypes that can be received

void setReusePreviousMessage(bool reusePreviousMessage)

Equivalent to setWaitForMessage but with inverted logic.

bool getReusePreviousMessage() const

Equivalent to getWaitForMessage but with inverted logic.

void setGroup(std::string group)

Set group name for this input

std::string getGroup() const

Get group name for this input

bool isConnected() const

Check if this input is connected

std::shared_ptr<InputQueue> createInputQueue(unsigned int maxSize = INPUT_QUEUE_DEFAULT_MAX_SIZE, bool blocking = INPUT_QUEUE_DEFAULT_BLOCKING)

Create an shared pointer to an input queue that can be used to send messages to this input from onhost.

Parameters:
  • maxSize – Maximum size of the input queue

  • blocking – Whether the input queue should block when full

Returns:

std::shared_ptr<InputQueue>: shared pointer to an input queue

Public Members

std::vector<DatatypeHierarchy> possibleDatatypes

Public Static Attributes

static constexpr bool INPUT_QUEUE_DEFAULT_BLOCKING = false

Default value for the blocking argument in the createInputQueue method

static constexpr unsigned int INPUT_QUEUE_DEFAULT_MAX_SIZE = 16

Default value for the maxSize argument in the createInputQueue method

Protected Attributes

std::vector<Output*> connectedOutputs