nusabot-connect

nusabotid/nusabot-mqtt/nusabot-connect

No description
nusabot-connect
@/nusabot-connect
MQTTnusabotid/nusabot-mqtt-broker/nusabot-device
Portnumber
CONNpulse
Establish the connection
nusabot-connect
OUT
DONE
ERR
MQTT
Port
CONN
ERRpulse
Pulses if the connection failed
DONEpulse
Pulses on a successful connection
OUTnusabotid/nusabot-mqtt-broker/nusabot-device
To use the node in your project you should have the nusabotid/nusabot-mqtt library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

// clang-format off
{{#global}}
#include <ESP8266WiFi.h>
char* topicG;
char* payloadG;
unsigned int lengthG = 0;
{{/global}}
// clang-format on

struct State {
};

// clang-format off
{{ GENERATED_CODE }}
// clang-format on

void evaluate(Context ctx) {
    auto MQTT = getValue<input_MQTT>(ctx);
    auto state = getState(ctx);

    if (isInputDirty<input_CONN>(ctx)) {

            emitValue<output_DONE>(ctx, true);
            emitValue<output_OUT>(ctx, MQTT);

    }


}