Skip to main content

Output Class

Pull handle for a node's output stream. More...

Declaration

class simaai::neat::graph::GraphRun::Output { ... }

Included Headers

#include <GraphRun.h>

Friends Index

classGraphRun

Private Constructors Index

Output (GraphRun *run, NodeId node)

Public Member Functions Index

std::optional< Sample >pull (int timeout_ms=-1, GraphRunStats *stats=nullptr) const

Pull one sample. timeout_ms < 0 blocks indefinitely; returns nullopt on timeout. More...

Samplepull_or_throw (int timeout_ms=-1, GraphRunStats *stats=nullptr) const

Like pull() but throws SessionError on timeout. More...

NodeIdnode_id () const

Node this output belongs to. More...

Private Member Attributes Index

GraphRun *run_ = nullptr
NodeIdnode_ = kInvalidNode

Description

Pull handle for a node's output stream.

Obtained from GraphRun::output(node_id). Optionally records to a GraphRunStats collector on every successful pull.

Definition at line 196 of file GraphRun.h.

Friends

GraphRun

friend class GraphRun

Definition at line 208 of file GraphRun.h.

208 friend class GraphRun;

Private Constructors

Output()

simaai::neat::graph::GraphRun::Output::Output (GraphRun * run, NodeId node)
inline

Definition at line 209 of file GraphRun.h.

209 Output(GraphRun* run, NodeId node) : run_(run), node_(node) {}

Public Member Functions

node_id()

NodeId simaai::neat::graph::GraphRun::Output::node_id ()
inline

Node this output belongs to.

Definition at line 203 of file GraphRun.h.

203 NodeId node_id() const {
204 return node_;
205 }

pull()

std::optional< Sample > simaai::neat::graph::GraphRun::Output::pull (int timeout_ms=-1, GraphRunStats * stats=nullptr)

Pull one sample. timeout_ms < 0 blocks indefinitely; returns nullopt on timeout.

Definition at line 199 of file GraphRun.h.

pull_or_throw()

Sample simaai::neat::graph::GraphRun::Output::pull_or_throw (int timeout_ms=-1, GraphRunStats * stats=nullptr)

Like pull() but throws SessionError on timeout.

Definition at line 201 of file GraphRun.h.

Private Member Attributes

node_

NodeId simaai::neat::graph::GraphRun::Output::node_ = kInvalidNode

Definition at line 212 of file GraphRun.h.

212 NodeId node_ = kInvalidNode;

run_

GraphRun* simaai::neat::graph::GraphRun::Output::run_ = nullptr

Definition at line 211 of file GraphRun.h.

211 GraphRun* run_ = nullptr;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.