ESPHome
2024.10.2
|
The abstract base class for all script types. More...
#include <script.h>
Public Member Functions | |
virtual void | execute (Ts...)=0 |
Execute a new instance of this script. More... | |
virtual bool | is_running () |
Check if any instance of this script is currently running. More... | |
virtual void | stop () |
Stop all instances of this script. More... | |
void | execute_tuple (const std::tuple< Ts... > &tuple) |
void | set_name (const std::string &name) |
Public Member Functions inherited from esphome::Trigger< Ts... > | |
void | trigger (Ts... x) |
Inform the parent automation that the event has triggered. More... | |
void | set_automation_parent (Automation< Ts... > *automation_parent) |
void | stop_action () |
Stop any action connected to this trigger. More... | |
bool | is_action_running () |
Returns true if any action connected to this trigger is running. More... | |
Protected Member Functions | |
template<int... S> | |
void | execute_tuple_ (const std::tuple< Ts... > &tuple, seq< S... >) |
Protected Member Functions inherited from esphome::script::ScriptLogger | |
void | esp_logw_ (int line, const char *format, const char *param) |
void | esp_logd_ (int line, const char *format, const char *param) |
void | esp_log_ (int level, int line, const char *format, const char *param) |
Protected Attributes | |
std::string | name_ |
Protected Attributes inherited from esphome::Trigger< Ts... > | |
Automation< Ts... > * | automation_parent_ |
The abstract base class for all script types.
|
pure virtual |
Execute a new instance of this script.
The behavior of this function when a script is already running is defined by the subtypes
Implemented in esphome::script::ParallelScript< Ts >, esphome::script::QueueingScript< Ts >, esphome::script::RestartScript< Ts >, and esphome::script::SingleScript< Ts >.
|
inline |
|
inlineprotected |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
Stop all instances of this script.
Reimplemented in esphome::script::QueueingScript< Ts >.
|
protected |