Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #113, use CFE_TBL_FILEDEF macro for table definitions #118

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions fsw/tables/hs_amt.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
#include "hs_tbldefs.h"
#include "cfe_tbl_filedef.h"

CFE_TBL_FileDef_t CFE_TBL_FileDef = {"HS_AppMon_Tbl", HS_APP_NAME ".AppMon_Tbl", "HS AppMon Table", "hs_amt.tbl",
(sizeof(HS_AMTEntry_t) * HS_MAX_MONITORED_APPS)};

HS_AMTEntry_t HS_AppMon_Tbl[HS_MAX_MONITORED_APPS] = {
/* AppName NullTerm CycleCount ActionType */

Expand Down Expand Up @@ -70,3 +67,5 @@ HS_AMTEntry_t HS_AppMon_Tbl[HS_MAX_MONITORED_APPS] = {
/* 30 */ {"", 0, 10, HS_AMT_ACT_NOACT},
/* 31 */ {"", 0, 10, HS_AMT_ACT_NOACT},
};

CFE_TBL_FILEDEF(HS_AppMon_Tbl, HS.AppMon_Tbl, HS AppMon Table, hs_amt.tbl)
7 changes: 3 additions & 4 deletions fsw/tables/hs_mat.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
#include "cfe_es_msg.h"
#include "cfe_msgids.h"

CFE_TBL_FileDef_t CFE_TBL_FileDef = {"HS_Default_MsgActs_Tbl", HS_APP_NAME ".MsgActs_Tbl", "HS MsgActs Table",
"hs_mat.tbl", (sizeof(HS_MATEntry_t) * HS_MAX_MSG_ACT_TYPES)};

/* Checksum for each desired command - Note that if checksum is enabled, real values (non-zero) must be input */
#ifndef CFE_TBL_NOOP_CKSUM
#define CFE_TBL_NOOP_CKSUM 0x00
Expand Down Expand Up @@ -66,7 +63,7 @@ typedef struct
/* Helper macro to get size of structure elements */
#define HS_MEMBER_SIZE(member) (sizeof(((HS_Message *)0)->member))

HS_MatTableEntry_t HS_Default_MsgActs_Tbl[HS_MAX_MSG_ACT_TYPES] = {
HS_MatTableEntry_t HS_MsgActs_Tbl[HS_MAX_MSG_ACT_TYPES] = {
/* EnableState Cooldown Message */

/* 0 */
Expand Down Expand Up @@ -103,3 +100,5 @@ HS_MatTableEntry_t HS_Default_MsgActs_Tbl[HS_MAX_MSG_ACT_TYPES] = {
.HsMsg.cmd1 = {CFE_MSG_CMD_HDR_INIT(CFE_TBL_CMD_MID, HS_MEMBER_SIZE(cmd1), CFE_TBL_NOOP_CC, CFE_TBL_NOOP_CKSUM)}}

};

CFE_TBL_FILEDEF(HS_MsgActs_Tbl, HS.MsgActs_Tbl, HS MsgActs Table, hs_mat.tbl)
5 changes: 2 additions & 3 deletions fsw/tables/hs_xct.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
#include "hs_tbldefs.h"
#include "cfe_tbl_filedef.h"

CFE_TBL_FileDef_t CFE_TBL_FileDef = {"HS_ExeCount_Tbl", HS_APP_NAME ".ExeCount_Tbl", "HS ExeCount Table", "hs_xct.tbl",
(sizeof(HS_XCTEntry_t) * HS_MAX_EXEC_CNT_SLOTS)};

HS_XCTEntry_t HS_ExeCount_Tbl[HS_MAX_EXEC_CNT_SLOTS] = {
/* ResourceName NullTerm ResourceType */

Expand Down Expand Up @@ -70,3 +67,5 @@ HS_XCTEntry_t HS_ExeCount_Tbl[HS_MAX_EXEC_CNT_SLOTS] = {
/* 30 */ {"", 0, HS_XCT_TYPE_NOTYPE},
/* 31 */ {"", 0, HS_XCT_TYPE_NOTYPE},
};

CFE_TBL_FILEDEF(HS_ExeCount_Tbl, HS.ExeCount_Tbl, HS ExeCount Table, hs_xct.tbl)