template class OutputMQTTNode

Overview

Output node used to connect an MQTT publisher to the computational graph. More…

#include <output_node.h>

template <class MSG_TYPE>
class OutputMQTTNode: public OutputNode {
public:
    // construction

    OutputMQTTNode(
        const std::string& id,
        const std::string& address,
        bool publishFromCache = false,
        unsigned int computePeriod = 1
    );

    // methods

    virtual std::string typeStr() const;
};

// direct descendants

template <class MSG_TYPE>
class DPOutputMQTTNode;

Inherited Members

public:
    // enums

    enum NodeType;

    // fields

    static const static std::map<NodeType, std::string> nodeTypeStr = {{ComputationalNode::Input, "Input"},                                                                                            {ComputationalNode::Output, "Output"},                                                                                            {ComputationalNode::Functional, "Functional"}};

    // methods

    const std::string& id() const;
    NodeType type() const;
    virtual std::string typeStr() const;
    void setVisited(bool visited);
    bool isVisited() const;
    void setDoCompute(bool doCompute);
    virtual bool doCompute() const;

    static std::pair<std::string, std::string> parseNodeAddress(
        const std::string& address,
        bool hasPort = true
    );

    template <class T_IN>
    InputPort<T_IN, DATA>* getOrRegisterInput(const std::string& id);

    unsigned int getComputePeriod();
    void setComputePeriod(unsigned int computePeriod);
    bool publishFromCache();
    virtual bool doCompute() const;

Detailed Documentation

Output node used to connect an MQTT publisher to the computational graph.

The template parameter MSG_TYPE is the MQTT msg type this node can publish

Construction

OutputMQTTNode(
    const std::string& id,
    const std::string& address,
    bool publishFromCache = false,
    unsigned int computePeriod = 1
)

Constructor.

Methods

virtual std::string typeStr() const

Returns the node ‘type’ as a string.