130 bool returnValue =
false;
131 if ((duration != 0u) || (timestampEnter != 0u)) {
151 static uint32_t sysm_timestamp = 0;
155 if (sysm_timestamp == local_timer) {
158 sysm_timestamp = local_timer;
160 uint32_t time_since_last_call = 0;
161 uint32_t max_allowed_jitter = 0;
169 if ((time_since_last_call > max_allowed_jitter) &&
260 if (updateNecessary ==
true) {
289 #ifdef UNITY_UNIT_TEST
DIAG_RETURNTYPE_e DIAG_Handler(DIAG_ID_e diag_id, DIAG_EVENT_e event, DIAG_IMPACT_LEVEL_e impact, uint32_t data)
DIAG_Handler provides generic error handling, based on diagnosis group.
@ DIAG_ID_SYSTEMMONITORING
#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.
FRAM_RETURN_TYPE_e FRAM_ReadData(FRAM_BLOCK_ID_e blockId)
Reads a variable from the FRAM.
FRAM_RETURN_TYPE_e FRAM_WriteData(FRAM_BLOCK_ID_e blockId)
Writes a variable to the FRAM.
Header for the driver for the FRAM module.
FRAM_SYS_MON_RECORD_s fram_sys_mon_record
@ FRAM_BLOCK_ID_SYS_MON_RECORD
#define NULL_PTR
Null pointer.
Declaration of the OS wrapper interface.
void OS_ExitTaskCritical(void)
Exit Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
void OS_EnterTaskCritical(void)
Enter Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
uint32_t OS_GetTickCount(void)
Returns OS based system tick value.
struct that stores for each task the last violation of timing
uint32_t taskEngineViolatingDuration
uint32_t taskEngineEnterTimestamp
bool anyTimingIssueOccurred
uint32_t task10msViolatingDuration
uint32_t task100msViolatingDuration
uint32_t task100msEnterTimestamp
uint32_t task1msViolatingDuration
uint32_t task100msAlgorithmEnterTimestamp
uint32_t task10msEnterTimestamp
uint32_t task1msEnterTimestamp
uint32_t task100msAlgorithmViolatingDuration
void(* callbackfunc)(SYSM_TASK_ID_e taskID)
bool recordedViolationEngine
bool recordedViolation10ms
bool recordedViolation100ms
bool recordedViolation1ms
bool recordedViolation100msAlgo
bool recordedViolationAny
SYSM_NOTIFICATION_s * TEST_SYSM_GetNotifications(void)
void SYSM_GetRecordedTimingViolations(SYSM_TIMING_VIOLATION_RESPONSE_s *pAnswer)
Returns the timing violation flags determined from fram state.
void SYSM_ClearAllTimingViolations(void)
Clears all timing violations (both current and recorded)
void SYSM_CheckNotifications(void)
overall system monitoring
void SYSM_Notify(SYSM_TASK_ID_e taskId, SYSM_NOTIFY_TYPE_e state, uint32_t timestamp)
Sets needed bits to indicate that a task is running.
void SYSM_UpdateFramData(void)
Commits the stored changes to FRAM if necessary.
static void SYSM_RecordTimingViolation(SYSM_TASK_ID_e taskId, uint32_t taskDuration, uint32_t timestampEnter)
Records the violation of a timing in non volatile memory.
STD_RETURN_TYPE_e SYSM_Init(void)
initialization function for system monitoring
static volatile bool sysm_flagFramCopyHasChanges
static SYSM_NOTIFICATION_s sysm_notifications[SYSM_TASK_ID_MAX]
static bool SYSM_ConvertRecordedTimingsToViolation(uint32_t duration, uint32_t timestampEnter)
Convert recorded timings into a decision (bool) whether the timing has been violated or not.
static FRAM_SYS_MON_RECORD_s sysm_localFramCopy
void SYSM_CopyFramStruct(const FRAM_SYS_MON_RECORD_s *const kpkFrom, FRAM_SYS_MON_RECORD_s *pTo)
Copy from the from entry to the to entry.
SYSM_MONITORING_CFG_s sysm_ch_cfg[]
@ SYSM_TASK_ID_CYCLIC_10ms
@ SYSM_TASK_ID_CYCLIC_ALGORITHM_100ms
@ SYSM_TASK_ID_CYCLIC_100ms
@ SYSM_TASK_ID_CYCLIC_1ms