248 of 286
234 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 The task is waiting for InputCapture() to complete. 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. TaskWaitPinChange0 8 The task is waiting for a pin change event 0 TaskWaitPinChange1 9 The task is waiting for a pin change event 1 TaskWaitPinChange2 10 The task is waiting for a pin change event 2 TaskWaitPinChange3 11 The task is waiting for a pin change event 3 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. Pin Change Event Ports Underlying CPU PinChange0 PinChange1 PinChange2 PinChange3 mega644P PortA PortB PortC PortD mega1281 PortB PortE mega1280 PortB PortJ PortK 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. See Also ExitTask, ResumeTask, RunTask, TaskIsValid