23#ifndef INCLUDE_SERVICES_AMANAGEDTASKVTBL_H_
24#define INCLUDE_SERVICES_AMANAGEDTASKVTBL_H_
41struct _AManagedTask_vtbl {
43 sys_error_code_t (*OnCreateTask)(
AManagedTask *_this, tx_entry_function_t *pvTaskCode, CHAR **pcName, VOID **pvStackStart, ULONG *pnStackSize, UINT *pnPriority, UINT *pnPreemptThreshold, ULONG *pnTimeSlice, ULONG *pnAutoStart, ULONG *pnParams);
87 uint8_t nReserved : 1;
132extern EPowerMode SysGetPowerMode(
void);
140 return _this->
vptr->HardwareInit(_this, pParams);
145 VOID **pvStackStart, ULONG *pnStackSize,
146 UINT *pnPriority, UINT *pnPreemptThreshold,
147 ULONG *pnTimeSlice, ULONG *pnAutoStart,
149 return _this->
vptr->OnCreateTask(_this, pvTaskCode, pcName, pvStackStart, pnStackSize, pnPriority, pnPreemptThreshold, pnTimeSlice, pnAutoStart, pnParams);
154 assert_param(_this != NULL);
155 EPowerMode eObjeActivePowerMode = eActivePowerMode;
156 EPowerMode eObjNewPowerMode = eNewPowerMode;
164 return _this->
vptr->DoEnterPowerMode(_this, eObjeActivePowerMode, eObjNewPowerMode);
169 return _this->
vptr->HandleError(_this, xError);
174 return _this->
vptr->OnEnterTaskControlLoop(_this);
190 return SYS_NO_ERROR_CODE;
195 return SysGetPowerMode();
200 assert_param(_this != NULL);
206 return eTaskPowrMode;
219 return SYS_NO_ERROR_CODE;
230 assert_param(_this != NULL);
246 assert_param(_this != NULL);
250 return SYS_NO_ERROR_CODE;
#define MT_ALLOWED_ERROR_COUNT
Definition AManagedTask.h:47
#define MT_MAX_ERROR_COUNT
Definition AManagedTask.h:40
sys_error_code_t(* pExecuteStepFunc_t)(AManagedTask *_this)
Definition AManagedTask.h:66
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTSetPMStateRemapFunc(AManagedTask *_this, const EPowerMode *pPMState2PMStateMap)
Definition AManagedTask_vtbl.h:245
struct _AMTStatus AMTStatus
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTNotifyIsStillRunning(AManagedTask *_this, sys_error_code_t nStepError)
Definition AManagedTask_vtbl.h:210
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTOnCreateTask(AManagedTask *_this, tx_entry_function_t *pvTaskCode, CHAR **pcName, VOID **pvStackStart, ULONG *pnStackSize, UINT *pnPriority, UINT *pnPreemptThreshold, ULONG *pnTimeSlice, ULONG *pnAutoStart, ULONG *pnParams)
Definition AManagedTask_vtbl.h:144
SYS_DEFINE_STATIC_INLINE boolean_t AMTIsPowerModeSwitchPending(AManagedTask *_this)
Definition AManagedTask_vtbl.h:229
SYS_DEFINE_STATIC_INLINE EPowerMode AMTGetTaskPowerMode(AManagedTask *_this)
Definition AManagedTask_vtbl.h:199
struct _AManagedTask_vtbl AManagedTask_vtbl
Definition AManagedTask_vtbl.h:39
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTInit(AManagedTask *_this)
Definition AManagedTask_vtbl.h:178
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTDoEnterPowerMode(AManagedTask *_this, const EPowerMode eActivePowerMode, const EPowerMode eNewPowerMode)
Definition AManagedTask_vtbl.h:153
SYS_DEFINE_STATIC_INLINE void AMTReportErrOnStepExecution(AManagedTask *_this, sys_error_code_t nStepError)
Definition AManagedTask_vtbl.h:236
SYS_DEFINE_STATIC_INLINE EPowerMode AMTGetSystemPowerMode()
Definition AManagedTask_vtbl.h:194
SYS_DEFINE_STATIC_INLINE void AMTResetAEDCounter(AManagedTask *_this)
Definition AManagedTask_vtbl.h:223
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTHandleError(AManagedTask *_this, SysEvent xError)
Definition AManagedTask_vtbl.h:168
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTHardwareInit(AManagedTask *_this, void *pParams)
Definition AManagedTask_vtbl.h:139
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTOnEnterTaskControlLoop(AManagedTask *_this)
Definition AManagedTask_vtbl.h:173
Umbrella header for the basic system features.
Definition AManagedTask_vtbl.h:53
uint8_t nAutoStart
Definition AManagedTask_vtbl.h:85
uint8_t nIsTaskStillRunning
Definition AManagedTask_vtbl.h:74
uint8_t nPowerModeSwitchDone
Definition AManagedTask_vtbl.h:69
uint8_t nDelayPowerModeSwitch
Definition AManagedTask_vtbl.h:58
uint8_t nErrorCount
Definition AManagedTask_vtbl.h:79
uint8_t nPowerModeSwitchPending
Definition AManagedTask_vtbl.h:63
Definition AManagedTask_vtbl.h:94
const EPowerMode * m_pPMState2PMStateMap
Definition AManagedTask_vtbl.h:124
TX_THREAD m_xTaskHandle
Definition AManagedTask_vtbl.h:103
const AManagedTask_vtbl * vptr
Definition AManagedTask_vtbl.h:98
AMTStatus m_xStatus
Definition AManagedTask_vtbl.h:129
const pExecuteStepFunc_t * m_pfPMState2FuncMap
Definition AManagedTask_vtbl.h:114
struct _AManagedTask * m_pNext
Definition AManagedTask_vtbl.h:108
void SysResetAEDCounter(void)
Definition sysinit.c:319
uint16_t sys_error_code_t
Definition syserror.h:41
#define SYS_DEFINE_STATIC_INLINE
Definition systp.h:95