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

Test of the ftask module. 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 "Mockrtc.h"
#include "Mocksbc.h"
#include "Mocksof_trapezoid.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_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

OS_TASK_HANDLE 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}
 

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
2023-10-12 (date of last update)
Version
v1.6.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_BUFFER_ELEMENT_s))

Definition at line 135 of file test_ftask.c.

◆ FTSK_CAN_RX_QUEUE_LENGTH

#define FTSK_CAN_RX_QUEUE_LENGTH   (50u)

Definition at line 134 of file test_ftask.c.

◆ FTSK_DATA_QUEUE_ITEM_SIZE

#define FTSK_DATA_QUEUE_ITEM_SIZE   (sizeof(DATA_QUEUE_MESSAGE_s))

Definition at line 131 of file test_ftask.c.

◆ FTSK_DATA_QUEUE_LENGTH

#define FTSK_DATA_QUEUE_LENGTH   (1u)

Definition at line 130 of file test_ftask.c.

◆ FTSK_IMD_QUEUE_ITEM_SIZE

#define FTSK_IMD_QUEUE_ITEM_SIZE   (sizeof(CAN_BUFFER_ELEMENT_s))

Definition at line 133 of file test_ftask.c.

◆ FTSK_IMD_QUEUE_LENGTH

#define FTSK_IMD_QUEUE_LENGTH   (5u)

Definition at line 132 of file test_ftask.c.

Function Documentation

◆ setUp()

void setUp ( void  )

Definition at line 147 of file test_ftask.c.

◆ tearDown()

void tearDown ( void  )

Definition at line 150 of file test_ftask.c.

◆ testDummy()

void testDummy ( void  )

Definition at line 154 of file test_ftask.c.

Variable Documentation

◆ fram_soc

FRAM_SOC_s fram_soc = {0}

Definition at line 141 of file test_ftask.c.

◆ fram_voltage

uint32_t fram_voltage = 0u

Definition at line 140 of file test_ftask.c.

◆ ftsk_taskHandleAfe

OS_TASK_HANDLE ftsk_taskHandleAfe

Definition of task handles.

Definition of task handles.

Definition at line 128 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 137 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 139 of file test_ftask.c.

◆ os_timer

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

Definition at line 138 of file test_ftask.c.

◆ sbc_stateMcuSupervisor

SBC_STATE_s sbc_stateMcuSupervisor

state of the SBC module

Definition at line 142 of file test_ftask.c.

◆ sys_state

SYS_STATE_s sys_state = {0}

contains the state of the contactor state machine

Definition at line 144 of file test_ftask.c.