void setTaskVar(int id, void * var)
id | : | Task identifier of the task to modify |
---|---|---|
var | : | New value to set for the task variable |
This function sets the value of the user variable for the task. The task user variable is maintained by the task manager but is not used by the task manager. It can be used for any desired purpose. In many cases, it is useful for a task function to be designed to operate as a ‘state machine’. In this case, the task user variable can be used to maintain the current state code for the task. In other cases, the task variable can be used as a parameter to the task function. It can, for example, hold a pointer to a data structure used by the task. The task variable is set to 0 when the task is created.
None.
The Task Management Functions are specific to ChipKit and exceed the Arduino 1.6.x specification.
createTask(), destroyTask(), getTaskId(), getTaskNextExec(), getTaskPeriod(), getTaskState(), getTaskVar(), setTaskPeriod(), setTaskState(), setTaskVar(), startTaskAt(),