TaskScheduler icon indicating copy to clipboard operation
TaskScheduler copied to clipboard

Method to get the name of the Callback registered in the Task

Open georgevbsantiago opened this issue 11 months ago • 7 comments

Hello @arkhipenko

First of all, THANK YOU SO MUCH for this fantastic library!!!

A doubt. Is there a method to get the current callback name of the task? In this case, when we use Task as a finite state machine, it would be interesting to know which Callback is registered in Task.

Ex:

void function_01 () { ... }

void function_02 () { ... }

void function_03 () { ... }

task.setCallback(&function_01);
...
task.setCallback(&function_02);
....
task.setCallback(&function_03);
....
    if( equal(task.getCallback(), &function_02) ) {
    
    ....
    }

georgevbsantiago avatar Jul 10 '23 19:07 georgevbsantiago