1#ifndef SENSESP_SRC_SENSESP_SIGNALK_SYSTEM_ASYNC_RESPONSE_HANDLER_H_
2#define SENSESP_SRC_SENSESP_SIGNALK_SYSTEM_ASYNC_RESPONSE_HANDLER_H_
7#include <elapsedMillis.h>
47 ESP_LOGV(
"AsyncResponseHandler",
"Activating response handler");
59 ESP_LOGV(
"AsyncResponseHandler",
"Timeout");
67 void set(
const bool& success)
override {
68 ESP_LOGV(
"AsyncResponseHandler",
"status: %d",
status_);
70 ESP_LOGV(
"AsyncResponseHandler",
71 "Received response when not in pending state");
81 ESP_LOGV(
"AsyncResponseHandler",
"Received response: %d", success);
Handle async command responses from remote systems.
void set(const bool &success) override
void activate()
Activate must be called when a command is sent to the remote system.
AsyncResponseHandler(int timeout)
const AsyncResponseStatus get_status() const
AsyncResponseStatus status_
reactesp::DelayEvent * timeout_event_
elapsedMillis elapsed_millis_
A base class for piece of code (like a transform) that accepts data for input. ValueConsumers can acc...
A base class for any sensor or piece of code that outputs a value for consumption elsewhere.
void emit(const AsyncResponseStatus &new_value)
std::shared_ptr< reactesp::EventLoop > event_loop()