You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Internal functions EVS_EnableTypes and EVS_DisableTypes both silently mask and use a variable with a constructed value where the value should be const, fragile since each individual value is used (twice) so easy to get out of sync:
Describe the solution you'd like
At minimum define a mask (near bit definitions) and use it. Helpers could check the range and return an error, then handler could just report on failure.
Describe alternatives you've considered
Could leave the check in the handler and remove the helpers since they'd just be an | or &~, not really worth a helper for this approach.
Additional context
Code review
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Inconsistent handling/checking of event type when input by command.
There is no type mask defined, so some places it's constructed and other's hardcoded:
cFE/modules/evs/fsw/inc/cfe_evs_msg.h
Lines 898 to 902 in 73c338d
Internal functions
EVS_EnableTypes
andEVS_DisableTypes
both silently mask and use a variable with a constructed value where the value should be const, fragile since each individual value is used (twice) so easy to get out of sync:cFE/modules/evs/fsw/src/cfe_evs_utils.c
Lines 337 to 344 in 73c338d
cFE/modules/evs/fsw/src/cfe_evs_utils.c
Lines 356 to 363 in 73c338d
All the command handlers that actually use the above helpers already check against a hard coded value and report out of range bit mask:
cFE/modules/evs/fsw/src/cfe_evs_task.c
Line 1080 in 73c338d
cFE/modules/evs/fsw/src/cfe_evs_task.c
Line 932 in 73c338d
cFE/modules/evs/fsw/src/cfe_evs_task.c
Line 982 in 73c338d
cFE/modules/evs/fsw/src/cfe_evs_task.c
Line 1152 in 73c338d
Describe the solution you'd like
At minimum define a mask (near bit definitions) and use it. Helpers could check the range and return an error, then handler could just report on failure.
Describe alternatives you've considered
Could leave the check in the handler and remove the helpers since they'd just be an | or &~, not really worth a helper for this approach.
Additional context
Code review
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: