From 656df668a1961752025f2c33fd2a5b266214513e Mon Sep 17 00:00:00 2001 From: Avi Date: Sat, 22 Oct 2022 10:08:47 +1000 Subject: [PATCH] Fix #338, Move 'EID' to the end of Event ID names --- fsw/inc/cf_events.h | 248 ++++++++++++++--------------- fsw/inc/cf_msg.h | 138 ++++++++-------- fsw/src/cf_app.c | 24 +-- fsw/src/cf_cfdp.c | 42 ++--- fsw/src/cf_cfdp_dispatch.c | 6 +- fsw/src/cf_cfdp_r.c | 36 ++--- fsw/src/cf_cfdp_s.c | 28 ++-- fsw/src/cf_cfdp_sbintf.c | 6 +- fsw/src/cf_cmd.c | 104 ++++++------ fsw/src/cf_utils.c | 4 +- unit-test/cf_app_tests.c | 14 +- unit-test/cf_cfdp_dispatch_tests.c | 4 +- unit-test/cf_cfdp_r_tests.c | 40 ++--- unit-test/cf_cfdp_s_tests.c | 28 ++-- unit-test/cf_cfdp_sbintf_tests.c | 8 +- unit-test/cf_cfdp_tests.c | 46 +++--- unit-test/cf_cmd_tests.c | 164 +++++++++---------- unit-test/cf_utils_tests.c | 2 +- 18 files changed, 471 insertions(+), 471 deletions(-) diff --git a/fsw/inc/cf_events.h b/fsw/inc/cf_events.h index d973cfae..55387749 100644 --- a/fsw/inc/cf_events.h +++ b/fsw/inc/cf_events.h @@ -55,7 +55,7 @@ * * Failure from release table address call during periodic table check */ -#define CF_EID_ERR_INIT_TBL_CHECK_REL (21) +#define CF_INIT_TBL_CHECK_REL_ERR_EID (21) /** * \brief CF Check Table Manage Failed Event ID @@ -66,7 +66,7 @@ * * Failure from manage table call during periodic table check */ -#define CF_EID_ERR_INIT_TBL_CHECK_MAN (22) +#define CF_INIT_TBL_CHECK_MAN_ERR_EID (22) /** * \brief CF Check Table Get Address Failed Event ID @@ -77,7 +77,7 @@ * * Failure from get table call during periodic table check */ -#define CF_EID_ERR_INIT_TBL_CHECK_GA (23) +#define CF_INIT_TBL_CHECK_GA_ERR_EID (23) /** * \brief CF Table Registration At Initialization Failed Event ID @@ -88,7 +88,7 @@ * * Failure from table register call during application initialization */ -#define CF_EID_ERR_INIT_TBL_REG (24) +#define CF_INIT_TBL_REG_ERR_EID (24) /** * \brief CF Table Load At Initialization Failed Event ID @@ -99,7 +99,7 @@ * * Failure from table load call during application initialization */ -#define CF_EID_ERR_INIT_TBL_LOAD (25) +#define CF_INIT_TBL_LOAD_ERR_EID (25) /** * \brief CF Table Manage At Initialization Failed Event ID @@ -110,7 +110,7 @@ * * Failure from table manage call during application initialization */ -#define CF_EID_ERR_INIT_TBL_MANAGE (26) +#define CF_INIT_TBL_MANAGE_ERR_EID (26) /** * \brief CF Table Get Address At Initialization Failed Event ID @@ -121,7 +121,7 @@ * * Failure from table get address call during application initialization */ -#define CF_EID_ERR_INIT_TBL_GETADDR (27) +#define CF_INIT_TBL_GETADDR_ERR_EID (27) /** * \brief CF Message ID Invalid Event ID @@ -132,7 +132,7 @@ * * Invalid message ID received on the software bus pipe */ -#define CF_EID_ERR_INIT_CMD_LENGTH (28) +#define CF_INIT_CMD_LENGTH_ERR_EID (28) /** * \brief CF SB Receive Buffer Failed Event ID @@ -143,7 +143,7 @@ * * Failure from SB Receive Buffer call in application run loop */ -#define CF_EID_ERR_INIT_MSG_RECV (29) +#define CF_INIT_MSG_RECV_ERR_EID (29) /** * \brief CF Channel Semaphore Initialization Failed Event ID @@ -155,7 +155,7 @@ * Failure from get semaphore by name call during engine channel initialization, * semaphore needs to exist before engine is initialized. */ -#define CF_EID_ERR_INIT_SEM (30) +#define CF_INIT_SEM_ERR_EID (30) /** * \brief CF Channel Create Pipe Failed Event ID @@ -177,7 +177,7 @@ * * Failure from message subscription call during engine channel initialization */ -#define CF_EID_ERR_INIT_SUB (32) +#define CF_INIT_SUB_ERR_EID (32) /** * \brief CF Ticks Per Second Config Table Validation Failed Event ID @@ -188,7 +188,7 @@ * * Configuration table ticks per second set to zero */ -#define CF_EID_ERR_INIT_TPS (33) +#define CF_INIT_TPS_ERR_EID (33) /** * \brief CF CRC Bytes Per Wakeup Config Table Validation Failed Event ID @@ -199,7 +199,7 @@ * * Configuration table CRC bytes per wakeup not aligned or zero */ -#define CF_EID_ERR_INIT_CRC_ALIGN (34) +#define CF_INIT_CRC_ALIGN_ERR_EID (34) /** * \brief CF Outgoing Chunk Size Config Table Validation Failed Event ID @@ -210,7 +210,7 @@ * * Configuration table outgoing chunk size larger than PDU data size */ -#define CF_EID_ERR_INIT_OUTGOING_SIZE (35) +#define CF_INIT_OUTGOING_SIZE_ERR_EID (35) /************************************************************************** * CF_PDU event IDs - Protocol data unit @@ -225,7 +225,7 @@ * * Successful processing of metadata PDU */ -#define CF_EID_INF_PDU_MD_RECVD (40) +#define CF_PDU_MD_RECVD_INF_EID (40) /** * \brief CF PDU Header Too Short Event ID @@ -236,7 +236,7 @@ * * Failure processing PDU header */ -#define CF_EID_ERR_PDU_SHORT_HEADER (41) +#define CF_PDU_SHORT_HEADER_ERR_EID (41) /** * \brief CF Metadata PDU Too Short Event ID @@ -247,7 +247,7 @@ * * Failure processing metadata PDU */ -#define CF_EID_ERR_PDU_MD_SHORT (43) +#define CF_PDU_MD_SHORT_ERR_EID (43) /** * \brief CF Metadata PDU Source Filename Length Invalid Event ID @@ -258,7 +258,7 @@ * * Metadata PDU source filename length exceeds buffer size */ -#define CF_EID_ERR_PDU_INVALID_SRC_LEN (44) +#define CF_PDU_INVALID_SRC_LEN_ERR_EID (44) /** * \brief CF Metadata PDU Destination Filename Length Invalid Event ID @@ -269,7 +269,7 @@ * * Metadata PDU destination filename length exceeds buffer size */ -#define CF_EID_ERR_PDU_INVALID_DST_LEN (45) +#define CF_PDU_INVALID_DST_LEN_ERR_EID (45) /** * \brief CF File Data PDU Too Short Event ID @@ -280,7 +280,7 @@ * * Failure processing file data PDU */ -#define CF_EID_ERR_PDU_FD_SHORT (46) +#define CF_PDU_FD_SHORT_ERR_EID (46) /** * \brief CF End-Of-File PDU Too Short Event ID @@ -291,7 +291,7 @@ * * Failure processing end-of-file PDU */ -#define CF_EID_ERR_PDU_EOF_SHORT (47) +#define CF_PDU_EOF_SHORT_ERR_EID (47) /** * \brief CF Acknowledgment PDU Too Short Event ID @@ -302,7 +302,7 @@ * * Failure processing acknowledgment PDU */ -#define CF_EID_ERR_PDU_ACK_SHORT (48) +#define CF_PDU_ACK_SHORT_ERR_EID (48) /** * \brief CF Finished PDU Too Short Event ID @@ -313,7 +313,7 @@ * * Failure processing finished PDU */ -#define CF_EID_ERR_PDU_FIN_SHORT (49) +#define CF_PDU_FIN_SHORT_ERR_EID (49) /** * \brief CF Negative Acknowledgment PDU Too Short Event ID @@ -324,7 +324,7 @@ * * Failure processing negative acknowledgment PDU */ -#define CF_EID_ERR_PDU_NAK_SHORT (50) +#define CF_PDU_NAK_SHORT_ERR_EID (50) /** * \brief CF File Data PDU Unsupported Option Event ID @@ -335,7 +335,7 @@ * * File Data PDU received with the segment metadata flag set */ -#define CF_EID_ERR_PDU_FD_UNSUPPORTED (54) +#define CF_PDU_FD_UNSUPPORTED_ERR_EID (54) /** * \brief CF PDU Header Large File Flag Set Event ID @@ -346,7 +346,7 @@ * * PDU Header received with the unsupported large file flag set */ -#define CF_EID_ERR_PDU_LARGE_FILE (55) +#define CF_PDU_LARGE_FILE_ERR_EID (55) /** * \brief CF PDU Header Field Truncation @@ -357,7 +357,7 @@ * * PDU Header received with fields that would be truncated with the cf configuration */ -#define CF_EID_ERR_PDU_TRUNCATION (56) +#define CF_PDU_TRUNCATION_ERR_EID (56) /************************************************************************** * CF_CFDP event IDs - Engine @@ -373,7 +373,7 @@ * PDU without a matching/existing transaction received when channel receive queue is already * handling the maximum number of concurrent receive transactions */ -#define CF_EID_ERR_CFDP_RX_DROPPED (60) +#define CF_CFDP_RX_DROPPED_ERR_EID (60) /** * \brief CF PDU Received With Invalid Destination Entity ID Event ID @@ -385,7 +385,7 @@ * PDU without a matching/existing transaction received with an entity ID that doesn't * match the receiving channel's entity ID */ -#define CF_EID_ERR_CFDP_INVALID_DST_EID (61) +#define CF_CFDP_INVALID_DST_ERR_EID (61) /** * \brief CF Invalid Metadata PDU Received On Idle Transaction Event ID @@ -396,7 +396,7 @@ * * Metadata PDU received for an idle transaction failed decoding */ -#define CF_EID_ERR_CFDP_IDLE_MD (62) +#define CF_CFDP_IDLE_MD_ERR_EID (62) /** * \brief CF Non-metadata File Directive PDU Received On Idle Transaction Event ID @@ -407,7 +407,7 @@ * * File Directive PDU received without the metadata directive code on an idle transaction */ -#define CF_EID_ERR_CFDP_FD_UNHANDLED (63) +#define CF_CFDP_FD_UNHANDLED_ERR_EID (63) /** * \brief CF Transmission Request Rejected Due To Max Commanded TX Reached Event ID @@ -419,7 +419,7 @@ * Command request to transmit a file received when channel is already * handling the maximum number of concurrent command transmit transactions */ -#define CF_EID_ERR_CFDP_MAX_CMD_TX (64) +#define CF_CFDP_MAX_CMD_TX_ERR_EID (64) /** * \brief CF Playback/Polling Directory Open Failed Event ID @@ -430,7 +430,7 @@ * * Failure opening directory during playback or polling initialization */ -#define CF_EID_ERR_CFDP_OPENDIR (65) +#define CF_CFDP_OPENDIR_ERR_EID (65) /** * \brief CF Playback Request Rejected Due to Max Playback Directories Reached Event ID @@ -442,7 +442,7 @@ * Command request to playback a directory received when channel is already * handling the maximum number of concurrent playback directories */ -#define CF_EID_ERR_CFDP_DIR_SLOT (66) +#define CF_CFDP_DIR_SLOT_ERR_EID (66) /** * \brief CF No Message Buffer Available Event ID @@ -453,7 +453,7 @@ * * Failure from SB allocate message buffer call when constructing PDU */ -#define CF_EID_ERR_CFDP_NO_MSG (67) +#define CF_CFDP_NO_MSG_ERR_EID (67) /** * \brief CF Close File Failed Event ID @@ -464,7 +464,7 @@ * * Failure from file close call */ -#define CF_EID_ERR_CFDP_CLOSE_ERR (68) +#define CF_CFDP_CLOSE_ERR_EID (68) /************************************************************************** * CF_CFDP_R event IDs - Engine receive @@ -480,7 +480,7 @@ * RX transaction missing metadata which results in a NAK being sent to * request a metadata PDU for the transaction */ -#define CF_EID_INF_CFDP_R_REQUEST_MD (70) +#define CF_CFDP_R_REQUEST_MD_INF_EID (70) /** * \brief CF Creating Temp File For RX Transaction Without Metadata PDU @@ -492,7 +492,7 @@ * RX transaction missing metadata causing creation of a temporary * filename to store the data */ -#define CF_EID_INF_CFDP_R_TEMP_FILE (71) +#define CF_CFDP_R_TEMP_FILE_INF_EID (71) /** * \brief CF RX Transaction NAK Limit Reached Event ID @@ -503,7 +503,7 @@ * * Condition that triggers a NAK occurred that would meet or exceed the NAK limit */ -#define CF_EID_ERR_CFDP_R_NAK_LIMIT (72) +#define CF_CFDP_R_NAK_LIMIT_ERR_EID (72) /** * \brief CF RX Transaction ACK Limit Reached Event ID @@ -514,7 +514,7 @@ * * Condition that triggers an ACK occurred that would meet or exceed the ACK limit */ -#define CF_EID_ERR_CFDP_R_ACK_LIMIT (73) +#define CF_CFDP_R_ACK_LIMIT_ERR_EID (73) /** * \brief CF RX Transaction CRC Mismatch Event ID @@ -525,7 +525,7 @@ * * RX Transaction final CRC mismatch */ -#define CF_EID_ERR_CFDP_R_CRC (74) +#define CF_CFDP_R_CRC_ERR_EID (74) /** * \brief CF RX File Data PDU Seek Failed Event ID @@ -536,7 +536,7 @@ * * Failure of lseek call when processing out of order file data PDUs */ -#define CF_EID_ERR_CFDP_R_SEEK_FD (75) +#define CF_CFDP_R_SEEK_FD_ERR_EID (75) /** * \brief CF RX Class 2 CRC Seek Failed Event ID @@ -548,7 +548,7 @@ * Failure of lseek call when calculating CRC from the file at * the end of a Class 2 RX transaction */ -#define CF_EID_ERR_CFDP_R_SEEK_CRC (76) +#define CF_CFDP_R_SEEK_CRC_ERR_EID (76) /** * \brief CF RX File Data PDU Write Failed Event ID @@ -559,7 +559,7 @@ * * Failure of write to file call when processing file data PDUs */ -#define CF_EID_ERR_CFDP_R_WRITE (77) +#define CF_CFDP_R_WRITE_ERR_EID (77) /** * \brief CF RX End-Of-File PDU File Size Mismatch Event ID @@ -570,7 +570,7 @@ * * End-of-file PDU file size does not match transaction expected file size */ -#define CF_EID_ERR_CFDP_R_SIZE_MISMATCH (78) +#define CF_CFDP_R_SIZE_MISMATCH_ERR_EID (78) /** * \brief CF Invalid End-Of-File PDU Event ID @@ -581,7 +581,7 @@ * * End-of-file PDU failed decoding */ -#define CF_EID_ERR_CFDP_R_PDU_EOF (79) +#define CF_CFDP_R_PDU_EOF_ERR_EID (79) /** * \brief CF RX Transaction File Create Failed Event ID @@ -592,7 +592,7 @@ * * Failure in opencreate file call for an RX transaction */ -#define CF_EID_ERR_CFDP_R_CREAT (80) +#define CF_CFDP_R_CREAT_ERR_EID (80) /** * \brief CF Class 2 RX Transaction Invalid FIN-ACK PDU Event ID @@ -603,7 +603,7 @@ * * ACK PDU failed decoding during Class 2 RX Transaction */ -#define CF_EID_ERR_CFDP_R_PDU_FINACK (81) +#define CF_CFDP_R_PDU_FINACK_ERR_EID (81) /** * \brief CF RX Class 2 Metadata PDU Size Mismatch Event ID @@ -615,7 +615,7 @@ * Out-of-order RX Class 2 Metadata PDU received with file size that doesn't * match already received EOF PDU file size */ -#define CF_EID_ERR_CFDP_R_EOF_MD_SIZE (82) +#define CF_CFDP_R_EOF_MD_SIZE_ERR_EID (82) /** * \brief CF RX Class 2 Metadata PDU File Rename Failed Event ID @@ -627,7 +627,7 @@ * Failure from file rename call after reception of an out-of-order RX * Class 2 Metadata PDU */ -#define CF_EID_ERR_CFDP_R_RENAME (83) +#define CF_CFDP_R_RENAME_ERR_EID (83) /** * \brief CF RX Class 2 Metadata PDU File Open Failed Event ID @@ -639,7 +639,7 @@ * Failure from file open call after reception of an out-of-order RX * Class 2 Metadata PDU */ -#define CF_EID_ERR_CFDP_R_OPEN (84) +#define CF_CFDP_R_OPEN_ERR_EID (84) /** * \brief CF Invalid Out-of-order Metadata PDU Received Event ID @@ -650,7 +650,7 @@ * * Failure to decode out-of-order metadata PDU */ -#define CF_EID_ERR_CFDP_R_PDU_MD (85) +#define CF_CFDP_R_PDU_MD_ERR_EID (85) /** * \brief CF Class 2 CRC Read From File Failed Event ID @@ -661,7 +661,7 @@ * * Failure from file read call during RX Class 2 CRC calculation */ -#define CF_EID_ERR_CFDP_R_READ (86) +#define CF_CFDP_R_READ_ERR_EID (86) /** * \brief CF RX Invalid File Directive PDU Code Received Event ID @@ -673,7 +673,7 @@ * Unrecognized file directive PDU directive code received for * a current transaction */ -#define CF_EID_ERR_CFDP_R_DC_INV (87) +#define CF_CFDP_R_DC_INV_ERR_EID (87) /** * \brief CF RX Inactivity Timer Expired Event ID @@ -684,7 +684,7 @@ * * Expiration of the RX inactivity timer */ -#define CF_EID_ERR_CFDP_R_INACT_TIMER (88) +#define CF_CFDP_R_INACT_TIMER_ERR_EID (88) /************************************************************************** * CF_CFDP_S event IDs - Engine send @@ -699,7 +699,7 @@ * * File TX transaction initiated */ -#define CF_EID_INF_CFDP_S_START_SEND (90) +#define CF_CFDP_S_START_SEND_INF_EID (90) /** * \brief CF TX File Data PDU Seek Failed Event ID @@ -710,7 +710,7 @@ * * Failure of lseek call when preparing to send file data PDU */ -#define CF_EID_ERR_CFDP_S_SEEK_FD (91) +#define CF_CFDP_S_SEEK_FD_ERR_EID (91) /** * \brief CF TX File Data PDU Read Failed Event ID @@ -721,7 +721,7 @@ * * Failure of read file call when preparing to send file data PDU */ -#define CF_EID_ERR_CFDP_S_READ (92) +#define CF_CFDP_S_READ_ERR_EID (92) /** * \brief CF TX File Data PDU Send Failed Event ID @@ -732,7 +732,7 @@ * * Failure to send the file data PDU */ -#define CF_EID_ERR_CFDP_S_SEND_FD (93) +#define CF_CFDP_S_SEND_FD_ERR_EID (93) /** * \brief CF TX Metadata PDU File Already Open Event ID @@ -743,7 +743,7 @@ * * Failure to send metadata PDU due to file already being open */ -#define CF_EID_ERR_CFDP_S_ALREADY_OPEN (94) +#define CF_CFDP_S_ALREADY_OPEN_ERR_EID (94) /** * \brief CF TX Metadata PDU File Open Failed Event ID @@ -754,7 +754,7 @@ * * Failure in file open call when preparing to send metadata PDU */ -#define CF_EID_ERR_CFDP_S_OPEN (95) +#define CF_CFDP_S_OPEN_ERR_EID (95) /** * \brief CF TX Metadata PDU File Seek End Failed Event ID @@ -766,7 +766,7 @@ * Failure in file lseek to end of file call when preparing * to send metadata PDU */ -#define CF_EID_ERR_CFDP_S_SEEK_END (96) +#define CF_CFDP_S_SEEK_END_ERR_EID (96) /** * \brief CF TX Metadata PDU File Seek Beginning Failed Event ID @@ -778,7 +778,7 @@ * Failure in file lseek to beginning of file call when * preparing to send metadata PDU */ -#define CF_EID_ERR_CFDP_S_SEEK_BEG (97) +#define CF_CFDP_S_SEEK_BEG_ERR_EID (97) /** * \brief CF TX Metadata PDU Send Failed Event ID @@ -789,7 +789,7 @@ * * Failure to send the metadata PDU */ -#define CF_EID_ERR_CFDP_S_SEND_MD (98) +#define CF_CFDP_S_SEND_MD_ERR_EID (98) /** * \brief CF TX Received NAK PDU Bad Segment Request Event ID @@ -801,7 +801,7 @@ * Bad segment request values in received NAK PDU relating * to a current transaction */ -#define CF_EID_ERR_CFDP_S_INVALID_SR (100) +#define CF_CFDP_S_INVALID_SR_ERR_EID (100) /** * \brief CF TX Received NAK PDU Invalid Event ID @@ -813,7 +813,7 @@ * Failure processing received NAK PDU relating * to a current transaction */ -#define CF_EID_ERR_CFDP_S_PDU_NAK (101) +#define CF_CFDP_S_PDU_NAK_ERR_EID (101) /** * \brief CF TX Received EOF ACK PDU Invalid Event ID @@ -825,7 +825,7 @@ * Failure processing received ACK PDU relating * to a current transaction */ -#define CF_EID_ERR_CFDP_S_PDU_EOF (102) +#define CF_CFDP_S_PDU_EOF_ERR_EID (102) /** * \brief CF TX Received Early FIN PDU Event ID @@ -836,7 +836,7 @@ * * Early FIN PDU received prior to completion of a current transaction */ -#define CF_EID_ERR_CFDP_S_EARLY_FIN (103) +#define CF_CFDP_S_EARLY_FIN_ERR_EID (103) /** * \brief CF Invalid TX File Directive PDU Code Event ID @@ -848,7 +848,7 @@ * Unrecognized file directive PDU directive code received for * a current transaction */ -#define CF_EID_ERR_CFDP_S_DC_INV (104) +#define CF_CFDP_S_DC_INV_ERR_EID (104) /** * \brief CF Received TX Non-File Directive PDU Event ID @@ -859,7 +859,7 @@ * * Received a non-file directive PDU on a send transaction */ -#define CF_EID_ERR_CFDP_S_NON_FD_PDU (105) +#define CF_CFDP_S_NON_FD_PDU_ERR_EID (105) /** * \brief CF TX EOF PDU Send Limit Reached Event ID @@ -871,7 +871,7 @@ * Timed out the limit number of times waiting for an ACK PDU for the EOF PDU on a * current transaction */ -#define CF_EID_ERR_CFDP_S_ACK_LIMIT (106) +#define CF_CFDP_S_ACK_LIMIT_ERR_EID (106) /** * \brief CF TX Inactivity Timer Expired Event ID @@ -882,7 +882,7 @@ * * Send transaction activity timeout expired */ -#define CF_EID_ERR_CFDP_S_INACT_TIMER (107) +#define CF_CFDP_S_INACT_TIMER_ERR_EID (107) /************************************************************************** * CF_CMD event IDs - Command processing @@ -919,7 +919,7 @@ * * Receipt and successful processing of set parameter command */ -#define CF_EID_INF_CMD_GETSET1 (112) +#define CF_CMD_GETSET1_INF_EID (112) /** * \brief CF Get Parameter Command Received Event ID @@ -930,7 +930,7 @@ * * Receipt and successful processing of get parameter command */ -#define CF_EID_INF_CMD_GETSET2 (113) +#define CF_CMD_GETSET2_INF_EID (113) /** * \brief CF Suspend/Resume Command Received Event ID @@ -941,7 +941,7 @@ * * Receipt and successful processing of suspend/resume command */ -#define CF_EID_INF_CMD_SUSPRES (114) +#define CF_CMD_SUSPRES_INF_EID (114) /** * \brief CF Write Queue Command Received Event ID @@ -952,7 +952,7 @@ * * Receipt and successful processing of write queue command */ -#define CF_EID_INF_CMD_WQ (115) +#define CF_CMD_WQ_INF_EID (115) /** * \brief CF Enable Engine Command Received Event ID @@ -963,7 +963,7 @@ * * Receipt and successful processing of enable engine command */ -#define CF_EID_INF_CMD_ENABLE_ENGINE (116) +#define CF_CMD_ENABLE_ENGINE_INF_EID (116) /** * \brief CF Disable Engine Command Received Event ID @@ -974,7 +974,7 @@ * * Receipt and successful processing of disable engine command */ -#define CF_EID_INF_CMD_DISABLE_ENGINE (117) +#define CF_CMD_DISABLE_ENGINE_INF_EID (117) /** * \brief CF Transfer File Command Received Event ID @@ -985,7 +985,7 @@ * * Receipt and successful processing of transfer file command */ -#define CF_EID_INF_CMD_TX_FILE (118) +#define CF_CMD_TX_FILE_INF_EID (118) /** * \brief CF Playback Directory Command Received Event ID @@ -996,7 +996,7 @@ * * Receipt and successful processing of playback directory command */ -#define CF_EID_INF_CMD_PLAYBACK_DIR (119) +#define CF_CMD_PLAYBACK_DIR_INF_EID (119) /** * \brief CF Freeze Command Received Event ID @@ -1007,7 +1007,7 @@ * * Receipt and successful processing of freeze command */ -#define CF_EID_INF_CMD_FREEZE (120) +#define CF_CMD_FREEZE_INF_EID (120) /** * \brief CF Thaw Command Received Event ID @@ -1018,7 +1018,7 @@ * * Receipt and successful processing of thaw command */ -#define CF_EID_INF_CMD_THAW (121) +#define CF_CMD_THAW_INF_EID (121) /** * \brief CF Cancel Command Received Event ID @@ -1029,7 +1029,7 @@ * * Receipt and successful processing of cancel command */ -#define CF_EID_INF_CMD_CANCEL (122) +#define CF_CMD_CANCEL_INF_EID (122) /** * \brief CF Abandon Command Received Event ID @@ -1040,7 +1040,7 @@ * * Receipt and successful processing of abandon command */ -#define CF_EID_INF_CMD_ABANDON (123) +#define CF_CMD_ABANDON_INF_EID (123) /** * \brief CF Enable Dequeue Command Received Event ID @@ -1051,7 +1051,7 @@ * * Receipt and successful processing of enable dequeue command */ -#define CF_EID_INF_CMD_ENABLE_DEQUEUE (124) +#define CF_CMD_ENABLE_DEQUEUE_INF_EID (124) /** * \brief CF Disable Dequeue Command Received Event ID @@ -1062,7 +1062,7 @@ * * Receipt and successful processing of disable dequeue command */ -#define CF_EID_INF_CMD_DISABLE_DEQUEUE (125) +#define CF_CMD_DISABLE_DEQUEUE_INF_EID (125) /** * \brief CF Enable Polldir Command Received Event ID @@ -1073,7 +1073,7 @@ * * Receipt and successful processing of enable polldir command */ -#define CF_EID_INF_CMD_ENABLE_POLLDIR (126) +#define CF_CMD_ENABLE_POLLDIR_INF_EID (126) /** * \brief CF Disable Polldir Command Received Event ID @@ -1084,7 +1084,7 @@ * * Receipt and successful processing of disable polldir command */ -#define CF_EID_INF_CMD_DISABLE_POLLDIR (127) +#define CF_CMD_DISABLE_POLLDIR_INF_EID (127) /** * \brief CF Purge Queue Command Received Event ID @@ -1095,7 +1095,7 @@ * * Receipt and successful processing of purge queue command */ -#define CF_EID_INF_CMD_PURGE_QUEUE (128) +#define CF_CMD_PURGE_QUEUE_INF_EID (128) /** * \brief CF Reset Counters Command Invalid Event ID @@ -1106,7 +1106,7 @@ * * Reset counters command received with invalid parameter */ -#define CF_EID_ERR_CMD_RESET_INVALID (129) +#define CF_CMD_RESET_INVALID_ERR_EID (129) /** * \brief CF Command Channel Invalid Event ID @@ -1117,7 +1117,7 @@ * * Command received with channel parameter out of range */ -#define CF_EID_ERR_CMD_CHAN_PARAM (130) +#define CF_CMD_CHAN_PARAM_ERR_EID (130) /** * \brief CF Command Transaction Invalid Event ID @@ -1128,7 +1128,7 @@ * * Command received without a matching transaction */ -#define CF_EID_ERR_CMD_TRANS_NOT_FOUND (131) +#define CF_CMD_TRANS_NOT_FOUND_ERR_EID (131) /** * \brief CF Command All Transaction Channel Invalid Event ID @@ -1139,7 +1139,7 @@ * * Command received to act on all transactions with invalid channel */ -#define CF_EID_ERR_CMD_TSN_CHAN_INVALID (132) +#define CF_CMD_TSN_CHAN_INVALID_ERR_EID (132) /** * \brief CF Suspend/Resume Command For Single Transaction State Unchanged Event ID @@ -1150,7 +1150,7 @@ * * Suspend/resume command received affecting single transaction already set to that state */ -#define CF_EID_ERR_CMD_SUSPRES_SAME (133) +#define CF_CMD_SUSPRES_SAME_ERR_EID (133) /** * \brief CF Suspend/Resume Command No Matching Transaction Event ID @@ -1161,7 +1161,7 @@ * * Suspend/resume command received without a matching transaction */ -#define CF_EID_ERR_CMD_SUSPRES_CHAN (134) +#define CF_CMD_SUSPRES_CHAN_ERR_EID (134) /** * \brief CF Enable/Disable Polling Directory Command Invalid Polling Directory Index Event ID @@ -1172,7 +1172,7 @@ * * Enable/disable polling directory command received with invalid poling directory index */ -#define CF_EID_ERR_CMD_POLLDIR_INVALID (135) +#define CF_CMD_POLLDIR_INVALID_ERR_EID (135) /** * \brief CF Purge Queue Command Invalid Argument Event ID @@ -1183,7 +1183,7 @@ * * Purge Queue command received with invalid queue argument */ -#define CF_EID_ERR_CMD_PURGE_ARG (136) +#define CF_CMD_PURGE_ARG_ERR_EID (136) /** * \brief CF Write Queue Command Invalid Channel Event ID @@ -1194,7 +1194,7 @@ * * Write Queue command received with invalid channel argument */ -#define CF_EID_ERR_CMD_WQ_CHAN (137) +#define CF_CMD_WQ_CHAN_ERR_EID (137) /** * \brief CF Write Queue Command Invalid Queue Event ID @@ -1205,7 +1205,7 @@ * * Write Queue command received with invalid queue selection arguments */ -#define CF_EID_ERR_CMD_WQ_ARGS (138) +#define CF_CMD_WQ_ARGS_ERR_EID (138) /** * \brief CF Write Queue Command File Open Failed Event ID @@ -1216,7 +1216,7 @@ * * Failure of open file call during processing of write queue command */ -#define CF_EID_ERR_CMD_WQ_OPEN (139) +#define CF_CMD_WQ_OPEN_ERR_EID (139) /** * \brief CF Write Queue Command RX Active File Write Failed Event ID @@ -1227,7 +1227,7 @@ * * Failure of file write call for RX active transactions during processing of write queue command */ -#define CF_EID_ERR_CMD_WQ_WRITEQ_RX (140) +#define CF_CMD_WQ_WRITEQ_RX_ERR_EID (140) /** * \brief CF Write Queue Command RX History File Write Failed Event ID @@ -1238,7 +1238,7 @@ * * Failure of file write call for RX history during processing of write queue command */ -#define CF_EID_ERR_CMD_WQ_WRITEHIST_RX (141) +#define CF_CMD_WQ_WRITEHIST_RX_ERR_EID (141) /** * \brief CF Write Queue Command TX Active File Write Failed Event ID @@ -1249,7 +1249,7 @@ * * Failure of file write call for TX active transactions during processing of write queue command */ -#define CF_EID_ERR_CMD_WQ_WRITEQ_TX (142) +#define CF_CMD_WQ_WRITEQ_TX_ERR_EID (142) /** * \brief CF Write Queue Command TX Pending File Write Failed Event ID @@ -1260,7 +1260,7 @@ * * Failure of file write call for TX pending transactions during processing of write queue command */ -#define CF_EID_ERR_CMD_WQ_WRITEQ_PEND (143) +#define CF_CMD_WQ_WRITEQ_PEND_ERR_EID (143) /** * \brief CF Write Queue Command TX History File Write Failed Event ID @@ -1271,7 +1271,7 @@ * * Failure of file write call for TX history during processing of write queue command */ -#define CF_EID_ERR_CMD_WQ_WRITEHIST_TX (144) +#define CF_CMD_WQ_WRITEHIST_TX_ERR_EID (144) /** * \brief CF Set Parameter Command Parameter Validation Failed Event ID @@ -1282,7 +1282,7 @@ * * Parameter validation failed during processing of set parameter command */ -#define CF_EID_ERR_CMD_GETSET_VALIDATE (145) +#define CF_CMD_GETSET_VALIDATE_ERR_EID (145) /** * \brief CF Set/Get Parameter Command Invalid Parameter ID Event ID @@ -1293,7 +1293,7 @@ * * Invalid parameter id value received in set or get parameter command */ -#define CF_EID_ERR_CMD_GETSET_PARAM (146) +#define CF_CMD_GETSET_PARAM_ERR_EID (146) /** * \brief CF Set/Get Parameter Command Invalid Channel Event ID @@ -1304,7 +1304,7 @@ * * Invalid channel value received in set or get parameter command */ -#define CF_EID_ERR_CMD_GETSET_CHAN (147) +#define CF_CMD_GETSET_CHAN_ERR_EID (147) /** * \brief CF Enable Engine Command Failed Event ID @@ -1315,7 +1315,7 @@ * * Failed to initialize engine when processing engine enable command */ -#define CF_EID_ERR_CMD_ENABLE_ENGINE (148) +#define CF_CMD_ENABLE_ENGINE_ERR_EID (148) /** * \brief CF Enable Engine Command Engine Already Enabled Event ID @@ -1326,7 +1326,7 @@ * * Enable engine command received while engine is already enabled */ -#define CF_EID_ERR_CMD_ENG_ALREADY_ENA (149) +#define CF_CMD_ENG_ALREADY_ENA_ERR_EID (149) /** * \brief CF Disable Engine Command Engine Already Disabled Event ID @@ -1337,7 +1337,7 @@ * * Disable engine command received while engine is already disabled */ -#define CF_EID_ERR_CMD_ENG_ALREADY_DIS (150) +#define CF_CMD_ENG_ALREADY_DIS_ERR_EID (150) /** * \brief CF Command Length Verification Failed Event ID @@ -1370,7 +1370,7 @@ * * Write entry to file did not match expected length */ -#define CF_EID_ERR_CMD_WHIST_WRITE (153) +#define CF_CMD_WHIST_WRITE_ERR_EID (153) /** * \brief CF Playback Dir Or TX File Command Bad Parameter Event ID @@ -1381,7 +1381,7 @@ * * Bad parameter received in playback directory or transfer file command */ -#define CF_EID_ERR_CMD_BAD_PARAM (154) +#define CF_CMD_BAD_PARAM_ERR_EID (154) /** * \brief CF Cancel Command No Matching Transaction Event ID @@ -1392,7 +1392,7 @@ * * Cancel command received without a matching transaction */ -#define CF_EID_ERR_CMD_CANCEL_CHAN (155) +#define CF_CMD_CANCEL_CHAN_ERR_EID (155) /** * \brief CF Abandon Command No Matching Transaction Event ID @@ -1403,7 +1403,7 @@ * * Abandon command received without a matching transaction */ -#define CF_EID_ERR_CMD_ABANDON_CHAN (156) +#define CF_CMD_ABANDON_CHAN_ERR_EID (156) /** * \brief CF Transfer File Command Failed Event ID @@ -1414,7 +1414,7 @@ * * Transfer file command was unsuccessful */ -#define CF_EID_ERR_CMD_TX_FILE (157) +#define CF_CMD_TX_FILE_ERR_EID (157) /** * \brief CF Playback Directory Command Failed Event ID @@ -1425,7 +1425,7 @@ * * Playback directory command was unsuccessful */ -#define CF_EID_ERR_CMD_PLAYBACK_DIR (158) +#define CF_CMD_PLAYBACK_DIR_ERR_EID (158) /** * \brief CF Freeze Command Failed Event ID @@ -1436,7 +1436,7 @@ * * Freeze command was unsuccessful */ -#define CF_EID_ERR_CMD_FREEZE (159) +#define CF_CMD_FREEZE_ERR_EID (159) /** * \brief CF Thaw Command Failed Event ID @@ -1447,7 +1447,7 @@ * * Thaw command was unsuccessful */ -#define CF_EID_ERR_CMD_THAW (160) +#define CF_CMD_THAW_ERR_EID (160) /** * \brief CF Enable Dequeue Command Failed Event ID @@ -1458,7 +1458,7 @@ * * Enable Dequeue command was unsuccessful */ -#define CF_EID_ERR_CMD_ENABLE_DEQUEUE (161) +#define CF_CMD_ENABLE_DEQUEUE_ERR_EID (161) /** * \brief CF Disable Dequeue Command Failed Event ID @@ -1469,7 +1469,7 @@ * * Disable dequeue command was unsuccessful */ -#define CF_EID_ERR_CMD_DISABLE_DEQUEUE (162) +#define CF_CMD_DISABLE_DEQUEUE_ERR_EID (162) /** * \brief CF Enable Polldir Command Failed Event ID @@ -1480,7 +1480,7 @@ * * Enable polldir command was unsuccessful */ -#define CF_EID_ERR_CMD_ENABLE_POLLDIR (163) +#define CF_CMD_ENABLE_POLLDIR_ERR_EID (163) /** * \brief CF Disable Polldir Command Failed Event ID @@ -1491,7 +1491,7 @@ * * Disable polldir command was unsuccessful */ -#define CF_EID_ERR_CMD_DISABLE_POLLDIR (164) +#define CF_CMD_DISABLE_POLLDIR_ERR_EID (164) /** * \brief CF Purge Queue Command Failed Event ID @@ -1502,7 +1502,7 @@ * * Purge queue command was unsuccessful */ -#define CF_EID_ERR_CMD_PURGE_QUEUE (165) +#define CF_CMD_PURGE_QUEUE_ERR_EID (165) /**\}*/ diff --git a/fsw/inc/cf_msg.h b/fsw/inc/cf_msg.h index 9bbe2ed8..9e003d5b 100644 --- a/fsw/inc/cf_msg.h +++ b/fsw/inc/cf_msg.h @@ -217,7 +217,7 @@ typedef enum * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid counter type, #CF_EID_ERR_CMD_RESET_INVALID + * - Invalid counter type, #CF_CMD_RESET_INVALID_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -240,13 +240,13 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_TX_FILE + * - #CF_CMD_TX_FILE_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid parameter, #CF_EID_ERR_CMD_BAD_PARAM - * - Transaction initialization failure, #CF_EID_ERR_CMD_TX_FILE + * - Invalid parameter, #CF_CMD_BAD_PARAM_ERR_EID + * - Transaction initialization failure, #CF_CMD_TX_FILE_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -272,13 +272,13 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_PLAYBACK_DIR + * - #CF_CMD_PLAYBACK_DIR_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid parameter, #CF_EID_ERR_CMD_BAD_PARAM - * - Playback initialization failure, #CF_EID_ERR_CMD_PLAYBACK_DIR + * - Invalid parameter, #CF_CMD_BAD_PARAM_ERR_EID + * - Playback initialization failure, #CF_CMD_PLAYBACK_DIR_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -307,13 +307,13 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_FREEZE + * - #CF_CMD_FREEZE_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM - * - Command processing failure, #CF_EID_ERR_CMD_FREEZE + * - Invalid channel number, #CF_CMD_CHAN_PARAM_ERR_EID + * - Command processing failure, #CF_CMD_FREEZE_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -341,13 +341,13 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_THAW + * - #CF_CMD_THAW_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM - * - Command processing failure, #CF_EID_ERR_CMD_THAW + * - Invalid channel number, #CF_CMD_CHAN_PARAM_ERR_EID + * - Command processing failure, #CF_CMD_THAW_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -375,15 +375,15 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_SUSPRES + * - #CF_CMD_SUSPRES_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Transaction not found using compound key, #CF_EID_ERR_CMD_TRANS_NOT_FOUND - * - Invalid channel number, #CF_EID_ERR_CMD_TSN_CHAN_INVALID - * - Already in requested state, #CF_EID_ERR_CMD_SUSPRES_SAME - * - No matching transaction, #CF_EID_ERR_CMD_SUSPRES_CHAN + * - Transaction not found using compound key, #CF_CMD_TRANS_NOT_FOUND_ERR_EID + * - Invalid channel number, #CF_CMD_TSN_CHAN_INVALID_ERR_EID + * - Already in requested state, #CF_CMD_SUSPRES_SAME_ERR_EID + * - No matching transaction, #CF_CMD_SUSPRES_CHAN_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -411,15 +411,15 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_SUSPRES + * - #CF_CMD_SUSPRES_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Transaction not found using compound key, #CF_EID_ERR_CMD_TRANS_NOT_FOUND - * - Invalid channel number, #CF_EID_ERR_CMD_TSN_CHAN_INVALID - * - Already in requested state, #CF_EID_ERR_CMD_SUSPRES_SAME - * - No matching transaction, #CF_EID_ERR_CMD_SUSPRES_CHAN + * - Transaction not found using compound key, #CF_CMD_TRANS_NOT_FOUND_ERR_EID + * - Invalid channel number, #CF_CMD_TSN_CHAN_INVALID_ERR_EID + * - Already in requested state, #CF_CMD_SUSPRES_SAME_ERR_EID + * - No matching transaction, #CF_CMD_SUSPRES_CHAN_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -446,14 +446,14 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_CANCEL + * - #CF_CMD_CANCEL_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Transaction not found using compound key, #CF_EID_ERR_CMD_TRANS_NOT_FOUND - * - Invalid channel number, #CF_EID_ERR_CMD_TSN_CHAN_INVALID - * - No matching transaction, #CF_EID_ERR_CMD_CANCEL_CHAN + * - Transaction not found using compound key, #CF_CMD_TRANS_NOT_FOUND_ERR_EID + * - Invalid channel number, #CF_CMD_TSN_CHAN_INVALID_ERR_EID + * - No matching transaction, #CF_CMD_CANCEL_CHAN_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -480,14 +480,14 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_ABANDON + * - #CF_CMD_ABANDON_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Transaction not found using compound key, #CF_EID_ERR_CMD_TRANS_NOT_FOUND - * - Invalid channel number, #CF_EID_ERR_CMD_TSN_CHAN_INVALID - * - No matching transaction, #CF_EID_ERR_CMD_ABANDON_CHAN + * - Transaction not found using compound key, #CF_CMD_TRANS_NOT_FOUND_ERR_EID + * - Invalid channel number, #CF_CMD_TSN_CHAN_INVALID_ERR_EID + * - No matching transaction, #CF_CMD_ABANDON_CHAN_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -512,14 +512,14 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_GETSET1 + * - #CF_CMD_GETSET1_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid configuration parameter key, #CF_EID_ERR_CMD_GETSET_PARAM - * - Invalid channel number, #CF_EID_ERR_CMD_GETSET_CHAN - * - Parameter value failed validation, #CF_EID_ERR_CMD_GETSET_VALIDATE + * - Invalid configuration parameter key, #CF_CMD_GETSET_PARAM_ERR_EID + * - Invalid channel number, #CF_CMD_GETSET_CHAN_ERR_EID + * - Parameter value failed validation, #CF_CMD_GETSET_VALIDATE_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -544,13 +544,13 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_GETSET2 + * - #CF_CMD_GETSET2_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid configuration parameter key, #CF_EID_ERR_CMD_GETSET_PARAM - * - Invalid channel number, #CF_EID_ERR_CMD_GETSET_CHAN + * - Invalid configuration parameter key, #CF_CMD_GETSET_PARAM_ERR_EID + * - Invalid channel number, #CF_CMD_GETSET_CHAN_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -575,18 +575,18 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_WQ + * - #CF_CMD_WQ_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid parameter combination, #CF_EID_ERR_CMD_WQ_ARGS - * - Invalid channel number, #CF_EID_ERR_CMD_WQ_CHAN - * - Open file to write failed, #CF_EID_ERR_CMD_WQ_OPEN - * - Write RX data failed, #CF_EID_ERR_CMD_WQ_WRITEQ_RX - * - Write RX history data failed, #CF_EID_ERR_CMD_WQ_WRITEHIST_RX - * - Write TX data failed, #CF_EID_ERR_CMD_WQ_WRITEQ_TX - * - Write TX history data failed, #CF_EID_ERR_CMD_WQ_WRITEHIST_TX + * - Invalid parameter combination, #CF_CMD_WQ_ARGS_ERR_EID + * - Invalid channel number, #CF_CMD_WQ_CHAN_ERR_EID + * - Open file to write failed, #CF_CMD_WQ_OPEN_ERR_EID + * - Write RX data failed, #CF_CMD_WQ_WRITEQ_RX_ERR_EID + * - Write RX history data failed, #CF_CMD_WQ_WRITEHIST_RX_ERR_EID + * - Write TX data failed, #CF_CMD_WQ_WRITEQ_TX_ERR_EID + * - Write TX history data failed, #CF_CMD_WQ_WRITEHIST_TX_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -613,13 +613,13 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_ENABLE_DEQUEUE + * - #CF_CMD_ENABLE_DEQUEUE_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM - * - Enable dequeue failed, #CF_EID_ERR_CMD_ENABLE_DEQUEUE + * - Invalid channel number, #CF_CMD_CHAN_PARAM_ERR_EID + * - Enable dequeue failed, #CF_CMD_ENABLE_DEQUEUE_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -646,13 +646,13 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_DISABLE_DEQUEUE + * - #CF_CMD_DISABLE_DEQUEUE_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM - * - Disable dequeue failed, #CF_EID_INF_CMD_DISABLE_DEQUEUE + * - Invalid channel number, #CF_CMD_CHAN_PARAM_ERR_EID + * - Disable dequeue failed, #CF_CMD_DISABLE_DEQUEUE_INF_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -685,14 +685,14 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_ENABLE_POLLDIR + * - #CF_CMD_ENABLE_POLLDIR_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM - * - Invalid polling directory index, #CF_EID_ERR_CMD_POLLDIR_INVALID - * - Enable directory polling failed, #CF_EID_ERR_CMD_ENABLE_POLLDIR + * - Invalid channel number, #CF_CMD_CHAN_PARAM_ERR_EID + * - Invalid polling directory index, #CF_CMD_POLLDIR_INVALID_ERR_EID + * - Enable directory polling failed, #CF_CMD_ENABLE_POLLDIR_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -725,14 +725,14 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_DISABLE_POLLDIR + * - #CF_CMD_DISABLE_POLLDIR_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM - * - Invalid polling directory index, #CF_EID_ERR_CMD_POLLDIR_INVALID - * - Disable directory polling failed, #CF_EID_ERR_CMD_DISABLE_POLLDIR + * - Invalid channel number, #CF_CMD_CHAN_PARAM_ERR_EID + * - Invalid polling directory index, #CF_CMD_POLLDIR_INVALID_ERR_EID + * - Disable directory polling failed, #CF_CMD_DISABLE_POLLDIR_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -766,14 +766,14 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_PURGE_QUEUE + * - #CF_CMD_PURGE_QUEUE_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM - * - Invalid purge queue argument, #CF_EID_ERR_CMD_PURGE_ARG - * - Purge queue failed, #CF_EID_ERR_CMD_PURGE_QUEUE + * - Invalid channel number, #CF_CMD_CHAN_PARAM_ERR_EID + * - Invalid purge queue argument, #CF_CMD_PURGE_ARG_ERR_EID + * - Purge queue failed, #CF_CMD_PURGE_QUEUE_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -799,13 +799,13 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_ENABLE_ENGINE + * - #CF_CMD_ENABLE_ENGINE_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Engine initialization failed, #CF_EID_ERR_CMD_ENABLE_ENGINE - * - Engine already enabled, #CF_EID_ERR_CMD_ENG_ALREADY_ENA + * - Engine initialization failed, #CF_CMD_ENABLE_ENGINE_ERR_EID + * - Engine already enabled, #CF_CMD_ENG_ALREADY_ENA_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment @@ -832,12 +832,12 @@ typedef enum * Successful execution of this command may be verified with * the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment - * - #CF_EID_INF_CMD_DISABLE_ENGINE + * - #CF_CMD_DISABLE_ENGINE_INF_EID * * \par Error Conditions * This command may fail for the following reason(s): * - Command packet length not as expected, #CF_CMD_LEN_ERR_EID - * - Engine already disabled, #CF_EID_ERR_CMD_ENG_ALREADY_DIS + * - Engine already disabled, #CF_CMD_ENG_ALREADY_DIS_ERR_EID * * \par Evidence of failure may be found in the following telemetry: * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment diff --git a/fsw/src/cf_app.c b/fsw/src/cf_app.c index b1803f7d..bcbceece 100644 --- a/fsw/src/cf_app.c +++ b/fsw/src/cf_app.c @@ -80,7 +80,7 @@ void CF_CheckTables(void) status = CFE_TBL_ReleaseAddress(CF_AppData.config_handle); if (status < CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_CHECK_REL, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_TBL_CHECK_REL_ERR_EID, CFE_EVS_EventType_ERROR, "CF: error in CFE_TBL_ReleaseAddress (check), returned 0x%08lx", (unsigned long)status); CF_AppData.run_status = CFE_ES_RunStatus_APP_ERROR; } @@ -88,7 +88,7 @@ void CF_CheckTables(void) status = CFE_TBL_Manage(CF_AppData.config_handle); if (status < CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_CHECK_MAN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_TBL_CHECK_MAN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: error in CFE_TBL_Manage (check), returned 0x%08lx", (unsigned long)status); CF_AppData.run_status = CFE_ES_RunStatus_APP_ERROR; } @@ -96,7 +96,7 @@ void CF_CheckTables(void) status = CFE_TBL_GetAddress((void *)&CF_AppData.config_table, CF_AppData.config_handle); if (status < CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_CHECK_GA, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_TBL_CHECK_GA_ERR_EID, CFE_EVS_EventType_ERROR, "CF: failed to get table address (check), returned 0x%08lx", (unsigned long)status); CF_AppData.run_status = CFE_ES_RunStatus_APP_ERROR; } @@ -119,18 +119,18 @@ CFE_Status_t CF_ValidateConfigTable(void *tbl_ptr) if (!tbl->ticks_per_second) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_TPS, CFE_EVS_EventType_ERROR, "CF: config table has zero ticks per second"); + CFE_EVS_SendEvent(CF_INIT_TPS_ERR_EID, CFE_EVS_EventType_ERROR, "CF: config table has zero ticks per second"); ret = no_ticks_per_second; } else if (!tbl->rx_crc_calc_bytes_per_wakeup || (tbl->rx_crc_calc_bytes_per_wakeup & 0x3ff)) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_CRC_ALIGN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_CRC_ALIGN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: config table has rx CRC size not aligned with 1024"); ret = crc_alignment; /* must be 1024-byte aligned */ } else if (tbl->outgoing_file_chunk_size > sizeof(CF_CFDP_PduFileDataContent_t)) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_OUTGOING_SIZE, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_OUTGOING_SIZE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: config table has outgoing file chunk size too large"); ret = outgoing_chunk_size; /* must be smaller than file data character array */ } @@ -156,7 +156,7 @@ CFE_Status_t CF_TableInit(void) CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_LOAD_DUMP, CF_ValidateConfigTable); if (status != CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_REG, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_TBL_REG_ERR_EID, CFE_EVS_EventType_ERROR, "CF: error registering table, returned 0x%08lx", (unsigned long)status); } else @@ -164,7 +164,7 @@ CFE_Status_t CF_TableInit(void) status = CFE_TBL_Load(CF_AppData.config_handle, CFE_TBL_SRC_FILE, CF_CONFIG_TABLE_FILENAME); if (status != CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_LOAD, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_TBL_LOAD_ERR_EID, CFE_EVS_EventType_ERROR, "CF: error loading table, returned 0x%08lx", (unsigned long)status); } } @@ -174,7 +174,7 @@ CFE_Status_t CF_TableInit(void) status = CFE_TBL_Manage(CF_AppData.config_handle); if (status != CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_MANAGE, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_TBL_MANAGE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: error in CFE_TBL_Manage, returned 0x%08lx", (unsigned long)status); } } @@ -185,7 +185,7 @@ CFE_Status_t CF_TableInit(void) /* status will be CFE_TBL_INFO_UPDATED because it was just loaded, but we can use CFE_SUCCESS too */ if ((status != CFE_TBL_INFO_UPDATED) && (status != CFE_SUCCESS)) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_GETADDR, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_TBL_GETADDR_ERR_EID, CFE_EVS_EventType_ERROR, "CF: error getting table address, returned 0x%08lx", (unsigned long)status); } else @@ -308,7 +308,7 @@ void CF_ProcessMsg(CFE_SB_Buffer_t *msg) default: ++CF_AppData.hk.counters.err; - CFE_EVS_SendEvent(CF_EID_ERR_INIT_CMD_LENGTH, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_CMD_LENGTH_ERR_EID, CFE_EVS_EventType_ERROR, "CF: invalid command packet id=0x%lx", (unsigned long)CFE_SB_MsgIdToValue(msg_id)); break; } @@ -352,7 +352,7 @@ void CF_AppMain(void) } else if (status != CFE_SB_TIME_OUT && status != CFE_SB_NO_MESSAGE) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_MSG_RECV, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_MSG_RECV_ERR_EID, CFE_EVS_EventType_ERROR, "CF: exiting due to CFE_SB_ReceiveBuffer error 0x%08lx", (unsigned long)status); CF_AppData.run_status = CFE_ES_RunStatus_APP_ERROR; } diff --git a/fsw/src/cf_cfdp.c b/fsw/src/cf_cfdp.c index b33b93e9..d5d7fe78 100644 --- a/fsw/src/cf_cfdp.c +++ b/fsw/src/cf_cfdp.c @@ -596,7 +596,7 @@ CFE_Status_t CF_CFDP_RecvPh(uint8 chan_num, CF_Logical_PduBuffer_t *ph) */ if (CF_CFDP_DecodeHeader(ph->pdec, &ph->pdu_header) != CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_TRUNCATION, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_TRUNCATION_ERR_EID, CFE_EVS_EventType_ERROR, "CF: PDU rejected due to EID/seq number field truncation"); ++CF_AppData.hk.channel_hk[chan_num].counters.recv.error; ret = CF_ERROR; @@ -609,7 +609,7 @@ CFE_Status_t CF_CFDP_RecvPh(uint8 chan_num, CF_Logical_PduBuffer_t *ph) */ else if (CF_CODEC_IS_OK(ph->pdec) && ph->pdu_header.large_flag) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_LARGE_FILE, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_LARGE_FILE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: PDU with large file bit received (unsupported)"); ++CF_AppData.hk.channel_hk[chan_num].counters.recv.error; ret = CF_ERROR; @@ -623,7 +623,7 @@ CFE_Status_t CF_CFDP_RecvPh(uint8 chan_num, CF_Logical_PduBuffer_t *ph) if (!CF_CODEC_IS_OK(ph->pdec)) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_SHORT_HEADER, CFE_EVS_EventType_ERROR, "CF: PDU too short (%lu received)", + CFE_EVS_SendEvent(CF_PDU_SHORT_HEADER_ERR_EID, CFE_EVS_EventType_ERROR, "CF: PDU too short (%lu received)", (unsigned long)CF_CODEC_GET_SIZE(ph->pdec)); ++CF_AppData.hk.channel_hk[chan_num].counters.recv.error; ret = CF_SHORT_PDU_ERROR; @@ -653,7 +653,7 @@ CFE_Status_t CF_CFDP_RecvMd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) CF_CFDP_DecodeMd(ph->pdec, &ph->int_header.md); if (!CF_CODEC_IS_OK(ph->pdec)) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_MD_SHORT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_MD_SHORT_ERR_EID, CFE_EVS_EventType_ERROR, "CF: metadata packet too short: %lu bytes received", (unsigned long)CF_CODEC_GET_SIZE(ph->pdec)); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -675,7 +675,7 @@ CFE_Status_t CF_CFDP_RecvMd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) &md->source_filename); if (lv_ret < 0) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_INVALID_SRC_LEN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_INVALID_SRC_LEN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: metadata PDU rejected due to invalid length in source filename of 0x%02x", md->source_filename.length); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -687,7 +687,7 @@ CFE_Status_t CF_CFDP_RecvMd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) &md->dest_filename); if (lv_ret < 0) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_INVALID_DST_LEN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_INVALID_DST_LEN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: metadata PDU rejected due to invalid length in dest filename of 0x%02x", md->dest_filename.length); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -695,7 +695,7 @@ CFE_Status_t CF_CFDP_RecvMd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) } else { - CFE_EVS_SendEvent(CF_EID_INF_PDU_MD_RECVD, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_PDU_MD_RECVD_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: md received for source: %s, dest: %s", t->history->fnames.src_filename, t->history->fnames.dst_filename); } @@ -732,7 +732,7 @@ CFE_Status_t CF_CFDP_RecvFd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) if (!CF_CODEC_IS_OK(ph->pdec)) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_FD_SHORT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_FD_SHORT_ERR_EID, CFE_EVS_EventType_ERROR, "CF: filedata PDU too short: %lu bytes received", (unsigned long)CF_CODEC_GET_SIZE(ph->pdec)); CF_CFDP_SetTxnStatus(t, CF_TxnStatus_PROTOCOL_ERROR); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -741,7 +741,7 @@ CFE_Status_t CF_CFDP_RecvFd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) else if (ph->pdu_header.segment_meta_flag) { /* If recv PDU has the "segment_meta_flag" set, this is not currently handled in CF. */ - CFE_EVS_SendEvent(CF_EID_ERR_PDU_FD_UNSUPPORTED, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_FD_UNSUPPORTED_ERR_EID, CFE_EVS_EventType_ERROR, "CF: filedata PDU with segment metadata received"); CF_CFDP_SetTxnStatus(t, CF_TxnStatus_PROTOCOL_ERROR); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -765,7 +765,7 @@ CFE_Status_t CF_CFDP_RecvEof(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) if (!CF_CODEC_IS_OK(ph->pdec)) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_EOF_SHORT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_EOF_SHORT_ERR_EID, CFE_EVS_EventType_ERROR, "CF: EOF PDU too short: %lu bytes received", (unsigned long)CF_CODEC_GET_SIZE(ph->pdec)); ret = CF_SHORT_PDU_ERROR; } @@ -787,7 +787,7 @@ CFE_Status_t CF_CFDP_RecvAck(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) if (!CF_CODEC_IS_OK(ph->pdec)) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_ACK_SHORT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_ACK_SHORT_ERR_EID, CFE_EVS_EventType_ERROR, "CF: ACK PDU too short: %lu bytes received", (unsigned long)CF_CODEC_GET_SIZE(ph->pdec)); ret = CF_SHORT_PDU_ERROR; } @@ -810,7 +810,7 @@ CFE_Status_t CF_CFDP_RecvFin(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) if (!CF_CODEC_IS_OK(ph->pdec)) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_FIN_SHORT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_FIN_SHORT_ERR_EID, CFE_EVS_EventType_ERROR, "CF: FIN PDU too short: %lu bytes received", (unsigned long)CF_CODEC_GET_SIZE(ph->pdec)); ret = CF_SHORT_PDU_ERROR; } @@ -834,7 +834,7 @@ CFE_Status_t CF_CFDP_RecvNak(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) if (!CF_CODEC_IS_OK(ph->pdec)) { - CFE_EVS_SendEvent(CF_EID_ERR_PDU_NAK_SHORT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_PDU_NAK_SHORT_ERR_EID, CFE_EVS_EventType_ERROR, "CF: NAK PDU too short: %lu bytes received", (unsigned long)CF_CODEC_GET_SIZE(ph->pdec)); ret = CF_SHORT_PDU_ERROR; } @@ -916,14 +916,14 @@ void CF_CFDP_RecvIdle(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) } else { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_IDLE_MD, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_IDLE_MD_ERR_EID, CFE_EVS_EventType_ERROR, "CF: got invalid md PDU -- abandoning transaction"); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; /* leave state as idle, which will reset below */ } break; default: - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_FD_UNHANDLED, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_FD_UNHANDLED_ERR_EID, CFE_EVS_EventType_ERROR, "CF: unhandled file directive code 0x%02x in idle state", fdh->directive_code); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; break; @@ -978,7 +978,7 @@ CFE_Status_t CF_CFDP_InitEngine(void) CF_AppData.config_table->chan[i].pipe_depth_input); if (ret != CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_SUB, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_SUB_ERR_EID, CFE_EVS_EventType_ERROR, "CF: failed to subscribe to MID 0x%lx, returned 0x%08lx", (unsigned long)CF_AppData.config_table->chan[i].mid_input, (unsigned long)ret); break; @@ -1009,7 +1009,7 @@ CFE_Status_t CF_CFDP_InitEngine(void) if (ret != OS_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_INIT_SEM, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_INIT_SEM_ERR_EID, CFE_EVS_EventType_ERROR, "CF: failed to get sem id for name %s, error=%ld", CF_AppData.config_table->chan[i].sem_name, (long)ret); break; @@ -1244,7 +1244,7 @@ void CF_CFDP_InitTxnTxFile(CF_Transaction_t *t, CF_CFDP_Class_t cfdp_class, uint static void CF_CFDP_TxFile_Initiate(CF_Transaction_t *t, CF_CFDP_Class_t cfdp_class, uint8 keep, uint8 chan, uint8 priority, CF_EntityId_t dest_id) { - CFE_EVS_SendEvent(CF_EID_INF_CFDP_S_START_SEND, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CFDP_S_START_SEND_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: start class %d tx of file %lu:%.*s -> %lu:%.*s", cfdp_class + 1, (unsigned long)CF_AppData.config_table->local_eid, CF_FILENAME_MAX_LEN, t->history->fnames.src_filename, (unsigned long)dest_id, CF_FILENAME_MAX_LEN, @@ -1285,7 +1285,7 @@ CFE_Status_t CF_CFDP_TxFile(const char *src_filename, const char *dst_filename, if (c->num_cmd_tx == CF_MAX_COMMANDED_PLAYBACK_FILES_PER_CHAN) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_MAX_CMD_TX, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_MAX_CMD_TX_ERR_EID, CFE_EVS_EventType_ERROR, "CF: max number of commanded files reached"); ret = CF_ERROR; } @@ -1325,7 +1325,7 @@ static CFE_Status_t CF_CFDP_PlaybackDir_Initiate(CF_Playback_t *p, const char *s ret = OS_DirectoryOpen(&p->dir_id, src_filename); if (ret != OS_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_OPENDIR, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_OPENDIR_ERR_EID, CFE_EVS_EventType_ERROR, "CF: failed to open playback directory %s, error=%ld", src_filename, (long)ret); ++CF_AppData.hk.channel_hk[chan].counters.fault.directory_read; } @@ -1372,7 +1372,7 @@ CFE_Status_t CF_CFDP_PlaybackDir(const char *src_filename, const char *dst_filen if (i == CF_MAX_COMMANDED_PLAYBACK_DIRECTORIES_PER_CHAN) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_DIR_SLOT, CFE_EVS_EventType_ERROR, "CF: no playback dir slot available"); + CFE_EVS_SendEvent(CF_CFDP_DIR_SLOT_ERR_EID, CFE_EVS_EventType_ERROR, "CF: no playback dir slot available"); return CF_ERROR; } diff --git a/fsw/src/cf_cfdp_dispatch.c b/fsw/src/cf_cfdp_dispatch.c index 085c1019..5857fb7b 100644 --- a/fsw/src/cf_cfdp_dispatch.c +++ b/fsw/src/cf_cfdp_dispatch.c @@ -60,7 +60,7 @@ void CF_CFDP_R_DispatchRecv(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph, else { ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.spurious; - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_DC_INV, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_DC_INV_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): received PDU with invalid directive code %d for sub-state %d", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, fdh->directive_code, t->state_data.r.sub_state); @@ -119,7 +119,7 @@ void CF_CFDP_S_DispatchRecv(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph, else { ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.spurious; - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_DC_INV, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_DC_INV_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): received PDU with invalid directive code %d for sub-state %d", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, fdh->directive_code, t->state_data.s.sub_state); @@ -127,7 +127,7 @@ void CF_CFDP_S_DispatchRecv(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph, } else { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_NON_FD_PDU, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_NON_FD_PDU_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): received non-file directive PDU", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); } diff --git a/fsw/src/cf_cfdp_r.c b/fsw/src/cf_cfdp_r.c index 209ae9e1..c8145a60 100644 --- a/fsw/src/cf_cfdp_r.c +++ b/fsw/src/cf_cfdp_r.c @@ -94,7 +94,7 @@ CFE_Status_t CF_CFDP_R_CheckCrc(CF_Transaction_t *t, uint32 expected_crc) CF_CRC_Finalize(&t->crc); if (t->crc.result != expected_crc) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_CRC, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_CRC_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): CRC mismatch for R trans. got 0x%08lx expected 0x%08lx", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (unsigned long)t->crc.result, @@ -152,7 +152,7 @@ void CF_CFDP_R2_Complete(CF_Transaction_t *t, int ok_to_send_nak) /* Check limit and handle if needed */ if (t->state_data.r.r2.acknak_count >= CF_AppData.config_table->chan[t->chan_num].nak_limit) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_NAK_LIMIT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_NAK_LIMIT_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): NAK limited reach", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); send_fin = 1; @@ -208,7 +208,7 @@ CFE_Status_t CF_CFDP_R_ProcessFd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph fret = CF_WrappedLseek(t->fd, fd->offset, OS_SEEK_SET); if (fret != fd->offset) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_SEEK_FD, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_SEEK_FD_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): failed to seek offset %ld, got %ld", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (long)fd->offset, (long)fret); @@ -223,7 +223,7 @@ CFE_Status_t CF_CFDP_R_ProcessFd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph fret = CF_WrappedWrite(t->fd, fd->data_ptr, fd->data_len); if (fret != fd->data_len) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_WRITE, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_WRITE_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): OS_write expected %ld, got %ld", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (long)fd->data_len, (long)fret); @@ -260,7 +260,7 @@ CFE_Status_t CF_CFDP_R_SubstateRecvEof(CF_Transaction_t *t, CF_Logical_PduBuffer /* only check size if MD received, otherwise it's still OK */ if (t->flags.rx.md_recv && (eof->size != t->fsize)) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_SIZE_MISMATCH, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_SIZE_MISMATCH_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): EOF file size mismatch: got %lu expected %lu", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (unsigned long)eof->size, (unsigned long)t->fsize); @@ -270,7 +270,7 @@ CFE_Status_t CF_CFDP_R_SubstateRecvEof(CF_Transaction_t *t, CF_Logical_PduBuffer } else { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_PDU_EOF, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): invalid EOF packet", + CFE_EVS_SendEvent(CF_CFDP_R_PDU_EOF_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): invalid EOF packet", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -533,7 +533,7 @@ CFE_Status_t CF_CFDP_R_SubstateSendNak(CF_Transaction_t *t) { /* need to send simple NAK packet to request metadata PDU again */ /* after doing so, transition to recv md state */ - CFE_EVS_SendEvent(CF_EID_INF_CFDP_R_REQUEST_MD, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CFDP_R_REQUEST_MD_INF_EID, CFE_EVS_EventType_INFORMATION, "CF R%d(%lu:%lu): requesting MD", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); /* scope start/end, and sr[0] start/end == 0 special value to request metadata */ @@ -576,7 +576,7 @@ void CF_CFDP_R_Init(CF_Transaction_t *t) /* the -1 below is to make room for the slash */ snprintf(t->history->fnames.dst_filename, sizeof(t->history->fnames.dst_filename) - 1, "%.*s/%lu.tmp", CF_FILENAME_MAX_PATH - 1, CF_AppData.config_table->tmp_dir, (unsigned long)t->history->seq_num); - CFE_EVS_SendEvent(CF_EID_INF_CFDP_R_TEMP_FILE, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CFDP_R_TEMP_FILE_INF_EID, CFE_EVS_EventType_INFORMATION, "CF R%d(%lu:%lu): making temp file %s for transaction without MD", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, t->history->fnames.dst_filename); @@ -589,7 +589,7 @@ void CF_CFDP_R_Init(CF_Transaction_t *t) OS_READ_WRITE); if (ret < 0) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_CREAT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_CREAT_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): failed to create file %s for writing, error=%ld", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, t->history->fnames.dst_filename, (long)ret); @@ -655,7 +655,7 @@ CFE_Status_t CF_CFDP_R2_CalcCrcChunk(CF_Transaction_t *t) fret = CF_WrappedLseek(t->fd, t->state_data.r.r2.rx_crc_calc_bytes, OS_SEEK_SET); if (fret != t->state_data.r.r2.rx_crc_calc_bytes) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_SEEK_CRC, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_SEEK_CRC_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): failed to seek offset %lu, got %ld", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (unsigned long)t->state_data.r.r2.rx_crc_calc_bytes, (long)fret); @@ -669,7 +669,7 @@ CFE_Status_t CF_CFDP_R2_CalcCrcChunk(CF_Transaction_t *t) fret = CF_WrappedRead(t->fd, buf, read_size); if (fret != read_size) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_READ, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_READ_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): failed to read file expected %lu, got %ld", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (unsigned long)read_size, (long)fret); @@ -762,7 +762,7 @@ void CF_CFDP_R2_Recv_fin_ack(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) } else { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_PDU_FINACK, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): invalid fin-ack", + CFE_EVS_SendEvent(CF_CFDP_R_PDU_FINACK_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): invalid fin-ack", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -802,7 +802,7 @@ void CF_CFDP_R2_RecvMd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) /* EOF was received, so check that md and EOF sizes match */ if (t->state_data.r.r2.eof_size != t->fsize) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_EOF_MD_SIZE, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_EOF_MD_SIZE_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): EOF/md size mismatch md: %lu, EOF: %lu", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (unsigned long)t->fsize, @@ -825,7 +825,7 @@ void CF_CFDP_R2_RecvMd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) CFE_ES_PerfLogExit(CF_PERF_ID_RENAME); if (status != OS_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_RENAME, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_RENAME_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): failed to rename file in R2, error=%ld", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (long)status); @@ -840,7 +840,7 @@ void CF_CFDP_R2_RecvMd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) CF_WrappedOpenCreate(&t->fd, t->history->fnames.dst_filename, OS_FILE_FLAG_NONE, OS_READ_WRITE); if (ret < 0) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_OPEN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_OPEN_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): failed to open renamed file in R2, error=%ld", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (long)ret); @@ -862,7 +862,7 @@ void CF_CFDP_R2_RecvMd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) } else { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_PDU_MD, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): invalid md received", + CFE_EVS_SendEvent(CF_CFDP_R_PDU_MD_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): invalid md received", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -942,7 +942,7 @@ void CF_CFDP_R_Cancel(CF_Transaction_t *t) *-----------------------------------------------------------------*/ void CF_CFDP_R_SendInactivityEvent(CF_Transaction_t *t) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_INACT_TIMER, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_INACT_TIMER_ERR_EID, CFE_EVS_EventType_ERROR, "CF R%d(%lu:%lu): inactivity timer expired", (t->state == CF_TxnState_R2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); ++CF_AppData.hk.channel_hk[t->chan_num].counters.fault.inactivity_timer; @@ -1032,7 +1032,7 @@ void CF_CFDP_R_Tick(CF_Transaction_t *t, int *cont /* unused */) /* Check limit and handle if needed */ if (t->state_data.r.r2.acknak_count >= CF_AppData.config_table->chan[t->chan_num].ack_limit) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_R_ACK_LIMIT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_R_ACK_LIMIT_ERR_EID, CFE_EVS_EventType_ERROR, "CF R2(%lu:%lu): ACK limit reached, no fin-ack", (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); CF_CFDP_SetTxnStatus(t, CF_TxnStatus_ACK_LIMIT_NO_FIN); diff --git a/fsw/src/cf_cfdp_s.c b/fsw/src/cf_cfdp_s.c index f4da829b..1ae4d37b 100644 --- a/fsw/src/cf_cfdp_s.c +++ b/fsw/src/cf_cfdp_s.c @@ -167,7 +167,7 @@ CFE_Status_t CF_CFDP_S_SendFileData(CF_Transaction_t *t, uint32 foffs, uint32 by status = CF_WrappedLseek(t->fd, foffs, OS_SEEK_SET); if (status != foffs) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_SEEK_FD, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_SEEK_FD_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): error seeking to offset %ld, got %ld", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (long)foffs, (long)status); @@ -181,7 +181,7 @@ CFE_Status_t CF_CFDP_S_SendFileData(CF_Transaction_t *t, uint32 foffs, uint32 by status = CF_WrappedRead(t->fd, data_ptr, actual_bytes); if (status != actual_bytes) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_READ, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_READ_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): error reading bytes: expected %ld, got %ld", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, (long)actual_bytes, (long)status); @@ -200,7 +200,7 @@ CFE_Status_t CF_CFDP_S_SendFileData(CF_Transaction_t *t, uint32 foffs, uint32 by } else if (status == CF_SEND_PDU_ERROR) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_SEND_FD, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_SEND_FD_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): error sending fd", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); ret = CF_ERROR; @@ -351,7 +351,7 @@ void CF_CFDP_S_SubstateSendMetadata(CF_Transaction_t *t) { if (OS_FileOpenCheck(t->history->fnames.src_filename) == OS_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_ALREADY_OPEN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_ALREADY_OPEN_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): file %s already open", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, t->history->fnames.src_filename); @@ -364,7 +364,7 @@ void CF_CFDP_S_SubstateSendMetadata(CF_Transaction_t *t) ret = CF_WrappedOpenCreate(&t->fd, t->history->fnames.src_filename, OS_FILE_FLAG_NONE, OS_READ_ONLY); if (ret < 0) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_OPEN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_OPEN_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): failed to open file %s, error=%ld", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, t->history->fnames.src_filename, (long)ret); @@ -379,7 +379,7 @@ void CF_CFDP_S_SubstateSendMetadata(CF_Transaction_t *t) status = CF_WrappedLseek(t->fd, 0, OS_SEEK_END); if (status < 0) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_SEEK_END, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_SEEK_END_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): failed to seek end file %s, error=%ld", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, t->history->fnames.src_filename, (long)status); @@ -395,7 +395,7 @@ void CF_CFDP_S_SubstateSendMetadata(CF_Transaction_t *t) status = CF_WrappedLseek(t->fd, 0, OS_SEEK_SET); if (status != 0) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_SEEK_BEG, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_SEEK_BEG_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): failed to seek begin file %s, got %ld", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, t->history->fnames.src_filename, (long)status); @@ -411,7 +411,7 @@ void CF_CFDP_S_SubstateSendMetadata(CF_Transaction_t *t) if (sret == CF_SEND_PDU_ERROR) { /* failed to send md */ - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_SEND_MD, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): failed to send md", + CFE_EVS_SendEvent(CF_CFDP_S_SEND_MD_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): failed to send md", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); success = false; @@ -460,7 +460,7 @@ void CF_CFDP_S_SubstateSendFinAck(CF_Transaction_t *t) void CF_CFDP_S2_EarlyFin(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) { /* received early fin, so just cancel */ - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_EARLY_FIN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_EARLY_FIN_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): got early FIN -- cancelling", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); CF_CFDP_SetTxnStatus(t, CF_TxnStatus_EARLY_FIN); @@ -531,14 +531,14 @@ void CF_CFDP_S2_Nak(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) CF_AppData.hk.channel_hk[t->chan_num].counters.recv.nak_segment_requests += nak->segment_list.num_segments; if (bad_sr) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_INVALID_SR, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_INVALID_SR_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): received %d invalid NAK segment requests", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num, bad_sr); } } else { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_PDU_NAK, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_PDU_NAK_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): received invalid NAK PDU", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -581,7 +581,7 @@ void CF_CFDP_S2_WaitForEofAck(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) } else { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_PDU_EOF, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_PDU_EOF_ERR_EID, CFE_EVS_EventType_ERROR, "CF S%d(%lu:%lu): received invalid EOF PDU", (t->state == CF_TxnState_S2), (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); ++CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error; @@ -708,7 +708,7 @@ void CF_CFDP_S_Tick(CF_Transaction_t *t, int *cont /* unused */) { if (CF_Timer_Expired(&t->inactivity_timer)) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_INACT_TIMER, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_INACT_TIMER_ERR_EID, CFE_EVS_EventType_ERROR, "CF S2(%lu:%lu): inactivity timer expired", (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); CF_CFDP_SetTxnStatus(t, CF_TxnStatus_INACTIVITY_DETECTED); @@ -732,7 +732,7 @@ void CF_CFDP_S_Tick(CF_Transaction_t *t, int *cont /* unused */) /* Check limit and handle if needed */ if (t->state_data.s.s2.acknak_count >= CF_AppData.config_table->chan[t->chan_num].ack_limit) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_S_ACK_LIMIT, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_S_ACK_LIMIT_ERR_EID, CFE_EVS_EventType_ERROR, "CF S2(%lu:%lu), ack limit reached, no eof-ack", (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); CF_CFDP_SetTxnStatus(t, CF_TxnStatus_ACK_LIMIT_NO_EOF); diff --git a/fsw/src/cf_cfdp_sbintf.c b/fsw/src/cf_cfdp_sbintf.c index a36cc15c..88daa3fe 100644 --- a/fsw/src/cf_cfdp_sbintf.c +++ b/fsw/src/cf_cfdp_sbintf.c @@ -109,7 +109,7 @@ CF_Logical_PduBuffer_t *CF_CFDP_MsgOutGet(const CF_Transaction_t *t, bool silent c->cur = t; /* remember where we were for next time */ if (!silent) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_NO_MSG, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_NO_MSG_ERR_EID, CFE_EVS_EventType_ERROR, "CF: no output message buffer available"); } success = false; @@ -267,7 +267,7 @@ void CF_CFDP_ReceiveMessage(CF_Channel_t *c) if (CF_AppData.hk.channel_hk[chan_num].q_size[CF_QueueIdx_RX] == CF_MAX_SIMULTANEOUS_RX) { CFE_EVS_SendEvent( - CF_EID_ERR_CFDP_RX_DROPPED, CFE_EVS_EventType_ERROR, + CF_CFDP_RX_DROPPED_ERR_EID, CFE_EVS_EventType_ERROR, "CF: dropping packet from %lu transaction number 0x%08lx due max RX transactions reached", (unsigned long)ph->pdu_header.source_eid, (unsigned long)ph->pdu_header.sequence_num); @@ -291,7 +291,7 @@ void CF_CFDP_ReceiveMessage(CF_Channel_t *c) } else { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_INVALID_DST_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_INVALID_DST_ERR_EID, CFE_EVS_EventType_ERROR, "CF: dropping packet for invalid destination eid 0x%lx", (unsigned long)ph->pdu_header.destination_eid); } diff --git a/fsw/src/cf_cmd.c b/fsw/src/cf_cmd.c index 5a3c5981..8bdda89f 100644 --- a/fsw/src/cf_cmd.c +++ b/fsw/src/cf_cmd.c @@ -68,7 +68,7 @@ void CF_CmdReset(CFE_SB_Buffer_t *msg) if (param > 4) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_RESET_INVALID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_RESET_INVALID_ERR_EID, CFE_EVS_EventType_ERROR, "CF: Received RESET COUNTERS command with invalid parameter %d", param); ++CF_AppData.hk.counters.err; } @@ -137,7 +137,7 @@ void CF_CmdTxFile(CFE_SB_Buffer_t *msg) if ((tx->cfdp_class != CF_CFDP_CLASS_1 && tx->cfdp_class != CF_CFDP_CLASS_2) || tx->chan_num >= CF_NUM_CHANNELS || tx->keep > 1) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_BAD_PARAM, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_BAD_PARAM_ERR_EID, CFE_EVS_EventType_ERROR, "CF: bad parameter in CF_CmdTxFile(): chan=%u, class=%u keep=%u", (unsigned int)tx->chan_num, (unsigned int)tx->cfdp_class, (unsigned int)tx->keep); ++CF_AppData.hk.counters.err; @@ -151,13 +151,13 @@ void CF_CmdTxFile(CFE_SB_Buffer_t *msg) if (CF_CFDP_TxFile(tx->src_filename, tx->dst_filename, tx->cfdp_class, tx->keep, tx->chan_num, tx->priority, tx->dest_id) == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_TX_FILE, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CMD_TX_FILE_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: file transfer successfully initiated"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_TX_FILE, CFE_EVS_EventType_ERROR, "CF: file transfer initiation failed"); + CFE_EVS_SendEvent(CF_CMD_TX_FILE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: file transfer initiation failed"); ++CF_AppData.hk.counters.err; } } @@ -180,7 +180,7 @@ void CF_CmdPlaybackDir(CFE_SB_Buffer_t *msg) if ((tx->cfdp_class != CF_CFDP_CLASS_1 && tx->cfdp_class != CF_CFDP_CLASS_2) || tx->chan_num >= CF_NUM_CHANNELS || tx->keep > 1) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_BAD_PARAM, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_BAD_PARAM_ERR_EID, CFE_EVS_EventType_ERROR, "CF: bad parameter in CF_CmdPlaybackDir(): chan=%u, class=%u keep=%u", (unsigned int)tx->chan_num, (unsigned int)tx->cfdp_class, (unsigned int)tx->keep); ++CF_AppData.hk.counters.err; @@ -194,13 +194,13 @@ void CF_CmdPlaybackDir(CFE_SB_Buffer_t *msg) if (CF_CFDP_PlaybackDir(tx->src_filename, tx->dst_filename, tx->cfdp_class, tx->keep, tx->chan_num, tx->priority, tx->dest_id) == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_PLAYBACK_DIR, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CMD_PLAYBACK_DIR_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: directory playback initiation successful"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_PLAYBACK_DIR, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_PLAYBACK_DIR_ERR_EID, CFE_EVS_EventType_ERROR, "CF: directory playback initiation failed"); ++CF_AppData.hk.counters.err; } @@ -233,7 +233,7 @@ CFE_Status_t CF_DoChanAction(CF_UnionArgsCmd_t *cmd, const char *errstr, CF_Chan else { /* bad parameter */ - CFE_EVS_SendEvent(CF_EID_ERR_CMD_CHAN_PARAM, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_CHAN_PARAM_ERR_EID, CFE_EVS_EventType_ERROR, "CF: %s: channel parameter out of range. received %d", errstr, cmd->byte[0]); ret = CF_ERROR; } @@ -266,12 +266,12 @@ void CF_CmdFreeze(CFE_SB_Buffer_t *msg) if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "freeze", (CF_ChanActionFn_t)CF_DoFreezeThaw, &barg) == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_FREEZE, CFE_EVS_EventType_INFORMATION, "CF: freeze successful"); + CFE_EVS_SendEvent(CF_CMD_FREEZE_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: freeze successful"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_FREEZE, CFE_EVS_EventType_ERROR, "CF: freeze cmd failed"); + CFE_EVS_SendEvent(CF_CMD_FREEZE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: freeze cmd failed"); ++CF_AppData.hk.counters.err; } } @@ -288,12 +288,12 @@ void CF_CmdThaw(CFE_SB_Buffer_t *msg) if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "thaw", (CF_ChanActionFn_t)CF_DoFreezeThaw, &barg) == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_THAW, CFE_EVS_EventType_INFORMATION, "CF: thaw successful"); + CFE_EVS_SendEvent(CF_CMD_THAW_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: thaw successful"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_THAW, CFE_EVS_EventType_ERROR, "CF: thaw cmd failed"); + CFE_EVS_SendEvent(CF_CMD_THAW_ERR_EID, CFE_EVS_EventType_ERROR, "CF: thaw cmd failed"); ++CF_AppData.hk.counters.err; } } @@ -349,7 +349,7 @@ CFE_Status_t CF_TsnChanAction(CF_TransactionCmd_t *cmd, const char *cmdstr, CF_T } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_TRANS_NOT_FOUND, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_TRANS_NOT_FOUND_ERR_EID, CFE_EVS_EventType_ERROR, "CF: %s cmd: failed to find transaction for (eid %lu, ts %lu)", cmdstr, (unsigned long)cmd->eid, (unsigned long)cmd->ts); } @@ -366,7 +366,7 @@ CFE_Status_t CF_TsnChanAction(CF_TransactionCmd_t *cmd, const char *cmdstr, CF_T } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_TSN_CHAN_INVALID, CFE_EVS_EventType_ERROR, "CF: %s cmd: invalid channel %d", + CFE_EVS_SendEvent(CF_CMD_TSN_CHAN_INVALID_ERR_EID, CFE_EVS_EventType_ERROR, "CF: %s cmd: invalid channel %d", cmdstr, cmd->chan); } @@ -414,20 +414,20 @@ void CF_DoSuspRes(CF_TransactionCmd_t *cmd, uint8 action) if (ret == 1 && args.same) { /* A single transaction was mached, and it was already set the same way */ - CFE_EVS_SendEvent(CF_EID_ERR_CMD_SUSPRES_SAME, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_SUSPRES_SAME_ERR_EID, CFE_EVS_EventType_ERROR, "CF: %s cmd: setting suspend flag to current value of %d", msgstr[action], action); ++CF_AppData.hk.counters.err; } else if (ret <= 0) { /* No transaction was matched for the given combination of chan + eid + ts */ - CFE_EVS_SendEvent(CF_EID_ERR_CMD_SUSPRES_CHAN, CFE_EVS_EventType_ERROR, "CF: %s cmd: no transaction found", + CFE_EVS_SendEvent(CF_CMD_SUSPRES_CHAN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: %s cmd: no transaction found", msgstr[action]); ++CF_AppData.hk.counters.err; } else { - CFE_EVS_SendEvent(CF_EID_INF_CMD_SUSPRES, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CMD_SUSPRES_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: %s cmd: setting suspend flag to %d", msgstr[action], action); ++CF_AppData.hk.counters.cmd; } @@ -476,14 +476,14 @@ void CF_CmdCancel(CFE_SB_Buffer_t *msg) { if (CF_TsnChanAction((CF_TransactionCmd_t *)msg, "cancel", CF_CmdCancel_Txn, NULL) > 0) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_CANCEL, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CMD_CANCEL_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: cancel transaction successfully initiated"); ++CF_AppData.hk.counters.cmd; } else { /* No transaction was matched for the given combination of chan + eid + ts */ - CFE_EVS_SendEvent(CF_EID_ERR_CMD_CANCEL_CHAN, CFE_EVS_EventType_ERROR, "CF: cancel cmd: no transaction found"); + CFE_EVS_SendEvent(CF_CMD_CANCEL_CHAN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: cancel cmd: no transaction found"); ++CF_AppData.hk.counters.err; } } @@ -509,13 +509,13 @@ void CF_CmdAbandon(CFE_SB_Buffer_t *msg) { if (CF_TsnChanAction((CF_TransactionCmd_t *)msg, "abandon", CF_CmdAbandon_Txn, NULL) > 0) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_ABANDON, CFE_EVS_EventType_INFORMATION, "CF: abandon successful"); + CFE_EVS_SendEvent(CF_CMD_ABANDON_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: abandon successful"); ++CF_AppData.hk.counters.cmd; } else { /* No transaction was matched for the given combination of chan + eid + ts */ - CFE_EVS_SendEvent(CF_EID_ERR_CMD_ABANDON_CHAN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_ABANDON_CHAN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: abandon cmd: no transaction found"); ++CF_AppData.hk.counters.err; } @@ -547,12 +547,12 @@ void CF_CmdEnableDequeue(CFE_SB_Buffer_t *msg) if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "enable_dequeue", (CF_ChanActionFn_t)CF_DoEnableDisableDequeue, &barg) == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_ENABLE_DEQUEUE, CFE_EVS_EventType_INFORMATION, "CF: dequeue enabled"); + CFE_EVS_SendEvent(CF_CMD_ENABLE_DEQUEUE_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: dequeue enabled"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_ENABLE_DEQUEUE, CFE_EVS_EventType_ERROR, "CF: enable dequeue cmd failed"); + CFE_EVS_SendEvent(CF_CMD_ENABLE_DEQUEUE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: enable dequeue cmd failed"); ++CF_AppData.hk.counters.err; } } @@ -570,12 +570,12 @@ void CF_CmdDisableDequeue(CFE_SB_Buffer_t *msg) if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "disable_dequeue", (CF_ChanActionFn_t)CF_DoEnableDisableDequeue, &barg) == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_DISABLE_DEQUEUE, CFE_EVS_EventType_INFORMATION, "CF: dequeue disabled"); + CFE_EVS_SendEvent(CF_CMD_DISABLE_DEQUEUE_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: dequeue disabled"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_DISABLE_DEQUEUE, CFE_EVS_EventType_ERROR, "CF: disable dequeue cmd failed"); + CFE_EVS_SendEvent(CF_CMD_DISABLE_DEQUEUE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: disable dequeue cmd failed"); ++CF_AppData.hk.counters.err; } } @@ -603,7 +603,7 @@ CFE_Status_t CF_DoEnableDisablePolldir(uint8 chan_num, const CF_ChanAction_BoolM } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_POLLDIR_INVALID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_POLLDIR_INVALID_ERR_EID, CFE_EVS_EventType_ERROR, "CF: enable/disable polldir: invalid polldir %d on channel %d", context->msg->byte[1], chan_num); ret = CF_ERROR; @@ -625,13 +625,13 @@ void CF_CmdEnablePolldir(CFE_SB_Buffer_t *msg) if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "enable_polldir", (CF_ChanActionFn_t)CF_DoEnableDisablePolldir, &barg) == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_ENABLE_POLLDIR, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CMD_ENABLE_POLLDIR_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: enabled polling directory"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_ENABLE_POLLDIR, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_ENABLE_POLLDIR_ERR_EID, CFE_EVS_EventType_ERROR, "CF: enable polling directory cmd failed"); ++CF_AppData.hk.counters.err; } @@ -650,13 +650,13 @@ void CF_CmdDisablePolldir(CFE_SB_Buffer_t *msg) if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "disable_polldir", (CF_ChanActionFn_t)CF_DoEnableDisablePolldir, &barg) == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_DISABLE_POLLDIR, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CMD_DISABLE_POLLDIR_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: disabled polling directory"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_DISABLE_POLLDIR, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_DISABLE_POLLDIR_ERR_EID, CFE_EVS_EventType_ERROR, "CF: disable polling directory cmd failed"); ++CF_AppData.hk.counters.err; } @@ -719,7 +719,7 @@ CFE_Status_t CF_DoPurgeQueue(uint8 chan_num, CF_UnionArgsCmd_t *cmd) break; default: - CFE_EVS_SendEvent(CF_EID_ERR_CMD_PURGE_ARG, CFE_EVS_EventType_ERROR, "CF: purge queue invalid arg %d", + CFE_EVS_SendEvent(CF_CMD_PURGE_ARG_ERR_EID, CFE_EVS_EventType_ERROR, "CF: purge queue invalid arg %d", cmd->byte[1]); ret = CF_ERROR; break; @@ -749,12 +749,12 @@ void CF_CmdPurgeQueue(CFE_SB_Buffer_t *msg) if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "purge_queue", (CF_ChanActionFn_t)CF_DoPurgeQueue, msg) == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_PURGE_QUEUE, CFE_EVS_EventType_INFORMATION, "CF: queue purged"); + CFE_EVS_SendEvent(CF_CMD_PURGE_QUEUE_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: queue purged"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_PURGE_QUEUE, CFE_EVS_EventType_ERROR, "CF: purge queue cmd failed"); + CFE_EVS_SendEvent(CF_CMD_PURGE_QUEUE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: purge queue cmd failed"); ++CF_AppData.hk.counters.err; } } @@ -776,14 +776,14 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) /* check the commands for validity */ if (wq->chan >= CF_NUM_CHANNELS) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_WQ_CHAN, CFE_EVS_EventType_ERROR, "CF: write queue invalid channel arg"); + CFE_EVS_SendEvent(CF_CMD_WQ_CHAN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: write queue invalid channel arg"); ++CF_AppData.hk.counters.err; success = false; } /* only invalid combination is up direction, pending queue */ else if ((wq->type == CF_Type_up) && (wq->queue == CF_Queue_pend)) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_WQ_ARGS, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_WQ_ARGS_ERR_EID, CFE_EVS_EventType_ERROR, "CF: write queue invalid command parameters"); ++CF_AppData.hk.counters.err; success = false; @@ -795,7 +795,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) ret = CF_WrappedOpenCreate(&fd, wq->filename, OS_FILE_FLAG_CREATE | OS_FILE_FLAG_TRUNCATE, OS_WRITE_ONLY); if (ret < 0) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_WQ_OPEN, CFE_EVS_EventType_ERROR, "CF: write queue failed to open file %s", + CFE_EVS_SendEvent(CF_CMD_WQ_OPEN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: write queue failed to open file %s", wq->filename); ++CF_AppData.hk.counters.err; success = false; @@ -811,7 +811,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) ret = CF_WriteTxnQueueDataToFile(fd, c, CF_QueueIdx_RX); if (ret) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_WQ_WRITEQ_RX, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_WQ_WRITEQ_RX_ERR_EID, CFE_EVS_EventType_ERROR, "CF: write queue failed to write CF_QueueIdx_RX data"); CF_WrappedClose(fd); ++CF_AppData.hk.counters.err; @@ -824,7 +824,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) ret = CF_WriteHistoryQueueDataToFile(fd, c, CF_Direction_RX); if (ret) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_WQ_WRITEHIST_RX, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_WQ_WRITEHIST_RX_ERR_EID, CFE_EVS_EventType_ERROR, "CF: write queue failed to write history RX data"); CF_WrappedClose(fd); ++CF_AppData.hk.counters.err; @@ -846,7 +846,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) ret = CF_WriteTxnQueueDataToFile(fd, c, qs[i]); if (ret) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_WQ_WRITEQ_TX, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_WQ_WRITEQ_TX_ERR_EID, CFE_EVS_EventType_ERROR, "CF: write queue failed to write q index %d", qs[i]); CF_WrappedClose(fd); ++CF_AppData.hk.counters.err; @@ -862,7 +862,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) ret = CF_WriteTxnQueueDataToFile(fd, c, CF_QueueIdx_PEND); if (ret) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_WQ_WRITEQ_PEND, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_WQ_WRITEQ_PEND_ERR_EID, CFE_EVS_EventType_ERROR, "CF: write queue failed to write pending queue"); CF_WrappedClose(fd); ++CF_AppData.hk.counters.err; @@ -876,7 +876,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) ret = CF_WriteHistoryQueueDataToFile(fd, c, CF_Direction_TX); if (ret) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_WQ_WRITEHIST_TX, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_WQ_WRITEHIST_TX_ERR_EID, CFE_EVS_EventType_ERROR, "CF: write queue failed to write CF_QueueIdx_TX data"); CF_WrappedClose(fd); ++CF_AppData.hk.counters.err; @@ -887,7 +887,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) if (success) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_WQ, CFE_EVS_EventType_INFORMATION, "CF: write queue successful"); + CFE_EVS_SendEvent(CF_CMD_WQ_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: write queue successful"); ++CF_AppData.hk.counters.cmd; } } @@ -1000,12 +1000,12 @@ void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, if (item.size == 0) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_GETSET_PARAM, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_GETSET_PARAM_ERR_EID, CFE_EVS_EventType_ERROR, "CF: invalid configuration parameter id %d received", param_id); } else if (chan_num >= CF_NUM_CHANNELS) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_GETSET_CHAN, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_GETSET_CHAN_ERR_EID, CFE_EVS_EventType_ERROR, "CF: invalid configuration channel id %d received", chan_num); } else if (is_set) @@ -1018,7 +1018,7 @@ void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_GETSET_VALIDATE, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_GETSET_VALIDATE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: validation for parameter id %d failed", param_id); } } @@ -1031,7 +1031,7 @@ void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, { acc = 0; - CFE_EVS_SendEvent(CF_EID_INF_CMD_GETSET1, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(CF_CMD_GETSET1_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: setting parameter id %d to %lu", param_id, (unsigned long)value); /* Store value based on its size */ @@ -1069,7 +1069,7 @@ void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, value = *((const uint8 *)item.ptr); } - CFE_EVS_SendEvent(CF_EID_INF_CMD_GETSET2, CFE_EVS_EventType_INFORMATION, "CF: parameter id %d = %lu", param_id, + CFE_EVS_SendEvent(CF_CMD_GETSET2_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: parameter id %d = %lu", param_id, (unsigned long)value); } @@ -1119,19 +1119,19 @@ void CF_CmdEnableEngine(CFE_SB_Buffer_t *msg) { if (CF_CFDP_InitEngine() == CFE_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_INF_CMD_ENABLE_ENGINE, CFE_EVS_EventType_INFORMATION, "CF: enabled CFDP engine"); + CFE_EVS_SendEvent(CF_CMD_ENABLE_ENGINE_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: enabled CFDP engine"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_ENABLE_ENGINE, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_ENABLE_ENGINE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: failed to re-initialize and enable CFDP engine"); ++CF_AppData.hk.counters.err; } } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_ENG_ALREADY_ENA, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_ENG_ALREADY_ENA_ERR_EID, CFE_EVS_EventType_ERROR, "CF: received enable engine command while engine already enabled"); ++CF_AppData.hk.counters.err; } @@ -1148,12 +1148,12 @@ void CF_CmdDisableEngine(CFE_SB_Buffer_t *msg) if (CF_AppData.engine.enabled) { CF_CFDP_DisableEngine(); - CFE_EVS_SendEvent(CF_EID_INF_CMD_DISABLE_ENGINE, CFE_EVS_EventType_INFORMATION, "CF: disabled CFDP engine"); + CFE_EVS_SendEvent(CF_CMD_DISABLE_ENGINE_INF_EID, CFE_EVS_EventType_INFORMATION, "CF: disabled CFDP engine"); ++CF_AppData.hk.counters.cmd; } else { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_ENG_ALREADY_DIS, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_ENG_ALREADY_DIS_ERR_EID, CFE_EVS_EventType_ERROR, "CF: received disable engine command while engine already disabled"); ++CF_AppData.hk.counters.err; } diff --git a/fsw/src/cf_utils.c b/fsw/src/cf_utils.c index 89171407..67554495 100644 --- a/fsw/src/cf_utils.c +++ b/fsw/src/cf_utils.c @@ -200,7 +200,7 @@ CFE_Status_t CF_WriteHistoryEntryToFile(osal_id_t fd, const CF_History_t *h) ret = CF_WrappedWrite(fd, linebuf, len); if (ret != len) { - CFE_EVS_SendEvent(CF_EID_ERR_CMD_WHIST_WRITE, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CMD_WHIST_WRITE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: writing queue file failed, expected %ld got %ld", (long)len, (long)ret); return CF_ERROR; } @@ -439,7 +439,7 @@ void CF_WrappedClose(osal_id_t fd) if (ret != OS_SUCCESS) { - CFE_EVS_SendEvent(CF_EID_ERR_CFDP_CLOSE_ERR, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CF_CFDP_CLOSE_ERR_EID, CFE_EVS_EventType_ERROR, "CF: failed to close file 0x%lx, OS_close returned %ld", OS_ObjectIdToInteger(fd), (long)ret); } } diff --git a/unit-test/cf_app_tests.c b/unit-test/cf_app_tests.c index f66027d6..c83024bc 100644 --- a/unit-test/cf_app_tests.c +++ b/unit-test/cf_app_tests.c @@ -291,7 +291,7 @@ void Test_CF_TableInit_FailBecause_CFE_TBL_Register_DidNotReturnSuccess(void) /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_INIT_TBL_REG); + UT_CF_AssertEventID(CF_INIT_TBL_REG_ERR_EID); } void Test_CF_TableInit_FailBecause_CFE_TBL_Load_DidNotReturnSuccess(void) @@ -305,7 +305,7 @@ void Test_CF_TableInit_FailBecause_CFE_TBL_Load_DidNotReturnSuccess(void) /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_INIT_TBL_LOAD); + UT_CF_AssertEventID(CF_INIT_TBL_LOAD_ERR_EID); } void Test_CF_TableInit_FailBecause_CFE_TBL_Manage_DidNotReturnSuccess(void) @@ -320,7 +320,7 @@ void Test_CF_TableInit_FailBecause_CFE_TBL_Manage_DidNotReturnSuccess(void) /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_INIT_TBL_MANAGE); + UT_CF_AssertEventID(CF_INIT_TBL_MANAGE_ERR_EID); } void Test_CF_TableInit_FailBecause_CFE_TBL_GetAddress_DidNotReturnSuccess(void) @@ -335,7 +335,7 @@ void Test_CF_TableInit_FailBecause_CFE_TBL_GetAddress_DidNotReturnSuccess(void) /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_INIT_TBL_GETADDR); + UT_CF_AssertEventID(CF_INIT_TBL_GETADDR_ERR_EID); } void Test_CF_TableInit_When_CFE_TBL_GetAddress_Returns_CFE_SUCCESS_SuccessAndDoNotSendEvent(void) @@ -577,7 +577,7 @@ void Test_CF_ProcessMsg_UnrecognizedCommandEnterDefaultPath(void) /* Assert */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_INIT_CMD_LENGTH); + UT_CF_AssertEventID(CF_INIT_CMD_LENGTH_ERR_EID); } /******************************************************************************* @@ -631,7 +631,7 @@ void Test_CF_AppMain_CFE_SB_ReceiveBuffer_Cases(void) /* Event from CF_Init and CF_AppMain */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2); UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_INIT_INF_EID); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_EID_ERR_INIT_MSG_RECV); + UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_INIT_MSG_RECV_ERR_EID); /* Reset, return CFE_SUCCESS from CFE_SB_ReceiveBuffer and buffer NULL */ UT_CF_ResetEventCapture(); @@ -643,7 +643,7 @@ void Test_CF_AppMain_CFE_SB_ReceiveBuffer_Cases(void) /* Event from CF_Init and CF_AppMain */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2); UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_INIT_INF_EID); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_EID_ERR_INIT_MSG_RECV); + UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_INIT_MSG_RECV_ERR_EID); /* Reset, return non-error codes and non-NULL buffer */ UT_CF_ResetEventCapture(); diff --git a/unit-test/cf_cfdp_dispatch_tests.c b/unit-test/cf_cfdp_dispatch_tests.c index 3e8416e9..441c8a90 100644 --- a/unit-test/cf_cfdp_dispatch_tests.c +++ b/unit-test/cf_cfdp_dispatch_tests.c @@ -155,7 +155,7 @@ void Test_CF_CFDP_R_DispatchRecv(void) ph->fdirective.directive_code = CF_CFDP_FileDirective_INVALID_MAX; UtAssert_VOIDCALL(CF_CFDP_R_DispatchRecv(t, ph, &dispatch, NULL)); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.recv.spurious, 1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_DC_INV); + UT_CF_AssertEventID(CF_CFDP_R_DC_INV_ERR_EID); /* file data with error */ UT_CFDP_Dispatch_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); @@ -207,7 +207,7 @@ void Test_CF_CFDP_S_DispatchRecv(void) ph->fdirective.directive_code = CF_CFDP_FileDirective_INVALID_MAX; UtAssert_VOIDCALL(CF_CFDP_S_DispatchRecv(t, ph, &dispatch)); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.recv.spurious, 1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_DC_INV); + UT_CF_AssertEventID(CF_CFDP_S_DC_INV_ERR_EID); /* file data PDU, not expected in this type of txn */ UT_CFDP_Dispatch_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); diff --git a/unit-test/cf_cfdp_r_tests.c b/unit-test/cf_cfdp_r_tests.c index 594b373f..aad8d63d 100644 --- a/unit-test/cf_cfdp_r_tests.c +++ b/unit-test/cf_cfdp_r_tests.c @@ -360,7 +360,7 @@ void Test_CF_CFDP_R_Init(void) t->state = CF_TxnState_R2; UtAssert_VOIDCALL(CF_CFDP_R_Init(t)); UtAssert_STUB_COUNT(CF_CFDP_ArmAckTimer, 1); - UT_CF_AssertEventID(CF_EID_INF_CFDP_R_TEMP_FILE); + UT_CF_AssertEventID(CF_CFDP_R_TEMP_FILE_INF_EID); /* nominal, R2 state, with md_recv (no tempfile) */ UT_CFDP_R_SetupBasicTestState(UT_CF_Setup_RX, NULL, NULL, NULL, &t, NULL); @@ -375,7 +375,7 @@ void Test_CF_CFDP_R_Init(void) UT_SetDeferredRetcode(UT_KEY(CF_WrappedOpenCreate), 1, -1); t->state = CF_TxnState_R1; UtAssert_VOIDCALL(CF_CFDP_R_Init(t)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_CREAT); + UT_CF_AssertEventID(CF_CFDP_R_CREAT_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_open, 1); UtAssert_STUB_COUNT(CF_CFDP_ResetTransaction, 1); @@ -384,7 +384,7 @@ void Test_CF_CFDP_R_Init(void) UT_SetDeferredRetcode(UT_KEY(CF_WrappedOpenCreate), 1, -1); t->state = CF_TxnState_R2; UtAssert_VOIDCALL(CF_CFDP_R_Init(t)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_CREAT); + UT_CF_AssertEventID(CF_CFDP_R_CREAT_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_open, 2); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILESTORE_REJECTION); } @@ -463,7 +463,7 @@ void Test_CF_CFDP_R_CheckCrc(void) t->state = CF_TxnState_R1; t->crc.result = 0xdeadbeef; UtAssert_INT32_EQ(CF_CFDP_R_CheckCrc(t, 0x1badc0de), 1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_CRC); + UT_CF_AssertEventID(CF_CFDP_R_CRC_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.crc_mismatch, 1); /* CRC mismatch, class 2 */ @@ -471,7 +471,7 @@ void Test_CF_CFDP_R_CheckCrc(void) t->state = CF_TxnState_R2; t->crc.result = 0xdeadbeef; UtAssert_INT32_EQ(CF_CFDP_R_CheckCrc(t, 0x2badc0de), 1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_CRC); + UT_CF_AssertEventID(CF_CFDP_R_CRC_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.crc_mismatch, 2); /* CRC match */ @@ -511,7 +511,7 @@ void Test_CF_CFDP_R2_Complete(void) UtAssert_VOIDCALL(CF_CFDP_R2_Complete(t, 1)); UtAssert_BOOL_TRUE(t->flags.rx.send_fin); UtAssert_BOOL_TRUE(t->flags.rx.complete); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_NAK_LIMIT); + UT_CF_AssertEventID(CF_CFDP_R_NAK_LIMIT_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.nak_limit, 1); /* test with md_recv - with no more setup this only sets filedata state */ @@ -578,7 +578,7 @@ void Test_CF_CFDP_R_ProcessFd(void) UT_SetDefaultReturnValue(UT_KEY(CF_WrappedWrite), -1); UtAssert_INT32_EQ(CF_CFDP_R_ProcessFd(t, ph), -1); UtAssert_UINT32_EQ(t->state_data.r.cached_pos, 300); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_WRITE); + UT_CF_AssertEventID(CF_CFDP_R_WRITE_ERR_EID); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILESTORE_REJECTION); /* call again, but with a failed lseek */ @@ -590,7 +590,7 @@ void Test_CF_CFDP_R_ProcessFd(void) UT_SetDefaultReturnValue(UT_KEY(CF_WrappedLseek), -1); UtAssert_INT32_EQ(CF_CFDP_R_ProcessFd(t, ph), -1); UtAssert_UINT32_EQ(t->state_data.r.cached_pos, 300); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_SEEK_FD); + UT_CF_AssertEventID(CF_CFDP_R_SEEK_FD_ERR_EID); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILE_SIZE_ERROR); /* these stats should have been updated during the course of this test */ @@ -626,13 +626,13 @@ void Test_CF_CFDP_R_SubstateRecvEof(void) eof->size = 100; t->fsize = 300; UtAssert_INT32_EQ(CF_CFDP_R_SubstateRecvEof(t, ph), CF_REC_PDU_FSIZE_MISMATCH_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_SIZE_MISMATCH); + UT_CF_AssertEventID(CF_CFDP_R_SIZE_MISMATCH_ERR_EID); /* with failure of CF_CFDP_RecvEof() */ UT_CFDP_R_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); UT_SetDefaultReturnValue(UT_KEY(CF_CFDP_RecvEof), -1); UtAssert_INT32_EQ(CF_CFDP_R_SubstateRecvEof(t, ph), CF_REC_PDU_BAD_EOF_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_PDU_EOF); + UT_CF_AssertEventID(CF_CFDP_R_PDU_EOF_ERR_EID); /* these counters should have been updated during the test */ UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[UT_CFDP_CHANNEL].counters.fault.file_size_mismatch, 1); @@ -853,14 +853,14 @@ void Test_CF_CFDP_R_SubstateSendNak(void) /* with md_recv flag false, this should request one by sending a blank NAK */ UT_CFDP_R_SetupBasicTestState(UT_CF_Setup_TX, &ph, NULL, NULL, &t, NULL); UtAssert_INT32_EQ(CF_CFDP_R_SubstateSendNak(t), 0); - UT_CF_AssertEventID(CF_EID_INF_CFDP_R_REQUEST_MD); + UT_CF_AssertEventID(CF_CFDP_R_REQUEST_MD_INF_EID); UtAssert_STUB_COUNT(CF_CFDP_SendNak, 1); /* same, but with failure of CF_CFDP_SendNak */ UT_CFDP_R_SetupBasicTestState(UT_CF_Setup_TX, &ph, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(CF_CFDP_SendNak), 1, CF_SEND_PDU_NO_BUF_AVAIL_ERROR); UtAssert_INT32_EQ(CF_CFDP_R_SubstateSendNak(t), -1); - UT_CF_AssertEventID(CF_EID_INF_CFDP_R_REQUEST_MD); + UT_CF_AssertEventID(CF_CFDP_R_REQUEST_MD_INF_EID); UtAssert_STUB_COUNT(CF_CFDP_SendNak, 2); /* with md_recv flag true, this should call gap compute to assemble the NAK */ @@ -962,7 +962,7 @@ void Test_CF_CFDP_R2_CalcCrcChunk(void) t->fsize = 50; UT_SetDeferredRetcode(UT_KEY(CF_WrappedRead), 1, -1); UtAssert_INT32_EQ(CF_CFDP_R2_CalcCrcChunk(t), -1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_READ); + UT_CF_AssertEventID(CF_CFDP_R_READ_ERR_EID); UtAssert_BOOL_FALSE(t->flags.com.crc_calc); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILE_SIZE_ERROR); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_read, 1); @@ -975,7 +975,7 @@ void Test_CF_CFDP_R2_CalcCrcChunk(void) t->fsize = 50; UT_SetDeferredRetcode(UT_KEY(CF_WrappedLseek), 1, -1); UtAssert_INT32_EQ(CF_CFDP_R2_CalcCrcChunk(t), -1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_SEEK_CRC); + UT_CF_AssertEventID(CF_CFDP_R_SEEK_CRC_ERR_EID); UtAssert_BOOL_FALSE(t->flags.com.crc_calc); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILE_SIZE_ERROR); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_seek, 1); @@ -1030,7 +1030,7 @@ void Test_CF_CFDP_R2_Recv_fin_ack(void) UT_CFDP_R_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(CF_CFDP_RecvAck), 1, -1); UtAssert_VOIDCALL(CF_CFDP_R2_Recv_fin_ack(t, ph)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_PDU_FINACK); + UT_CF_AssertEventID(CF_CFDP_R_PDU_FINACK_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error, 1); } @@ -1069,28 +1069,28 @@ void Test_CF_CFDP_R2_RecvMd(void) t->state_data.r.r2.eof_size = 120; t->flags.rx.eof_recv = true; UtAssert_VOIDCALL(CF_CFDP_R2_RecvMd(t, ph)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_EOF_MD_SIZE); + UT_CF_AssertEventID(CF_CFDP_R_EOF_MD_SIZE_ERR_EID); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILE_SIZE_ERROR); /* OS_mv failure */ UT_CFDP_R_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(OS_mv), 1, CF_ERROR); UtAssert_VOIDCALL(CF_CFDP_R2_RecvMd(t, ph)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_RENAME); + UT_CF_AssertEventID(CF_CFDP_R_RENAME_ERR_EID); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILESTORE_REJECTION); /* reopen failure */ UT_CFDP_R_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(CF_WrappedOpenCreate), 1, CF_ERROR); UtAssert_VOIDCALL(CF_CFDP_R2_RecvMd(t, ph)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_OPEN); + UT_CF_AssertEventID(CF_CFDP_R_OPEN_ERR_EID); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILESTORE_REJECTION); /* CF_CFDP_RecvMd failure */ UT_CFDP_R_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(CF_CFDP_RecvMd), 1, CF_PDU_METADATA_ERROR); UtAssert_VOIDCALL(CF_CFDP_R2_RecvMd(t, ph)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_PDU_MD); + UT_CF_AssertEventID(CF_CFDP_R_PDU_MD_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error, 1); } @@ -1105,7 +1105,7 @@ void Test_CF_CFDP_R_SendInactivityEvent(void) UT_CFDP_R_SetupBasicTestState(UT_CF_Setup_RX, NULL, NULL, NULL, &t, NULL); UtAssert_VOIDCALL(CF_CFDP_R_SendInactivityEvent(t)); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.inactivity_timer, 1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_R_INACT_TIMER); + UT_CF_AssertEventID(CF_CFDP_R_INACT_TIMER_ERR_EID); } /******************************************************************************* diff --git a/unit-test/cf_cfdp_s_tests.c b/unit-test/cf_cfdp_s_tests.c index c2e2c5a4..ffc85735 100644 --- a/unit-test/cf_cfdp_s_tests.c +++ b/unit-test/cf_cfdp_s_tests.c @@ -245,7 +245,7 @@ void Test_CF_CFDP_S_Tick(void) t->state = CF_TxnState_S2; UtAssert_VOIDCALL(CF_CFDP_S_Tick(t, &cont)); UtAssert_STUB_COUNT(CF_Timer_Tick, 1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_INACT_TIMER); + UT_CF_AssertEventID(CF_CFDP_S_INACT_TIMER_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.inactivity_timer, 1); UtAssert_STUB_COUNT(CF_CFDP_ResetTransaction, 1); @@ -283,7 +283,7 @@ void Test_CF_CFDP_S_Tick(void) t->state_data.s.sub_state = CF_TxSubState_WAIT_FOR_EOF_ACK; t->state_data.s.s2.acknak_count = 9; UtAssert_VOIDCALL(CF_CFDP_S_Tick(t, &cont)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_ACK_LIMIT); + UT_CF_AssertEventID(CF_CFDP_S_ACK_LIMIT_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.ack_limit, 1); UtAssert_STUB_COUNT(CF_CFDP_ResetTransaction, 2); @@ -479,7 +479,7 @@ void Test_CF_CFDP_S_SendFileData(void) config->outgoing_file_chunk_size = read_size; t->fsize = 300; UtAssert_INT32_EQ(CF_CFDP_S_SendFileData(t, offset, read_size, true), -1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_SEND_FD); + UT_CF_AssertEventID(CF_CFDP_S_SEND_FD_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.sent.file_data_bytes, cumulative_read); /* read w/failure */ @@ -490,7 +490,7 @@ void Test_CF_CFDP_S_SendFileData(void) UtAssert_INT32_EQ(CF_CFDP_S_SendFileData(t, offset, read_size, true), -1); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.sent.file_data_bytes, cumulative_read); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_read, 1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_READ); + UT_CF_AssertEventID(CF_CFDP_S_READ_ERR_EID); /* require lseek */ offset = 25; @@ -511,7 +511,7 @@ void Test_CF_CFDP_S_SendFileData(void) UtAssert_INT32_EQ(CF_CFDP_S_SendFileData(t, offset, read_size, true), -1); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.sent.file_data_bytes, cumulative_read); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_seek, 1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_SEEK_FD); + UT_CF_AssertEventID(CF_CFDP_S_SEEK_FD_ERR_EID); } void Test_CF_CFDP_S_SubstateSendFileData(void) @@ -658,7 +658,7 @@ void Test_CF_CFDP_S_SubstateSendMetadata(void) /* with no setup, OS_FileOpenCheck returns SUCCESS (true) */ UT_CFDP_S_SetupBasicTestState(UT_CF_Setup_TX, NULL, NULL, NULL, &t, NULL); UtAssert_VOIDCALL(CF_CFDP_S_SubstateSendMetadata(t)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_ALREADY_OPEN); + UT_CF_AssertEventID(CF_CFDP_S_ALREADY_OPEN_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_open, 1); /* file already open */ @@ -675,7 +675,7 @@ void Test_CF_CFDP_S_SubstateSendMetadata(void) UT_CFDP_S_SetupBasicTestState(UT_CF_Setup_TX, NULL, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(CF_WrappedOpenCreate), 1, -1); UtAssert_VOIDCALL(CF_CFDP_S_SubstateSendMetadata(t)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_OPEN); + UT_CF_AssertEventID(CF_CFDP_S_OPEN_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_open, 2); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILESTORE_REJECTION); @@ -683,7 +683,7 @@ void Test_CF_CFDP_S_SubstateSendMetadata(void) UT_CFDP_S_SetupBasicTestState(UT_CF_Setup_TX, NULL, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(CF_WrappedLseek), 1, -1); UtAssert_VOIDCALL(CF_CFDP_S_SubstateSendMetadata(t)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_SEEK_END); + UT_CF_AssertEventID(CF_CFDP_S_SEEK_END_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_seek, 1); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILESTORE_REJECTION); @@ -691,7 +691,7 @@ void Test_CF_CFDP_S_SubstateSendMetadata(void) UT_CFDP_S_SetupBasicTestState(UT_CF_Setup_TX, NULL, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(CF_WrappedLseek), 2, -1); UtAssert_VOIDCALL(CF_CFDP_S_SubstateSendMetadata(t)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_SEEK_BEG); + UT_CF_AssertEventID(CF_CFDP_S_SEEK_BEG_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.fault.file_seek, 2); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILESTORE_REJECTION); @@ -699,7 +699,7 @@ void Test_CF_CFDP_S_SubstateSendMetadata(void) UT_CFDP_S_SetupBasicTestState(UT_CF_Setup_TX, NULL, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(CF_CFDP_SendMd), 1, CF_SEND_PDU_ERROR); UtAssert_VOIDCALL(CF_CFDP_S_SubstateSendMetadata(t)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_SEND_MD); + UT_CF_AssertEventID(CF_CFDP_S_SEND_MD_ERR_EID); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_FILESTORE_REJECTION); /* CF_CFDP_SendMd fails w/ NO_MSG (no event here) */ @@ -772,7 +772,7 @@ void Test_CF_CFDP_S2_Nak(void) /* no segments */ UT_CFDP_S_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); UtAssert_VOIDCALL(CF_CFDP_S2_Nak(t, ph)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_PDU_NAK); + UT_CF_AssertEventID(CF_CFDP_S_PDU_NAK_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error, 1); /* nominal, re-send md request (0,0) */ @@ -804,7 +804,7 @@ void Test_CF_CFDP_S2_Nak(void) t->fsize = 300; UtAssert_VOIDCALL(CF_CFDP_S2_Nak(t, ph)); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.recv.nak_segment_requests, 6); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_INVALID_SR); + UT_CF_AssertEventID(CF_CFDP_S_INVALID_SR_ERR_EID); /* bad decode */ UT_CFDP_S_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); @@ -813,7 +813,7 @@ void Test_CF_CFDP_S2_Nak(void) nak->segment_list.num_segments = 1; UtAssert_VOIDCALL(CF_CFDP_S2_Nak(t, ph)); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error, 2); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_PDU_NAK); + UT_CF_AssertEventID(CF_CFDP_S_PDU_NAK_ERR_EID); } void Test_CF_CFDP_S2_Nak_Arm(void) @@ -847,7 +847,7 @@ void Test_CF_CFDP_S2_WaitForEofAck(void) UT_CFDP_S_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); UT_SetDeferredRetcode(UT_KEY(CF_CFDP_RecvAck), 1, -1); UtAssert_VOIDCALL(CF_CFDP_S2_WaitForEofAck(t, ph)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_S_PDU_EOF); + UT_CF_AssertEventID(CF_CFDP_S_PDU_EOF_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[t->chan_num].counters.recv.error, 1); /* with error status */ diff --git a/unit-test/cf_cfdp_sbintf_tests.c b/unit-test/cf_cfdp_sbintf_tests.c index addad99e..7347ff47 100644 --- a/unit-test/cf_cfdp_sbintf_tests.c +++ b/unit-test/cf_cfdp_sbintf_tests.c @@ -315,7 +315,7 @@ void Test_CF_CFDP_ReceiveMessage(void) config->local_eid = 123; ph->pdu_header.destination_eid = ~config->local_eid; UtAssert_VOIDCALL(CF_CFDP_ReceiveMessage(c)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_INVALID_DST_EID); + UT_CF_AssertEventID(CF_CFDP_INVALID_DST_ERR_EID); /* recv correct destination_eid but CF_MAX_SIMULTANEOUS_RX hit */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, &c, NULL, &t, &config); @@ -323,7 +323,7 @@ void Test_CF_CFDP_ReceiveMessage(void) config->local_eid = 123; ph->pdu_header.destination_eid = config->local_eid; UtAssert_VOIDCALL(CF_CFDP_ReceiveMessage(c)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_RX_DROPPED); + UT_CF_AssertEventID(CF_CFDP_RX_DROPPED_ERR_EID); } void Test_CF_CFDP_Send(void) @@ -374,7 +374,7 @@ void Test_CF_CFDP_MsgOutGet(void) UtAssert_NOT_NULL(CF_CFDP_MsgOutGet(t, false)); UT_SetDefaultReturnValue(UT_KEY(OS_CountSemTimedWait), OS_ERROR_TIMEOUT); UtAssert_NULL(CF_CFDP_MsgOutGet(t, false)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_NO_MSG); + UT_CF_AssertEventID(CF_CFDP_NO_MSG_ERR_EID); /* transaction is suspended */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_TX, NULL, NULL, NULL, &t, NULL); @@ -392,7 +392,7 @@ void Test_CF_CFDP_MsgOutGet(void) /* no msg available from SB */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_NONE, NULL, NULL, NULL, &t, NULL); UtAssert_NULL(CF_CFDP_MsgOutGet(t, false)); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_NO_MSG); + UT_CF_AssertEventID(CF_CFDP_NO_MSG_ERR_EID); /* same, but the silent flag should supress the event */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_NONE, NULL, NULL, NULL, &t, NULL); diff --git a/unit-test/cf_cfdp_tests.c b/unit-test/cf_cfdp_tests.c index d380706f..c5cc2473 100644 --- a/unit-test/cf_cfdp_tests.c +++ b/unit-test/cf_cfdp_tests.c @@ -270,19 +270,19 @@ void Test_CF_CFDP_RecvPh(void) UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, NULL, NULL); CF_CODEC_SET_DONE(ph->pdec); UtAssert_INT32_EQ(CF_CFDP_RecvPh(UT_CFDP_CHANNEL, ph), CF_SHORT_PDU_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_SHORT_HEADER); + UT_CF_AssertEventID(CF_PDU_SHORT_HEADER_ERR_EID); /* decode error, large file bit set */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, NULL, NULL); ph->pdu_header.large_flag = true; UtAssert_INT32_EQ(CF_CFDP_RecvPh(UT_CFDP_CHANNEL, ph), CF_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_LARGE_FILE); + UT_CF_AssertEventID(CF_PDU_LARGE_FILE_ERR_EID); /* decode error, insufficient storage for EID or seq num */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, NULL, NULL); UT_SetDeferredRetcode(UT_KEY(CF_CFDP_DecodeHeader), 1, CF_ERROR); UtAssert_INT32_EQ(CF_CFDP_RecvPh(UT_CFDP_CHANNEL, ph), CF_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_TRUNCATION); + UT_CF_AssertEventID(CF_PDU_TRUNCATION_ERR_EID); } void Test_CF_CFDP_RecvMd(void) @@ -316,21 +316,21 @@ void Test_CF_CFDP_RecvMd(void) UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); CF_CODEC_SET_DONE(ph->pdec); UtAssert_INT32_EQ(CF_CFDP_RecvMd(t, ph), CF_PDU_METADATA_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_MD_SHORT); + UT_CF_AssertEventID(CF_PDU_MD_SHORT_ERR_EID); /* decode errors: LV dest filename too long */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); md = &ph->int_header.md; md->dest_filename.length = CF_FILENAME_MAX_LEN + 1; UtAssert_INT32_EQ(CF_CFDP_RecvMd(t, ph), CF_PDU_METADATA_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_INVALID_DST_LEN); + UT_CF_AssertEventID(CF_PDU_INVALID_DST_LEN_ERR_EID); /* decode errors: LV source filename too long */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); md = &ph->int_header.md; md->source_filename.length = CF_FILENAME_MAX_LEN + 1; UtAssert_INT32_EQ(CF_CFDP_RecvMd(t, ph), CF_PDU_METADATA_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_INVALID_SRC_LEN); + UT_CF_AssertEventID(CF_PDU_INVALID_SRC_LEN_ERR_EID); } void Test_CF_CFDP_RecvFd(void) @@ -357,7 +357,7 @@ void Test_CF_CFDP_RecvFd(void) CF_CODEC_SET_DONE(ph->pdec); UtAssert_INT32_EQ(CF_CFDP_RecvFd(t, ph), CF_SHORT_PDU_ERROR); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_PROTOCOL_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_FD_SHORT); + UT_CF_AssertEventID(CF_PDU_FD_SHORT_ERR_EID); /* decode errors: CRC part */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); @@ -371,7 +371,7 @@ void Test_CF_CFDP_RecvFd(void) ph->pdu_header.segment_meta_flag = 1; UtAssert_INT32_EQ(CF_CFDP_RecvFd(t, ph), CF_ERROR); UtAssert_INT32_EQ(t->history->txn_stat, CF_TxnStatus_PROTOCOL_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_FD_UNSUPPORTED); + UT_CF_AssertEventID(CF_PDU_FD_UNSUPPORTED_ERR_EID); } void Test_CF_CFDP_RecvEof(void) @@ -391,7 +391,7 @@ void Test_CF_CFDP_RecvEof(void) UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); CF_CODEC_SET_DONE(ph->pdec); UtAssert_INT32_EQ(CF_CFDP_RecvEof(t, ph), CF_SHORT_PDU_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_EOF_SHORT); + UT_CF_AssertEventID(CF_PDU_EOF_SHORT_ERR_EID); } void Test_CF_CFDP_RecvAck(void) @@ -410,7 +410,7 @@ void Test_CF_CFDP_RecvAck(void) UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); CF_CODEC_SET_DONE(ph->pdec); UtAssert_INT32_EQ(CF_CFDP_RecvAck(t, ph), CF_SHORT_PDU_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_ACK_SHORT); + UT_CF_AssertEventID(CF_PDU_ACK_SHORT_ERR_EID); } void Test_CF_CFDP_RecvFin(void) @@ -430,7 +430,7 @@ void Test_CF_CFDP_RecvFin(void) UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); CF_CODEC_SET_DONE(ph->pdec); UtAssert_INT32_EQ(CF_CFDP_RecvFin(t, ph), CF_SHORT_PDU_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_FIN_SHORT); + UT_CF_AssertEventID(CF_PDU_FIN_SHORT_ERR_EID); } void Test_CF_CFDP_RecvNak(void) @@ -450,7 +450,7 @@ void Test_CF_CFDP_RecvNak(void) UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, NULL, &t, NULL); CF_CODEC_SET_DONE(ph->pdec); UtAssert_INT32_EQ(CF_CFDP_RecvNak(t, ph), CF_SHORT_PDU_ERROR); - UT_CF_AssertEventID(CF_EID_ERR_PDU_NAK_SHORT); + UT_CF_AssertEventID(CF_PDU_NAK_SHORT_ERR_EID); } void Test_CF_CFDP_RecvDrop(void) @@ -517,13 +517,13 @@ void Test_CF_CFDP_RecvIdle(void) CF_CODEC_SET_DONE(ph->pdec); UtAssert_VOIDCALL(CF_CFDP_RecvIdle(t, ph)); UtAssert_INT32_EQ(t->state, CF_TxnState_IDLE); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_IDLE_MD); + UT_CF_AssertEventID(CF_CFDP_IDLE_MD_ERR_EID); UT_CFDP_SetupBasicTestState(UT_CF_Setup_RX, &ph, NULL, &h, &t, NULL); ph->fdirective.directive_code = CF_CFDP_FileDirective_INVALID_MIN; UtAssert_VOIDCALL(CF_CFDP_RecvIdle(t, ph)); UtAssert_INT32_EQ(t->state, CF_TxnState_IDLE); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_FD_UNHANDLED); + UT_CF_AssertEventID(CF_CFDP_FD_UNHANDLED_ERR_EID); } void Test_CF_CFDP_CopyStringFromLV(void) @@ -869,7 +869,7 @@ void Test_CF_CFDP_InitEngine(void) UT_SetDefaultReturnValue(UT_KEY(OS_CountSemGetIdByName), OS_ERROR); UtAssert_INT32_EQ(CF_CFDP_InitEngine(), OS_ERROR); UtAssert_BOOL_FALSE(CF_AppData.engine.enabled); - UT_CF_AssertEventID(CF_EID_ERR_INIT_SEM); + UT_CF_AssertEventID(CF_INIT_SEM_ERR_EID); /* Max retries of OS_CountSemGetIdByName - sem was never created at all */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_NONE, NULL, NULL, NULL, NULL, &config); @@ -877,7 +877,7 @@ void Test_CF_CFDP_InitEngine(void) UT_SetDefaultReturnValue(UT_KEY(OS_CountSemGetIdByName), OS_ERR_NAME_NOT_FOUND); UtAssert_INT32_EQ(CF_CFDP_InitEngine(), OS_ERR_NAME_NOT_FOUND); UtAssert_BOOL_FALSE(CF_AppData.engine.enabled); - UT_CF_AssertEventID(CF_EID_ERR_INIT_SEM); + UT_CF_AssertEventID(CF_INIT_SEM_ERR_EID); /* Retry of OS_CountSemGetIdByName, when sem was created late, and thus * got return OS_ERR_NAME_NOT_FOUND followed by OS_SUCCESS */ @@ -928,7 +928,7 @@ void Test_CF_CFDP_TxFile(void) UtAssert_STRINGBUF_EQ(dest, -1, h->fnames.dst_filename, sizeof(h->fnames.dst_filename)); UtAssert_STRINGBUF_EQ(src, -1, h->fnames.src_filename, sizeof(h->fnames.src_filename)); UtAssert_UINT32_EQ(c->num_cmd_tx, 1); - UT_CF_AssertEventID(CF_EID_INF_CFDP_S_START_SEND); + UT_CF_AssertEventID(CF_CFDP_S_START_SEND_INF_EID); /* same but for class 2 (for branch coverage) */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_TX, NULL, &c, &h, &t, NULL); @@ -939,13 +939,13 @@ void Test_CF_CFDP_TxFile(void) UtAssert_STRINGBUF_EQ(dest, -1, h->fnames.dst_filename, sizeof(h->fnames.dst_filename)); UtAssert_STRINGBUF_EQ(src, -1, h->fnames.src_filename, sizeof(h->fnames.src_filename)); UtAssert_UINT32_EQ(c->num_cmd_tx, 2); - UT_CF_AssertEventID(CF_EID_INF_CFDP_S_START_SEND); + UT_CF_AssertEventID(CF_CFDP_S_START_SEND_INF_EID); /* max TX */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_TX, NULL, &c, &h, &t, NULL); c->num_cmd_tx = CF_MAX_COMMANDED_PLAYBACK_FILES_PER_CHAN; UtAssert_INT32_EQ(CF_CFDP_TxFile(src, dest, CF_CFDP_CLASS_1, 1, UT_CFDP_CHANNEL, 0, 1), -1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_MAX_CMD_TX); + UT_CF_AssertEventID(CF_CFDP_MAX_CMD_TX_ERR_EID); } void Test_CF_CFDP_PlaybackDir(void) @@ -975,7 +975,7 @@ void Test_CF_CFDP_PlaybackDir(void) memset(pb, 0, sizeof(*pb)); UT_SetDeferredRetcode(UT_KEY(OS_DirectoryOpen), 1, OS_ERROR); UtAssert_INT32_EQ(CF_CFDP_PlaybackDir(src, dest, CF_CFDP_CLASS_1, 1, UT_CFDP_CHANNEL, 0, 1), -1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_OPENDIR); + UT_CF_AssertEventID(CF_CFDP_OPENDIR_ERR_EID); /* no non-busy entries */ UT_CFDP_SetupBasicTestState(UT_CF_Setup_NONE, NULL, &c, NULL, NULL, NULL); @@ -985,7 +985,7 @@ void Test_CF_CFDP_PlaybackDir(void) pb->busy = 1; } UtAssert_INT32_EQ(CF_CFDP_PlaybackDir(src, dest, CF_CFDP_CLASS_1, 1, UT_CFDP_CHANNEL, 0, 1), -1); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_DIR_SLOT); + UT_CF_AssertEventID(CF_CFDP_DIR_SLOT_ERR_EID); } static int32 Ut_Hook_CycleTx_SetRanOne(void *UserObj, int32 StubRetcode, uint32 CallCount, @@ -1173,7 +1173,7 @@ void Test_CF_CFDP_ProcessPollingDirectories(void) UT_SetDeferredRetcode(UT_KEY(OS_DirectoryOpen), 1, OS_ERROR); UtAssert_VOIDCALL(CF_CFDP_ProcessPollingDirectories(c)); UtAssert_BOOL_TRUE(poll->timer_set); - UT_CF_AssertEventID(CF_EID_ERR_CFDP_OPENDIR); + UT_CF_AssertEventID(CF_CFDP_OPENDIR_ERR_EID); /* Test case where the impl calls through to CF_CFDP_ProcessPlaybackDirectory() * @@ -1262,7 +1262,7 @@ void Test_CF_CFDP_ProcessPlaybackDirectory(void) UtAssert_BOOL_FALSE(pb.diropen); UtAssert_STRINGBUF_EQ(h->fnames.src_filename, sizeof(h->fnames.src_filename), "/ut", -1); UtAssert_STRINGBUF_EQ(h->fnames.dst_filename, sizeof(h->fnames.dst_filename), "/ut", -1); - UT_CF_AssertEventID(CF_EID_INF_CFDP_S_START_SEND); + UT_CF_AssertEventID(CF_CFDP_S_START_SEND_INF_EID); } static int32 Ut_Hook_TickTransactions_SetEarlyExit(void *UserObj, int32 StubRetcode, uint32 CallCount, diff --git a/unit-test/cf_cmd_tests.c b/unit-test/cf_cmd_tests.c index f82d5953..10fad395 100644 --- a/unit-test/cf_cmd_tests.c +++ b/unit-test/cf_cmd_tests.c @@ -214,7 +214,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIsEqTo_5_SendEventAndRejectCommand(vo /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_RESET_INVALID); + UT_CF_AssertEventID(CF_CMD_RESET_INVALID_ERR_EID); /* Assert incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } @@ -238,7 +238,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIsGreaterThan_5_SendEventAndRejectCom /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_RESET_INVALID); + UT_CF_AssertEventID(CF_CMD_RESET_INVALID_ERR_EID); /* Assert incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } @@ -516,7 +516,7 @@ void Test_CF_CmdTxFile(void) UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_TX_FILE); + UT_CF_AssertEventID(CF_CMD_TX_FILE_INF_EID); UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); @@ -524,21 +524,21 @@ void Test_CF_CmdTxFile(void) UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 2); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_TX_FILE); + UT_CF_AssertEventID(CF_CMD_TX_FILE_INF_EID); /* out of range arguments: bad class */ UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->cfdp_class = 10; UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); + UT_CF_AssertEventID(CF_CMD_BAD_PARAM_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->cfdp_class = -10; UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); + UT_CF_AssertEventID(CF_CMD_BAD_PARAM_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 2); /* out of range arguments: bad channel */ @@ -546,7 +546,7 @@ void Test_CF_CmdTxFile(void) memset(msg, 0, sizeof(*msg)); msg->chan_num = CF_NUM_CHANNELS; UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); + UT_CF_AssertEventID(CF_CMD_BAD_PARAM_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 3); /* out of range arguments: bad keep */ @@ -554,7 +554,7 @@ void Test_CF_CmdTxFile(void) memset(msg, 0, sizeof(*msg)); msg->keep = 15; UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); + UT_CF_AssertEventID(CF_CMD_BAD_PARAM_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 4); /* CF_CFDP_TxFile fails*/ @@ -562,7 +562,7 @@ void Test_CF_CmdTxFile(void) UT_SetDefaultReturnValue(UT_KEY(CF_CFDP_TxFile), -1); memset(msg, 0, sizeof(*msg)); UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_TX_FILE); + UT_CF_AssertEventID(CF_CMD_TX_FILE_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 5); } @@ -597,14 +597,14 @@ void Test_CF_CmdPlaybackDir(void) memset(msg, 0, sizeof(*msg)); msg->cfdp_class = 10; UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); + UT_CF_AssertEventID(CF_CMD_BAD_PARAM_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->cfdp_class = -10; UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); + UT_CF_AssertEventID(CF_CMD_BAD_PARAM_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 2); /* out of range arguments: bad channel */ @@ -612,7 +612,7 @@ void Test_CF_CmdPlaybackDir(void) memset(msg, 0, sizeof(*msg)); msg->chan_num = CF_NUM_CHANNELS; UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); + UT_CF_AssertEventID(CF_CMD_BAD_PARAM_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 3); /* out of range arguments: bad keep */ @@ -620,7 +620,7 @@ void Test_CF_CmdPlaybackDir(void) memset(msg, 0, sizeof(*msg)); msg->keep = 15; UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); + UT_CF_AssertEventID(CF_CMD_BAD_PARAM_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 4); /* CF_CFDP_PlaybackDir fails*/ @@ -628,7 +628,7 @@ void Test_CF_CmdPlaybackDir(void) UT_SetDefaultReturnValue(UT_KEY(CF_CFDP_PlaybackDir), -1); memset(msg, 0, sizeof(*msg)); UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_PLAYBACK_DIR); + UT_CF_AssertEventID(CF_CMD_PLAYBACK_DIR_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 5); } @@ -808,7 +808,7 @@ void Test_CF_DoChanAction_WhenChanNumberEq_CF_NUM_CHANNELS_Return_neg1_And_SendE /* Assert */ UtAssert_STUB_COUNT(Chan_action_fn_t, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_CHAN_PARAM); + UT_CF_AssertEventID(CF_CMD_CHAN_PARAM_ERR_EID); UtAssert_True(local_result == -1, "CF_DoChanAction returned %d and should be -1 (cmd->byte[0] >= CF_NUM_CHANNELS)", local_result); @@ -851,7 +851,7 @@ void Test_CF_DoChanAction_WhenBadChannelNumber_Return_neg1_And_SendEvent(void) /* Assert */ UtAssert_STUB_COUNT(Chan_action_fn_t, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_CHAN_PARAM); + UT_CF_AssertEventID(CF_CMD_CHAN_PARAM_ERR_EID); UtAssert_True(local_result == -1, "CF_DoChanAction returned %d and should be -1 (cmd->byte[0] >= CF_NUM_CHANNELS)", local_result); @@ -925,7 +925,7 @@ void Test_CF_CmdFreeze_Set_frozen_To_1_AndAcceptCommand(void) "CF_AppData.hk.counters.cmd is %d and should be 1 more than %d", CF_AppData.hk.counters.cmd, initial_hk_cmd_counter); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_FREEZE); + UT_CF_AssertEventID(CF_CMD_FREEZE_INF_EID); } void Test_CF_CmdFreeze_Set_frozen_To_1_AndRejectCommand(void) @@ -949,7 +949,7 @@ void Test_CF_CmdFreeze_Set_frozen_To_1_AndRejectCommand(void) /* Assert */ /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_FREEZE); + UT_CF_AssertEventID(CF_CMD_FREEZE_ERR_EID); } /******************************************************************************* @@ -988,7 +988,7 @@ void Test_CF_CmdThaw_Set_frozen_To_0_AndAcceptCommand(void) "CF_AppData.hk.counters.cmd is %d and should be 1 more than %d", CF_AppData.hk.counters.cmd, initial_hk_cmd_counter); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_THAW); + UT_CF_AssertEventID(CF_CMD_THAW_INF_EID); } void Test_CF_CmdThaw_Set_frozen_To_0_AndRejectCommand(void) @@ -1012,7 +1012,7 @@ void Test_CF_CmdThaw_Set_frozen_To_0_AndRejectCommand(void) /* Assert */ /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_THAW); + UT_CF_AssertEventID(CF_CMD_THAW_ERR_EID); } /******************************************************************************* @@ -1135,7 +1135,7 @@ void Test_CF_TsnChanAction_SendEvent_cmd_chan_Eq_CF_COMPOUND_KEY_TransactionNotF /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_TRANS_NOT_FOUND); + UT_CF_AssertEventID(CF_CMD_TRANS_NOT_FOUND_ERR_EID); UtAssert_STUB_COUNT(Dummy_CF_TsnChanAction_fn_t, 0); } @@ -1250,7 +1250,7 @@ void Test_CF_TsnChanAction_cmd_FailBecause_cmd_chan_IsInvalid(void) /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_TSN_CHAN_INVALID); + UT_CF_AssertEventID(CF_CMD_TSN_CHAN_INVALID_ERR_EID); } /******************************************************************************* @@ -1351,7 +1351,7 @@ void Test_CF_DoSuspRes(void) UT_SetDeferredRetcode(UT_KEY(CF_TraverseAllTransactions), 1, 1); UtAssert_VOIDCALL(CF_DoSuspRes(cmd, 1)); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_SUSPRES); + UT_CF_AssertEventID(CF_CMD_SUSPRES_INF_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 1); /* Output the CF_ChanAction_SuspResArg_t back to the caller, to set the "same" flag to 1 */ @@ -1362,7 +1362,7 @@ void Test_CF_DoSuspRes(void) UT_SetHandlerFunction(UT_KEY(CF_TraverseAllTransactions), UT_AltHandler_CF_TraverseAllTransactions_SetSuspResArg, &utargs); UtAssert_VOIDCALL(CF_DoSuspRes(cmd, 0)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_SUSPRES_SAME); + UT_CF_AssertEventID(CF_CMD_SUSPRES_SAME_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 2); /* Output the CF_ChanAction_SuspResArg_t back to the caller, to set the "same" flag to 1 */ @@ -1372,7 +1372,7 @@ void Test_CF_DoSuspRes(void) UT_SetDeferredRetcode(UT_KEY(CF_TraverseAllTransactions), 1, 10); UtAssert_VOIDCALL(CF_DoSuspRes(cmd, 1)); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_SUSPRES); + UT_CF_AssertEventID(CF_CMD_SUSPRES_INF_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 2); } @@ -1398,8 +1398,8 @@ void Test_CF_CmdSuspend_Call_CF_DoSuspRes_WithGiven_msg_And_action_1(void) /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_EID_ERR_CMD_TSN_CHAN_INVALID); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_EID_ERR_CMD_SUSPRES_CHAN); + UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_CMD_TSN_CHAN_INVALID_ERR_EID); + UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_CMD_SUSPRES_CHAN_ERR_EID); /* Assert incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); @@ -1427,8 +1427,8 @@ void Test_CF_CmdResume_Call_CF_DoSuspRes_WithGiven_msg_And_action_0(void) /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_EID_ERR_CMD_TSN_CHAN_INVALID); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_EID_ERR_CMD_SUSPRES_CHAN); + UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_CMD_TSN_CHAN_INVALID_ERR_EID); + UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_CMD_SUSPRES_CHAN_ERR_EID); /* Assert incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); @@ -1481,7 +1481,7 @@ void Test_CF_CmdCancel_Success(void) UtAssert_STUB_COUNT(CF_TraverseAllTransactions, 1); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_CANCEL); + UT_CF_AssertEventID(CF_CMD_CANCEL_INF_EID); } void Test_CF_CmdCancel_Failure(void) @@ -1500,7 +1500,7 @@ void Test_CF_CmdCancel_Failure(void) /* Assert */ UtAssert_STUB_COUNT(CF_TraverseAllTransactions, 1); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_CANCEL_CHAN); + UT_CF_AssertEventID(CF_CMD_CANCEL_CHAN_ERR_EID); } /******************************************************************************* @@ -1553,7 +1553,7 @@ void Test_CF_CmdAbandon_Success(void) UtAssert_STUB_COUNT(CF_TraverseAllTransactions, 1); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_ABANDON); + UT_CF_AssertEventID(CF_CMD_ABANDON_INF_EID); } void Test_CF_CmdAbandon_Failure(void) @@ -1572,7 +1572,7 @@ void Test_CF_CmdAbandon_Failure(void) /* Assert */ UtAssert_STUB_COUNT(CF_TraverseAllTransactions, 1); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_ABANDON_CHAN); + UT_CF_AssertEventID(CF_CMD_ABANDON_CHAN_ERR_EID); } /******************************************************************************* @@ -1645,7 +1645,7 @@ void Test_CF_CmdEnableDequeue_Success(void) "THE BEHAVIOR BUT IT IS NOT", CF_AppData.hk.counters.cmd, initial_hk_cmd_counter); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_ENABLE_DEQUEUE); + UT_CF_AssertEventID(CF_CMD_ENABLE_DEQUEUE_INF_EID); } void Test_CF_CmdEnableDequeue_Failure(void) @@ -1674,7 +1674,7 @@ void Test_CF_CmdEnableDequeue_Failure(void) /* Assert */ /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_ENABLE_DEQUEUE); + UT_CF_AssertEventID(CF_CMD_ENABLE_DEQUEUE_ERR_EID); } /******************************************************************************* @@ -1718,7 +1718,7 @@ void Test_CF_CmdDisableDequeue_Success(void) "CF_AppData.hk.counters.cmd is %d and should be 1 more than %d", CF_AppData.hk.counters.cmd, initial_hk_cmd_counter); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_DISABLE_DEQUEUE); + UT_CF_AssertEventID(CF_CMD_DISABLE_DEQUEUE_INF_EID); } void Test_CF_CmdDisableDequeue_Failure(void) @@ -1747,7 +1747,7 @@ void Test_CF_CmdDisableDequeue_Failure(void) /* Assert */ /* Assert for CF_DoFreezeThaw */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_DISABLE_DEQUEUE); + UT_CF_AssertEventID(CF_CMD_DISABLE_DEQUEUE_ERR_EID); } /******************************************************************************* @@ -1853,7 +1853,7 @@ void Test_CF_DoEnableDisablePolldir_FailPolldirEq_CF_MAX_POLLING_DIR_PER_CHAN_An local_result = CF_DoEnableDisablePolldir(arg_chan_num, arg_context); /* Assert */ - UT_CF_AssertEventID(CF_EID_ERR_CMD_POLLDIR_INVALID); + UT_CF_AssertEventID(CF_CMD_POLLDIR_INVALID_ERR_EID); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); UtAssert_True(local_result == -1, "CF_DoEnableDisablePolldir returned %d and should be -1", local_result); } @@ -1882,7 +1882,7 @@ void Test_CF_DoEnableDisablePolldir_FailAnyBadPolldirSendEvent(void) local_result = CF_DoEnableDisablePolldir(arg_chan_num, arg_context); /* Assert */ - UT_CF_AssertEventID(CF_EID_ERR_CMD_POLLDIR_INVALID); + UT_CF_AssertEventID(CF_CMD_POLLDIR_INVALID_ERR_EID); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); UtAssert_True(local_result == -1, "CF_DoEnableDisablePolldir returned %d and should be -1", local_result); } @@ -1929,7 +1929,7 @@ void Test_CF_CmdEnablePolldir_SuccessWhenActionSuccess(void) UtAssert_True(CF_AppData.hk.counters.cmd == (uint16)(initial_hk_cmd_counter + 1), "CF_AppData.hk.counters.cmd is %d and should be 1 more than %d", CF_AppData.hk.counters.cmd, initial_hk_cmd_counter); - UT_CF_AssertEventID(CF_EID_INF_CMD_ENABLE_POLLDIR); + UT_CF_AssertEventID(CF_CMD_ENABLE_POLLDIR_INF_EID); } void Test_CF_CmdEnablePolldir_FailWhenActionFail(void) @@ -1961,7 +1961,7 @@ void Test_CF_CmdEnablePolldir_FailWhenActionFail(void) UtAssert_True(CF_AppData.hk.counters.err == (uint16)(initial_hk_err_counter + 1), "CF_AppData.hk.counters.err is %d and should be 1 more than %d", CF_AppData.hk.counters.err, initial_hk_err_counter); - UT_CF_AssertEventID(CF_EID_ERR_CMD_ENABLE_POLLDIR); + UT_CF_AssertEventID(CF_CMD_ENABLE_POLLDIR_ERR_EID); } /******************************************************************************* @@ -2006,7 +2006,7 @@ void Test_CF_CmdDisablePolldir_SuccessWhenActionSuccess(void) UtAssert_True(CF_AppData.hk.counters.cmd == (uint16)(initial_hk_cmd_counter + 1), "CF_AppData.hk.counters.cmd is %d and should be 1 more than %d", CF_AppData.hk.counters.cmd, initial_hk_cmd_counter); - UT_CF_AssertEventID(CF_EID_INF_CMD_DISABLE_POLLDIR); + UT_CF_AssertEventID(CF_CMD_DISABLE_POLLDIR_INF_EID); } void Test_CF_CmdDisablePolldir_FailWhenActionFail(void) @@ -2038,7 +2038,7 @@ void Test_CF_CmdDisablePolldir_FailWhenActionFail(void) UtAssert_True(CF_AppData.hk.counters.err == (uint16)(initial_hk_err_counter + 1), "CF_AppData.hk.counters.err is %d and should be 1 more than %d", CF_AppData.hk.counters.err, initial_hk_err_counter); - UT_CF_AssertEventID(CF_EID_ERR_CMD_DISABLE_POLLDIR); + UT_CF_AssertEventID(CF_CMD_DISABLE_POLLDIR_ERR_EID); } /******************************************************************************* @@ -2244,7 +2244,7 @@ void Test_CF_DoPurgeQueue_GivenBad_data_byte_1_SendEventAndReturn_neg1(void) /* Assert */ UtAssert_True(local_result == -1, "CF_DoPurgeQueue returned %d and should be -1", local_result); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_PURGE_ARG); + UT_CF_AssertEventID(CF_CMD_PURGE_ARG_ERR_EID); UtAssert_STUB_COUNT(CF_CList_Traverse, 0); } @@ -2268,7 +2268,7 @@ void Test_CF_DoPurgeQueue_AnyGivenBad_data_byte_1_SendEventAndReturn_neg1(void) /* Assert */ UtAssert_True(local_result == -1, "CF_DoPurgeQueue returned %d and should be -1", local_result); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_PURGE_ARG); + UT_CF_AssertEventID(CF_CMD_PURGE_ARG_ERR_EID); UtAssert_STUB_COUNT(CF_CList_Traverse, 0); } @@ -2307,7 +2307,7 @@ void Test_CF_CmdPurgeQueue_FailWhenActionFail(void) UtAssert_True(CF_AppData.hk.counters.err == (uint16)(initial_hk_err_counter + 1), "CF_AppData.hk.counters.err is %d and should be 1 more than %d", CF_AppData.hk.counters.err, initial_hk_err_counter); - UT_CF_AssertEventID(CF_EID_ERR_CMD_PURGE_QUEUE); + UT_CF_AssertEventID(CF_CMD_PURGE_QUEUE_ERR_EID); } void Test_CF_CmdPurgeQueue_SuccessWhenActionSuccess(void) @@ -2333,7 +2333,7 @@ void Test_CF_CmdPurgeQueue_SuccessWhenActionSuccess(void) /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_PURGE_QUEUE); + UT_CF_AssertEventID(CF_CMD_PURGE_QUEUE_INF_EID); } /******************************************************************************* @@ -2362,7 +2362,7 @@ void Test_CF_CmdWriteQueue_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectComman /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_CHAN); + UT_CF_AssertEventID(CF_CMD_WQ_CHAN_ERR_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } @@ -2387,7 +2387,7 @@ void Test_CF_CmdWriteQueue_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRej /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_CHAN); + UT_CF_AssertEventID(CF_CMD_WQ_CHAN_ERR_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2417,7 +2417,7 @@ void Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand(void) /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_ARGS); + UT_CF_AssertEventID(CF_CMD_WQ_ARGS_ERR_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2459,7 +2459,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_ UtAssert_STUB_COUNT(CF_WrappedOpenCreate, 1); UtAssert_INT32_EQ(context_CF_WrappedOpenCreate.access, OS_WRITE_ONLY); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_OPEN); + UT_CF_AssertEventID(CF_CMD_WQ_OPEN_ERR_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2501,7 +2501,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_que UtAssert_STUB_COUNT(CF_WrappedOpenCreate, 1); UtAssert_INT32_EQ(context_CF_WrappedOpenCreate.access, OS_WRITE_ONLY); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_OPEN); + UT_CF_AssertEventID(CF_CMD_WQ_OPEN_ERR_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2549,7 +2549,7 @@ void Test_CF_CmdWriteQueue_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedC /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_WRITEQ_RX); + UT_CF_AssertEventID(CF_CMD_WQ_WRITEQ_RX_ERR_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 1); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2600,7 +2600,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_q /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_WRITEQ_RX); + UT_CF_AssertEventID(CF_CMD_WQ_WRITEQ_RX_ERR_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 1); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2651,7 +2651,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpA /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_WRITEHIST_RX); + UT_CF_AssertEventID(CF_CMD_WQ_WRITEHIST_RX_ERR_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 1); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2702,7 +2702,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_WRITEQ_TX); + UT_CF_AssertEventID(CF_CMD_WQ_WRITEQ_TX_ERR_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 1); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2755,7 +2755,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_w /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 2); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_WRITEQ_TX); + UT_CF_AssertEventID(CF_CMD_WQ_WRITEQ_TX_ERR_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 1); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2806,7 +2806,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_WRITEQ_PEND); + UT_CF_AssertEventID(CF_CMD_WQ_WRITEQ_PEND_ERR_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 1); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2857,7 +2857,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WQ_WRITEHIST_TX); + UT_CF_AssertEventID(CF_CMD_WQ_WRITEHIST_TX_ERR_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 1); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); @@ -2906,7 +2906,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_All(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 4); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 2); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -2951,7 +2951,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_History(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 2); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -2996,7 +2996,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Active(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 3); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3041,7 +3041,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Pend(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3090,7 +3090,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_All(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3135,7 +3135,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_History(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3180,7 +3180,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_Active(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3227,7 +3227,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_All(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 3); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3272,7 +3272,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_History(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3317,7 +3317,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Active(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 2); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3362,7 +3362,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Pend(void) UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); UtAssert_STUB_COUNT(CF_WriteHistoryQueueDataToFile, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_WQ); + UT_CF_AssertEventID(CF_CMD_WQ_INF_EID); UtAssert_STUB_COUNT(CF_WrappedClose, 0); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3513,7 +3513,7 @@ void Test_CF_CmdGetSetParam(void) { UT_CF_ResetEventCapture(); UtAssert_VOIDCALL(CF_CmdGetSetParam(1, param_id, 1 + param_id, UT_CFDP_CHANNEL)); - UT_CF_AssertEventID(CF_EID_INF_CMD_GETSET1); + UT_CF_AssertEventID(CF_CMD_GETSET1_INF_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, ++expected_count); } @@ -3534,27 +3534,27 @@ void Test_CF_CmdGetSetParam(void) { UT_CF_ResetEventCapture(); UtAssert_VOIDCALL(CF_CmdGetSetParam(0, param_id, 1, UT_CFDP_CHANNEL)); - UT_CF_AssertEventID(CF_EID_INF_CMD_GETSET2); + UT_CF_AssertEventID(CF_CMD_GETSET2_INF_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, ++expected_count); } /* Bad param ID */ UT_CF_ResetEventCapture(); UtAssert_VOIDCALL(CF_CmdGetSetParam(0, CF_GetSet_ValueID_MAX, 0, UT_CFDP_CHANNEL)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_GETSET_PARAM); + UT_CF_AssertEventID(CF_CMD_GETSET_PARAM_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); /* Bad channel ID */ UT_CF_ResetEventCapture(); UtAssert_VOIDCALL(CF_CmdGetSetParam(0, 0, 0, CF_NUM_CHANNELS + 1)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_GETSET_CHAN); + UT_CF_AssertEventID(CF_CMD_GETSET_CHAN_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 2); /* Validation fail */ UT_CF_ResetEventCapture(); UtAssert_VOIDCALL(CF_CmdGetSetParam(1, CF_GetSet_ValueID_outgoing_file_chunk_size, 100 + sizeof(CF_CFDP_PduFileDataContent_t), UT_CFDP_CHANNEL)); - UT_CF_AssertEventID(CF_EID_ERR_CMD_GETSET_VALIDATE); + UT_CF_AssertEventID(CF_CMD_GETSET_VALIDATE_ERR_EID); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 3); } @@ -3585,7 +3585,7 @@ void Test_CF_CmdSetParam_Call_CF_CmdGetSetParam_With_cmd_key_And_cmd_value(void) /* Assert */ UtAssert_UINT32_EQ(CF_AppData.config_table->ticks_per_second, utbuf.sp.value); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_EID_INF_CMD_GETSET1); + UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_CMD_GETSET1_INF_EID); /* Assert for incremented counter() */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 1); } @@ -3616,7 +3616,7 @@ void Test_CF_CmdGetParam_Call_CF_CmdGetSetParam_With_cmd_data_byte_0_AndConstant /* Assert */ /* Note actual value not tested, just flow */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_EID_INF_CMD_GETSET2); + UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_CMD_GETSET2_INF_EID); /* Assert for incremented counter() */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 1); } @@ -3648,7 +3648,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableInitSuccessAndIncrementCmdCounte /* Assert */ UtAssert_STUB_COUNT(CF_CFDP_InitEngine, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_ENABLE_ENGINE); + UT_CF_AssertEventID(CF_CMD_ENABLE_ENGINE_INF_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } @@ -3674,7 +3674,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementEr /* Assert */ UtAssert_STUB_COUNT(CF_CFDP_InitEngine, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_ENABLE_ENGINE); + UT_CF_AssertEventID(CF_CMD_ENABLE_ENGINE_ERR_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } @@ -3697,7 +3697,7 @@ void Test_CF_CmdEnableEngine_WithEngineEnableFailsSendEventAndIncrementErrCounte /* Assert */ UtAssert_STUB_COUNT(CF_CFDP_InitEngine, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_ENG_ALREADY_ENA); + UT_CF_AssertEventID(CF_CMD_ENG_ALREADY_ENA_ERR_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } @@ -3724,7 +3724,7 @@ void Test_CF_CmdDisableEngine_SuccessWhenEngineEnabledAndIncrementCmdCounter(voi /* Assert */ UtAssert_STUB_COUNT(CF_CFDP_DisableEngine, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_INF_CMD_DISABLE_ENGINE); + UT_CF_AssertEventID(CF_CMD_DISABLE_ENGINE_INF_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); @@ -3746,7 +3746,7 @@ void Test_CF_CmdDisableEngine_WhenEngineDisabledAndIncrementErrCounterThenFail(v /* Assert */ UtAssert_STUB_COUNT(CF_CFDP_DisableEngine, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_ENG_ALREADY_DIS); + UT_CF_AssertEventID(CF_CMD_ENG_ALREADY_DIS_ERR_EID); /* Assert for incremented counter */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); UtAssert_True(CF_AppData.hk.counters.err == (uint16)(initial_hk_err_counter + 1), diff --git a/unit-test/cf_utils_tests.c b/unit-test/cf_utils_tests.c index 55dbd372..d6e04e42 100644 --- a/unit-test/cf_utils_tests.c +++ b/unit-test/cf_utils_tests.c @@ -549,7 +549,7 @@ void Test_CF_WriteHistoryEntryToFile(void) UT_CF_ResetEventCapture(); UT_SetDeferredRetcode(UT_KEY(OS_write), 1, -1); UtAssert_INT32_EQ(CF_WriteHistoryEntryToFile(arg_fd, &h), -1); - UT_CF_AssertEventID(CF_EID_ERR_CMD_WHIST_WRITE); + UT_CF_AssertEventID(CF_CMD_WHIST_WRITE_ERR_EID); } /*******************************************************************************