foxBMS - Unit Tests  1.4.1
The foxBMS Unit Tests API Documentation
test_ftask_cfg.c File Reference

Tests for the ftask_cfg driver. More...

#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_trapezoid.h"
#include "Mocksps.h"
#include "Mockstate_estimation.h"
#include "Mocksys.h"
#include "Mocksys_mon.h"
#include "fram_cfg.h"
#include "ftask_cfg.h"
#include "pex_cfg.h"
#include "sys_mon_cfg.h"
#include "fassert.h"
#include "ftask.h"
#include "imd.h"
Include dependency graph for test_ftask_cfg.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_BUFFER_ELEMENT_s))
 
#define FTSK_CAN_RX_QUEUE_LENGTH   (50u)
 
#define FTSK_CAN_RX_QUEUE_ITEM_SIZE   (sizeof(CAN_BUFFER_ELEMENT_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...
 
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

Tests for the ftask_cfg 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:

  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-10-27 (date of last update)
Version
v1.4.1
Prefix
TEST

Definition in file test_ftask_cfg.c.

Macro Definition Documentation

◆ FTSK_CAN_RX_QUEUE_ITEM_SIZE

#define FTSK_CAN_RX_QUEUE_ITEM_SIZE   (sizeof(CAN_BUFFER_ELEMENT_s))

Definition at line 103 of file test_ftask_cfg.c.

◆ FTSK_CAN_RX_QUEUE_LENGTH

#define FTSK_CAN_RX_QUEUE_LENGTH   (50u)

Definition at line 102 of file test_ftask_cfg.c.

◆ FTSK_DATA_QUEUE_ITEM_SIZE

#define FTSK_DATA_QUEUE_ITEM_SIZE   (sizeof(DATA_QUEUE_MESSAGE_s))

Definition at line 99 of file test_ftask_cfg.c.

◆ FTSK_DATA_QUEUE_LENGTH

#define FTSK_DATA_QUEUE_LENGTH   (1u)

Definition at line 98 of file test_ftask_cfg.c.

◆ FTSK_IMD_QUEUE_ITEM_SIZE

#define FTSK_IMD_QUEUE_ITEM_SIZE   (sizeof(CAN_BUFFER_ELEMENT_s))

Definition at line 101 of file test_ftask_cfg.c.

◆ FTSK_IMD_QUEUE_LENGTH

#define FTSK_IMD_QUEUE_LENGTH   (5u)

Definition at line 100 of file test_ftask_cfg.c.

Function Documentation

◆ setUp()

void setUp ( void  )

Definition at line 120 of file test_ftask_cfg.c.

◆ tearDown()

void tearDown ( void  )

Definition at line 123 of file test_ftask_cfg.c.

◆ testDummy()

void testDummy ( void  )

Definition at line 127 of file test_ftask_cfg.c.

Variable Documentation

◆ ftsk_canRxQueueStorageArea

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

Definition at line 114 of file test_ftask_cfg.c.

◆ ftsk_canRxQueueStructure

StaticQueue_t ftsk_canRxQueueStructure
static

Definition at line 117 of file test_ftask_cfg.c.

◆ ftsk_dataQueueStorageArea

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

Definition at line 112 of file test_ftask_cfg.c.

◆ ftsk_dataQueueStructure

StaticQueue_t ftsk_dataQueueStructure
static

Definition at line 115 of file test_ftask_cfg.c.

◆ ftsk_imdQueueStorageArea

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

Definition at line 113 of file test_ftask_cfg.c.

◆ ftsk_imdQueueStructure

StaticQueue_t ftsk_imdQueueStructure
static

Definition at line 116 of file test_ftask_cfg.c.

◆ ftsk_taskHandleAfe

TaskHandle_t ftsk_taskHandleAfe

Definition of task handles.

Definition of task handles.

Definition at line 96 of file test_ftask_cfg.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 105 of file test_ftask_cfg.c.

◆ os_schedulerStartTime

uint32_t os_schedulerStartTime = 0

Scheduler "zero" time for task phase control.

timestamp of the scheduler start

Definition at line 107 of file test_ftask_cfg.c.

◆ os_timer

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

Definition at line 106 of file test_ftask_cfg.c.

◆ sbc_stateMcuSupervisor

SBC_STATE_s sbc_stateMcuSupervisor

state of the SBC module

Definition at line 108 of file test_ftask_cfg.c.

◆ sys_state

SYS_STATE_s sys_state = {0}

contains the state of the contactor state machine

Definition at line 110 of file test_ftask_cfg.c.