Skip to content

Commit

Permalink
Fix nasa#1543, Rename CFE_TIME_QueryResetVars to `CFE_TIME_RestoreF…
Browse files Browse the repository at this point in the history
…romTimeResetVars`
  • Loading branch information
thnkslprpt committed Jan 16, 2024
1 parent 7f5ebcd commit 0240673
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions modules/time/fsw/src/cfe_time_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ CFE_TIME_SysTime_t CFE_TIME_LatchClock(void)
* See description in header file for argument/return detail
*
*-----------------------------------------------------------------*/
void CFE_TIME_QueryResetVars(void)
void CFE_TIME_RestoreFromTimeResetVars(void)
{
CFE_TIME_ResetVars_t LocalResetVars;
uint32 DefSubsMET;
Expand Down Expand Up @@ -247,7 +247,7 @@ void CFE_TIME_InitData(void)
/*
** Try to get values used to compute time from Reset Area...
*/
CFE_TIME_QueryResetVars();
CFE_TIME_RestoreFromTimeResetVars();

RefState = CFE_TIME_StartReferenceUpdate();

Expand Down
2 changes: 1 addition & 1 deletion modules/time/fsw/src/cfe_time_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void CFE_TIME_InitData(void);
/**
* @brief query contents of Reset Variables
*/
void CFE_TIME_QueryResetVars(void);
void CFE_TIME_RestoreFromTimeResetVars(void);

/*---------------------------------------------------------------------------------------*/
/**
Expand Down
10 changes: 5 additions & 5 deletions modules/time/ut-coverage/time_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -1955,31 +1955,31 @@ void Test_ResetArea(void)
/* Tests existing and good Reset Area */
UT_InitData();
UT_SetStatusBSPResetArea(OS_SUCCESS, CFE_TIME_RESET_SIGNATURE, CFE_TIME_ToneSignalSelect_PRIMARY);
CFE_TIME_QueryResetVars();
CFE_TIME_RestoreFromTimeResetVars();
UtAssert_INT32_EQ(CFE_TIME_Global.DataStoreStatus, CFE_TIME_RESET_AREA_EXISTING);

/* Tests existing and good Reset Area */
UT_InitData();
UT_SetStatusBSPResetArea(OS_SUCCESS, CFE_TIME_RESET_SIGNATURE, CFE_TIME_ToneSignalSelect_REDUNDANT);
CFE_TIME_QueryResetVars();
CFE_TIME_RestoreFromTimeResetVars();
UtAssert_INT32_EQ(CFE_TIME_Global.DataStoreStatus, CFE_TIME_RESET_AREA_EXISTING);

/* Test response to a bad reset area */
UT_InitData();
UT_SetStatusBSPResetArea(OS_ERROR, CFE_TIME_RESET_SIGNATURE, CFE_TIME_ToneSignalSelect_PRIMARY);
CFE_TIME_QueryResetVars();
CFE_TIME_RestoreFromTimeResetVars();
UtAssert_INT32_EQ(CFE_TIME_Global.DataStoreStatus, CFE_TIME_RESET_AREA_BAD);

/* Test initializing to default time values */
UT_InitData();
UT_SetStatusBSPResetArea(OS_SUCCESS, CFE_TIME_RESET_SIGNATURE + 1, CFE_TIME_ToneSignalSelect_PRIMARY);
CFE_TIME_QueryResetVars();
CFE_TIME_RestoreFromTimeResetVars();
UtAssert_INT32_EQ(CFE_TIME_Global.DataStoreStatus, CFE_TIME_RESET_AREA_NEW);

/* Test response to a bad clock signal selection parameter */
UT_InitData();
UT_SetStatusBSPResetArea(OS_SUCCESS, CFE_TIME_RESET_SIGNATURE, CFE_TIME_ToneSignalSelect_REDUNDANT + 1);
CFE_TIME_QueryResetVars();
CFE_TIME_RestoreFromTimeResetVars();
UtAssert_INT32_EQ(CFE_TIME_Global.DataStoreStatus, CFE_TIME_RESET_AREA_NEW);

/* Test response to a reset area error */
Expand Down

0 comments on commit 0240673

Please sign in to comment.