#include <ExecWithParameter.h>
Public Member Functions | |
| ExecWithParameter (void(*fn)(TParam), TParam storedParam) | |
| void | exec () override |
| Public Member Functions inherited from Executable | |
| virtual | ~Executable ()=default |
Gives the ability to register a task with task manager that will call a function with a stored parameter An example usage would be to store a Stream upon which to write to. Note that if you use the new method below you absolutely must provide the deleteWhenDone defaulted parameter as true.
taskManager.scheduleFixedRate(1000, new ExecWithParameter<Stream*>(&Serial), TIME_MILLIS, true);
To use static memory, create an ExecWithParameter instance globally, and then pass a pointer to the schedule.
| TParam | The type that you want to store until called back. |
|
inline |
Constructs an instance giving the function to call and the parameter to pass to the function
| fn | the function to be called. |
| storedParam | the parameter to pass to the function |
|
inlineoverridevirtual |
Called when the schedule is reached
Implements Executable.