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

Add option to send CFE_TBL_NO_SUCH_TABLE_ERR_EID event from CFE_TBL_FindTableInRegistry #1528

Open
skliper opened this issue May 14, 2021 · 0 comments

Comments

@skliper
Copy link
Contributor

skliper commented May 14, 2021

Is your feature request related to a problem? Please describe.
Repeated pattern in TBL to find a table and if not found send the same event:

/* Locate specified table in registry */
RegIndex = CFE_TBL_FindTableInRegistry(TblFileHeader.TableName);
if (RegIndex == CFE_TBL_NOT_FOUND)
{
CFE_EVS_SendEvent(CFE_TBL_NO_SUCH_TABLE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to locate '%s' in Table Registry", TblFileHeader.TableName);
}

else /* Table could not be found in Registry */
{
CFE_EVS_SendEvent(CFE_TBL_NO_SUCH_TABLE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to locate '%s' in Table Registry", TableName);
}

else /* Table could not be found in Registry */
{
CFE_EVS_SendEvent(CFE_TBL_NO_SUCH_TABLE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to locate '%s' in Table Registry", TableName);
}

else /* Table could not be found in Registry */
{
CFE_EVS_SendEvent(CFE_TBL_NO_SUCH_TABLE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to locate '%s' in Table Registry", TableName);
}

else /* Table could not be found in Registry */
{
CFE_EVS_SendEvent(CFE_TBL_NO_SUCH_TABLE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to locate '%s' in Table Registry", TableName);
}

else /* Table could not be found in Registry */
{
CFE_EVS_SendEvent(CFE_TBL_NO_SUCH_TABLE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to locate '%s' in Table Registry", TableName);
}

Describe the solution you'd like
Optionally (if needed) send event in CFE_TBL_FindTableInRegistry

Describe alternatives you've considered
Other refactoring as suggested in #1504

Additional context
Code review

Requester Info
Jacob Hageman - NASA/GSFC

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