C2A_Core
utility_counter.h
[詳解]
1 #ifndef UTILITY_COUNTER_H_
2 #define UTILITY_COUNTER_H_
3 // FIXME: このAppは現在管理されていない!
4 // 使用する前に確認すること
5 
6 #if 0
7 // FIXME: 現在 AL に依存してしまっている
8 #include <src_user/Settings/System/anomaly_logger_define.h>
9 #ifdef AL_ENABLE
10 
11 #include "../System/ApplicationManager/app_info.h"
12 #include "../System/AnomalyLogger/anomaly_logger.h"
13 #include "../TlmCmd/common_cmd_packet.h"
14 
15 // 汎用カウンタ用構造体
16 typedef enum
17 {
18  UTIL_COUNTER_RES00 = 0,
19  UTIL_COUNTER_RES01,
20  UTIL_COUNTER_RES02,
21  UTIL_COUNTER_RES03,
22  UTIL_COUNTER_RES04,
23  UTIL_COUNTER_RES05,
24  UTIL_COUNTER_RES06,
25  UTIL_COUNTER_RES07,
26  UTIL_COUNTER_RES08,
27  UTIL_COUNTER_RES09,
28  UTIL_COUNTER_RES10,
29  UTIL_COUNTER_RES11,
30  UTIL_COUNTER_RES12,
31  UTIL_COUNTER_RES13,
32  UTIL_COUNTER_RES14,
33  UTIL_COUNTER_RES15,
34  UTIL_COUNTER_RES16,
35  UTIL_COUNTER_RES17,
36  UTIL_COUNTER_RES18,
37  UTIL_COUNTER_RES19,
38  UTIL_COUNTER_RES20,
39  UTIL_COUNTER_RES21,
40  UTIL_COUNTER_RES22,
41  UTIL_COUNTER_RES23,
42  UTIL_COUNTER_RES24,
43  UTIL_COUNTER_RES25,
44  UTIL_COUNTER_RES26,
45  UTIL_COUNTER_RES27,
46  UTIL_COUNTER_RES28,
47  UTIL_COUNTER_RES29,
48  UTIL_COUNTER_RES30,
49  UTIL_COUNTER_RES31,
50  UTIL_COUNTER_MAX
51 } UTIL_COUNTER_NAME;
52 
53 typedef struct
54 {
55  unsigned int counter;
56  unsigned int threshold;
57  unsigned char anomaly_active;
58 } UTIL_COUNTER_counter;
59 
60 typedef struct
61 {
62  UTIL_COUNTER_counter cnt[UTIL_COUNTER_MAX];
63 } UtilityCounter;
64 
65 extern const UtilityCounter* const utility_counter;
66 
67 AppInfo UTIL_COUNTER_create_app(void);
68 
69 // コマンド
70 CCP_CmdRet Cmd_UTIL_COUNTER_INCREMENT(const CommonCmdPacket* packet);
71 CCP_CmdRet Cmd_UTIL_COUNTER_RESET(const CommonCmdPacket* packet);
72 CCP_CmdRet Cmd_UTIL_COUNTER_SET_PARAM(const CommonCmdPacket* packet);
73 
74 #endif
75 #endif
76 #endif
コマンド返り値
Space Packet (コマンド用)