foxBMS - Unit Tests  1.5.0
The foxBMS Unit Tests API Documentation
database.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 database.c
44  * @author foxBMS Team
45  * @date 2015-08-18 (date of creation)
46  * @updated 2023-02-03 (date of last update)
47  * @version v1.5.0
48  * @ingroup ENGINE
49  * @prefix DATA
50  *
51  * @brief Database module implementation
52  *
53  * @details The database read/write functions put references to the database
54  * entries to be read/written in the database queue. The function
55  * DATA_Task() reads the queue to get the database entries to be
56  * read/written. Up to DATA_MAX_ENTRIES_PER_ACCESS entries can be
57  * read/written with the same function call. To avoid code
58  * duplication, the functions to read/write 1 to
59  * DATA_MAX_ENTRIES_PER_ACCESS-1 entries call the function to
60  * read/write DATA_MAX_ENTRIES_PER_ACCESS entries and use NULL_PTR
61  * for the entries that are not to be read/written. DATA_Task()
62  * checks that the first entry is not a NULL_PTR and asserts if it
63  * is not the case. If subsequent entries are found in the database
64  * queue, they are simply ignored if they are NULL_PTR.
65  */
66 
67 /*========== Includes =======================================================*/
68 #include "general.h"
69 
70 #include "database.h"
71 
72 #include "ftask.h"
73 #include "os.h"
74 
75 #include <stdint.h>
76 #include <string.h>
77 
78 /*========== Macros and Definitions =========================================*/
79 /** Maximum queue timeout time in milliseconds */
80 #define DATA_MAX_QUEUE_TIMEOUT_MS (10u)
81 
82 #define DATA_QUEUE_TIMEOUT_MS (DATA_MAX_QUEUE_TIMEOUT_MS / OS_TICK_RATE_MS)
83 
84 FAS_STATIC_ASSERT(DATA_QUEUE_TIMEOUT_MS > 0u, "invalid database queue timeout!");
85 
86 /** configuration struct of database device */
87 typedef struct {
88  uint8_t nrDatabaseEntries; /*!< number of database entries */
89  DATA_BASE_s *pDatabase; /*!< pointer to the array with the database entries */
91 
92 /*========== Static Constant and Variable Definitions =======================*/
93 
94 /**
95  * @brief device configuration of database
96  * @details all attributes of device configuration are listed here (pointer to
97  * channel list, number of channels)
98  */
100  .nrDatabaseEntries = sizeof(data_database) / sizeof(DATA_BASE_s), /**< number of blocks (and block headers) */
101  .pDatabase = &data_database[0],
102 };
103 
104 /**
105  * @brief uniqueId to respective database entry selector
106  * @details This array is the link between the uniqueId of a database entry and
107  * the actual position of the database entry in data_database[].
108  * The IDs are set to its final value, when Data_Initialize is called.
109  */
111 
112 /*========== Extern Constant and Variable Definitions =======================*/
113 
114 /*========== Static Function Prototypes =====================================*/
115 static void DATA_IterateOverDatabaseEntries(const DATA_QUEUE_MESSAGE_s *kpReceiveMessage);
116 
118  DATA_BLOCK_ACCESS_TYPE_e accessType,
119  void *pData0,
120  void *pData1,
121  void *pData2,
122  void *pData3);
123 
124 static void DATA_CopyData(
125  DATA_BLOCK_ACCESS_TYPE_e accessType,
126  uint32_t dataLength,
127  void *pDatabaseStruct,
128  void *pPassedDataStruct);
129 
130 /*========== Static Function Implementations ================================*/
132  DATA_BLOCK_ACCESS_TYPE_e accessType,
133  void *pData0,
134  void *pData1,
135  void *pData2,
136  void *pData3) {
137  FAS_ASSERT((accessType == DATA_WRITE_ACCESS) || (accessType == DATA_READ_ACCESS));
138  FAS_ASSERT(pData0 != NULL_PTR);
139  /* AXIVION Routine Generic-MissingParameterAssert: pData1: pointer might be NULL_PTR (i.e., if the caller
140  * is DATA_Read1DataBlock/DATA_Write1DataBlock). The DATA_Task function checks the pointer being not NULL_PTR prior
141  * to usage. */
142  /* AXIVION Routine Generic-MissingParameterAssert: pData2: pointer might be NULL_PTR (i.e., if the caller
143  * is DATA_Read1DataBlock/DATA_Write1DataBlock or DATA_Read2DataBlocks/DATA_Write2DataBlocks). The DATA_Task
144  * function checks the pointer being not NULL_PTR prior to usage. */
145  /* AXIVION Routine Generic-MissingParameterAssert: pData3: pointer might be NULL_PTR (i.e., if the caller
146  * is DATA_Read1DataBlock/DATA_Write1DataBlock, DATA_Read2DataBlocks/DATA_Write2DataBlocks or
147  * DATA_Read3DataBlocks/DATA_Write3DataBlocks). The DATA_Task function checks the pointer being not NULL_PTR prior
148  * to usage. */
149  STD_RETURN_TYPE_e retval = STD_NOT_OK;
150  /* prepare send message with attributes of data block */
151  DATA_QUEUE_MESSAGE_s data_sendMessage = {
152  .pDatabaseEntry[DATA_ENTRY_0] = pData0,
153  .pDatabaseEntry[DATA_ENTRY_1] = pData1,
154  .pDatabaseEntry[DATA_ENTRY_2] = pData2,
155  .pDatabaseEntry[DATA_ENTRY_3] = pData3,
156  .accessType = accessType,
157  };
158  /* Send a pointer to a message object and maximum block time: DATA_QUEUE_TIMEOUT_MS */
159  if (OS_SendToBackOfQueue(ftsk_databaseQueue, (void *)&data_sendMessage, DATA_QUEUE_TIMEOUT_MS) == OS_SUCCESS) {
160  retval = STD_OK;
161  }
162  return retval;
163 }
164 
165 static void DATA_CopyData(
166  DATA_BLOCK_ACCESS_TYPE_e accessType,
167  uint32_t dataLength,
168  void *pDatabaseStruct,
169  void *pPassedDataStruct) {
170  FAS_ASSERT((accessType == DATA_WRITE_ACCESS) || (accessType == DATA_READ_ACCESS));
171  /* AXIVION Routine Generic-MissingParameterAssert: dataLength: parameter accepts whole range */
172  /* Copy data either into database or passed database struct */
173  FAS_ASSERT(pDatabaseStruct != NULL_PTR);
174  FAS_ASSERT(pPassedDataStruct != NULL_PTR);
175 
176  if (accessType == DATA_WRITE_ACCESS) {
177  /* Pointer on data block header of passed struct */
178  /* AXIVION Next Codeline Style MisraC2012-11.5 this casted is required in order to have a generic interface
179  * for all database entries. */
180  DATA_BLOCK_HEADER_s *pHeader = (DATA_BLOCK_HEADER_s *)pPassedDataStruct;
181  /* Update timestamps in passed database struct and then copy this struct into database */
182  pHeader->previousTimestamp = pHeader->timestamp;
183  pHeader->timestamp = OS_GetTickCount();
184  /* Copy passed struct in database struct */
185  /* memcpy has no return value therefore there is nothing to check: casting to void */
186  /* AXIVION Next Codeline Style MisraC2012-21.18
187  * */
188  (void)memcpy(pDatabaseStruct, pPassedDataStruct, dataLength);
189  } else if (accessType == DATA_READ_ACCESS) {
190  /* Copy database entry in passed struct */
191  /* memcpy has no return value therefore there is nothing to check: casting to void */
192  (void)memcpy(pPassedDataStruct, pDatabaseStruct, dataLength);
193  } else {
194  /* invalid database operation */
196  }
197 }
198 
199 static void DATA_IterateOverDatabaseEntries(const DATA_QUEUE_MESSAGE_s *kpReceiveMessage) {
200  FAS_ASSERT(kpReceiveMessage != NULL_PTR);
201  for (uint8_t queueEntry = 0u; queueEntry < DATA_MAX_ENTRIES_PER_ACCESS; queueEntry++) {
202  /* Iterate over pointer array and handle all access operations if pointer != NULL_PTR
203  * All pointers in the array, expect the first one, might be NULL_PTR, which is valid.
204  * Again, to understand explanation see the comments in DATA_Read1DataBlock, DATA_Read2DataBlocks,
205  * DATA_Read3DataBlocks and DATA_Read4DataBlocks as well as DATA_Write1DataBlock,
206  * DATA_Write2DataBlocks, DATA_Write3DataBlocks and DATA_Write4DataBlocks */
207  if (kpReceiveMessage->pDatabaseEntry[queueEntry] != NULL_PTR) {
208  /* pointer to passed database struct */
209  void *pPassedDataStruct = kpReceiveMessage->pDatabaseEntry[queueEntry];
210  /* Get access type (read or write) of passed data struct */
211  DATA_BLOCK_ACCESS_TYPE_e accessType = kpReceiveMessage->accessType;
212 
213  /* Get pointer to database header entry */
214  const DATA_BLOCK_HEADER_s *kpHeader = (DATA_BLOCK_HEADER_s *)kpReceiveMessage->pDatabaseEntry[queueEntry];
215  uint8_t uniqueId = (uint8_t)(kpHeader->uniqueId);
216  FAS_ASSERT(uniqueId < (uint8_t)DATA_BLOCK_ID_MAX);
217  uint8_t entryIndex = data_uniqueIdToDatabaseEntry[uniqueId];
218  /* Pointer to database struct representation of passed struct */
219  void *pDatabaseStruct = (void *)data_baseHeader.pDatabase[entryIndex].pDatabaseEntry;
220  /* Get dataLength of database entry */
221  uint32_t dataLength = data_baseHeader.pDatabase[entryIndex].dataLength;
222 
223  DATA_CopyData(accessType, dataLength, pDatabaseStruct, pPassedDataStruct);
224  }
225  }
226 }
227 
228 /*========== Extern Function Implementations ================================*/
230  STD_RETURN_TYPE_e retval = STD_OK;
231  /* Check that database queue has been created */
232  const bool allQueuesCreatedCopyForAssert = ftsk_allQueuesCreated;
233  FAS_ASSERT(allQueuesCreatedCopyForAssert == true);
234 
235  FAS_STATIC_ASSERT((sizeof(data_database) != 0u), "No database defined");
236  /* make sure that no basic assumptions are broken -- since data_database is
237  declared with length DATA_BLOCK_ID_MAX, this assert should never fail */
239  ((sizeof(data_database) / sizeof(DATA_BASE_s)) == (uint8_t)(DATA_BLOCK_ID_MAX)), "Database array length error");
240 
241  /* Iterate over database and set respective read/write pointer for each database entry */
242  for (uint16_t i = 0u; i < data_baseHeader.nrDatabaseEntries; i++) {
243  /* Initialize database entry with 0, set write pointer to start of database entry */
244  uint8_t *pStartDatabaseEntryWR = (uint8_t *)data_baseHeader.pDatabase[i].pDatabaseEntry;
245 
246  /* Start after uniqueId entry. Set j'th byte to zero in database entry */
247  for (uint32_t j = 0u; j < (data_baseHeader.pDatabase + i)->dataLength; j++) {
248  if (j >= sizeof(DATA_BLOCK_ID_e)) {
249  *pStartDatabaseEntryWR = 0;
250  }
251  pStartDatabaseEntryWR++;
252  }
253  }
254 
255  /* Configure link between uniqueId and database entry array position */
256  for (uint8_t databaseEntry = 0u; databaseEntry < data_baseHeader.nrDatabaseEntries; databaseEntry++) {
257  /* Get pointer to database header entry */
259  /* make sure that the database entry is not a null pointer (which would happen if an entry is missing
260  despite the ID existing) */
261  FAS_ASSERT(pHeader != NULL_PTR);
262  /* Get uniqueId */
263  DATA_BLOCK_ID_e blockId = pHeader->uniqueId;
264  if ((blockId < DATA_BLOCK_ID_MAX) && (databaseEntry < DATA_BLOCK_ID_MAX)) {
265  /* e.g., data_uniqueIdToDatabaseEntry[<some id>] = configured database entry index */
266  data_uniqueIdToDatabaseEntry[blockId] = databaseEntry;
267  } else {
268  /* Configuration error -> set retval to #STD_NOT_OK */
269  retval = STD_NOT_OK;
270  }
271  }
272 
273  if (ftsk_databaseQueue == NULL_PTR) {
274  retval = STD_NOT_OK; /* Failed to create the queue */
275  }
276  return retval;
277 }
278 
279 void DATA_Task(void) {
280  if (ftsk_databaseQueue != NULL_PTR) {
281  DATA_QUEUE_MESSAGE_s receiveMessage = {
284  /* scan queue and wait for a message up to a maximum amount of 1ms (block time) */
285  if (OS_ReceiveFromQueue(ftsk_databaseQueue, (&receiveMessage), 1u) == OS_SUCCESS) {
286  /* plausibility check, error whether the first pointer is a NULL_PTR, as this must not happen.
287  * See the comments in DATA_Read1DataBlock, DATA_Read2DataBlocks, DATA_Read3DataBlocks and
288  * DATA_Read4DataBlocks as well as DATA_Write1DataBlock, DATA_Write2DataBlocks,
289  * DATA_Write3DataBlocks and DATA_Write4DataBlocks */
290  FAS_ASSERT(receiveMessage.pDatabaseEntry[0] != NULL_PTR);
291  /* ready to start reading/writing database entries */
292  DATA_IterateOverDatabaseEntries(&receiveMessage);
293  }
294  }
295 }
296 
297 void DATA_DummyFunction(void) {
298 }
299 
300 STD_RETURN_TYPE_e DATA_Read1DataBlock(void *pDataToReceiver0) {
301  FAS_ASSERT(pDataToReceiver0 != NULL_PTR);
303 }
304 
305 STD_RETURN_TYPE_e DATA_Read2DataBlocks(void *pDataToReceiver0, void *pDataToReceiver1) {
306  FAS_ASSERT(pDataToReceiver0 != NULL_PTR);
307  FAS_ASSERT(pDataToReceiver1 != NULL_PTR);
308  return DATA_AccessDatabaseEntries(DATA_READ_ACCESS, pDataToReceiver0, pDataToReceiver1, NULL_PTR, NULL_PTR);
309 }
310 
311 STD_RETURN_TYPE_e DATA_Read3DataBlocks(void *pDataToReceiver0, void *pDataToReceiver1, void *pDataToReceiver2) {
312  FAS_ASSERT(pDataToReceiver0 != NULL_PTR);
313  FAS_ASSERT(pDataToReceiver1 != NULL_PTR);
314  FAS_ASSERT(pDataToReceiver2 != NULL_PTR);
315  return DATA_AccessDatabaseEntries(DATA_READ_ACCESS, pDataToReceiver0, pDataToReceiver1, pDataToReceiver2, NULL_PTR);
316 }
317 
319  void *pDataToReceiver0,
320  void *pDataToReceiver1,
321  void *pDataToReceiver2,
322  void *pDataToReceiver3) {
323  FAS_ASSERT(pDataToReceiver0 != NULL_PTR);
324  FAS_ASSERT(pDataToReceiver1 != NULL_PTR);
325  FAS_ASSERT(pDataToReceiver2 != NULL_PTR);
326  FAS_ASSERT(pDataToReceiver3 != NULL_PTR);
328  DATA_READ_ACCESS, pDataToReceiver0, pDataToReceiver1, pDataToReceiver2, pDataToReceiver3);
329 }
330 
331 STD_RETURN_TYPE_e DATA_Write1DataBlock(void *pDataFromSender0) {
332  FAS_ASSERT(pDataFromSender0 != NULL_PTR);
334 }
335 
336 STD_RETURN_TYPE_e DATA_Write2DataBlocks(void *pDataFromSender0, void *pDataFromSender1) {
337  FAS_ASSERT(pDataFromSender0 != NULL_PTR);
338  FAS_ASSERT(pDataFromSender1 != NULL_PTR);
339  return DATA_AccessDatabaseEntries(DATA_WRITE_ACCESS, pDataFromSender0, pDataFromSender1, NULL_PTR, NULL_PTR);
340 }
341 
342 STD_RETURN_TYPE_e DATA_Write3DataBlocks(void *pDataFromSender0, void *pDataFromSender1, void *pDataFromSender2) {
343  FAS_ASSERT(pDataFromSender0 != NULL_PTR);
344  FAS_ASSERT(pDataFromSender1 != NULL_PTR);
345  FAS_ASSERT(pDataFromSender2 != NULL_PTR);
347  DATA_WRITE_ACCESS, pDataFromSender0, pDataFromSender1, pDataFromSender2, NULL_PTR);
348 }
349 
351  void *pDataFromSender0,
352  void *pDataFromSender1,
353  void *pDataFromSender2,
354  void *pDataFromSender3) {
355  FAS_ASSERT(pDataFromSender0 != NULL_PTR);
356  FAS_ASSERT(pDataFromSender1 != NULL_PTR);
357  FAS_ASSERT(pDataFromSender2 != NULL_PTR);
358  FAS_ASSERT(pDataFromSender3 != NULL_PTR);
360  DATA_WRITE_ACCESS, pDataFromSender0, pDataFromSender1, pDataFromSender2, pDataFromSender3);
361 }
362 
363 extern void DATA_ExecuteDataBist(void) {
364  /* compile database entry */
366  dummyWriteTable.member1 = UINT8_MAX;
368 
369  /* write entry */
370  STD_RETURN_TYPE_e writeReturnValue = DATA_WRITE_DATA(&dummyWriteTable);
371  FAS_ASSERT(writeReturnValue == STD_OK);
372 
374 
375  /* read entry into new variable */
376  STD_RETURN_TYPE_e readReturnValue = DATA_READ_DATA(&dummyReadTable);
377  FAS_ASSERT(readReturnValue == STD_OK);
378 
379  FAS_ASSERT(dummyReadTable.member1 == dummyWriteTable.member1);
380  FAS_ASSERT(dummyReadTable.member2 == dummyWriteTable.member2);
381 }
382 
383 /*========== Externalized Static Function Implementations (Unit Test) =======*/
384 #ifdef UNITY_UNIT_TEST
385 #endif
STD_RETURN_TYPE_e DATA_Write4DataBlocks(void *pDataFromSender0, void *pDataFromSender1, void *pDataFromSender2, void *pDataFromSender3)
Stores four data blocks in database.
Definition: database.c:350
void DATA_Task(void)
trigger of database manager
Definition: database.c:279
STD_RETURN_TYPE_e DATA_Read2DataBlocks(void *pDataToReceiver0, void *pDataToReceiver1)
Reads two data blocks in database by value.
Definition: database.c:305
static STD_RETURN_TYPE_e DATA_AccessDatabaseEntries(DATA_BLOCK_ACCESS_TYPE_e accessType, void *pData0, void *pData1, void *pData2, void *pData3)
Definition: database.c:131
static void DATA_IterateOverDatabaseEntries(const DATA_QUEUE_MESSAGE_s *kpReceiveMessage)
Definition: database.c:199
FAS_STATIC_ASSERT(DATA_QUEUE_TIMEOUT_MS > 0u, "invalid database queue timeout!")
STD_RETURN_TYPE_e DATA_Read1DataBlock(void *pDataToReceiver0)
Reads one data block in database by value.
Definition: database.c:300
void DATA_DummyFunction(void)
Dummy void function of the database module.
Definition: database.c:297
STD_RETURN_TYPE_e DATA_Write1DataBlock(void *pDataFromSender0)
Stores one data block in database.
Definition: database.c:331
STD_RETURN_TYPE_e DATA_Read3DataBlocks(void *pDataToReceiver0, void *pDataToReceiver1, void *pDataToReceiver2)
Reads three data blocks in database by value.
Definition: database.c:311
STD_RETURN_TYPE_e DATA_Write3DataBlocks(void *pDataFromSender0, void *pDataFromSender1, void *pDataFromSender2)
Stores three data blocks in database.
Definition: database.c:342
void DATA_ExecuteDataBist(void)
Executes a built-in self-test for the database module.
Definition: database.c:363
static const DATA_BASE_HEADER_s data_baseHeader
device configuration of database
Definition: database.c:99
STD_RETURN_TYPE_e DATA_Read4DataBlocks(void *pDataToReceiver0, void *pDataToReceiver1, void *pDataToReceiver2, void *pDataToReceiver3)
Reads four data blocks in database by value.
Definition: database.c:318
static uint8_t data_uniqueIdToDatabaseEntry[DATA_BLOCK_ID_MAX]
uniqueId to respective database entry selector
Definition: database.c:110
STD_RETURN_TYPE_e DATA_Write2DataBlocks(void *pDataFromSender0, void *pDataFromSender1)
Stores two data blocks in database.
Definition: database.c:336
#define DATA_QUEUE_TIMEOUT_MS
Definition: database.c:82
STD_RETURN_TYPE_e DATA_Initialize(void)
Initialization of database manager.
Definition: database.c:229
static void DATA_CopyData(DATA_BLOCK_ACCESS_TYPE_e accessType, uint32_t dataLength, void *pDatabaseStruct, void *pPassedDataStruct)
Definition: database.c:165
Database module header.
DATA_BLOCK_ACCESS_TYPE_e
data block access types (read or write)
Definition: database.h:109
@ DATA_READ_ACCESS
Definition: database.h:111
@ DATA_WRITE_ACCESS
Definition: database.h:110
#define DATA_ENTRY_0
Definition: database.h:77
#define DATA_ENTRY_2
Definition: database.h:79
#define DATA_ENTRY_3
Definition: database.h:80
#define DATA_ENTRY_1
Definition: database.h:78
#define DATA_MAX_ENTRIES_PER_ACCESS
Definition: database.h:75
#define DATA_DUMMY_VALUE_UINT8_T_ALTERNATING_BIT_PATTERN
Definition: database.h:115
#define DATA_READ_DATA(...)
Definition: database.h:86
#define DATA_WRITE_DATA(...)
Definition: database.h:96
DATA_BASE_s data_database[]
channel configuration of database (data blocks)
Definition: database_cfg.c:179
DATA_BLOCK_ID_e
Definition: database_cfg.h:78
@ DATA_BLOCK_ID_DUMMY_FOR_SELF_TEST
Definition: database_cfg.h:111
@ DATA_BLOCK_ID_MAX
Definition: database_cfg.h:112
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
Definition: fassert.h:250
#define FAS_TRAP
Define that evaluates to essential boolean false thus tripping an assert.
Definition: fassert.h:129
STD_RETURN_TYPE_e
Definition: fstd_types.h:82
@ 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
Header of task driver implementation.
volatile bool ftsk_allQueuesCreated
OS_QUEUE ftsk_databaseQueue
General macros and definitions for the whole platform.
#define GEN_REPEAT_U(x, n)
Macro that helps to generate a series of literals (for array initializers).
Definition: general.h:250
#define GEN_STRIP(x)
Definition: general.h:261
Declaration of the OS wrapper interface.
@ OS_SUCCESS
Definition: os.h:83
OS_STD_RETURN_e OS_ReceiveFromQueue(OS_QUEUE xQueue, void *const pvBuffer, uint32_t ticksToWait)
Receive an item from a queue.
Definition: os_freertos.c:248
OS_STD_RETURN_e OS_SendToBackOfQueue(OS_QUEUE xQueue, const void *const pvItemToQueue, uint32_t ticksToWait)
Post an item to the back the provided queue.
Definition: os_freertos.c:261
uint32_t OS_GetTickCount(void)
Returns OS based system tick value.
Definition: os_freertos.c:142
uint8_t nrDatabaseEntries
Definition: database.c:88
DATA_BASE_s * pDatabase
Definition: database.c:89
uint32_t dataLength
Definition: database_cfg.h:74
void * pDatabaseEntry
Definition: database_cfg.h:73
uint32_t previousTimestamp
Definition: database_cfg.h:124
DATA_BLOCK_ID_e uniqueId
Definition: database_cfg.h:122
void * pDatabaseEntry[DATA_MAX_ENTRIES_PER_ACCESS]
Definition: database.h:122
DATA_BLOCK_ACCESS_TYPE_e accessType
Definition: database.h:121