SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
|
Used to send requests to the server to change the value of the specified path to a specific value according to the specification at https://signalk.org/specification/1.5.0/doc/put.html. More...
#include <sensesp/signalk/signalk_put_request.h>
Public Member Functions | |
SKPutRequest (String sk_path, String config_path="", bool ignore_duplicates=true, uint32_t timeout=5000) | |
virtual void | set (const T &new_value) override |
virtual void | set_put_value (JsonObject &put_data) override |
Public Member Functions inherited from sensesp::SKPutRequestBase | |
SKPutRequestBase (const String &sk_path, const String &config_path="", uint32_t timeout=5000) | |
virtual bool | to_json (JsonObject &root) override |
virtual bool | from_json (const JsonObject &config) override |
String | get_sk_path () |
bool | request_pending () |
Public Member Functions inherited from sensesp::FileSystemSaveable | |
FileSystemSaveable (const String &config_path) | |
virtual bool | load () override |
Load and populate the object from a persistent storage. | |
virtual bool | save () override |
Save the object to a persistent storage. | |
virtual bool | clear () override |
Delete the data from a persistent storage. | |
bool | find_config_file (const String &config_path, String &filename) |
Public Member Functions inherited from sensesp::Saveable | |
Saveable (const String &config_path) | |
virtual bool | refresh () |
Refresh the object. This may or may not access the persistent storage but is not expected to overwrite the object's state. | |
const String & | get_config_path () const |
Public Member Functions inherited from sensesp::Serializable | |
Public Member Functions inherited from sensesp::ValueConsumer< T > | |
virtual void | set_input (const T &new_value) |
void | connect_from (ValueProducer< T > *producer) |
Protected Attributes | |
T | value_ |
bool | ignore_duplicates_ |
Protected Attributes inherited from sensesp::SKPutRequestBase | |
String | sk_path {} |
uint32_t | timeout {} |
String | pending_request_id_ {} |
Protected Attributes inherited from sensesp::Saveable | |
const String | config_path_ |
Additional Inherited Members | |
Public Types inherited from sensesp::ValueConsumer< T > | |
using | input_type = T |
Static Public Member Functions inherited from sensesp::SKRequest | |
static String | send_request (JsonDocument &request, std::function< void(JsonDocument &)> callback, uint32_t timeout=5000) |
static void | handle_response (JsonDocument &response) |
Protected Member Functions inherited from sensesp::SKPutRequestBase | |
void | send_put_request () |
virtual void | on_response (JsonDocument &response) |
Static Protected Member Functions inherited from sensesp::SKRequest | |
static void | remove_request (String request_id) |
static PendingRequest * | get_request (String request_id) |
Static Protected Attributes inherited from sensesp::SKRequest | |
static std::map< String, PendingRequest * > | request_map_ |
Used to send requests to the server to change the value of the specified path to a specific value according to the specification at https://signalk.org/specification/1.5.0/doc/put.html.
Definition at line 133 of file signalk_put_request.h.
|
inline |
The constructor
sk_path | The SignalK path the put request will be made on |
config_path | The configuration path to save the configuration |
ignore_duplicates | TRUE if incoming values that have not changed since the last one should not generated a PUT request |
timeout | The number of milliseconds to wait for a COMPLETED or FAILED response to be received from the server |
Definition at line 145 of file signalk_put_request.h.
|
inlineoverridevirtual |
Used to set an input of this consumer. It is called automatically by a ValueProducer but can also be called manually.
new_value | the value of the input |
Reimplemented from sensesp::ValueConsumer< T >.
Definition at line 150 of file signalk_put_request.h.
|
inlineoverridevirtual |
Sets the "value" field of the put request with the appropriate value.
Implements sensesp::SKPutRequestBase.
Definition at line 163 of file signalk_put_request.h.
|
protected |
Definition at line 169 of file signalk_put_request.h.
|
protected |
Definition at line 168 of file signalk_put_request.h.