Skip to content

Commit

Permalink
Fix #165, Add CFE_PSP_GetProcessorName stub
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Aug 25, 2020
1 parent dc9e208 commit 3ae587c
Showing 1 changed file with 31 additions and 0 deletions.
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

0 comments on commit 3ae587c

Please sign in to comment.