foxBMS - Unit Tests  1.6.0
The foxBMS Unit Tests API Documentation
test_can.c
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2023, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file test_can.c
44  * @author foxBMS Team
45  * @date 2020-04-01 (date of creation)
46  * @updated 2023-10-12 (date of last update)
47  * @version v1.6.0
48  * @ingroup UNIT_TEST_IMPLEMENTATION
49  * @prefix TEST
50  *
51  * @brief Tests for the CAN driver
52  * @details This file implements the test of the validation functions for tx message
53  * configuration with correct configuration for message period and phase.
54  * Both functions are tested to not assert an error with valid configuration.
55  * Invalid configurations are tested in test_can_1 and test_can_2.
56  */
57 
58 /*========== Includes =======================================================*/
59 #include "unity.h"
60 #include "MockHL_can.h"
61 #include "Mockcan_cfg.h"
62 #include "Mockdatabase.h"
63 #include "Mockdiag.h"
64 #include "Mockfoxmath.h"
65 #include "Mockftask.h"
66 #include "Mockimd.h"
67 #include "Mockio.h"
68 #include "Mockmcu.h"
69 #include "Mockos.h"
70 #include "Mockpex.h"
71 #include "Mockqueue.h"
72 #include "Mocktest_can_mpu_prototype_queue_create_stub.h"
73 
74 #include "version_cfg.h"
75 
76 #include "can.h"
77 #include "test_assert_helper.h"
78 
79 #include <stdbool.h>
80 #include <stdint.h>
81 
82 /*========== Unit Testing Framework Directives ==============================*/
83 TEST_INCLUDE_PATH("../../src/app/driver/can")
84 TEST_INCLUDE_PATH("../../src/app/driver/can/cbs")
85 TEST_INCLUDE_PATH("../../src/app/driver/config")
86 TEST_INCLUDE_PATH("../../src/app/driver/foxmath")
87 TEST_INCLUDE_PATH("../../src/app/driver/imd")
88 TEST_INCLUDE_PATH("../../src/app/driver/io")
89 TEST_INCLUDE_PATH("../../src/app/driver/pex")
90 TEST_INCLUDE_PATH("../../src/app/driver/rtc")
91 TEST_INCLUDE_PATH("../../src/app/engine/diag")
92 TEST_INCLUDE_PATH("../../src/app/task/config")
93 TEST_INCLUDE_PATH("../../src/app/task/ftask")
94 
95 /*========== Definitions and Implementations for Unit Test ==================*/
96 
97 /* see src/app/driver/config/can_cfg_rx-message-definitions.h, but we omit
98  this include here */
99 #define CANRX_NOT_PERIODIC (0u)
100 
101 /* TX test case */
102 #define TEST_CANTX_ID_DUMMY (0x001)
103 #define TEST_CANTX_DUMMY_PERIOD_ms (100)
104 #define TEST_CANTX_DUMMY_PHASE_ms (0)
105 
106 #define TEST_CANTX_DUMMY_MESSAGE \
107  { \
108  .id = TEST_CANTX_ID_DUMMY, \
109  .dlc = CAN_DEFAULT_DLC, \
110  .endianness = CAN_LITTLE_ENDIAN, \
111  .idType = CAN_STANDARD_IDENTIFIER_11_BIT, \
112  }, \
113  { \
114  .period = TEST_CANTX_DUMMY_PERIOD_ms, .phase = TEST_CANTX_DUMMY_PHASE_ms \
115  }
116 
117 /* Rx test case*/
118 #define TEST_CANRX_ID_DUMMY (0x002)
119 
120 #define TEST_CANRX_DUMMY_MESSAGE \
121  { \
122  .id = TEST_CANRX_ID_DUMMY, \
123  .dlc = CAN_DEFAULT_DLC, \
124  .endianness = CAN_LITTLE_ENDIAN, \
125  .idType = CAN_STANDARD_IDENTIFIER_11_BIT, \
126  }, \
127  { \
128  .period = CANRX_NOT_PERIODIC \
129  }
130 
132  .canNodeRegister = canREG1,
133 };
134 
136  .canNodeRegister = canREG2,
137 };
138 
155 
157 
160  .pTableCellTemperature = &can_tableTemperatures,
161  .pTableCellVoltage = &can_tableCellVoltages,
162  .pTableCurrentSensor = &can_tableCurrentSensor,
163  .pTableErrorState = &can_tableErrorState,
164  .pTableInsulation = &can_tableInsulation,
165  .pTableMinMax = &can_tableMinimumMaximumValues,
166  .pTableMol = &can_tableMolFlags,
167  .pTableMsl = &can_tableMslFlags,
168  .pTableOpenWire = &can_tableOpenWire,
169  .pTablePackValues = &can_tablePackValues,
170  .pTableRsl = &can_tableRslFlags,
171  .pTableSoc = &can_tableSoc,
172  .pTableSoe = &can_tableSoe,
173  .pTableSof = NULL_PTR,
174  .pTableSoh = &can_tableSoh,
175  .pTableStateRequest = &can_tableStateRequest,
176 };
177 
178 static uint32_t TEST_CANTX_DummyCallback(
179  CAN_MESSAGE_PROPERTIES_s message,
180  uint8_t *pCanData,
181  uint8_t *pMuxId,
182  const CAN_SHIM_s *const kpkCanShim) {
183  return 0;
184 }
185 
186 static uint32_t TEST_CANRX_DummyCallback(
187  CAN_MESSAGE_PROPERTIES_s message,
188  const uint8_t *const kpkCanData,
189  const CAN_SHIM_s *const kpkCanShim) {
190  return 0;
191 }
192 
195 };
196 
199 };
200 
201 const uint8_t can_txMessagesLength = sizeof(can_txMessages) / sizeof(can_txMessages[0]);
202 const uint8_t can_rxMessagesLength = sizeof(can_rxMessages) / sizeof(can_rxMessages[0]);
203 
205  .canNode = CAN_NODE_1,
206  .id = TEST_CANTX_ID_DUMMY,
208  .data = {0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u}};
209 
211 
213 
218 volatile bool ftsk_allQueuesCreated = false;
219 
220 /*========== Setup and Teardown =============================================*/
221 void setUp(void) {
223 
224  canTestState->periodicEnable = false;
225 
226  for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) {
229  }
230 }
231 
232 void tearDown(void) {
233 }
234 
235 /*========== Test Cases =====================================================*/
237  uint8_t data = 0;
238  canIsTxMessagePending_IgnoreAndReturn(0u);
239  canUpdateID_Ignore();
240  canTransmit_IgnoreAndReturn(0u);
242 }
243 
245  CAN_NODE_s node = {0};
246  canIsTxMessagePending_IgnoreAndReturn(0u);
247  canUpdateID_Ignore();
248  canTransmit_IgnoreAndReturn(0u);
250 }
251 
253  CAN_NODE_s *pNode = CAN_NODE_2;
254  uint8_t data = 0;
255 
256  canIsTxMessagePending_IgnoreAndReturn(1u);
257 
258  for (uint8_t i = 0u; i < 32; i++) {
259  TEST_ASSERT_EQUAL(STD_NOT_OK, CAN_DataSend(pNode, i, CAN_STANDARD_IDENTIFIER_11_BIT, &data));
260  }
261 }
262 
264  CAN_NODE_s *pNode = CAN_NODE_1;
265  uint8_t data = 0;
266  CAN_IDENTIFIER_TYPE_e identifierType = CAN_INVALID_TYPE;
267 
268  canIsTxMessagePending_IgnoreAndReturn(1u);
269  TEST_ASSERT_FAIL_ASSERT(CAN_DataSend(pNode, TEST_CANTX_ID_DUMMY, identifierType, &data));
270 }
271 
273  CAN_NODE_s *pNode = CAN_NODE_1;
274  uint8_t data = 0;
275 
276  /* simulate first messageBox has pending message */
277  canIsTxMessagePending_ExpectAndReturn(pNode->canNodeRegister, 1, 0u);
278  canUpdateID_Expect(pNode->canNodeRegister, 1, 0x20040000u);
279  canTransmit_ExpectAndReturn(pNode->canNodeRegister, 1, &data, 0u);
280  TEST_ASSERT_EQUAL(STD_OK, CAN_DataSend(pNode, 0x001, CAN_STANDARD_IDENTIFIER_11_BIT, &data));
281 
282  /* simulate messageBox until the highest to have no pending messages */
283  for (uint8_t messageBox = 1u; messageBox < (CAN_NR_OF_TX_MESSAGE_BOX - 1); messageBox++) {
284  canIsTxMessagePending_ExpectAndReturn(pNode->canNodeRegister, messageBox, 1u);
285  }
286  /* last message box has message pending */
287  canIsTxMessagePending_ExpectAndReturn(pNode->canNodeRegister, CAN_NR_OF_TX_MESSAGE_BOX - 1, 0u);
288  canUpdateID_Expect(pNode->canNodeRegister, CAN_NR_OF_TX_MESSAGE_BOX - 1, 0x20040000u);
289  canTransmit_ExpectAndReturn(pNode->canNodeRegister, CAN_NR_OF_TX_MESSAGE_BOX - 1, &data, 0u);
290  TEST_ASSERT_EQUAL(STD_OK, CAN_DataSend(pNode, 0x001, CAN_STANDARD_IDENTIFIER_11_BIT, &data));
291 }
292 
293 void testEnablePeriodic(void) {
294  /* check state before */
295  TEST_ASSERT_EQUAL(false, canTestState->periodicEnable);
296 
297  CAN_EnablePeriodic(false);
298  TEST_ASSERT_EQUAL(false, canTestState->periodicEnable);
299 
300  CAN_EnablePeriodic(true);
301  TEST_ASSERT_EQUAL(true, canTestState->periodicEnable);
302 }
303 
305  for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) {
306  /* check state before */
307  TEST_ASSERT_EQUAL(false, canTestState->currentSensorPresent[s]);
308 
309  TEST_ASSERT_EQUAL(false, CAN_IsCurrentSensorPresent(s));
310 
311  /* set state to true */
313 
314  /* check state again */
315  TEST_ASSERT_EQUAL(true, canTestState->currentSensorPresent[s]);
316  }
317 }
318 
320  for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) {
321  /* check state before */
322  TEST_ASSERT_EQUAL(false, canTestState->currentSensorCCPresent[s]);
323  TEST_ASSERT_EQUAL(false, CAN_IsCurrentSensorCcPresent(s));
324 
325  /* set state to true */
327 
328  /* check state again */
329  TEST_ASSERT_EQUAL(true, canTestState->currentSensorCCPresent[s]);
330  }
331 }
332 
335 }
336 
339 }
340 
342  const CAN_SHIM_s can_shim_corrupted = {
343  /* corrupted struct example */
344 
346  .pTableCellVoltage = &can_tableCellVoltages,
347  .pTableCurrentSensor = &can_tableCurrentSensor,
348  .pTableErrorState = &can_tableErrorState,
349  .pTableInsulation = &can_tableInsulation,
350  .pTableMinMax = &can_tableMinimumMaximumValues,
351  .pTableMol = &can_tableMolFlags,
352  .pTableMsl = &can_tableMslFlags,
353  .pTableOpenWire = &can_tableOpenWire,
354  .pTablePackValues = &can_tablePackValues,
355  .pTableRsl = &can_tableRslFlags,
356  .pTableSoc = &can_tableSoc,
357  .pTableSoe = &can_tableSoe,
358  .pTableSof = NULL_PTR,
359  .pTableSoh = &can_tableSoh,
360  .pTableStateRequest = &can_tableStateRequest,
361  };
362 
364 }
365 
367  /* Assume no messages in queue */
368  OS_ReceiveFromQueue_IgnoreAndReturn(OS_FAIL);
369 
370  /* assume all message boxes are full */
371  canIsTxMessagePending_IgnoreAndReturn(1u);
372  MATH_MinimumOfTwoUint8_t_IgnoreAndReturn(CAN_MAX_DLC);
373 
374  /* expect a message to be sent to queue */
375  OS_SendToBackOfQueue_ExpectAndReturn(ftsk_canTxUnsentMessagesQueue, (void *)&dummyMessageBuffer, 0u, OS_FAIL);
376  /* sending to queue failed, expect error sent to diag */
378 
379  /* test call */
381 
382  /* call repeatedly until phase is zero again */
383  for (uint16_t i = 0; i < numberOfRepetitionsToReset; i++) {
385  }
386 }
387 
389  /* Assume no messages in queue */
390  OS_ReceiveFromQueue_IgnoreAndReturn(OS_FAIL);
391 
392  /* assume all message boxes are full */
393  canIsTxMessagePending_IgnoreAndReturn(1u);
394  MATH_MinimumOfTwoUint8_t_IgnoreAndReturn(CAN_MAX_DLC);
395 
396  /* expect a message to be sent to queue */
397  OS_SendToBackOfQueue_ExpectAndReturn(ftsk_canTxUnsentMessagesQueue, (void *)&dummyMessageBuffer, 0u, OS_SUCCESS);
398  /* sending to queue successful, expect no error */
399  DIAG_Handler_ExpectAndReturn(DIAG_ID_CAN_TX_QUEUE_FULL, DIAG_EVENT_OK, DIAG_SYSTEM, 0u, DIAG_HANDLER_RETURN_OK);
400 
401  /* test call */
403 
404  /* call repeatedly until phase is zero again */
405  for (uint16_t i = 0; i < numberOfRepetitionsToReset; i++) {
407  }
408 }
409 
411  /* Invalid messageIndex */
413 
414  /* test case period not elapsed */
415  TEST_ASSERT_EQUAL(false, TEST_CAN_IsMessagePeriodElapsed(1u, 0u));
416 
417  /* test case period elapsed */
418  TEST_ASSERT_EQUAL(true, TEST_CAN_IsMessagePeriodElapsed(0u, 0u));
419 }
420 
422  CAN_BUFFER_ELEMENT_s dummyMessageBufferEmpty = {
423  .canNode = NULL_PTR, .id = 0u, .idType = CAN_INVALID_TYPE, .data = {0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u}};
424 
425  /** only test the case of failing, because the case of successful call would
426  * require actual (not mocked) call of OS_ReceiveFromQueue to write to message buffer */
427  OS_ReceiveFromQueue_ExpectAndReturn(ftsk_canTxUnsentMessagesQueue, (void *)&dummyMessageBufferEmpty, 0u, OS_FAIL);
428 
429  /* test call */
431 }
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
void TEST_CAN_ValidateConfiguredTxMessagePhase(void)
Definition: can.c:1053
bool CAN_IsCurrentSensorCcPresent(uint8_t stringNumber)
get flag if CC message from current sensor is received.
Definition: can.c:1019
STD_RETURN_TYPE_e TEST_CAN_PeriodicTransmit(void)
Definition: can.c:1065
CAN_STATE_s * TEST_CAN_GetCANState(void)
Definition: can.c:1047
bool TEST_CAN_IsMessagePeriodElapsed(uint32_t ticksSinceStart, uint16_t messageIndex)
Definition: can.c:1074
void TEST_CAN_CheckDatabaseNullPointer(CAN_SHIM_s canShim)
Definition: can.c:1056
void CAN_SendMessagesFromQueue(void)
Reads messages from TX Queue and sends them via CAN.
Definition: can.c:966
bool CAN_IsCurrentSensorPresent(uint8_t stringNumber)
set flag for presence of current sensor.
Definition: can.c:1014
STD_RETURN_TYPE_e CAN_DataSend(CAN_NODE_s *pNode, uint32_t id, CAN_IDENTIFIER_TYPE_e idType, uint8 *pData)
Sends over CAN the data passed in parameters. This function goes over the message boxes and marks the...
Definition: can.c:923
void TEST_CAN_ValidateConfiguredTxMessagePeriod(void)
Definition: can.c:1050
void CAN_EnablePeriodic(bool command)
Enables periodic sending per CAN. This is used to prevent sending uninitialized data per CAN (e....
Definition: can.c:1006
Header for the driver for the CAN module.
#define CAN_NR_OF_TX_MESSAGE_BOX
Definition: can.h:74
#define CAN_TICK_ms
Definition: can.h:79
#define CAN_NODE_2
Definition: can_cfg.h:81
#define CAN_NODE_1
Definition: can_cfg.h:80
#define CAN_MAX_DLC
Definition: can_cfg.h:101
CAN_IDENTIFIER_TYPE_e
Definition: can_cfg.h:162
@ CAN_INVALID_TYPE
Definition: can_cfg.h:165
@ CAN_STANDARD_IDENTIFIER_11_BIT
Definition: can_cfg.h:163
@ DATA_BLOCK_ID_MIN_MAX
Definition: database_cfg.h:99
@ DATA_BLOCK_ID_SOE
Definition: database_cfg.h:109
@ DATA_BLOCK_ID_ERROR_STATE
Definition: database_cfg.h:95
@ DATA_BLOCK_ID_RSL_FLAG
Definition: database_cfg.h:106
@ DATA_BLOCK_ID_INSULATION_MONITORING
Definition: database_cfg.h:97
@ DATA_BLOCK_ID_STATE_REQUEST
Definition: database_cfg.h:112
@ DATA_BLOCK_ID_CELL_VOLTAGE
Definition: database_cfg.h:89
@ DATA_BLOCK_ID_CURRENT_SENSOR
Definition: database_cfg.h:93
@ DATA_BLOCK_ID_OPEN_WIRE_BASE
Definition: database_cfg.h:103
@ DATA_BLOCK_ID_MSL_FLAG
Definition: database_cfg.h:102
@ DATA_BLOCK_ID_PACK_VALUES
Definition: database_cfg.h:105
@ DATA_BLOCK_ID_SOH
Definition: database_cfg.h:111
@ DATA_BLOCK_ID_MOL_FLAG
Definition: database_cfg.h:100
@ DATA_BLOCK_ID_CELL_TEMPERATURE
Definition: database_cfg.h:86
@ DATA_BLOCK_ID_SOC
Definition: database_cfg.h:108
static DIAG_DIAGNOSIS_STATE_s diag
Definition: diag.c:71
@ DIAG_HANDLER_RETURN_OK
Definition: diag.h:69
@ DIAG_EVENT_NOT_OK
Definition: diag_cfg.h:268
@ DIAG_EVENT_OK
Definition: diag_cfg.h:267
@ DIAG_SYSTEM
Definition: diag_cfg.h:280
@ DIAG_ID_CAN_TX_QUEUE_FULL
Definition: diag_cfg.h:186
@ STD_NOT_OK
Definition: fstd_types.h:84
@ STD_OK
Definition: fstd_types.h:83
#define NULL_PTR
Null pointer.
Definition: fstd_types.h:77
@ OS_SUCCESS
Definition: os.h:86
@ OS_FAIL
Definition: os.h:87
CAN_NODE_s * canNode
Definition: can_cfg.h:170
canBASE_t * canNodeRegister
Definition: can_cfg.h:76
DATA_BLOCK_CELL_TEMPERATURE_s * pTableCellTemperature
Definition: can_cfg.h:180
OS_QUEUE * pQueueImd
Definition: can_cfg.h:178
bool currentSensorCCPresent[BS_NR_OF_STRINGS]
Definition: can.h:85
bool currentSensorPresent[BS_NR_OF_STRINGS]
Definition: can.h:84
bool periodicEnable
Definition: can.h:83
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:153
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:135
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:219
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:337
DATA_BLOCK_ID_e uniqueId
Definition: database_cfg.h:125
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:167
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:497
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:455
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:310
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:195
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:477
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:517
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:539
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:528
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:553
Helper for unit tests.
#define TEST_ASSERT_PASS_ASSERT(_code_under_test)
assert whether assert macro has passed
#define TEST_ASSERT_FAIL_ASSERT(_code_under_test)
assert whether assert macro has failed
static DATA_BLOCK_CELL_VOLTAGE_s can_tableCellVoltages
Definition: test_can.c:140
#define TEST_CANTX_ID_DUMMY
Definition: test_can.c:102
const CAN_RX_MESSAGE_TYPE_s can_rxMessages[]
Definition: test_can.c:197
void testDataSendNoMessagePending(void)
Definition: test_can.c:252
void testCAN_PeriodicTransmitQueueFull(void)
Definition: test_can.c:366
static DATA_BLOCK_MSL_FLAG_s can_tableMslFlags
Definition: test_can.c:147
#define TEST_CANRX_DUMMY_MESSAGE
Definition: test_can.c:120
OS_QUEUE ftsk_imdCanDataQueue
Definition: test_can.c:215
static DATA_BLOCK_MIN_MAX_s can_tableMinimumMaximumValues
Definition: test_can.c:145
static DATA_BLOCK_OPEN_WIRE_s can_tableOpenWire
Definition: test_can.c:148
CAN_STATE_s * canTestState
Definition: test_can.c:212
CAN_BUFFER_ELEMENT_s dummyMessageBuffer
Definition: test_can.c:204
OS_QUEUE ftsk_canTxUnsentMessagesQueue
Definition: test_can.c:217
volatile bool ftsk_allQueuesCreated
Definition: test_can.c:218
const uint8_t can_rxMessagesLength
Definition: test_can.c:202
void testCAN_CheckDatabaseNullPointer(void)
Definition: test_can.c:341
void testCAN_ValidateConfiguredTxMessagePeriod(void)
Definition: test_can.c:333
static DATA_BLOCK_PACK_VALUES_s can_tablePackValues
Definition: test_can.c:149
const uint8_t can_txMessagesLength
Definition: test_can.c:201
#define TEST_CANTX_DUMMY_PERIOD_ms
Definition: test_can.c:103
void testDataSendMessagePending(void)
Definition: test_can.c:272
void testCAN_SendMessagesFromQueue(void)
Definition: test_can.c:421
void testCAN_ValidateConfiguredTxMessagePhase(void)
Definition: test_can.c:337
void testDataSendInvalidIdentifierType(void)
Definition: test_can.c:263
static DATA_BLOCK_MOL_FLAG_s can_tableMolFlags
Definition: test_can.c:146
static DATA_BLOCK_SOH_s can_tableSoh
Definition: test_can.c:153
static DATA_BLOCK_ERROR_STATE_s can_tableErrorState
Definition: test_can.c:142
void testIsCurrentSensorCcPresent(void)
Definition: test_can.c:319
void setUp(void)
Definition: test_can.c:221
void tearDown(void)
Definition: test_can.c:232
const CAN_TX_MESSAGE_TYPE_s can_txMessages[]
Definition: test_can.c:193
const CAN_SHIM_s can_kShim
Definition: test_can.c:158
static DATA_BLOCK_CELL_TEMPERATURE_s can_tableTemperatures
Definition: test_can.c:139
static DATA_BLOCK_SOE_s can_tableSoe
Definition: test_can.c:152
const CAN_NODE_s can_node1
Definition: test_can.c:131
void testEnablePeriodic(void)
Definition: test_can.c:293
static DATA_BLOCK_RSL_FLAG_s can_tableRslFlags
Definition: test_can.c:150
static uint32_t TEST_CANTX_DummyCallback(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
Definition: test_can.c:178
static uint32_t TEST_CANRX_DummyCallback(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
Definition: test_can.c:186
static DATA_BLOCK_STATE_REQUEST_s can_tableStateRequest
Definition: test_can.c:154
static DATA_BLOCK_INSULATION_MONITORING_s can_tableInsulation
Definition: test_can.c:143
void testDataSendNullPointerAsData(void)
Definition: test_can.c:244
void testCAN_PeriodicTransmitQueueHasSpace(void)
Definition: test_can.c:388
#define TEST_CANTX_DUMMY_MESSAGE
Definition: test_can.c:106
OS_QUEUE ftsk_canRxQueue
Definition: test_can.c:216
void testCAN_IsMessagePeriodElapsed(void)
Definition: test_can.c:410
void testIsCurrentSensorPresent(void)
Definition: test_can.c:304
const CAN_NODE_s can_node2Isolated
Definition: test_can.c:135
void testDataSendNullPointerAsNode(void)
Definition: test_can.c:236
OS_QUEUE ftsk_dataQueue
Definition: test_can.c:214
const uint16_t numberOfRepetitionsToReset
Definition: test_can.c:210
static DATA_BLOCK_SOC_s can_tableSoc
Definition: test_can.c:151
static DATA_BLOCK_CURRENT_SENSOR_s can_tableCurrentSensor
Definition: test_can.c:141
OS_QUEUE imd_canDataQueue
Definition: test_can.c:156
Header file for the version information that is generated by the toolchain.