software:firmware
MakAir Firmware
end_of_line_test.h File Reference

Auto test for end of line unit test. More...

Go to the source code of this file.

Classes

class  EolTest
 Controls the running of the embedded auto tests. More...
 

Macros

#define EOL_TEST_ACTIVE   0xa240183a
 This an arbitrary value allowing to check if test mode is active. More...
 

Enumerations

enum  TestStep {
  START , SUPPLY_TO_EXPANDER_NOT_CONNECTED , CHECK_FAN , TEST_BAT_DEAD ,
  BATTERY_DEEP_DISCHARGE , DISCONNECT_MAINS , CONNECT_MAINS , CHECK_BUZZER ,
  CHECK_ALL_BUTTONS , CHECK_UI_SCREEN , PLUG_AIR_TEST_SYTEM , REACH_MAX_PRESSURE ,
  MAX_PRESSURE_REACHED_OK , MAX_PRESSURE_NOT_REACHED , START_LEAK_MESURE , LEAK_IS_TOO_HIGH ,
  REACH_NULL_PRESSURE , MIN_PRESSURE_NOT_REACHED , USER_CONFIRMATION_BEFORE_O2_TEST , START_O2_TEST ,
  O2_PRESSURE_NOT_REACH , WAIT_USER_BEFORE_LONG_RUN , START_LONG_RUN_BLOWER , PRESSURE_NOT_STABLE ,
  FLOW_NOT_STABLE , END_SUCCESS , DISPLAY_PRESSURE , DISPLAY_FLOW
}
 
enum  TestState { STATE_IN_PROGRESS , STATE_ERROR , STATE_SUCCESS }
 

Variables

EolTest eolTest
 

Detailed Description

Auto test for end of line unit test.

Author
Makers For Life

Definition in file end_of_line_test.h.

Macro Definition Documentation

◆ EOL_TEST_ACTIVE

#define EOL_TEST_ACTIVE   0xa240183a

This an arbitrary value allowing to check if test mode is active.

A variable is initialized at beginning of testMode with this value. Due to the fact this value is arbitrary and big, it is highly impossible that a memory corruption randomly gives this value

Definition at line 22 of file end_of_line_test.h.

Enumeration Type Documentation

◆ TestState

enum TestState
Enumerator
STATE_IN_PROGRESS 
STATE_ERROR 
STATE_SUCCESS 

Definition at line 70 of file end_of_line_test.h.

70  {
74 };
@ STATE_IN_PROGRESS
@ STATE_SUCCESS
@ STATE_ERROR

◆ TestStep

enum TestStep
Enumerator
START 
SUPPLY_TO_EXPANDER_NOT_CONNECTED 
CHECK_FAN 
TEST_BAT_DEAD 
BATTERY_DEEP_DISCHARGE 
DISCONNECT_MAINS 
CONNECT_MAINS 
CHECK_BUZZER 
CHECK_ALL_BUTTONS 
CHECK_UI_SCREEN 
PLUG_AIR_TEST_SYTEM 
REACH_MAX_PRESSURE 
MAX_PRESSURE_REACHED_OK 
MAX_PRESSURE_NOT_REACHED 
START_LEAK_MESURE 
LEAK_IS_TOO_HIGH 
REACH_NULL_PRESSURE 
MIN_PRESSURE_NOT_REACHED 
USER_CONFIRMATION_BEFORE_O2_TEST 
START_O2_TEST 
O2_PRESSURE_NOT_REACH 
WAIT_USER_BEFORE_LONG_RUN 
START_LONG_RUN_BLOWER 
PRESSURE_NOT_STABLE 
FLOW_NOT_STABLE 
END_SUCCESS 
DISPLAY_PRESSURE 
DISPLAY_FLOW 

Definition at line 26 of file end_of_line_test.h.

26  {
27  START,
29  CHECK_FAN,
35  // cppcheck-suppress misra-c2012-12.3
38  // cppcheck-suppress misra-c2012-12.3
40  // cppcheck-suppress misra-c2012-12.3
42  // cppcheck-suppress misra-c2012-12.3
44  // cppcheck-suppress misra-c2012-12.3
46  // cppcheck-suppress misra-c2012-12.3
48  // cppcheck-suppress misra-c2012-12.3
50  // cppcheck-suppress misra-c2012-12.3
52  // cppcheck-suppress misra-c2012-12.3
55  // cppcheck-suppress misra-c2012-12.3
57  // cppcheck-suppress misra-c2012-12.3
60  // cppcheck-suppress misra-c2012-12.3
62  // cppcheck-suppress misra-c2012-12.3
68 };
@ CHECK_ALL_BUTTONS
@ END_SUCCESS
@ START
@ USER_CONFIRMATION_BEFORE_O2_TEST
@ MAX_PRESSURE_REACHED_OK
@ START_O2_TEST
@ CONNECT_MAINS
@ SUPPLY_TO_EXPANDER_NOT_CONNECTED
@ CHECK_UI_SCREEN
@ MAX_PRESSURE_NOT_REACHED
@ O2_PRESSURE_NOT_REACH
@ LEAK_IS_TOO_HIGH
@ CHECK_FAN
@ WAIT_USER_BEFORE_LONG_RUN
@ BATTERY_DEEP_DISCHARGE
@ TEST_BAT_DEAD
@ MIN_PRESSURE_NOT_REACHED
@ DISCONNECT_MAINS
@ DISPLAY_FLOW
@ PLUG_AIR_TEST_SYTEM
@ START_LONG_RUN_BLOWER
@ REACH_NULL_PRESSURE
@ START_LEAK_MESURE
@ REACH_MAX_PRESSURE
@ PRESSURE_NOT_STABLE
@ DISPLAY_PRESSURE
@ FLOW_NOT_STABLE
@ CHECK_BUZZER

Variable Documentation

◆ eolTest

EolTest eolTest
extern

Definition at line 37 of file end_of_line_test.cpp.