Skip to content

Commit

Permalink
Fix #50, implement dispatcher pattern for BP
Browse files Browse the repository at this point in the history
Split command handler implementations and dispatching operation to
separate source files.
  • Loading branch information
jphickey committed Dec 14, 2023
1 parent b5694ec commit 397d35e
Show file tree
Hide file tree
Showing 11 changed files with 851 additions and 658 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ include_directories(fsw/src)

set(APP_SRC_FILES
fsw/src/bp_app.c
fsw/src/bp_cmd.c
fsw/src/bp_dispatch.c
fsw/src/bp_flow.c
fsw/src/bp_cla_bundle_io.c
fsw/src/bp_storage.c
Expand Down
8 changes: 4 additions & 4 deletions config/default_bp_fcncodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/* BP_CMD_MID */
#define BP_NOOP_CC 0
#define BP_RESET_CC 1
#define BP_RESET_APP_CC 1
#define BP_RELOAD_FLOW_TABLE_CC 2
#define BP_ENABLE_FLOW_CC 3
#define BP_DISABLE_FLOW_CC 4
Expand All @@ -49,9 +49,9 @@
#define BP_DISABLE_OVERRIDE_PRIORITY_CC 11

/* BP_SEND_HK_MID */
#define BP_SEND_APP_CC 0
#define BP_SEND_ENABLED_CC 1
#define BP_SEND_DISABLED_CC 2
#define BP_SEND_APP_TLM_CC 0
#define BP_SEND_ENABLED_FLOW_TLM_CC 1
#define BP_SEND_DISABLED_FLOW_TLM_CC 2

/* BP_WAKEUP_MID */
#define BP_WAKEUP_CC 0
Expand Down
5 changes: 5 additions & 0 deletions config/default_bp_msgstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,9 @@ typedef struct
CFE_MSG_CommandHeader_t CommandHeader;
} BP_SendDisabledFlowTlmCmd_t;

typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader;
} BP_ProcessWakeupCmd_t;

#endif /* BP_MSG_H */
Loading

0 comments on commit 397d35e

Please sign in to comment.