TRC Library for FTC (2011) 2011
TRC Library Code Project

C:/Users/Michael/Ftc/2011/code/trclib/task.h File Reference

Go to the source code of this file.

Data Structures

struct  ROBOTTASK
struct  TASKS

Defines

#define _TASK_H
#define MOD_ID   MOD_TASK
#define MAX_NUM_TASKS   8
#define TaskRegisterHiFreq(m)   (g_HiFreqTasks |= (m))
#define TaskRegisterInput(m)   (g_InputTasks |= (m))
#define TaskRegisterOutput(m)   (g_OutputTask |= (m))

Functions

void TaskInit ()
bool TaskRegHiFreq (__in long module, __in void &context)
bool TaskRegInput (__in long module, __in void &context)
bool TaskRegOutput (__in long module, __in void &context)
void TaskProcessHiFreq ()
void NxtBtnTask (__inout NXTBTN &nxtbtn)

Variables

TASKS g_RobotTasks

Define Documentation

#define _TASK_H

Definition at line 17 of file task.h.

#define MAX_NUM_TASKS   8

Definition at line 27 of file task.h.

#define MOD_ID   MOD_TASK

Definition at line 24 of file task.h.

#define TaskRegisterHiFreq (   m)    (g_HiFreqTasks |= (m))

Definition at line 33 of file task.h.

#define TaskRegisterInput (   m)    (g_InputTasks |= (m))

Definition at line 34 of file task.h.

#define TaskRegisterOutput (   m)    (g_OutputTask |= (m))

Definition at line 35 of file task.h.


Function Documentation

void NxtBtnTask ( __inout NXTBTN nxtbtn)

This function processes the changed buttons and sends button event notifications.

Parameters:
nxtbtnPoints to the NXTBTN structure.

Definition at line 215 of file task.h.

void TaskInit ( )

This function initializes the robot task tables.

Definition at line 65 of file task.h.

void TaskProcessHiFreq ( )

This function dispatches all the registered high frequency tasks. This function dispatches all the registered high frequency tasks.

Definition at line 191 of file task.h.

bool TaskRegHiFreq ( __in long  module,
__in void &  context 
)

This function registers a high frequency robot task.

Parameters:
moduleSpecifies the module that has a high frequency task.
contextSpcifies the context of the task.
Returns:
Returns true if successful, false if the task table is full.

Definition at line 99 of file task.h.

bool TaskRegInput ( __in long  module,
__in void &  context 
)

This function registers a robot input task.

Parameters:
moduleSpecifies the module that has an input task.
contextSpcifies the context of the task.
Returns:
Returns true if successful, false if the task table is full.

Definition at line 130 of file task.h.

bool TaskRegOutput ( __in long  module,
__in void &  context 
)

This function registers a robot output task.

Parameters:
moduleSpecifies the module that has an output task.
contextSpcifies the context of the task.
Returns:
Returns true if successful, false if the task table is full.

Definition at line 161 of file task.h.


Variable Documentation

Definition at line 59 of file task.h.

 All Data Structures Files Functions Variables Defines