From e9124f2e2a8e2c5bb3c639d44ebf963dc0318737 Mon Sep 17 00:00:00 2001 From: jdfiguer Date: Thu, 29 Feb 2024 13:33:03 -0500 Subject: [PATCH] Post CCB review changes, Add new title for MOVEFILES variable --- docs/dox_src/cfs_ds.dox | 8 +++----- fsw/inc/ds_platform_cfg.h | 34 +++++++++++++++++----------------- fsw/src/ds_file.c | 2 +- fsw/src/ds_verify.h | 8 ++++---- unit-test/ds_cmds_tests.c | 2 +- unit-test/ds_file_tests.c | 6 +++--- 6 files changed, 29 insertions(+), 31 deletions(-) diff --git a/docs/dox_src/cfs_ds.dox b/docs/dox_src/cfs_ds.dox index 84de6cf..5da983f 100644 --- a/docs/dox_src/cfs_ds.dox +++ b/docs/dox_src/cfs_ds.dox @@ -147,12 +147,10 @@ the platform.

Move File Capability

- If the DS_MOVE_FILES configuration parameter is set to a non-empty string, the telemetry + If the DS_MOVEFILES_DESTDIR configuration parameter is set to a non-empty string, the telemetry database, Destination File table load images and the File Table display page - require changes. The Destination File Table rdl file uses the DS_MOVE_FILES - definition in the ds_platform_cfg.h file. However, in order to get the - required parameter included in telemetry, this configuration parameter must be - set to 1 rather than TRUE. The table images must include this parameter in + require changes. The Destination File Table rdl file uses the DS_MOVEFILES_DESTDIR + definition in the ds_platform_cfg.h file. The table images must include this parameter in order to load successfully and the display page must be modified to display this parameter. **/ diff --git a/fsw/inc/ds_platform_cfg.h b/fsw/inc/ds_platform_cfg.h index f5c1a3b..c5baf3b 100644 --- a/fsw/inc/ds_platform_cfg.h +++ b/fsw/inc/ds_platform_cfg.h @@ -427,6 +427,22 @@ */ #define DS_FILE_HEADER_TYPE 1 +/** + * \brief Application Per Packet Pipe Limit + * + * \par Description: + * This parameter defines the per packet pipe limit. This is + * the max number of packets with the same Message ID that may + * be in the DS input pipe at any one time. This value should + * be large enough to accommodate a burst of packets (usually + * event packets) plus a suitable margin. + * + * \par Limits: + * The value must be greater than zero and cannot exceed the + * definition of #DS_APP_PIPE_DEPTH. + */ +#define DS_PER_PACKET_PIPE_LIMIT 45 + /** * \brief Move Files to Downlink Directory After Close Selection * @@ -444,23 +460,7 @@ * non-empty string = add move pathname field to Destination File Table * empty string = do not add move pathname to Destination File Table */ -#define DS_MOVE_FILES "Move to downlink directory" - -/** - * \brief Application Per Packet Pipe Limit - * - * \par Description: - * This parameter defines the per packet pipe limit. This is - * the max number of packets with the same Message ID that may - * be in the DS input pipe at any one time. This value should - * be large enough to accommodate a burst of packets (usually - * event packets) plus a suitable margin. - * - * \par Limits: - * The value must be greater than zero and cannot exceed the - * definition of #DS_APP_PIPE_DEPTH. - */ -#define DS_PER_PACKET_PIPE_LIMIT 45 +#define DS_MOVEFILES_DESTDIR "Move to downlink directory" /**\}*/ diff --git a/fsw/src/ds_file.c b/fsw/src/ds_file.c index 2aea73c..653207d 100644 --- a/fsw/src/ds_file.c +++ b/fsw/src/ds_file.c @@ -811,7 +811,7 @@ void DS_FileCloseDest(int32 FileIndex) */ OS_close(FileStatus->FileHandle); - if (strlen(DS_MOVE_FILES) > 0) + if (strlen(DS_MOVEFILES_DESTDIR) > 0) { /* ** Move file only if table has a downlink directory name... diff --git a/fsw/src/ds_verify.h b/fsw/src/ds_verify.h index f0fed9c..2dd7d41 100644 --- a/fsw/src/ds_verify.h +++ b/fsw/src/ds_verify.h @@ -190,10 +190,6 @@ #error DS_FILE_HEADER_TYPE must be 0 or 1! #endif -#ifndef DS_MOVE_FILES -#error "DS_MOVE_FILES must be defined!" -#endif - #ifndef DS_PER_PACKET_PIPE_LIMIT #error DS_PER_PACKET_PIPE_LIMIT must be defined! #elif (DS_PER_PACKET_PIPE_LIMIT < 1) @@ -202,4 +198,8 @@ #error DS_PER_PACKET_PIPE_LIMIT cannot be greater than DS_APP_PIPE_DEPTH! #endif +#ifndef DS_MOVEFILES_DESTDIR +#error "DS_MOVEFILES_DESTDIR must be defined!" +#endif + #endif diff --git a/unit-test/ds_cmds_tests.c b/unit-test/ds_cmds_tests.c index 7b7e893..74b31a8 100644 --- a/unit-test/ds_cmds_tests.c +++ b/unit-test/ds_cmds_tests.c @@ -1276,7 +1276,7 @@ void DS_CloseAllCmd_Test_Nominal(void) DS_AppData.FileStatus[i].FileHandle = OS_OBJECT_ID_UNDEFINED; } - if (strlen(DS_MOVE_FILES) > 0) + if (strlen(DS_MOVEFILES_DESTDIR) > 0) { strncpy(DS_AppData.DestFileTblPtr->File[0].Movename, "", DS_PATHNAME_BUFSIZE); } diff --git a/unit-test/ds_file_tests.c b/unit-test/ds_file_tests.c index 93240cd..1782fe0 100644 --- a/unit-test/ds_file_tests.c +++ b/unit-test/ds_file_tests.c @@ -297,7 +297,7 @@ void DS_FileSetupWrite_Test_MaxFileSizeExceeded(void) strncpy(DS_AppData.FileStatus[FileIndex].FileName, "directory1/", sizeof(DS_AppData.FileStatus[FileIndex].FileName)); - if (strlen(DS_MOVE_FILES) > 0) + if (strlen(DS_MOVEFILES_DESTDIR) > 0) { strncpy(DS_AppData.DestFileTblPtr->File[FileIndex].Movename, "directory2/movename/", sizeof(DS_AppData.DestFileTblPtr->File[FileIndex].Movename)); @@ -572,7 +572,7 @@ void DS_FileCreateDest_Test_ClosedFileHandle(void) DS_AppData.DestFileTblPtr->File[FileIndex].FileNameType = DS_BY_COUNT; DS_AppData.FileStatus[FileIndex].FileCount = 1; - if (strlen(DS_MOVE_FILES) > 0) + if (strlen(DS_MOVEFILES_DESTDIR) > 0) { DS_AppData.DestFileTblPtr->File[FileIndex].Movename[0] = '\0'; } @@ -1304,7 +1304,7 @@ void UtTest_Setup(void) UT_DS_TEST_ADD(DS_FileUpdateHeader_Test_PlatformConfigCFE_SeekError); } - if (strlen(DS_MOVE_FILES) > 0) + if (strlen(DS_MOVEFILES_DESTDIR) > 0) { UT_DS_TEST_ADD(DS_FileCloseDest_Test_PlatformConfigMoveFiles_Nominal); UT_DS_TEST_ADD(DS_FileCloseDest_Test_PlatformConfigMoveFiles_MoveError);