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

Integration Candidate 2020-05-13 #712

Merged
merged 19 commits into from
May 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8dad536
Fix #684, order of CleanupTaskResources
jphickey May 7, 2020
75c42bf
fix #681 - corrected doxygen for tbl
CDKnightNASA May 7, 2020
84809a7
fix #687 - validate table handle prior to use
CDKnightNASA May 7, 2020
de30de0
Refactor #492, sb_UT use of new macros
skliper May 11, 2020
070af1e
missed a MID wrap, other fixes related to ticket #666, #523, #580
CDKnightNASA May 12, 2020
8042159
Fix #309, Typo in CFE_ES_RestartApp WriteToSysLog
skliper May 12, 2020
744a9b4
Fix #679, Alignment warnings in UT
jphickey May 8, 2020
84e10c5
Fix #657, Register context in SendEvent and SysLog stubs
jtovias May 5, 2020
71f3242
Fix #707, Resolve highest MsgID of 0xFFFF bug
skliper May 16, 2020
c72b0ba
Merge pull request #686 from CDKnightNASA/fix-681-tbl_doxygen
astrogeco May 19, 2020
28faa4c
Merge pull request #699 from skliper/fix309-syslog-typo
astrogeco May 19, 2020
df31b09
Merge pull request #685 from jphickey/fix-684-cleanup-reorder
astrogeco May 19, 2020
0fa7baf
Merge pull request #688 from CDKnightNASA/fix-687-tblhandle_verify
astrogeco May 19, 2020
db6f048
Merge pull request #698 from CDKnightNASA/fix-693-sb_UT
astrogeco May 19, 2020
5727781
Merge pull request #673 from jtovias/fix657-add-UT-Stub-RegisterContext
astrogeco May 20, 2020
4d78023
Merge pull request #708 from skliper/fix707-msgkey-type-bug
astrogeco May 20, 2020
a702b83
Merge pull request #691 from jphickey/fix-679-ut-alignment-warnings
astrogeco May 20, 2020
92c3521
HOTFIX: Clarified highest valid msgid comments
skliper May 21, 2020
31659cc
Increase version to 6.7.18 and update Readme
astrogeco May 22, 2020
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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ This is a collection of services and associated framework to be located in the `

## Version History

### Development Build: 6.7.18

- Using ut stubs CFE_EVS_SendEvent and CFE_ES_WriteToSysLog, the register buffer will have the correct size. access to register buffer element will exist
- Both the main task and the child task(s) are successfully deleted and restarted after the exception occurs.
- Fixes doxygen warnings for the tbl subsystem.
- No compiler warnings or errors on cross build.
- Changes Message Key from uint16 to uint32 to avoid rollover and system hang
- See <https://github.com/nasa/cFE/pull/712> for more details

### Development Build: 6.7.17

- No longer automatically decompresses apps/libraries as part of load
Expand Down
7 changes: 6 additions & 1 deletion cmake/sample_defs/cpu1_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@
** The recommended case to to have this value the same across all mission platforms
**
** \par Limits
** This parameter has a lower limit of 1 and an upper limit of 0xFFFF.
** This parameter has a lower limit of 1 and an upper limit of 0xFFFF. Note
** for current implementations, V2/Extended headers assign 0xFFFFFFFF as the invalid
** message ID value, and default headers assigns 0xFFFF as the invalid value. This
** means for default headers, 0xFFFF is invalid even if you set the value
** below to it's maximum of 0xFFFF.
** The allocated message table is this size + 1 (could change based on implementaiton).
*/
#define CFE_PLATFORM_SB_HIGHEST_VALID_MSGID 0x1FFF

Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/es/cfe_es_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ int32 CFE_ES_RestartApp(uint32 AppID)
*/
if ( CFE_ES_Global.AppTable[AppID].Type == CFE_ES_AppType_CORE )
{
CFE_ES_SysLogWrite_Unsync ("CFE_ES_DeleteApp: Cannot Restart a CORE Application: %s.\n",
CFE_ES_SysLogWrite_Unsync ("CFE_ES_RestartApp: Cannot Restart a CORE Application: %s.\n",
CFE_ES_Global.AppTable[AppID].StartParams.Name );
ReturnCode = CFE_ES_ERR_APPID;
}
Expand Down
26 changes: 13 additions & 13 deletions fsw/cfe-core/src/es/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,24 +1114,12 @@ int32 CFE_ES_CleanUpApp(uint32 AppId)
*/
MainTaskId = CFE_ES_Global.AppTable[AppId].TaskInfo.MainTaskId;

/*
** Delete all of the OS resources, close files, and delete the main task
*/
Status = CFE_ES_CleanupTaskResources(MainTaskId);
if ( Status != CFE_SUCCESS )
{
CFE_ES_SysLogWrite_Unsync("CFE_ES_CleanUpApp: CleanUpTaskResources for Task ID:%d returned Error: 0x%08X\n",
(int)MainTaskId, (unsigned int)Status);
ReturnCode = CFE_ES_APP_CLEANUP_ERR;

}

/*
** Delete any child tasks associated with this app
*/
for ( i = 0; i < OS_MAX_TASKS; i++ )
{
/* delete only CHILD tasks - not the MainTaskId, which is already deleted (above) */
/* delete only CHILD tasks - not the MainTaskId, which will be deleted later (below) */
if ((CFE_ES_Global.TaskTable[i].RecordUsed == true) &&
(CFE_ES_Global.TaskTable[i].AppId == AppId) &&
(CFE_ES_Global.TaskTable[i].TaskId != MainTaskId))
Expand All @@ -1146,6 +1134,18 @@ int32 CFE_ES_CleanUpApp(uint32 AppId)
} /* end if */
} /* end for */

/*
** Delete all of the OS resources, close files, and delete the main task
*/
Status = CFE_ES_CleanupTaskResources(MainTaskId);
if ( Status != CFE_SUCCESS )
{
CFE_ES_SysLogWrite_Unsync("CFE_ES_CleanUpApp: CleanUpTaskResources for Task ID:%d returned Error: 0x%08X\n",
(int)MainTaskId, (unsigned int)Status);
ReturnCode = CFE_ES_APP_CLEANUP_ERR;

}

/*
** Remove the app from the AppTable
*/
Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/inc/cfe_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
*/
#define CFE_MAJOR_VERSION 6
#define CFE_MINOR_VERSION 7
#define CFE_REVISION 17
#define CFE_REVISION 18


#endif /* _cfe_version_ */
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/sb/cfe_sb_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
** be used directly, except by internal table lookups.
**
*/
typedef uint16 CFE_SB_MsgKey_Atom_t;
typedef uint32 CFE_SB_MsgKey_Atom_t;

/******************************************************************************
** Typedef: CFE_SB_MsgKey_t
Expand Down
21 changes: 12 additions & 9 deletions fsw/cfe-core/src/tbl/cfe_tbl_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,20 +678,14 @@ int32 CFE_TBL_Load( CFE_TBL_Handle_t TblHandle,
int32 Status;
uint32 ThisAppId;
CFE_TBL_LoadBuff_t *WorkingBufferPtr;
CFE_TBL_AccessDescriptor_t *AccessDescPtr = &CFE_TBL_TaskData.Handles[TblHandle];
CFE_TBL_RegistryRec_t *RegRecPtr = &CFE_TBL_TaskData.Registry[AccessDescPtr->RegIndex];
char AppName[OS_MAX_API_NAME]={"UNKNOWN"};
CFE_TBL_AccessDescriptor_t *AccessDescPtr;
CFE_TBL_RegistryRec_t *RegRecPtr;
char AppName[OS_MAX_API_NAME] = {"UNKNOWN"};
bool FirstTime = false;

/* Verify access rights and get a valid Application ID for calling App */
Status = CFE_TBL_ValidateAccess(TblHandle, &ThisAppId);

/* Translate AppID of caller into App Name */
CFE_ES_GetAppName(AppName, ThisAppId, OS_MAX_API_NAME);

/* Initialize return pointer to NULL */
WorkingBufferPtr = NULL;

if (Status != CFE_SUCCESS)
{
CFE_EVS_SendEventWithAppID(CFE_TBL_HANDLE_ACCESS_ERR_EID, CFE_EVS_EventType_ERROR,
Expand All @@ -701,6 +695,15 @@ int32 CFE_TBL_Load( CFE_TBL_Handle_t TblHandle,
return Status;
}

AccessDescPtr = &CFE_TBL_TaskData.Handles[TblHandle];
RegRecPtr = &CFE_TBL_TaskData.Registry[AccessDescPtr->RegIndex];

/* Translate AppID of caller into App Name */
CFE_ES_GetAppName(AppName, ThisAppId, OS_MAX_API_NAME);

/* Initialize return pointer to NULL */
WorkingBufferPtr = NULL;

/* Check to see if this is a dump only table */
if (RegRecPtr->DumpOnly)
{
Expand Down
2 changes: 2 additions & 0 deletions fsw/cfe-core/src/tbl/cfe_tbl_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ int32 CFE_TBL_GetWorkingBuffer(CFE_TBL_LoadBuff_t **WorkingBufferPtr,
** \par Assumptions, External Events, and Notes:
** -# This function assumes parameters have been verified.
**
** \param[in] AppName The name of the application loading the table.
**
** \param[in] WorkingBufferPtr Pointer to a working buffer that is to be loaded
** with the contents of the specified file
**
Expand Down
Loading