Skip to content

Commit

Permalink
Merge pull request #867 from CDKnightNASA/fix-788-evs_macros
Browse files Browse the repository at this point in the history
Fix #788, Simplified CFE_EVS_SendEvent macros
  • Loading branch information
astrogeco authored Nov 10, 2020
2 parents 120f3de + eeaaf91 commit 0041085
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fsw/cfe-core/src/inc/cfe_evs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@
#define OS_PRINTF(m,n)
#endif

/*
** Utility macros to make for simpler/more compact/readable code.
*/
#define CFE_EVS_Send(E,T,...) CFE_EVS_SendEvent((E), CFE_EVS_EventType_##T, __VA_ARGS__)
#define CFE_EVS_SendDbg(E,...) CFE_EVS_Send(E, DEBUG, __VA_ARGS__)
#define CFE_EVS_SendInfo(E,...) CFE_EVS_Send(E, INFORMATION, __VA_ARGS__)
#define CFE_EVS_SendErr(E,...) CFE_EVS_Send(E, ERROR, __VA_ARGS__)
#define CFE_EVS_SendCrit(E,...) CFE_EVS_Send(E, CRITICAL, __VA_ARGS__)

/** \name Common Event Filter Mask Values */
/** \{ */
#define CFE_EVS_NO_FILTER 0x0000 /**< \brief Stops any filtering. All messages are sent. */
Expand Down

0 comments on commit 0041085

Please sign in to comment.