eLooM for STM32 application  v3.3.0
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
ApplicationContext.h File Reference

Define the Application Context public API. More...

#include "services/AManagedTask.h"
#include "services/AManagedTaskEx.h"
#include "services/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)
 
static uint8_t ACGetTaskCount (ApplicationContext *_this)
 
static AManagedTaskACGetFirstTask (ApplicationContext *_this)
 
static AManagedTaskACGetNextTask (ApplicationContext *_this, const AManagedTask *pTask)
 

Detailed Description

Define the Application Context public API.

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

TODO - insert here the file description

Attention

Copyright (c) 2016 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

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_STATIC_INLINE AManagedTask * ACGetFirstTask ( ApplicationContext _this)
inlinestatic

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_STATIC_INLINE AManagedTask * ACGetNextTask ( ApplicationContext _this,
const AManagedTask pTask 
)
inlinestatic

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_STATIC_INLINE uint8_t ACGetTaskCount ( ApplicationContext _this)
inlinestatic

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()

sys_error_code_t ACInit ( ApplicationContext _this)

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.