Navigation bar
  Start Previous page
 245 of 283 
Next page End 240 241 242 243 244 245 246 247 248 249 250  

236
StatusTask
Type
Function returning Byte
Invocation
StatusTask(taskStack)
StatusTask()
Parameter
Method
Type
Description
taskStack
ByRef
array of Byte
The stack for a task of interest.
Discussion
This function returns a value indicating the status of the task associated with the given task stack.  If no
task stack is explicitly given, the task stack for the Main() routine is assumed.  The return values and
their respective meanings are shown in the table below.
Task Status Values
Constant
Value
Meaning
TaskReady
0
The task is running or ready to run.
TaskSleeping
1
The task is sleeping.
TaskWaitInputCapture
2
TaskWaitInt0
3
The task is awaiting Interrupt 0.
TaskWaitInt1
4
The task is awaiting Interrupt 1.
TaskWaitInt2
5
The task is awaiting Interrupt 2.
TaskWaitInterval
6
The task is waiting for the interval counter to expire.
TaskWaitAnalogCompare
7
The task is waiting for an analog comparator event.
TaskWaitPinChangeA
8
The task is waiting for a pin change event on PortA
TaskWaitPinChangeB
9
The task is waiting for a pin change event on PortB
TaskWaitPinChangeC
10
The task is waiting for a pin change event on PortC
TaskWaitPinChangeD
11
The task is waiting for a pin change event on PortD
TaskWaitOutputCapture
12
The task is waiting for OutputCapture() to complete.
TaskWaitInt3
13
The task is awaiting Interrupt 3.
TaskWaitInt4
14
The task is awaiting Interrupt 4.
TaskWaitInt5
15
The task is awaiting Interrupt 5.
TaskWaitInt6
16
The task is awaiting Interrupt 6.
TaskWaitInt7
17
The task is awaiting Interrupt 7.
TaskHalting
254
The task is in the process of terminating.
TaskHalted
255
The task has terminated.
If this function is invoked using an array other than one that is or was being used for a task stack the
result is undefined.
See the section on Task Management in the ZBasic Reference Manual for additional information
regarding task management.
Compatibility
This routine is not available in BasicX compatibility mode.
See Also
Previous page Top Next page