PER Firmware
Loading...
Searching...
No Matches
faults_common.h File Reference

Event-based FIDR system. More...

#include <stdint.h>
#include "can_library/generated/can_types.h"
Include dependency graph for faults_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fault_t
 

Enumerations

enum  fault_priority_t : uint8_t { FAULT_PRIO_WARNING , FAULT_PRIO_ERROR , FAULT_PRIO_FATAL , NUM_FAULT_PRIOS }
 
enum  fault_state_t : uint8_t { FAULT_STATE_CLEAR = 0 , FAULT_STATE_PENDING = 1 , FAULT_STATE_LATCHED = 2 , FAULT_STATE_RECOVERING = 3 }
 

Functions

void update_fault (fault_id_t fault_id, float value)
 
bool is_latched (fault_id_t fault_id)
 
bool is_clear (fault_id_t fault_id)
 
void fault_library_periodic ()
 
bool is_warning_latched ()
 
bool is_error_latched ()
 
bool is_fatal_latched ()
 
bool is_curr_mcu_latched ()
 
bool is_other_mcus_latched ()
 
bool is_any_latched ()
 

Detailed Description

Event-based FIDR system.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Enumeration Type Documentation

◆ fault_priority_t

enum fault_priority_t : uint8_t
Enumerator
FAULT_PRIO_WARNING 
FAULT_PRIO_ERROR 
FAULT_PRIO_FATAL 
NUM_FAULT_PRIOS 

◆ fault_state_t

enum fault_state_t : uint8_t
Enumerator
FAULT_STATE_CLEAR 
FAULT_STATE_PENDING 
FAULT_STATE_LATCHED 
FAULT_STATE_RECOVERING 

Function Documentation

◆ fault_library_periodic()

void fault_library_periodic ( )
Here is the caller graph for this function:

◆ is_any_latched()

bool is_any_latched ( )

◆ is_clear()

bool is_clear ( fault_id_t fault_id)
Here is the caller graph for this function:

◆ is_curr_mcu_latched()

bool is_curr_mcu_latched ( )

◆ is_error_latched()

bool is_error_latched ( )

◆ is_fatal_latched()

bool is_fatal_latched ( )

◆ is_latched()

bool is_latched ( fault_id_t fault_id)
Here is the caller graph for this function:

◆ is_other_mcus_latched()

bool is_other_mcus_latched ( )

◆ is_warning_latched()

bool is_warning_latched ( )

◆ update_fault()

void update_fault ( fault_id_t fault_id,
float value )
Here is the caller graph for this function: