Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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.
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:

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



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



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

Category

mandatory


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



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



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:

  • GOAL_TASK_PRIO_LOWEST

  • GOAL_TASK_PRIO_MEDIUM

  • GOAL_TASK_PRIO_HIGHEST

Return values

GOAL return status, see chapter 8.3


Category

mandatory



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



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


  • No labels