Skip to content

Both enums (index) and defines (mask) exist for event type #1447

@skliper

Description

@skliper

Is your feature request related to a problem? Please describe.
Having both the mask and the index requires keeping them in sync.

Event type bitmasks:

/* Event Type bit masks */
#define CFE_EVS_DEBUG_BIT 0x0001
#define CFE_EVS_INFORMATION_BIT 0x0002
#define CFE_EVS_ERROR_BIT 0x0004
#define CFE_EVS_CRITICAL_BIT 0x0008

Event type enum:

/**
* @brief Label definitions associated with CFE_EVS_EventType_Enum_t
*/
enum CFE_EVS_EventType
{
/**
* @brief Events that are intended only for debugging, not nominal operations
*/
CFE_EVS_EventType_DEBUG = 1,
/**
* @brief Events that identify a state change or action that is not an error
*/
CFE_EVS_EventType_INFORMATION = 2,
/**
* @brief Events that identify an error but are not catastrophic (e.g. - bad command
*/
CFE_EVS_EventType_ERROR = 3,
/**
* @brief Events that identify errors that are unrecoverable autonomously
*/
CFE_EVS_EventType_CRITICAL = 4
};
/**
* @brief Identifies type of event message
*
* @sa enum CFE_EVS_EventType
*/
typedef uint16 CFE_EVS_EventType_Enum_t;

Describe the solution you'd like
Collapse to one solution, either use the mask or the enums. Related to #1438 and #1398.

Describe alternatives you've considered
Or use one to create the other so they don't get out of sync.

Additional context
Code review

Requester Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions