get-local-ip

xod/esp8266/get-local-ip

Requests local IP from ESP8266 device, that connected to some network
get-local-ip
@/get-local-ip
Requests local IP from ESP8266 device, that connected to some network
DEV@/esp8266-device
An ESP8266 internet provider device
UPDpulse
Send request for local IP address
get-local-ip
IP
DONE
DEV
UPD
DONEpulse
Pulses when IP address received
IPxod/net/ip-address
A local IP address

C++ implementation

struct State {
};

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

void evaluate(Context ctx) {
    if (!isInputDirty<input_UPD>(ctx))
        return;

    auto esp = getValue<input_DEV>(ctx);
    ValueType<output_IP>::T ip = esp.wifi->getIP();
    emitValue<output_IP>(ctx, ip);
    emitValue<output_DONE>(ctx, 1);
}