.. index:: pair: class; OutputNode .. _doxid-class_output_node: template class OutputNode ========================= .. toctree:: :hidden: Overview ~~~~~~~~ Implementation of an output node in the computation graph. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include template class OutputNode: public :ref:`ComputationalNode` { public: // construction :ref:`OutputNode`( const std::string& id, :ref:`OutputNodePolicies::PublishFormatPolicy` publishFormatPolicy = OutputNodePolicies::PublishFormatPolicy::SERIES, bool publishFromCache = false, int maxPortConnections = 0, unsigned int computePeriod = 1 ); // methods template :ref:`InputPort`* :ref:`getOrRegisterInput`(const std::string& id); unsigned int :target:`getComputePeriod`(); void :target:`setComputePeriod`(unsigned int computePeriod); bool :target:`publishFromCache`(); virtual bool :ref:`doCompute`() const; }; // direct descendants class :ref:`OutputDummy`; class :ref:`OutputEngineNode`; template class :ref:`OutputMQTTNode`; template class :ref:`OutputROSNode`; class :ref:`OutputSpinnakerNode`; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // enums enum :ref:`NodeType`; // fields static const static std::map<:ref:`NodeType`, std::string> :ref:`nodeTypeStr` = {{:ref:`ComputationalNode::Input`, "Input"}, {ComputationalNode::Output, "Output"}, {ComputationalNode::Functional, "Functional"}}; // methods const std::string& :ref:`id`() const; :ref:`NodeType` :ref:`type`() const; virtual std::string :ref:`typeStr`() const; void :ref:`setVisited`(bool visited); bool :ref:`isVisited`() const; void :ref:`setDoCompute`(bool doCompute); virtual bool :ref:`doCompute`() const; static std::pair :ref:`parseNodeAddress`( const std::string& address, bool hasPort = true ); .. _details-class_output_node: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Implementation of an output node in the computation graph. Output nodes are the connection point to send data out of the computation graph. In its 'compute' operation all messages received since last 'compute' are sent using the 'sendSingleMsg' implemented by derived classes. Construction ------------ .. index:: pair: function; OutputNode .. _doxid-class_output_node_1a35ad2464116f596ef94c2314b83c3ce2: .. ref-code-block:: cpp :class: doxyrest-title-code-block OutputNode( const std::string& id, :ref:`OutputNodePolicies::PublishFormatPolicy` publishFormatPolicy = OutputNodePolicies::PublishFormatPolicy::SERIES, bool publishFromCache = false, int maxPortConnections = 0, unsigned int computePeriod = 1 ) Constructor. Methods ------- .. index:: pair: function; getOrRegisterInput .. _doxid-class_output_node_1a833d82862c1d613aab1448c3e0157237: .. ref-code-block:: cpp :class: doxyrest-title-code-block template :ref:`InputPort`* getOrRegisterInput(const std::string& id) Gets or register input port to this node and returns a pointer to it. .. index:: pair: function; doCompute .. _doxid-class_output_node_1a813b1573231b6a3d5e97b16b90360fd5: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool doCompute() const Tells if this node should be executed in this graph execution cycle, used in some graph execution modes. :ref:`ComputationalNode ` returns the value of its 'doCompute' property. Subclasses of :ref:`ComputationalNode ` can implement further logic that can override this value