Skip to content

Commit

Permalink
Merge pull request #118 from jphickey/fix-113-tbl-filedef
Browse files Browse the repository at this point in the history
Fix #113, use CFE_TBL_FILEDEF macro for table definitions
  • Loading branch information
dzbaker authored Jan 18, 2024
2 parents 216108e + 6156601 commit e609be9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
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)

0 comments on commit e609be9

Please sign in to comment.