60 #include "stream_buffer.h"
67 #define FTSK_DATABASE_QUEUE_LENGTH (1u)
70 #define FTSK_DATABASE_QUEUE_ITEM_SIZE (sizeof(DATA_QUEUE_MESSAGE_s))
73 #define FTSK_IMD_QUEUE_LENGTH (5u)
75 #define FTSK_IMD_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s))
78 #define FTSK_CAN_RX_QUEUE_LENGTH (50u)
80 #define FTSK_CAN_RX_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s))
230 #pragma TASK(FTSK_CreateTaskEngine)
248 #pragma TASK(FTSK_CreateTaskCyclic1ms)
250 uint32_t current_time = 0;
273 #pragma TASK(FTSK_CreateTaskCyclic10ms)
275 uint32_t current_time = 0;
295 #pragma TASK(FTSK_CreateTaskCyclic100ms)
297 uint32_t current_time = 0;
317 #pragma TASK(FTSK_CreateTaskCyclicAlgorithm100ms)
319 uint32_t current_time = 0;
366 (
const portCHAR *)
"FTSK_CreateTaskEngine",
378 (
const portCHAR *)
"FTSK_CreateTaskCyclic1ms",
390 (
const portCHAR *)
"FTSK_CreateTaskCyclic10ms",
402 (
const portCHAR *)
"FTSK_CreateTaskCyclic100ms",
414 (
const portCHAR *)
"FTSK_CreateTaskCyclicAlgorithm100ms",
Headers for the configuration for the CAN module.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define NULL_PTR
Null pointer.
static StaticTask_t ftsk_taskEngine
static void FTSK_CreateTaskEngine(void)
Database-Task.
#define FTSK_DATABASE_QUEUE_LENGTH
static uint8_t ftsk_imdQueueStorageArea[FTSK_IMD_QUEUE_LENGTH *FTSK_IMD_QUEUE_ITEM_SIZE]
size of storage area for the IMD queue
static StaticQueue_t ftsk_databaseQueueStructure
static void FTSK_CreateTaskCyclicAlgorithm100ms(void)
Creation of cyclic 100 ms algorithm task.
static StackType_t ftsk_stackSizeCyclicAlgorithm100ms[FTSK_TASK_CYCLIC_ALGORITHM_100MS_STACKSIZE]
static TaskHandle_t ftsk_taskHandleEngine
static TaskHandle_t ftsk_taskHandleCyclicAlgorithm100ms
volatile bool ftsk_allQueuesCreated
static StackType_t ftsk_stackSizeEngine[FTSK_TASK_ENGINE_STACK_SIZE]
static StaticTask_t ftsk_taskCyclic100ms
QueueHandle_t ftsk_databaseQueue
#define FTSK_CAN_RX_QUEUE_LENGTH
static uint8_t ftsk_databaseQueueStorageArea[FTSK_DATABASE_QUEUE_LENGTH *FTSK_DATABASE_QUEUE_ITEM_SIZE]
size of storage area for the database queue
static StaticQueue_t ftsk_canRxQueueStructure
static StaticQueue_t ftsk_imdQueueStructure
#define FTSK_IMD_QUEUE_ITEM_SIZE
static void FTSK_CreateTaskCyclic10ms(void)
Creation of cyclic 10 ms task.
static StackType_t ftsk_stackSizeCyclic10ms[FTSK_TASK_CYCLIC_10MS_STACK_SIZE]
static StackType_t ftsk_stackSizeCyclic100ms[FTSK_TASK_CYCLIC_100MS_STACK_SIZE]
void FTSK_CreateTasks(void)
Creates all tasks of the group.
static StaticTask_t ftsk_taskCyclicAlgorithm100ms
static uint8_t ftsk_canRxQueueStorageArea[FTSK_CAN_RX_QUEUE_LENGTH *FTSK_CAN_RX_QUEUE_ITEM_SIZE]
size of storage area for the CAN Rx queue
static void FTSK_CreateTaskCyclic100ms(void)
Creation of cyclic 100 ms task.
#define FTSK_CAN_RX_QUEUE_ITEM_SIZE
static TaskHandle_t ftsk_taskHandleCyclic100ms
static StackType_t ftsk_stackSizeCyclic1ms[FTSK_TASK_CYCLIC_1MS_STACK_SIZE]
QueueHandle_t ftsk_canRxQueue
static StaticTask_t ftsk_taskCyclic1ms
void FTSK_CreateQueues(void)
Creates all queues.
static StaticTask_t ftsk_taskCyclic10ms
#define FTSK_DATABASE_QUEUE_ITEM_SIZE
QueueHandle_t ftsk_imdCanDataQueue
static void FTSK_CreateTaskCyclic1ms(void)
Creation of cyclic 1 ms task.
static TaskHandle_t ftsk_taskHandleCyclic1ms
static TaskHandle_t ftsk_taskHandleCyclic10ms
#define FTSK_IMD_QUEUE_LENGTH
Header of task driver implementation.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic100ms
Task configuration of the cyclic 100 ms task.
void FTSK_InitializeUserCodeEngine(void)
Initializes the database.
void FTSK_RunUserCodeEngine(void)
Engine task for the database and the system monitoring module.
OS_TASK_DEFINITION_s ftsk_taskDefinitionEngine
Definition of the engine task.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic1ms
Task configuration of the cyclic 1 ms task.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclicAlgorithm100ms
Task configuration of the cyclic 100 ms task for algorithms.
void FTSK_RunUserCodeCyclic100ms(void)
Cyclic 100 ms task.
void FTSK_InitializeUserCodePreCyclicTasks(void)
Initialization function before all tasks started.
void FTSK_RunUserCodeCyclic10ms(void)
Cyclic 10 ms task.
void FTSK_RunUserCodeCyclic1ms(void)
Cyclic 1 ms task.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic10ms
Task configuration of the cyclic 10 ms task.
void FTSK_RunUserCodeCyclicAlgorithm100ms(void)
Cyclic 100 ms task for algorithms.
#define FTSK_TASK_ENGINE_STACK_SIZE
Stack size of engine task.
#define FTSK_TASK_CYCLIC_100MS_STACK_SIZE
Stack size of cyclic 100 ms task.
#define FTSK_TASK_CYCLIC_1MS_STACK_SIZE
Stack size of cyclic 1 ms task.
#define FTSK_TASK_CYCLIC_ALGORITHM_100MS_STACKSIZE
Stack size of cyclic 100 ms task for algorithms.
#define FTSK_TASK_CYCLIC_10MS_STACK_SIZE
Stack size of cyclic 10 ms task.
void OS_DelayTaskUntil(uint32_t *pPreviousWakeTime, uint32_t milliseconds)
Delay a task until a specified time.
uint32_t os_schedulerStartTime
Scheduler "zero" time for task phase control.
void OS_ExitTaskCritical(void)
Exit Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
void OS_EnterTaskCritical(void)
Enter Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
uint32_t OS_GetTickCount(void)
Returns OS based system tick value.
volatile OS_BOOT_STATE_e os_boot
@ OS_PRECYCLIC_INIT_HAS_FINISHED
void SYSM_Notify(SYSM_TASK_ID_e tsk_id, SYSM_NOTIFY_TYPE_e state, uint32_t time)
Sets needed bits to indicate that a task is running.
@ SYSM_TASK_ID_CYCLIC_10ms
@ SYSM_TASK_ID_CYCLIC_ALGORITHM_100ms
@ SYSM_TASK_ID_CYCLIC_100ms
@ SYSM_TASK_ID_CYCLIC_1ms