77 #define DATA_MAX_QUEUE_TIMEOUT_MS (10u)
79 #define DATA_QUEUE_TIMEOUT_MS (DATA_MAX_QUEUE_TIMEOUT_MS / OS_TICK_RATE_MS)
124 void *pDatabaseStruct,
125 void *pPassedDataStruct);
153 .accessType = accessType,
165 void *pDatabaseStruct,
166 void *pPassedDataStruct) {
185 (void)memcpy(pDatabaseStruct, pPassedDataStruct, dataLength);
189 (void)memcpy(pPassedDataStruct, pDatabaseStruct, dataLength);
206 void *pPassedDataStruct = kpReceiveMessage->
pDatabaseEntry[queueEntry];
212 uint8_t uniqueId = (uint8_t)(kpHeader->
uniqueId);
220 DATA_CopyData(accessType, dataLength, pDatabaseStruct, pPassedDataStruct);
230 FAS_ASSERT(allQueuesCreatedCopyForAssert ==
true);
246 *pStartDatabaseEntryWR = 0;
248 pStartDatabaseEntryWR++;
316 void *pDataToReceiver0,
317 void *pDataToReceiver1,
318 void *pDataToReceiver2,
319 void *pDataToReceiver3) {
325 DATA_READ_ACCESS, pDataToReceiver0, pDataToReceiver1, pDataToReceiver2, pDataToReceiver3);
348 void *pDataFromSender0,
349 void *pDataFromSender1,
350 void *pDataFromSender2,
351 void *pDataFromSender3) {
357 DATA_WRITE_ACCESS, pDataFromSender0, pDataFromSender1, pDataFromSender2, pDataFromSender3);
363 dummyWriteTable.
member1 = UINT8_MAX;
STD_RETURN_TYPE_e DATA_Write4DataBlocks(void *pDataFromSender0, void *pDataFromSender1, void *pDataFromSender2, void *pDataFromSender3)
Stores four data blocks in database.
void DATA_Task(void)
trigger of database manager
STD_RETURN_TYPE_e DATA_Read2DataBlocks(void *pDataToReceiver0, void *pDataToReceiver1)
Reads two data blocks in database by value.
static STD_RETURN_TYPE_e DATA_AccessDatabaseEntries(DATA_BLOCK_ACCESS_TYPE_e accessType, void *pData0, void *pData1, void *pData2, void *pData3)
static void DATA_IterateOverDatabaseEntries(const DATA_QUEUE_MESSAGE_s *kpReceiveMessage)
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.
void DATA_DummyFunction(void)
Dummy void function of the database module.
STD_RETURN_TYPE_e DATA_Write1DataBlock(void *pDataFromSender0)
Stores one data block in database.
STD_RETURN_TYPE_e DATA_Read3DataBlocks(void *pDataToReceiver0, void *pDataToReceiver1, void *pDataToReceiver2)
Reads three data blocks in database by value.
STD_RETURN_TYPE_e DATA_Write3DataBlocks(void *pDataFromSender0, void *pDataFromSender1, void *pDataFromSender2)
Stores three data blocks in database.
void DATA_ExecuteDataBist(void)
Executes a built-in self-test for the database module.
static const DATA_BASE_HEADER_s data_baseHeader
device configuration of database
STD_RETURN_TYPE_e DATA_Read4DataBlocks(void *pDataToReceiver0, void *pDataToReceiver1, void *pDataToReceiver2, void *pDataToReceiver3)
Reads four data blocks in database by value.
static uint8_t data_uniqueIdToDatabaseEntry[DATA_BLOCK_ID_MAX]
uniqueId to respective database entry selector
STD_RETURN_TYPE_e DATA_Write2DataBlocks(void *pDataFromSender0, void *pDataFromSender1)
Stores two data blocks in database.
#define DATA_QUEUE_TIMEOUT_MS
STD_RETURN_TYPE_e DATA_Initialize(void)
Initialization of database manager.
static void DATA_CopyData(DATA_BLOCK_ACCESS_TYPE_e accessType, uint32_t dataLength, void *pDatabaseStruct, void *pPassedDataStruct)
DATA_BLOCK_ACCESS_TYPE_e
data block access types (read or write)
#define DATA_MAX_ENTRIES_PER_ACCESS
#define DATA_DUMMY_VALUE_UINT8_T_ALTERNATING_BIT_PATTERN
#define DATA_READ_DATA(...)
#define DATA_WRITE_DATA(...)
DATA_BASE_s data_database[]
channel configuration of database (data blocks)
@ DATA_BLOCK_ID_DUMMY_FOR_SELF_TEST
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define FAS_TRAP
Define that evaluates to essential boolean false thus tripping an assert.
#define NULL_PTR
Null pointer.
Header of task driver implementation.
volatile bool ftsk_allQueuesCreated
QueueHandle_t ftsk_databaseQueue
#define GEN_REPEAT_U(x, n)
Macro that helps to generate a series of literals (for array initializers).
Declaration of the OS wrapper interface.
OS_STD_RETURN_e OS_ReceiveFromQueue(OS_QUEUE xQueue, void *const pvBuffer, uint32_t ticksToWait)
Receive an item from a queue.
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.
uint32_t OS_GetTickCount(void)
Returns OS based system tick value.
DATA_BLOCK_HEADER_s header
void * pDatabaseEntry[DATA_MAX_ENTRIES_PER_ACCESS]
DATA_BLOCK_ACCESS_TYPE_e accessType