ODeV framework  v2
Data Structures | Typedefs | Functions
ApplicationContext.h File Reference

Define the Application Context public API. More...

#include "systp.h"
#include "AManagedTask.h"
#include "AManagedTaskEx.h"
#include "AManagedTaskEx_vtbl.h"
+ Include dependency graph for ApplicationContext.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _ApplicationContext
 

Typedefs

typedef struct _ApplicationContext ApplicationContext
 

Functions

sys_error_code_t ACInit (ApplicationContext *this)
 
sys_error_code_t ACAddTask (ApplicationContext *this, AManagedTask *pTask)
 
sys_error_code_t ACRemoveTask (ApplicationContext *this, AManagedTask *pTask)
 
uint8_t ACGetTaskCount (ApplicationContext *this)
 
AManagedTaskACGetFirstTask (ApplicationContext *this)
 
AManagedTaskACGetNextTask (ApplicationContext *this, const AManagedTask *pTask)
 

Detailed Description

Define the Application Context public API.

Author
STMicroelectronics - ST-Korea - MCD Team
Version
1.2.0
Date
Jan 13, 2017

TODO - insert here the file description

Attention

© COPYRIGHT 2016 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Typedef Documentation

◆ ApplicationContext

An application context is a linked list of Managed tasks.

Function Documentation

◆ ACAddTask()

sys_error_code_t ACAddTask ( ApplicationContext this,
AManagedTask pTask 
)

Add a managed task to this context. If the task is already in this application context it is not added twice.

Parameters
thisspecifies a pointer to the application context object.
pTaskspecifies a pointer to a managed task object to be added to this context.
Returns
SYS_NO_ERROR_CODE if the the task has been added to the application context, or SYS_AC_TASK_ALREADY_ADDED_ERROR_CODE if the task is already in this application context.

◆ ACGetFirstTask()

SYS_DEFINE_INLINE AManagedTask * ACGetFirstTask ( ApplicationContext this)
inline

Get a pointer to the first task object in this application context.

Parameters
thisspecifies a pointer to the application context object.
Returns
a pointer to the first task object in this application context, or NULL if the this context is empty.

◆ ACGetNextTask()

SYS_DEFINE_INLINE AManagedTask * ACGetNextTask ( ApplicationContext this,
const AManagedTask pTask 
)
inline

Get a pointer to the next task object after pTask in this application context.

Parameters
thisspecifies a pointer to the application context object.
pTasksspecifies a pointer a managed task object in this context.
Returns
a pointer to the next task object after pTask in this application context.

◆ ACGetTaskCount()

SYS_DEFINE_INLINE uint8_t ACGetTaskCount ( ApplicationContext this)
inline

Get the number of managed task in this context.

Parameters
thisspecifies a pointer to the application context object.
Returns
the number of managed task in this context.

◆ ACInit()

Initialize this application context.

Parameters
thisspecifies a pointer to the application context object.
Returns
SYS_NO_ERROR_CODE.

◆ ACRemoveTask()

sys_error_code_t ACRemoveTask ( ApplicationContext this,
AManagedTask pTask 
)

Remove a managed task from this context.

Parameters
thisspecifies a pointer to the application context object.
pTaskspecifies a pointer to a managed task object to be removed from this context.
Returns
SYS_NO_ERROR_CODE.