-
Notifications
You must be signed in to change notification settings - Fork 26
/
hk_events.h
482 lines (442 loc) · 12.4 KB
/
hk_events.h
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
/************************************************************************
* NASA Docket No. GSC-18,919-1, and identified as “Core Flight
* System (cFS) Housekeeping (HK) Application version 2.5.1”
*
* Copyright (c) 2021 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
************************************************************************/
/**
* @file
* The CFS Housekeeping (HK) Application event id header file
*/
#ifndef HK_EVENTS_H
#define HK_EVENTS_H
/**
* \defgroup cfshkevents CFS Housekeeping Event IDs
* \{
*/
/**
* \brief HK Initialization Event ID
*
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when the Housekeeping App completes its
* initialization.
*/
#define HK_INIT_EID 1
/**
* \brief HK Command Code Invalid Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the HK application receives an unexpected
* command code
*/
#define HK_CC_ERR_EID 2
/**
* \brief HK Command Length Invalid Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the actual command length does not equal
* the expected command length
*/
#define HK_CMD_LEN_ERR_EID 3
/**
* \brief HK No-op Command Event ID
*
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when the HK application successfully receives a
* \link #HK_NOOP_CC No-op command. \endlink The command is used primarily as an
* indicator that the HK application can receive commands and generate telemetry.
*/
#define HK_NOOP_CMD_EID 4
/**
* \brief HK Reset Counters Command Event ID
*
* \par Type: DEBUG
*
* \par Cause:
*
* This event message is issued when the HK application receives a Reset
* Counters command.
*/
#define HK_RESET_CNTRS_CMD_EID 5
/**
* \brief HK Table Definition Exceeds Packet Length Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the received input packet is not large
* enough to accommodate every entry in the copy table. The count indicates the
* total number of copy table entries that reference past the end of the input packet.
*/
#define HK_ACCESSING_PAST_PACKET_END_EID 6
/**
* \brief HK New Table ES Memory Pool Request Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the HK application receives an error when
* requesting memory from the ES memory pool
*/
#define HK_MEM_POOL_MALLOC_FAILED_EID 7
/**
* \brief HK Input Message Subscribe Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the HK application receives an error while
* subscribing to the input messages.
*/
#define HK_CANT_SUBSCRIBE_TO_SB_PKT_EID 8
/**
* \brief HK Table Release Memory Pool Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the HK application receives an error while
* attempting to free the memory for an output message
*/
#define HK_MEM_POOL_FREE_FAILED_EID 9
/**
* \brief HK Table Get Status Failed Event ID
*
* \par Type: CRITICAL
*
* \par Cause:
*
* This event message is issued when the HK application receives an unexpected
* return value when calling the #CFE_TBL_GetStatus API for the copy table
*/
#define HK_UNEXPECTED_GETSTAT_RET_EID 10
/**
* \brief HK Combined Packet Message Not In Copy Table Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the HK application receives a command to
* send a combined output message that is not listed in the copy table.
*/
#define HK_UNKNOWN_COMBINED_PACKET_EID 11
/**
* \brief HK Combined Packet Missing Data From Input Packet Event ID
*
* \par Type: DEBUG
*
* \par Cause:
*
* This event message is issued when at least one section of data is missing in
* an output message.
*/
#define HK_OUTPKT_MISSING_DATA_EID 12
/**
* \brief HK Create Software Bus Pipe Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_SB_CreatePipe
* during HK initialization returns a value other than #CFE_SUCCESS
*/
#define HK_CR_PIPE_ERR_EID 14
/**
* \brief HK Subscribe To Send Combined Packet Request Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_SB_Subscribe
* for the #HK_SEND_COMBINED_PKT_MID, during HK initialization
* returns a value other than #CFE_SUCCESS
*/
#define HK_SUB_CMB_ERR_EID 15
/**
* \brief HK Subscribe to Housekeeping Request Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_SB_Subscribe
* for the #HK_SEND_HK_MID, during HK initialization returns
* a value other than #CFE_SUCCESS
*/
#define HK_SUB_REQ_ERR_EID 16
/**
* \brief HK Subscribe to Ground Commands Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_SB_Subscribe
* for the #HK_CMD_MID, during HK initialization returns a value
* other than #CFE_SUCCESS
*/
#define HK_SUB_CMD_ERR_EID 17
/**
* \brief HK Memory Pool Create Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_ES_PoolCreate
* during HK initialization returns a value other than #CFE_SUCCESS
*/
#define HK_CR_POOL_ERR_EID 18
/**
* \brief HK Copy Table Registration Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_TBL_Register
* for the copy table returns a value other than #CFE_SUCCESS
*/
#define HK_CPTBL_REG_ERR_EID 19
/**
* \brief HK Runtime Table Registration Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_TBL_Register
* for the runtime table returns a value other than #CFE_SUCCESS
*/
#define HK_RTTBL_REG_ERR_EID 20
/**
* \brief HK Copy Table Load Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_TBL_Load
* for the copy table returns a value other than #CFE_SUCCESS
*/
#define HK_CPTBL_LD_ERR_EID 21
/**
* \brief HK Copy Table Manage Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_TBL_Manage
* for the copy table returns a value other than #CFE_SUCCESS
*/
#define HK_CPTBL_MNG_ERR_EID 22
/**
* \brief HK Runtime Table Manage Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_TBL_Manage
* for the runtime table returns a value other than #CFE_SUCCESS
*/
#define HK_RTTBL_MNG_ERR_EID 23
/**
* \brief HK Copy Table Get Address Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_TBL_GetAddress
* for the copy table returns a value other than #CFE_TBL_INFO_UPDATED
*/
#define HK_CPTBL_GADR_ERR_EID 24
/**
* \brief HK Runtime Table Get Address Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_TBL_GetAddress
* for the runtime table returns a value other than #CFE_SUCCESS
*/
#define HK_RTTBL_GADR_ERR_EID 25
/**
* \brief HK Exit Due To Software Bus Receive Error Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the call to #CFE_SB_ReceiveBuffer
* returns a value other than #CFE_SUCCESS in the main loop
*/
#define HK_RCV_MSG_ERR_EID 26
/**
* \brief HK Runtime Table Get Status Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the HK application receives an unexpected
* return value when calling the #CFE_TBL_GetStatus API for the dump table
*/
#define HK_UNEXPECTED_GETSTAT2_RET_EID 27
/**
* \brief HK Message Length Invalid Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event is issued when an internal message which has a length that is inconsistant
* with the expected length for its message id.
*/
#define HK_MSG_LEN_ERR_EID 28
/**
* \brief HK Copy Table Get Address Unexpected Value Event ID
*
* \par Type: CRITICAL
*
* \par Cause:
*
* This event message is issued when the HK application receives an unexpected
* return value when calling the #CFE_TBL_GetAddress API for the copy table during
* the check of the table status. This is a critical error (due to unexpected behavior
* of a cFE service) and will cause the HK app to exit.
*/
#define HK_UNEXPECTED_GETADDR_RET_EID 29
/**
* \brief HK Copy Table Update Failed Event ID
*
* \par Type: CRITICAL
*
* \par Cause:
*
* This event message is issued when the HK application receives an unexpected
* return value when calling the #CFE_TBL_Update API for the copy table during
* the check of the table status. This is a critical error (due to unexpected behavior
* of a cFE service) and will cause the HK app to exit.
*/
#define HK_UNEXPECTED_TBLUPD_RET_EID 30
/**
* \brief HK Copy Table Release Address Failed Event ID
*
* \par Type: CRITICAL
*
* \par Cause:
*
* This event message is issued when the HK application receives an unexpected
* return value when calling the #CFE_TBL_ReleaseAddress API for the copy table during
* the check of the table status. This is a critical error (due to unexpected behavior
* of a cFE service) and will cause the HK app to exit.
*/
#define HK_UNEXPECTED_RELADDR_RET_EID 31
/**
* \brief HK Copy Table Validate Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when the HK application receives an unexpected
* return value when calling the #CFE_TBL_Validate API for the copy table during
* the check of the table status.
*/
#define HK_UNEXPECTED_TBLVLD_RET_EID 32
/**
* \brief HK Runtime Table Dump To Buffer Failed Event ID
*
* \par Type: CRITICAL
*
* \par Cause:
*
* This event message is issued when the HK application receives an unexpected
* return value when calling the #CFE_TBL_DumpToBuffer API for the runtime table during
* the check of the table status. This is a critical error (due to unexpected behavior
* of a cFE service) and will cause the HK app to exit.
*/
#define HK_UNEXPECTED_DUMPTOBUFFER_RET_EID 33
/**
* \brief HK New Copy Table Null Pointer Detected Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event is issued when at least one of the input arguments for processing a new copy table is NULL.
*/
#define HK_NULL_POINTER_NEWCPY_ERR_EID 34
/**
* \brief HK Copy Table Teardown Null Pointer Detected Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event is issued when at least one of the input arguments for tearing down an old copy table is NULL.
*/
#define HK_NULL_POINTER_TEARCPY_ERR_EID 35
/**
* \brief HK New Copy Table Housekeeping Processing Failed Event ID
*
* \par Type: CRITICAL
*
* \par Cause:
*
* This event is issued when an error occurs while processing a new copy table during housekeeping processing.
* The probable reason for a failure is that a NULL pointer was used as an argument in the called routine (a status
* value of 0xFFFFFFFF indicates a NULL pointer was detected).
* In this case (as opposed to during initialization), the event is critical.
*/
#define HK_NEWCPYTBL_HK_FAILED_EID 36
/**
* \brief HK New Copy Table Initialization Processing Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event is issued when an error occurs while processing a new copy table during app initialization.
* The probable reason for a failure is that a NULL pointer was used as an argument in the called routine (a status
* value of 0xFFFFFFFF indicates a NULL pointer was detected).
* In this case (as opposed to during housekeeping processing), the event is an error, but not critical.
*/
#define HK_NEWCPYTBL_INIT_FAILED_EID 37
/**\}*/
#endif