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 #1543, Rename CFE_TIME_QueryResetVars to CFE_TIME_RestoreFromTimeResetVars #2497

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
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 @@
* See description in header file for argument/return detail
*
*-----------------------------------------------------------------*/
void CFE_TIME_QueryResetVars(void)
void CFE_TIME_RestoreFromTimeResetVars(void)

Check notice

Code scanning / CodeQL-coding-standard

Function too long Note

CFE_TIME_RestoreFromTimeResetVars has too many lines (78, while 60 are allowed).

Check notice

Code scanning / CodeQL-coding-standard

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
{
CFE_TIME_ResetVars_t LocalResetVars;
uint32 DefSubsMET;
Expand Down Expand Up @@ -247,7 +247,7 @@
/*
** 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
Loading