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

Fix #165, Add CFE_PSP_GetProcessorName #189

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix #165, Add CFE_PSP_GetProcessorName stub
  • Loading branch information
skliper committed Aug 25, 2020
commit 3ae587ce48172c4ae06126ecf0a6ee20e0b31f7c
31 changes: 31 additions & 0 deletions ut-stubs/ut_psp_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,37 @@ uint32 CFE_PSP_GetSpacecraftId(void)
return status;
}

/*****************************************************************************/
/**
** \brief CFE_PSP_GetProcessorName stub function
**
** \par Description
** This function is used as a placeholder for the PSP function
** CFE_PSP_GetProcessorName. It is set to return a fixed value for the
** unit tests.
**
** \par Assumptions, External Events, and Notes:
** None
**
** \returns
** Returns Default_CpuName or passed in address from buffer
**
******************************************************************************/
const char *CFE_PSP_GetProcessorName(void)
{
int32 status;
const char *ptr = GLOBAL_CONFIGDATA.Default_CpuName;

status = UT_DEFAULT_IMPL(CFE_PSP_GetProcessorName);

if (status >= 0)
{
UT_Stub_CopyToLocal(UT_KEY(CFE_PSP_GetProcessorName), &ptr, sizeof(ptr));
}

return ptr;
}

/*****************************************************************************/
/**
v** \brief CFE_PSP_GetTime stub function
Expand Down