Blame view

app/gui/oven_control/servicedatas.h 1.96 KB
652e9cd54   고영탁   Merge
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  #ifndef SERVICEDATAS_H
  #define SERVICEDATAS_H
  
  #include <stdint.h>
  #include <time.h>
  
  #define STRUCT_PACK     __attribute__ ((packed))
  
  #define MAX_ERROR_TYPE_CNT  34
  
  typedef struct _error_item{
      uint16_t fired_cnt;
      time_t first_fired;
      time_t last_fried;
  }STRUCT_PACK error_item;
  
  
  typedef union _error_log{
          uint8_t datas[MAX_ERROR_TYPE_CNT*sizeof(error_item)];
          error_item values[MAX_ERROR_TYPE_CNT];
          struct{
              error_item door;
              error_item upper_fire_fail;
              error_item upper_fire_alarm;
              error_item upper_pan_fail;
              error_item lower_fire_fail;
              error_item lower_fire_alarm;
              error_item lower_pan_fail;
              error_item steam_fire_fail;
              error_item steam_fire_alarm;
              error_item steam_pan_fail;
              error_item water_level_sensor_fail;
              error_item water_flow_sensor_fail;
              error_item inner_temp_fail;
              error_item inner_temp_high_alarm;
              error_item qunching_temp_fail;
              error_item meat_prove_temp1_fail;
              error_item meatprove_temp2_fail;
              error_item meatprove_temp3_fail;
              error_item meatprove_temp4_fail;
              error_item wall_temp1_fail;
              error_item wall_temp2_fail;
              error_item steam_gen_temp_fail;
              error_item pcb_temp_fail;
              error_item upper_motor_noncook_fail;
              error_item upper_motor_cook_fail;
              error_item lower_motor_noncook_fail;
              error_item lower_motor_cook_fail;
              error_item small_motor_fail;
              error_item midd_motor_fail;
              error_item supply_motor_fail; // Steam Generator Tank Supply Pump
              error_item humidity_tamper_fail;
          }items;
  }STRUCT_PACK error_log;
  
  
  
  
  class servicedatas
  {
  public:
      servicedatas();
      error_log err_log;
      bool saveServiceDatas(void);
      bool loadServiceDatas(void);
  };
  
  #endif // SERVICEDATAS_H