From bb2372faa1dcde0205a7500fc80e1450186b6c02 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 19 Apr 2021 10:17:09 -0400 Subject: [PATCH] Fix #1337, add docs to CFE_ES_RegisterCDS() regarding clearing Note in the documentation for this function that it is the responsibility of the calling app to clear/fill the CDS block any time a new block is allocated. --- modules/core_api/fsw/inc/cfe_es.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/core_api/fsw/inc/cfe_es.h b/modules/core_api/fsw/inc/cfe_es.h index 3af8c2f6d..e9d7187e6 100644 --- a/modules/core_api/fsw/inc/cfe_es.h +++ b/modules/core_api/fsw/inc/cfe_es.h @@ -1021,7 +1021,13 @@ void CFE_ES_ProcessAsyncEvent(void); ** the calling Application. The memory can survive an Application restart as well as a Processor Reset. ** ** \par Assumptions, External Events, and Notes: -** None +** This function does _not_ clear or otherwise initialize/modify the data within the CDS block. +** If this function returns #CFE_ES_CDS_ALREADY_EXISTS the block may already have valid data in it. +** +** If a new CDS block is reserved (either because the name did not exist, or existed as a different +** size) it is the responsibility of the calling application to fill the CDS block with valid data. +** This is indicated by a #CFE_SUCCESS return code, and in this case the calling application should +** ensure that it also calls CFE_ES_CopyToCDS() to fill the block with valid data. ** ** \param[in, out] HandlePtr Pointer Application's variable that will contain the CDS Memory Block Handle. ** HandlePtr is the handle of the CDS block that can be used in