Skip to content

Commit

Permalink
Merge pull request #712 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
Integration Candidate 2020-05-13
  • Loading branch information
astrogeco authored May 22, 2020
2 parents 95f34d2 + 31659cc commit d217ca3
Show file tree
Hide file tree
Showing 13 changed files with 1,513 additions and 6,243 deletions.
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

0 comments on commit d217ca3

Please sign in to comment.