Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
This GOAL core module connects the specific operating system to other GOAL components via a generic abstraction layer. The task abstraction layer allows to create and shutdown a task, to configure the task priority and to handle the state machine for the task and requires indication functions containing the special operating system functions. The indication functions are described in chapter 5.12.2. Chapter: Platform API.
Task priorities are generalized to the following categories:
GOAL_TASK_PRIO_LOWEST
GOAL_TASK_PRIO_MEDIUM
GOAL_TASK_PRIO_HIGHEST
GOAL files:
goal_task.[h,c]
example:
…\goal\appl\00410_goal\task
Configuration
The following compiler-defines are available to configure the task abstraction layer:
GOAL_CONFIG_TASK:
0: task abstraction layer is disabled (default)
1: task abstraction layer is enabled
Platform API
GOAL requires the following indication function to connect a specific operating system to the task abstraction layer:
Table: goal_tgtTaskCreate()
Prototype | GOAL_STATUS_T goal_tgtTaskCreate(GOAL_TASK_T *pTask) | |||
Description | This indication function allows to create a task specified by the task-handle. | |||
Parameters | pTask | handle for the task | ||
Return values | GOAL return status, see | chapter 8.3|||
Category | mandatory |
Table: goal_tgtTaskStart()
Prototype | GOAL_STATUS_T goal_tgtTaskStart(GOAL_TASK_T *pTask) | |||
Description | This indication function allows to start the task specified by the task-handle. | |||
Parameters | pTask | handle for the task | ||
Return values | GOAL return status, see | chapter 8.3|||
Category | mandatory |
Table: goal_tgtTaskExit()
Prototype | GOAL_STATUS_T goal_tgtTaskExit(void) |
Description | This indication function allows to shutdown the current task. |
Parameters | none |
Return values | GOAL return status, see chapter 8.3 Chapter: GOAL status |
Category | mandatory |
Table: goal_tgtTaskMsSleep()
Prototype | GOAL_STATUS_T goal_tgtTaskMsSleep(uint32_t msReq, uint32_t *pMsRem) | |||
Description | This indication function allows to put the current task to sleep. | |||
Parameters | msReq | time in ms to sleep | ||
pMsRem | returns the remaining time in ms if sleep was interrupted and this function is available on the specific operating system | |||
Return values | GOAL return status, see | chapter 8.3|||
Category | mandatory |
Table: goal_tgtTaskTestSelf()
Prototype | GOAL_STATUS_T goal_tgtTaskTestSelf(GOAL_TASK_T *pTask) | |||
Description | This indication function allows to check if the ID of the current task matches to the task-handle. | |||
Parameters | pTask | handle for the task | ||
Return values | GOAL return status, see | chapter 8.3|||
Category | mandatory |
Table: goal_tgtTaskPrioSet()
Prototype | GOAL_STATUS_T goal_tgtTaskPrioSet(GOAL_TASK_T *pTask, uint32_t prio) | |||
Description | This indication function allows to configure the priority of the specified task. | |||
Parameters | pTask | handle for the task | ||
Prio | desired priority of the task:
| |||
Return values | GOAL return status, see | chapter 8.3|||
Category | mandatory |
Table: goal_tgtTaskSuspend()
Prototype | GOAL_STATUS_T goal_tgtTaskSuspend(GOAL_TASK_T *pTask) | |||
Description | This indication function allows to suspend the execution of the task specified by the task-handle. | |||
Parameters | pTask | handle for the task | ||
Return values | GOAL return status, see | chapter 8.3|||
Category | mandatory |
Table: goal_tgtTaskResume()
Prototype | GOAL_STATUS_T goal_tgtTaskResume(GOAL_TASK_T *pTask) | |||
Description | This indication function allows to resume the execution of the task specified by the task-handle. | |||
Parameters | pTask | handle for the task | ||
Return values | GOAL return status, see | chapter 8.3|||
Category | mandatory |
Table of Contents |
---|