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

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

Open
skliper opened this issue Apr 29, 2021 · 1 comment · May be fixed by #2613
Open

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

skliper opened this issue Apr 29, 2021 · 1 comment · May be fixed by #2613

Comments

@skliper
Copy link
Contributor

skliper commented Apr 29, 2021

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

@skliper skliper added this to the 7.0.0 milestone Apr 29, 2021
@skliper skliper removed this from the 7.0.0 milestone May 17, 2021
@skliper
Copy link
Contributor Author

skliper commented May 17, 2021

Related to #1398, need to sort out ENUM vs mask use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant