|
| LambdaTransform (std::function< OUT(IN)> function, String config_path="") |
|
| LambdaTransform (std::function< OUT(IN)> function, const ParamInfo *param_info, String config_path="") |
|
| LambdaTransform (std::function< OUT(IN, P1)> function, P1 param1, const ParamInfo *param_info, String config_path="") |
|
| LambdaTransform (std::function< OUT(IN, P1, P2)> function, P1 param1, P2 param2, const ParamInfo *param_info, String config_path="") |
| LambdaTransform constructor for two-parameter function.
|
|
| LambdaTransform (std::function< OUT(IN, P1, P2, P3)> function, P1 param1, P2 param2, P3 param3, const ParamInfo *param_info, String config_path="") |
|
| LambdaTransform (std::function< OUT(IN, P1, P2, P3, P4)> function, P1 param1, P2 param2, P3 param3, P4 param4, const ParamInfo *param_info, String config_path="") |
|
| LambdaTransform (std::function< OUT(IN, P1, P2, P3, P4, P5)> function, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, const ParamInfo *param_info, String config_path="") |
|
| LambdaTransform (std::function< OUT(IN, P1, P2, P3, P4, P5, P6)> function, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, const ParamInfo *param_info, String config_path="") |
|
void | set_input (IN input, uint8_t input_channel=0) override |
|
void | get_configuration (JsonObject &doc) override |
|
bool | set_configuration (const JsonObject &config) override |
|
String | get_config_schema () override |
|
| Transform (String config_path="") |
|
Transform< IN, OUT > * | connect_from (ValueProducer< OUT > *producer0, ValueProducer< OUT > *producer1=NULL, ValueProducer< OUT > *producer2=NULL, ValueProducer< OUT > *producer3=NULL, ValueProducer< OUT > *producer4=NULL) |
|
| TransformBase (String config_path="") |
|
| Configurable (String config_path="", String description="", int sort_order=1000) |
|
String | get_description () |
|
void | set_description (String description) |
| Set the description of the Configurable.
|
|
int | get_sort_order () |
|
void | set_sort_order (int sort_order) |
|
virtual void | save_configuration () |
|
| Startable (int priority=0) |
|
virtual void | start () |
|
const int | get_start_priority () |
|
void | set_start_priority (int priority) |
|
virtual void | set_input (T new_value, uint8_t input_channel=0) |
|
void | connect_from (ValueProducer< T > *producer, uint8_t input_channel=0) |
|
| ValueProducer () |
|
virtual const T & | get () const |
|
void | connect_to (ValueConsumer< T > *consumer, uint8_t input_channel=0) |
|
template<typename CT > |
void | connect_to (ValueConsumer< CT > *consumer, uint8_t input_channel=0) |
| Connect a producer to a consumer of a different type.
|
|
template<typename T2 > |
Transform< T, T2 > * | connect_to (Transform< T, T2 > *consumer_producer, uint8_t input_channel=0) |
|
template<typename TT , typename T2 > |
Transform< TT, T2 > * | connect_to (Transform< TT, T2 > *consumer_producer, uint8_t input_channel=0) |
| Connect a producer to a transform with a different input type.
|
|
void | emit (T new_value) |
|
| Observable () |
|
| Observable (Observable &&other) |
| Move constructor.
|
|
void | notify () |
|
void | attach (std::function< void()> observer) |
|
template<
class IN,
class OUT,
class P1 = bool,
class P2 = bool,
class P3 = bool,
class P4 = bool,
class P5 = bool,
class P6 = bool>
class sensesp::LambdaTransform< IN, OUT, P1, P2, P3, P4, P5, P6 >
Construct a new transform based on a single function.
LambdaTransform provides an easy way of creating custom transformations without having to create new Transform classes. You just create a transform function and feed that to a LambdaTransform constructor together with possible configuration parameters values and configuration parameter metadata (key names and descriptions).
- Template Parameters
-
Definition at line 71 of file lambda_transform.h.