foxBMS - Unit Tests
1.1.0
The foxBMS Unit Tests API Documentation
|
Implementation of engine task driver. More...
#include "ftask.h"
#include "can_cfg.h"
#include "FreeRTOS.h"
#include "stream_buffer.h"
#include "database.h"
#include "sys_mon.h"
Go to the source code of this file.
Macros | |
#define | FTSK_DATABASE_QUEUE_LENGTH (1u) |
#define | FTSK_DATABASE_QUEUE_ITEM_SIZE (sizeof(DATA_QUEUE_MESSAGE_s)) |
#define | FTSK_IMD_QUEUE_LENGTH (5u) |
#define | FTSK_IMD_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s)) |
#define | FTSK_CAN_RX_QUEUE_LENGTH (50u) |
#define | FTSK_CAN_RX_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s)) |
Functions | |
static void | FTSK_CreateTaskEngine (void) |
Database-Task. More... | |
static void | FTSK_CreateTaskCyclic1ms (void) |
Creation of cyclic 1 ms task. More... | |
static void | FTSK_CreateTaskCyclic10ms (void) |
Creation of cyclic 10 ms task. More... | |
static void | FTSK_CreateTaskCyclic100ms (void) |
Creation of cyclic 100 ms task. More... | |
static void | FTSK_CreateTaskCyclicAlgorithm100ms (void) |
Creation of cyclic 100 ms algorithm task. More... | |
void | FTSK_CreateQueues (void) |
Creates all queues. More... | |
void | FTSK_CreateTasks (void) |
Creates all tasks of the group. More... | |
Implementation of engine task driver.
SPDX-License-Identifier: BSD-3-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
TODO
Definition in file ftask.c.
#define FTSK_CAN_RX_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s)) |
#define FTSK_CAN_RX_QUEUE_LENGTH (50u) |
#define FTSK_DATABASE_QUEUE_ITEM_SIZE (sizeof(DATA_QUEUE_MESSAGE_s)) |
#define FTSK_DATABASE_QUEUE_LENGTH (1u) |
#define FTSK_IMD_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s)) |
#define FTSK_IMD_QUEUE_LENGTH (5u) |
void FTSK_CreateQueues | ( | void | ) |
|
static |
Creation of cyclic 100 ms task.
Task is delayed by a phase as defined in ftsk_tskdef_cyclic_100ms.phase (in milliseconds). After the phase delay, the cyclic execution starts, the entry time is saved in current_time. After one cycle, the Task is set to sleep until entry time + ftsk_tskdef_cyclic_100ms.cycleTime (in milliseconds).
Definition at line 296 of file ftask.c.
|
static |
Creation of cyclic 10 ms task.
Task is delayed by a phase as defined in ftsk_tskdef_cyclic_10ms.phase (in milliseconds). After the phase delay, the cyclic execution starts, the entry time is saved in current_time. After one cycle, the Task is set to sleep until entry time + ftsk_tskdef_cyclic_10ms.cycleTime (in milliseconds).
Definition at line 274 of file ftask.c.
|
static |
Creation of cyclic 1 ms task.
The Task calls OsStartUp() in the very beginning, this is the first active Task. Then the Task is delayed by a phase as defined in ftsk_tskdef_cyclic_1ms.phase (in milliseconds). After the phase delay, the cyclic execution starts, the entry time is saved in current_time. After one cycle, the Task is set to sleep until entry time + ftsk_tskdef_cyclic_1ms.cycleTime (in milliseconds).
Definition at line 249 of file ftask.c.
|
static |
Creation of cyclic 100 ms algorithm task.
Task is delayed by a phase as defined in ftsk_taskDefinitionCyclicAlgorithm100ms.Phase (in milliseconds). After the phase delay, the cyclic execution starts, the entry time is saved in current_time. After one cycle, the Task is set to sleep until entry time + ftsk_taskDefinitionCyclicAlgorithm100ms.CycleTime (in milliseconds).
Definition at line 318 of file ftask.c.
|
static |
void FTSK_CreateTasks | ( | void | ) |
volatile bool ftsk_allQueuesCreated = false |
QueueHandle_t ftsk_canRxQueue = NULL_PTR |
|
static |
size of storage area for the CAN Rx queue
The array that is used for the queue's storage area. This must be at least FTSK_CAN_RX_QUEUE_LENGTH * FTSK_CAN_RX_QUEUE_ITEM_SIZE
|
static |
QueueHandle_t ftsk_databaseQueue = NULL_PTR |
|
static |
size of storage area for the database queue
The array that is used for the queue's storage area. This must be at least FTSK_DATABASE_QUEUE_LENGTH * FTSK_DATABASE_QUEUE_ITEM_SIZE
|
static |
QueueHandle_t ftsk_imdCanDataQueue = NULL_PTR |
|
static |
size of storage area for the IMD queue
The array that is used for the queue's storage area. This must be at least FTSK_IMD_QUEUE_LENGTH * FTSK_IMD_QUEUE_ITEM_SIZE
|
static |
|
static |
Stack of ftsk_taskHandleCyclic100ms
|
static |
Stack of ftsk_taskHandleCyclic10ms
|
static |
Stack of ftsk_taskHandleCyclic1ms
|
static |
Stack of ftsk_taskHandleCyclicAlgorithm100ms
|
static |
Stack of ftsk_taskHandleEngine
|
static |
Task Struct for ftsk_taskHandleCyclic100ms
|
static |
Task Struct for ftsk_taskHandleCyclic10ms
|
static |
Task Struct for ftsk_taskHandleCyclic1ms
|
static |
Task Struct for ftsk_taskHandleCyclicAlgorithm100ms
|
static |
Task Struct for ftsk_taskHandleEngine
|
static |
|
static |
|
static |
|
static |