foxBMS - Unit Tests  1.3.0
The foxBMS Unit Tests API Documentation
test_ftask.c File Reference

Test of the ftask module. More...

#include "general.h"
#include "unity.h"
#include "MockHL_gio.h"
#include "Mockadc.h"
#include "Mockafe.h"
#include "Mockalgorithm.h"
#include "Mockbal.h"
#include "Mockbms.h"
#include "Mockcan.h"
#include "Mockcontactor.h"
#include "Mockdatabase.h"
#include "Mockdiag.h"
#include "Mockdiag_cfg.h"
#include "Mockfram.h"
#include "Mockhtsensor.h"
#include "Mocki2c.h"
#include "Mockimd.h"
#include "Mockinterlock.h"
#include "Mockled.h"
#include "Mockmeas.h"
#include "Mockmpu_prototypes.h"
#include "Mockos.h"
#include "Mockpex.h"
#include "Mockredundancy.h"
#include "Mocksbc.h"
#include "Mocksof.h"
#include "Mocksps.h"
#include "Mockstate_estimation.h"
#include "Mocksys.h"
#include "Mocksys_mon.h"
#include "ftask_cfg.h"
#include "sys_mon_cfg.h"
#include "fassert.h"
#include "ftask.h"
Include dependency graph for test_ftask.c:

Go to the source code of this file.

Macros

#define FTSK_DATA_QUEUE_LENGTH   (1u)
 
#define FTSK_DATA_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

void setUp (void)
 
void tearDown (void)
 
void testDummy (void)
 

Variables

TaskHandle_t ftsk_taskHandleAfe
 Definition of task handles. More...
 
volatile OS_BOOT_STATE_e os_boot = OS_OFF
 
volatile OS_TIMER_s os_timer = {0, 0, 0, 0, 0, 0, 0}
 
uint32_t os_schedulerStartTime = 0
 Scheduler "zero" time for task phase control. More...
 
uint32_t fram_voltage = 0u
 
FRAM_SOC_s fram_soc = {0}
 
SBC_STATE_s sbc_stateMcuSupervisor
 
SYS_STATE_s sys_state = {0}
 
static uint8_t ftsk_dataQueueStorageArea [FTSK_DATA_QUEUE_LENGTH *FTSK_DATA_QUEUE_ITEM_SIZE] = {0}
 
static uint8_t ftsk_imdQueueStorageArea [FTSK_IMD_QUEUE_LENGTH *FTSK_IMD_QUEUE_ITEM_SIZE] = {0}
 
static uint8_t ftsk_canRxQueueStorageArea [FTSK_CAN_RX_QUEUE_LENGTH *FTSK_CAN_RX_QUEUE_ITEM_SIZE] = {0}
 
static StaticQueue_t ftsk_dataQueueStructure
 
static StaticQueue_t ftsk_imdQueueStructure
 
static StaticQueue_t ftsk_canRxQueueStructure
 

Detailed Description

Test of the ftask module.

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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:

  • ″This product uses parts of foxBMS®″
  • ″This product includes parts of foxBMS®″
  • ″This product is derived from foxBMS®″
Author
foxBMS Team
Date
2020-04-02 (date of creation)
Updated
2022-05-30 (date of last update)
Version
v1.3.0
Prefix
TEST

Definition in file test_ftask.c.

Macro Definition Documentation

◆ FTSK_CAN_RX_QUEUE_ITEM_SIZE

#define FTSK_CAN_RX_QUEUE_ITEM_SIZE   (sizeof(CAN_BUFFERELEMENT_s))

Definition at line 102 of file test_ftask.c.

◆ FTSK_CAN_RX_QUEUE_LENGTH

#define FTSK_CAN_RX_QUEUE_LENGTH   (50u)

Definition at line 101 of file test_ftask.c.

◆ FTSK_DATA_QUEUE_ITEM_SIZE

#define FTSK_DATA_QUEUE_ITEM_SIZE   (sizeof(DATA_QUEUE_MESSAGE_s))

Definition at line 98 of file test_ftask.c.

◆ FTSK_DATA_QUEUE_LENGTH

#define FTSK_DATA_QUEUE_LENGTH   (1u)

Definition at line 97 of file test_ftask.c.

◆ FTSK_IMD_QUEUE_ITEM_SIZE

#define FTSK_IMD_QUEUE_ITEM_SIZE   (sizeof(CAN_BUFFERELEMENT_s))

Definition at line 100 of file test_ftask.c.

◆ FTSK_IMD_QUEUE_LENGTH

#define FTSK_IMD_QUEUE_LENGTH   (5u)

Definition at line 99 of file test_ftask.c.

Function Documentation

◆ setUp()

void setUp ( void  )

Definition at line 121 of file test_ftask.c.

◆ tearDown()

void tearDown ( void  )

Definition at line 124 of file test_ftask.c.

◆ testDummy()

void testDummy ( void  )

Definition at line 128 of file test_ftask.c.

Variable Documentation

◆ fram_soc

FRAM_SOC_s fram_soc = {0}

Definition at line 108 of file test_ftask.c.

◆ fram_voltage

uint32_t fram_voltage = 0u

Definition at line 107 of file test_ftask.c.

◆ ftsk_canRxQueueStorageArea

uint8_t ftsk_canRxQueueStorageArea[FTSK_CAN_RX_QUEUE_LENGTH *FTSK_CAN_RX_QUEUE_ITEM_SIZE] = {0}
static

Definition at line 115 of file test_ftask.c.

◆ ftsk_canRxQueueStructure

StaticQueue_t ftsk_canRxQueueStructure
static

Definition at line 118 of file test_ftask.c.

◆ ftsk_dataQueueStorageArea

uint8_t ftsk_dataQueueStorageArea[FTSK_DATA_QUEUE_LENGTH *FTSK_DATA_QUEUE_ITEM_SIZE] = {0}
static

Definition at line 113 of file test_ftask.c.

◆ ftsk_dataQueueStructure

StaticQueue_t ftsk_dataQueueStructure
static

Definition at line 116 of file test_ftask.c.

◆ ftsk_imdQueueStorageArea

uint8_t ftsk_imdQueueStorageArea[FTSK_IMD_QUEUE_LENGTH *FTSK_IMD_QUEUE_ITEM_SIZE] = {0}
static

Definition at line 114 of file test_ftask.c.

◆ ftsk_imdQueueStructure

StaticQueue_t ftsk_imdQueueStructure
static

Definition at line 117 of file test_ftask.c.

◆ ftsk_taskHandleAfe

TaskHandle_t ftsk_taskHandleAfe

Definition of task handles.

Definition at line 95 of file test_ftask.c.

◆ os_boot

volatile OS_BOOT_STATE_e os_boot = OS_OFF

boot state of the system

boot state of the OS

Definition at line 104 of file test_ftask.c.

◆ os_schedulerStartTime

uint32_t os_schedulerStartTime = 0

Scheduler "zero" time for task phase control.

timestamp of the scheduler start

Definition at line 106 of file test_ftask.c.

◆ os_timer

volatile OS_TIMER_s os_timer = {0, 0, 0, 0, 0, 0, 0}

Definition at line 105 of file test_ftask.c.

◆ sbc_stateMcuSupervisor

SBC_STATE_s sbc_stateMcuSupervisor

state of the SBC module

Definition at line 109 of file test_ftask.c.

◆ sys_state

SYS_STATE_s sys_state = {0}

contains the state of the contactor state machine

Definition at line 111 of file test_ftask.c.