diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index a950de2..0000000
--- a/.gitattributes
+++ /dev/null
@@ -1,6 +0,0 @@
-*.h linguist-language=c
-
-*.css linguist-documentation=true
-*.htm linguist-documentation=true
-*.html linguist-documentation=true
-*.prc linguist-documentation=true
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 64f4f38..fec7cd3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,19 @@
-cmake_minimum_required(VERSION 2.6.4)
+cmake_minimum_required(VERSION 1.6.4)
project(CFS_FM C)
include_directories(fsw/mission_inc)
include_directories(fsw/platform_inc)
include_directories(${cfs_lib_MISSION_DIR}/fsw/public_inc)
+#include_directories(${fs_lib_MISSION_DIR}/fsw/public_inc)
+#include_directories(${fs_lib_MISSION_DIR}/fsw/src)
+include_directories(${cfs_lib_MISSION_DIR}/fsw/src)
+
+message(STATUS "cfs_lib loc: ${cfs_lib_MISSION_DIR}")
+#message(STATUS "fs_lib loc : ${fs_lib_MISSION_DIR}")
+
+# Uncomment the below include if decompress functionality is
+# enabled in FM
+# include_directories(${fs_lib_MISSION_DIR}/fsw/public_inc)
aux_source_directory(fsw/src APP_SRC_FILES)
@@ -13,3 +23,6 @@ add_cfe_app(fm ${APP_SRC_FILES})
include_directories(fsw/src)
aux_source_directory(fsw/tables APP_TABLE_FILES)
add_cfe_tables(fm ${APP_TABLE_FILES})
+if (ENABLE_UNIT_TESTS)
+ add_subdirectory(unit-test)
+endif (ENABLE_UNIT_TESTS)
diff --git a/Core Flight System (CFS) NOSA.pdf b/Core Flight System (CFS) NOSA.pdf
deleted file mode 100644
index 5b6d60f..0000000
Binary files a/Core Flight System (CFS) NOSA.pdf and /dev/null differ
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/README.md b/README.md
index 4f332c2..a79e6b7 100644
--- a/README.md
+++ b/README.md
@@ -1,61 +1,57 @@
-core Flight System (cFS) File Manager Application (FM)
-======================================================
-
-Open Source Release Readme
-==========================
-
-FM Release 2.5.3
-
-Date:
-3/19/2020
-
-Introduction
----------------
-
- The File Manager application (FM) is a core Flight System (cFS) application
- that is a plug-in to the Core Flight Executive (cFE) component of the cFS.
-
- The FM application provides onboard file system management services by
- processing ground commands for copying, moving, and renaming files,
- decompressing files, creating directories, deleting files and directories,
- providing file and directory informational telemetry messages, and providing
- open file and directory listings.
-
- The FM application is written in C and depends on the cFS Operating System
- Abstraction Layer (OSAL) and cFE components. There is additional FM application
- specific configuration information contained in the application user's guide
- available in https://github.com/nasa/FM/tree/master/docs/users_guide
-
- This software is licensed under the NASA Open Source Agreement.
- http://ti.arc.nasa.gov/opensource/nosa
-
-
-Software Included
---------------------
-
- File Manager application (FM) 2.5.3
-
-
-Software Required
---------------------
-
- Operating System Abstraction Layer 5.0 or higher can be
- obtained at https://github.com/nasa/osal
-
- core Flight Executive 6.7.0 or higher can be obtained at
- https://github.com/nasa/cfe
-
- Note: An integrated bundle including the cFE, OSAL, and PSP can
- be obtained at https://github.com/nasa/cfs
-
-About cFS
-------------
-
- The cFS is a platform and project independent reusable software framework and
- set of reusable applications developed by NASA Goddard Space Flight Center.
- This framework is used as the basis for the flight software for satellite data
- systems and instruments, but can be used on other embedded systems. More
- information on the cFS can be found at http://cfs.gsfc.nasa.gov
-
-
-EOF
+core Flight System (cFS) File Manager Application (FM)
+======================================================
+
+Open Source Release Readme
+==========================
+
+FM Release Candidate 2.6.0
+
+Date: 9/8/2021
+
+Introduction
+---------------
+
+ The File Manager application (FM) is a core Flight System (cFS) application
+ that is a plug-in to the Core Flight Executive (cFE) component of the cFS.
+
+ The FM application provides onboard file system management services by
+ processing ground commands for copying, moving, and renaming files,
+ decompressing files, creating directories, deleting files and directories,
+ providing file and directory informational telemetry messages, and providing
+ open file and directory listings.
+
+ The FM application is written in C and depends on the cFS Operating System
+ Abstraction Layer (OSAL) and cFE components. There is additional FM application
+ specific configuration information contained in the application user's guide.
+
+ Developer's guide information can be generated using Doxygen:
+ doxygen fm_doxygen_config.txt
+
+ This software is licensed under the Apache 2.0 license.
+
+
+Software Included
+--------------------
+
+ File Manager application (FM) 2.6.0
+
+
+Software Required
+--------------------
+
+ cFS Caelum
+
+ Note: An integrated bundle including the cFE, OSAL, and PSP can
+ be obtained at https://github.com/nasa/cfs
+
+About cFS
+------------
+
+ The cFS is a platform and project independent reusable software framework and
+ set of reusable applications developed by NASA Goddard Space Flight Center.
+ This framework is used as the basis for the flight software for satellite data
+ systems and instruments, but can be used on other embedded systems. More
+ information on the cFS can be found at http://cfs.gsfc.nasa.gov
+
+
+EOF
diff --git a/docs/FM_2.6.0_AppRequirementsDocument.doc b/docs/FM_2.6.0_AppRequirementsDocument.doc
new file mode 100644
index 0000000..cbc33ce
Binary files /dev/null and b/docs/FM_2.6.0_AppRequirementsDocument.doc differ
diff --git a/docs/FM_RequirementsToDesignTrace.docx b/docs/FM_RequirementsToDesignTrace.docx
new file mode 100644
index 0000000..cf8361e
Binary files /dev/null and b/docs/FM_RequirementsToDesignTrace.docx differ
diff --git a/docs/FM_v2.5.4_VersionDescriptionDocument.pdf b/docs/FM_v2.5.4_VersionDescriptionDocument.pdf
new file mode 100644
index 0000000..ed38cd4
Binary files /dev/null and b/docs/FM_v2.5.4_VersionDescriptionDocument.pdf differ
diff --git a/docs/FM_v2.6.0_VersionDescriptionDocument.pdf b/docs/FM_v2.6.0_VersionDescriptionDocument.pdf
new file mode 100644
index 0000000..d2de10c
Binary files /dev/null and b/docs/FM_v2.6.0_VersionDescriptionDocument.pdf differ
diff --git a/docs/cFS_FM_User_Guide_Doc_No_582-2014-001_Ver_1_0_2019_11-01.pdf b/docs/cFS_FM_User_Guide_Doc_No_582-2014-001_Ver_1_0_2019_11-01.pdf
new file mode 100644
index 0000000..c9d6182
Binary files /dev/null and b/docs/cFS_FM_User_Guide_Doc_No_582-2014-001_Ver_1_0_2019_11-01.pdf differ
diff --git a/docs/detailed_design/presentations/CFS_FM_Design.ppt b/docs/detailed_design/presentations/CFS_FM_Design.ppt
index 34767b2..b172878 100644
Binary files a/docs/detailed_design/presentations/CFS_FM_Design.ppt and b/docs/detailed_design/presentations/CFS_FM_Design.ppt differ
diff --git a/docs/dox_src/users_guide/cfs_fm.dox b/docs/dox_src/users_guide/cfs_fm.dox
index 5d42e6d..2170660 100644
--- a/docs/dox_src/users_guide/cfs_fm.dox
+++ b/docs/dox_src/users_guide/cfs_fm.dox
@@ -1,5 +1,5 @@
/**
- \mainpage CFS File Manager (FM) User's Guide
+ \mainpage CFS File Manager (FM) User's Guide
\subpage cfsfmrevhist
@@ -18,6 +18,7 @@
**/
+
/**
\page cfsfmrevhist CFS File Manager User's Guide Revision History
diff --git a/fm_doxygen_config.txt b/fm_doxygen_config.txt
new file mode 100644
index 0000000..2db1498
--- /dev/null
+++ b/fm_doxygen_config.txt
@@ -0,0 +1,2576 @@
+# Doxyfile 1.8.16
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = "cFS_FM"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+PROJECT_BRIEF =
+
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = cfs_fm_user_guide
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS = NO
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all generated output in the proper direction.
+# Possible values are: None, LTR, RTL and Context.
+# The default value is: None.
+
+OUTPUT_TEXT_DIRECTION = None
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines (in the resulting output). You can put ^^ in the value part of an
+# alias to insert a newline as if a physical newline was in the original file.
+# When you need a literal { or } or , in the value part of an alias you have to
+# escape them by means of a backslash (\), this can lead to conflicts with the
+# commands \{ and \} for these it is advised to use the version @{ and @} or use
+# a double escape (\\{ and \\})
+
+ALIASES += "event=\xrefitem fmevents \"Event Message\" \"FM Event Message Cross Reference\" " \
+ "fmcfg=\xrefitem cfsfmcfg \"Purpose\" \"FM Configuration Parameters\" " \
+ "fmcmd=\xrefitem cfsfmcmds \"Purpose\" \"FM Command Reference\" " \
+ "fmtlm=\xrefitem cfsfmtlm \"Purpose\" \"FM Telemetry Reference\" " \
+ "fmtlmmnemonic=\xrefitem fmtlmmnems \"Telemetry
+ Mnemonic(s)\" \"FM Telemetry Mnemonic Cross Reference\" "
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
+# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is
+# Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 5
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# (including Cygwin) ands Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if ... \endif and \cond
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation. If
+# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = YES
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = fsw/
+
+INPUT += docs/dox_src/users_guide
+
+INPUT += docs/dox_src/mnem_maps
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.idl \
+ *.ddl \
+ *.odl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.cs \
+ *.d \
+ *.php \
+ *.php4 \
+ *.php5 \
+ *.phtml \
+ *.inc \
+ *.m \
+ *.markdown \
+ *.md \
+ *.mm \
+ *.dox \
+ *.py \
+ *.pyw \
+ *.f90 \
+ *.f95 \
+ *.f03 \
+ *.f08 \
+ *.f \
+ *.for \
+ *.tcl \
+ *.vhd \
+ *.vhdl \
+ *.ucf \
+ *.qsf \
+ *.ice
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE = unit_test
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH = docs/dox_src/users_guide
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+#
+#
+# where is the value of the INPUT_FILTER tag, and is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE = readme.md
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# entity all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see https://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+# cost of reduced performance. This can be particularly helpful with template
+# rich C++ code for which doxygen's built-in parser lacks the necessary type
+# information.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+# The default value is: NO.
+
+CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_OPTIONS =
+
+# If clang assisted parsing is enabled you can provide the clang parser with the
+# path to the compilation database (see:
+# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
+# were built. This is equivalent to specifying the "-p" option to a clang tool,
+# such as clang-check. These options will then be passed to the parser.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+
+CLANG_DATABASE_PATH =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = NO
+
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via Javascript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have Javascript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: https://developer.apple.com/xcode/), introduced with OSX
+# 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# https://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from https://www.mathjax.org before deployment.
+# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use + S
+# (what the is depends on the OS and browser, but it is typically
+# , /, or both). Inside the search box use the to jump into the search results window, the results can be navigated
+# using the . Press to select an item or to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing +. Also here use the
+# to select a filter and or to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: https://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: https://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME =
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_MAKEINDEX_CMD = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP = NO
+
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# configuration file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = YES
+
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_NS_MEMB_FILE_SCOPE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS = YES
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH =
+
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/fsw/mission_inc/fm_perfids.h b/fsw/mission_inc/fm_perfids.h
index 7bb6f04..e32de07 100644
--- a/fsw/mission_inc/fm_perfids.h
+++ b/fsw/mission_inc/fm_perfids.h
@@ -5,19 +5,19 @@
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
**
** Title: CFS File Manager (FM) Application Performance IDs
**
@@ -44,8 +44,8 @@
/**
** \name FM CFS Application Performance IDs */
/** \{ */
-#define FM_APPMAIN_PERF_ID 39
-#define FM_CHILD_TASK_PERF_ID 44
+#define FM_APPMAIN_PERF_ID 39
+#define FM_CHILD_TASK_PERF_ID 44
/** \} */
#endif /*_fm_perfids_h_*/
@@ -53,4 +53,3 @@
/************************/
/* End of File Comment */
/************************/
-
diff --git a/fsw/platform_inc/fm_msgids.h b/fsw/platform_inc/fm_msgids.h
index 4e3a2c8..67adc05 100644
--- a/fsw/platform_inc/fm_msgids.h
+++ b/fsw/platform_inc/fm_msgids.h
@@ -1,23 +1,23 @@
/*
-** Filename: fm_msgids.h
+** Filename: fm_msgids.h
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
**
** Title: File Manager (FM) Message ID Header File
**
@@ -41,15 +41,15 @@
**************************************************************************/
/* FM command packet message ID's */
-#define FM_CMD_MID 0x188C /** < \brief FM ground commands */
-#define FM_SEND_HK_MID 0x188D /** < \brief FM send housekeeping */
+#define FM_CMD_MID 0x188C /** < \brief FM ground commands */
+#define FM_SEND_HK_MID 0x188D /** < \brief FM send housekeeping */
/* FM telemetry packet message ID's */
-#define FM_HK_TLM_MID 0x088A /** < \brief FM housekeeping */
-#define FM_FILE_INFO_TLM_MID 0x088B /** < \brief FM get file info */
-#define FM_DIR_LIST_TLM_MID 0x088C /** < \brief FM get dir list */
-#define FM_OPEN_FILES_TLM_MID 0x088D /** < \brief FM get open files */
-#define FM_FREE_SPACE_TLM_MID 0x088E /** < \brief FM get free space */
+#define FM_HK_TLM_MID 0x088A /** < \brief FM housekeeping */
+#define FM_FILE_INFO_TLM_MID 0x088B /** < \brief FM get file info */
+#define FM_DIR_LIST_TLM_MID 0x088C /** < \brief FM get dir list */
+#define FM_OPEN_FILES_TLM_MID 0x088D /** < \brief FM get open files */
+#define FM_FREE_SPACE_TLM_MID 0x088E /** < \brief FM get free space */
#endif /* _fm_msgids_h_ */
diff --git a/fsw/platform_inc/fm_platform_cfg.h b/fsw/platform_inc/fm_platform_cfg.h
index 4f99ace..36b2d89 100644
--- a/fsw/platform_inc/fm_platform_cfg.h
+++ b/fsw/platform_inc/fm_platform_cfg.h
@@ -5,19 +5,19 @@
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
**
**
** Title: File Manager (FM) Platform Configuration Header File
@@ -35,7 +35,6 @@
#ifndef _fm_platform_cfg_h_
#define _fm_platform_cfg_h_
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM platform configuration parameters - application definitions */
@@ -56,8 +55,7 @@
** no limits on the definition. Refer to CFE Executive Services
** for specific information on limits related to application names.
*/
-#define FM_APP_NAME "FM"
-
+#define FM_APP_NAME "FM"
/** \fmcfg File Manager Command Pipe Name
**
@@ -70,8 +68,7 @@
** no limits on the definition. Refer to CFE Software Bus Services
** for specific information on limits related to pipe names.
*/
-#define FM_APP_PIPE_NAME "FM_CMD_PIPE"
-
+#define FM_APP_PIPE_NAME "FM_CMD_PIPE"
/** \fmcfg File Manager Command Pipe Depth
**
@@ -85,11 +82,10 @@
** It is recommended that this value be no less than 4 and
** no greater than 20 packets, but this is not enforced by FM.
*/
-#define FM_APP_PIPE_DEPTH 10
-
+#define FM_APP_PIPE_DEPTH 10
/** \sccfg Mission specific version number for FM application
-**
+**
** \par Description:
** An application version number consists of four parts:
** major version number, minor version number, revision
@@ -101,8 +97,7 @@
** Must be defined as a numeric value that is greater than
** or equal to zero.
*/
-#define FM_MISSION_REV 0
-
+#define FM_MISSION_REV 0
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -125,8 +120,7 @@
** filename. Set this parameter to the empty string if no default
** filename is desired.
*/
-#define FM_DIR_LIST_FILE_DEFNAME "/ram/fm_dirlist.out"
-
+#define FM_DIR_LIST_FILE_DEFNAME "/ram/fm_dirlist.out"
/** \fmcfg Maximum Directory List Output File Entries
**
@@ -144,8 +138,7 @@
** The FM application limits this value to be no less than 100 and
** no greater than 10000.
*/
-#define FM_DIR_LIST_FILE_ENTRIES 3000
-
+#define FM_DIR_LIST_FILE_ENTRIES 3000
/** \fmcfg Directory List Output File Header Sub-Type
**
@@ -157,8 +150,7 @@
** \par Limits:
** The FM application places no limits on this unsigned 32 bit value.
*/
-#define FM_DIR_LIST_FILE_SUBTYPE 12345
-
+#define FM_DIR_LIST_FILE_SUBTYPE 12345
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -182,8 +174,7 @@
** and no greater than 100. The number of directory entries in the
** telemetry packet will in large part determine the packet size.
*/
-#define FM_DIR_LIST_PKT_ENTRIES 20
-
+#define FM_DIR_LIST_PKT_ENTRIES 20
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -230,33 +221,33 @@
** no greater than 100 ms. The value zero generally means a very short
** task delay - refer to the target platform documentation for specifics.
*/
-#define FM_CHILD_FILE_BLOCK_SIZE 2048
-#define FM_CHILD_FILE_LOOP_COUNT 16
-#define FM_CHILD_FILE_SLEEP_MS 20
+#define FM_CHILD_FILE_BLOCK_SIZE 2048
+#define FM_CHILD_FILE_LOOP_COUNT 16
+#define FM_CHILD_FILE_SLEEP_MS 20
/** \fmcfg Child file stat sleep
**
** \par Description:
-** OS_stat is a CPU intensive call. FM uses the OS_stat call to query a
-** file’s size, date, and mode when setting up directory listings.
-** Querying a large number of files and/or files large in size when
+** OS_stat is a CPU intensive call. FM uses the OS_stat call to query a
+** file’s size, date, and mode when setting up directory listings.
+** Querying a large number of files and/or files large in size when
** processing directory listing commands can cause FM to hog the CPU. To
-** mitigate this, options to sleep a configurable number of milliseconds
+** mitigate this, options to sleep a configurable number of milliseconds
** between calls to OS_stat for a configurable number of files
** in a directory listing is provided. A large sleep cycle will not hang the CPU
** but it may take a long time for directory listing to complete. A shorter
** sleep cycle will speed up the directory listing commands but may cause
** FM to hog the CPU.
-**
+**
** FM_CHILD_STAT_SLEEP_MS: The number of milliseconds to sleep each
** cycle. One cycle is FM_CHILD_STAT_SLEEP_FILECOUNT.
-**
-** FM_CHILD_STAT_SLEEP_FILECOUNT: The number of files to process (OS_stat) before
+**
+** FM_CHILD_STAT_SLEEP_FILECOUNT: The number of files to process (OS_stat) before
** sleeping FM_CHILD_STAT_SLEEP_MS.
** Works in tandem with FM_CHILD_STAT_SLEEP_MS to reduce CPU hogging
** while allowing slightly more customization to balance time the operator is waiting to
** get data back from a directory listing versus FM hogging the CPU with calls to OS_stat
-**
+**
** In short:
** High SLEEP_MS means less CPU hogging by FM but a longer time to process a dir listing command
** Low SLEEP_MS means more potential CPU hogging by FM but shorter time to process a dir listing command
@@ -266,7 +257,7 @@
** The default is zero unless the mission needs require them to be changed.
**
*/
-#define FM_CHILD_STAT_SLEEP_MS 0
+#define FM_CHILD_STAT_SLEEP_MS 0
#define FM_CHILD_STAT_SLEEP_FILECOUNT 0
/** \fmcfg Child Task Command Queue Entry Count
@@ -285,8 +276,7 @@
** passing command arguments from the parent to the child task. The upper
** limit is arbitrary.
*/
-#define FM_CHILD_QUEUE_DEPTH 3
-
+#define FM_CHILD_QUEUE_DEPTH 3
/** \fmcfg Child Task Name - cFE object name
**
@@ -299,8 +289,7 @@
** no limits on the definition. Refer to CFE Executive Services
** for specific information on limits related to object names.
*/
-#define FM_CHILD_TASK_NAME "FM_CHILD_TASK"
-
+#define FM_CHILD_TASK_NAME "FM_CHILD_TASK"
/** \fmcfg Child Task Stack Size
**
@@ -315,20 +304,19 @@
** and no greater than 20480. These limits are purely arbitrary
** and may need to be modified for specific platforms.
*/
-#define FM_CHILD_TASK_STACK_SIZE 20480
-
+#define FM_CHILD_TASK_STACK_SIZE 20480
/** \fmcfg Child Task Execution Priority
**
** \par Description:
-** This parameter sets the execution priority for the FM child task.
-** It is highly recommended that this assignment be made by someone
-** familiar with the system requirements for tasks running on the
-** target platform. Note: This parameter is VxWorks® specific. Not
+** This parameter sets the execution priority for the FM child task.
+** It is highly recommended that this assignment be made by someone
+** familiar with the system requirements for tasks running on the
+** target platform. Note: This parameter is VxWorks® specific. Not
** all operating systems set task priority this way.
**
** \par Limits:
-** Value to be no less than 1 and no greater than 255.
+** Value to be no less than 1 and no greater than 255.
**
** \par Priority Values:
** Note that a small value has higher priority than a large value.
@@ -338,8 +326,7 @@
** parent defeats the purpose of having a child task to run in
** the background.
*/
-#define FM_CHILD_TASK_PRIORITY 205
-
+#define FM_CHILD_TASK_PRIORITY 205
/** \fmcfg Child Task Semaphore Name - cFE object name
**
@@ -353,8 +340,7 @@
** no limits on the definition. Refer to CFE Executive Services
** for specific information on limits related to object names.
*/
-#define FM_CHILD_SEM_NAME "FM_CHILD_SEM"
-
+#define FM_CHILD_SEM_NAME "FM_CHILD_SEM"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -372,8 +358,7 @@
** no limits on the definition. Refer to CFE Table Services
** for specific information on limits related to table names.
*/
-#define FM_TABLE_CFE_NAME "FreeSpace"
-
+#define FM_TABLE_CFE_NAME "FreeSpace"
/** \fmcfg Free Space Table Name - filename with path
**
@@ -385,8 +370,7 @@
** no limits on the definition. If the named table does not
** exist or fails validation, the table load will fail.
*/
-#define FM_TABLE_DEF_NAME "/cf/fm_freespace.tbl"
-
+#define FM_TABLE_DEF_NAME "/cf/fm_freespace.tbl"
/** \fmcfg Free Space Table Name - filename without path
**
@@ -400,8 +384,7 @@
** valid then the make process may fail, or the table file may
** be unloadable to the target hardware.
*/
-#define FM_TABLE_FILENAME "fm_freespace.tbl"
-
+#define FM_TABLE_FILENAME "fm_freespace.tbl"
/** \fmcfg Free Space Table Description
**
@@ -415,8 +398,7 @@
** no limits on the definition. Refer to cFE Table Services
** for limits related to table descriptive text.
*/
-#define FM_TABLE_DEF_DESC "FM File System Free Space Table"
-
+#define FM_TABLE_DEF_DESC "FM File System Free Space Table"
/** \fmcfg Number of Free Space Table Entries
**
@@ -430,14 +412,13 @@
** \par Limits:
** FM limits this value to be not less than 1 and not greater than 32.
*/
-#define FM_TABLE_ENTRY_COUNT 8
-
+#define FM_TABLE_ENTRY_COUNT 8
/** \fmcfg Table Data Validation Error Code
**
** \par Description:
** Table data is verified during the table load process. Should
-** the validation process fail, this value will be returned by
+** the validation process fail, this value will be returned by
** FM to cFE Table Services and displayed in an event message.
**
** \par Limits:
@@ -445,8 +426,19 @@
** no limits on the definition. Refer to cFE Table Services
** for limits related to error return values.
*/
-#define FM_TABLE_VALIDATION_ERR (0xCF000080L)
+#define FM_TABLE_VALIDATION_ERR (-1)
+/** \fmcfg Include Decompress
+**
+** \par Description:
+** If this setting is defined, FM will be built with the Decompress
+** command. Otherwise Decompress will not be built into the application.
+** If this setting is defined, FM will depend on an external FS_Lib.
+**
+** \par Limits:
+** N/A
+*/
+/*#define FM_INCLUDE_DECOMPRESS */
#endif /* _fm_platform_cfg_h_ */
diff --git a/fsw/src/fm_app.c b/fsw/src/fm_app.c
index 3fb30cf..476fcca 100644
--- a/fsw/src/fm_app.c
+++ b/fsw/src/fm_app.c
@@ -5,19 +5,19 @@
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
**
** Title: Core Flight System (CFS) File Manager (FM) Application
**
@@ -51,15 +51,13 @@
#include
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM application global data */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-FM_GlobalData_t FM_GlobalData;
-
+FM_GlobalData_t FM_GlobalData;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -69,12 +67,9 @@ FM_GlobalData_t FM_GlobalData;
void FM_AppMain(void)
{
- uint32 RunStatus = CFE_ES_APP_RUN;
- CFE_SB_MsgPtr_t MsgPtr = NULL;
- int32 Result = CFE_SUCCESS;
-
- /* Register application */
- Result = CFE_ES_RegisterApp();
+ uint32 RunStatus = CFE_ES_RunStatus_APP_RUN;
+ CFE_SB_Buffer_t *BufPtr = NULL;
+ int32 Result = CFE_SUCCESS;
/* Performance Log (start time counter) */
CFE_ES_PerfLogEntry(FM_APPMAIN_PERF_ID);
@@ -82,10 +77,7 @@ void FM_AppMain(void)
/*
** Perform application specific initialization...
*/
- if (Result == CFE_SUCCESS)
- {
- Result = FM_AppInit();
- }
+ Result = FM_AppInit();
/*
** Check for start-up error...
@@ -95,44 +87,64 @@ void FM_AppMain(void)
/*
** Set request to terminate main loop...
*/
- RunStatus = CFE_ES_APP_ERROR;
+ RunStatus = CFE_ES_RunStatus_APP_ERROR;
}
/*
** Main process loop...
*/
- while (CFE_ES_RunLoop(&RunStatus) == TRUE)
+ while (CFE_ES_RunLoop(&RunStatus) == true)
{
/* Performance Log (stop time counter) */
CFE_ES_PerfLogExit(FM_APPMAIN_PERF_ID);
/* Wait for the next Software Bus message */
- Result = CFE_SB_RcvMsg(&MsgPtr, FM_GlobalData.CmdPipe, CFE_SB_PEND_FOREVER);
+ Result = CFE_SB_ReceiveBuffer(&BufPtr, FM_GlobalData.CmdPipe, FM_SB_TIMEOUT);
/* Performance Log (start time counter) */
CFE_ES_PerfLogEntry(FM_APPMAIN_PERF_ID);
if (Result == CFE_SUCCESS)
{
- /* Process Software Bus message */
- FM_ProcessPkt(MsgPtr);
+ if (BufPtr != NULL)
+ {
+ /* Process Software Bus message */
+ FM_ProcessPkt(BufPtr);
+ }
+ else
+ {
+ /* Software Bus thought it succeeded but provided a bad pointer */
+ CFE_EVS_SendEvent(FM_SB_RECEIVE_NULL_PTR_ERR_EID, CFE_EVS_EventType_ERROR,
+ "Main loop error: SB returned NULL pointer on success");
+
+ /* Set request to terminate main loop */
+ RunStatus = CFE_ES_RunStatus_APP_ERROR;
+ }
+ }
+ else if (Result == CFE_SB_TIME_OUT)
+ {
+ /* Allow cFE the chance to manage tables. This is typically done
+ * during the housekeeping cycle, but if housekeeping is done at
+ * less than a 1Hz rate the table management is done here as well. */
+ FM_ReleaseTablePointers();
+ FM_AcquireTablePointers();
}
else
{
/* Process Software Bus error */
- CFE_EVS_SendEvent(FM_SB_RECEIVE_ERR_EID, CFE_EVS_ERROR,
- "Main loop error: SB receive: result = 0x%08X", (unsigned int)Result);
+ CFE_EVS_SendEvent(FM_SB_RECEIVE_ERR_EID, CFE_EVS_EventType_ERROR,
+ "Main loop error: SB receive: result = 0x%08X", (unsigned int)Result);
/* Set request to terminate main loop */
- RunStatus = CFE_ES_APP_ERROR;
+ RunStatus = CFE_ES_RunStatus_APP_ERROR;
}
}
/*
** Send an event describing the reason for the termination...
*/
- CFE_EVS_SendEvent(FM_EXIT_ERR_EID, CFE_EVS_ERROR,
- "Application terminating: result = 0x%08X", (unsigned int)Result);
+ CFE_EVS_SendEvent(FM_EXIT_ERR_EID, CFE_EVS_EventType_ERROR, "Application terminating: result = 0x%08X",
+ (unsigned int)Result);
/*
** In case cFE Event Services is not working...
@@ -151,7 +163,6 @@ void FM_AppMain(void)
} /* End FM_AppMain */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM application -- startup initialization processor */
@@ -160,33 +171,32 @@ void FM_AppMain(void)
int32 FM_AppInit(void)
{
- char *ErrText = "Initialization error:";
- int32 Result = CFE_SUCCESS;
+ const char *ErrText = "Initialization error:";
+ int32 Result = CFE_SUCCESS;
/* Initialize global data */
CFE_PSP_MemSet(&FM_GlobalData, 0, sizeof(FM_GlobalData_t));
/* Initialize child task semaphores */
- FM_GlobalData.ChildSemaphore = FM_CHILD_SEM_INVALID;
+ FM_GlobalData.ChildSemaphore = FM_CHILD_SEM_INVALID;
FM_GlobalData.ChildQueueCountSem = FM_CHILD_SEM_INVALID;
/* Register for event services */
- Result = CFE_EVS_Register(NULL, 0, CFE_EVS_BINARY_FILTER);
+ Result = CFE_EVS_Register(NULL, 0, CFE_EVS_EventFilter_BINARY);
if (Result != CFE_SUCCESS)
{
- CFE_EVS_SendEvent(FM_STARTUP_EVENTS_ERR_EID, CFE_EVS_ERROR,
- "%s register for event services: result = 0x%08X", ErrText, (unsigned int)Result);
+ CFE_EVS_SendEvent(FM_STARTUP_EVENTS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s register for event services: result = 0x%08X", ErrText, (unsigned int)Result);
}
else
{
/* Create Software Bus message pipe */
- Result = CFE_SB_CreatePipe(&FM_GlobalData.CmdPipe,
- FM_APP_PIPE_DEPTH, FM_APP_PIPE_NAME);
+ Result = CFE_SB_CreatePipe(&FM_GlobalData.CmdPipe, FM_APP_PIPE_DEPTH, FM_APP_PIPE_NAME);
if (Result != CFE_SUCCESS)
{
- CFE_EVS_SendEvent(FM_STARTUP_CREAT_PIPE_ERR_EID, CFE_EVS_ERROR,
- "%s create SB input pipe: result = 0x%08X", ErrText, (unsigned int)Result);
+ CFE_EVS_SendEvent(FM_STARTUP_CREAT_PIPE_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s create SB input pipe: result = 0x%08X", ErrText, (unsigned int)Result);
}
else
{
@@ -195,8 +205,8 @@ int32 FM_AppInit(void)
if (Result != CFE_SUCCESS)
{
- CFE_EVS_SendEvent(FM_STARTUP_SUBSCRIB_HK_ERR_EID, CFE_EVS_ERROR,
- "%s subscribe to HK request: result = 0x%08X", ErrText, (unsigned int)Result);
+ CFE_EVS_SendEvent(FM_STARTUP_SUBSCRIB_HK_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s subscribe to HK request: result = 0x%08X", ErrText, (unsigned int)Result);
}
}
}
@@ -209,8 +219,8 @@ int32 FM_AppInit(void)
if (Result != CFE_SUCCESS)
{
- CFE_EVS_SendEvent(FM_STARTUP_SUBSCRIB_GCMD_ERR_EID, CFE_EVS_ERROR,
- "%s subscribe to FM commands: result = 0x%08X", ErrText, (unsigned int)Result);
+ CFE_EVS_SendEvent(FM_STARTUP_SUBSCRIB_GCMD_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s subscribe to FM commands: result = 0x%08X", ErrText, (unsigned int)Result);
}
else
{
@@ -219,8 +229,8 @@ int32 FM_AppInit(void)
if (Result != CFE_SUCCESS)
{
- CFE_EVS_SendEvent(FM_STARTUP_TABLE_INIT_ERR_EID, CFE_EVS_ERROR,
- "%s register free space table: result = 0x%08X", ErrText, (unsigned int)Result);
+ CFE_EVS_SendEvent(FM_STARTUP_TABLE_INIT_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s register free space table: result = 0x%08X", ErrText, (unsigned int)Result);
}
else
{
@@ -228,154 +238,150 @@ int32 FM_AppInit(void)
FM_ChildInit();
/* Application startup event message */
- CFE_EVS_SendEvent(FM_STARTUP_EID, CFE_EVS_INFORMATION,
- "Initialization complete: version %d.%d.%d.%d",
- FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV);
+ CFE_EVS_SendEvent(FM_STARTUP_EID, CFE_EVS_EventType_INFORMATION,
+ "Initialization complete: version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION,
+ FM_REVISION, FM_MISSION_REV);
}
}
}
- return(Result);
+ return (Result);
} /* End of FM_AppInit() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM application -- input packet processor */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ProcessPkt(CFE_SB_MsgPtr_t MessagePtr)
+void FM_ProcessPkt(const CFE_SB_Buffer_t *BufPtr)
{
- CFE_SB_MsgId_t MessageID;
+ CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID;
- MessageID = CFE_SB_GetMsgId(MessagePtr);
+ CFE_MSG_GetMsgId(&BufPtr->Msg, &MessageID);
- switch(MessageID)
+ switch (MessageID)
{
/* Housekeeping request */
case FM_SEND_HK_MID:
- FM_ReportHK(MessagePtr);
+ FM_ReportHK((CFE_MSG_CommandHeader_t *)BufPtr);
break;
/* FM ground commands */
case FM_CMD_MID:
- FM_ProcessCmd(MessagePtr);
+ FM_ProcessCmd(BufPtr);
break;
default:
- CFE_EVS_SendEvent(FM_MID_ERR_EID, CFE_EVS_ERROR,
- "Main loop error: invalid message ID: mid = 0x%04X", MessageID);
+ CFE_EVS_SendEvent(FM_MID_ERR_EID, CFE_EVS_EventType_ERROR,
+ "Main loop error: invalid message ID: mid = 0x%08X", MessageID);
break;
-
}
return;
} /* End of FM_ProcessPkt */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM application -- command packet processor */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-void FM_ProcessCmd(CFE_SB_MsgPtr_t MessagePtr)
+void FM_ProcessCmd(const CFE_SB_Buffer_t *BufPtr)
{
- boolean Result = TRUE;
- uint16 CommandCode = 0;
+ bool Result = true;
+ CFE_MSG_FcnCode_t CommandCode = 0;
- CommandCode = CFE_SB_GetCmdCode(MessagePtr);
+ CFE_MSG_GetFcnCode(&BufPtr->Msg, &CommandCode);
/* Invoke specific command handler */
switch (CommandCode)
{
case FM_NOOP_CC:
- Result = FM_NoopCmd(MessagePtr);
+ Result = FM_NoopCmd(BufPtr);
break;
case FM_RESET_CC:
- Result = FM_ResetCountersCmd(MessagePtr);
+ Result = FM_ResetCountersCmd(BufPtr);
break;
case FM_COPY_CC:
- Result = FM_CopyFileCmd(MessagePtr);
+ Result = FM_CopyFileCmd(BufPtr);
break;
case FM_MOVE_CC:
- Result = FM_MoveFileCmd(MessagePtr);
+ Result = FM_MoveFileCmd(BufPtr);
break;
case FM_RENAME_CC:
- Result = FM_RenameFileCmd(MessagePtr);
+ Result = FM_RenameFileCmd(BufPtr);
break;
case FM_DELETE_CC:
- Result = FM_DeleteFileCmd(MessagePtr);
+ Result = FM_DeleteFileCmd(BufPtr);
break;
case FM_DELETE_ALL_CC:
- Result = FM_DeleteAllFilesCmd(MessagePtr);
+ Result = FM_DeleteAllFilesCmd(BufPtr);
break;
-
+#ifdef FM_INCLUDE_DECOMPRESS
case FM_DECOMPRESS_CC:
- Result = FM_DecompressFileCmd(MessagePtr);
+ Result = FM_DecompressFileCmd(BufPtr);
break;
-
+#endif
case FM_CONCAT_CC:
- Result = FM_ConcatFilesCmd(MessagePtr);
+ Result = FM_ConcatFilesCmd(BufPtr);
break;
case FM_GET_FILE_INFO_CC:
- Result = FM_GetFileInfoCmd(MessagePtr);
+ Result = FM_GetFileInfoCmd(BufPtr);
break;
case FM_GET_OPEN_FILES_CC:
- Result = FM_GetOpenFilesCmd(MessagePtr);
+ Result = FM_GetOpenFilesCmd(BufPtr);
break;
case FM_CREATE_DIR_CC:
- Result = FM_CreateDirectoryCmd(MessagePtr);
+ Result = FM_CreateDirectoryCmd(BufPtr);
break;
case FM_DELETE_DIR_CC:
- Result = FM_DeleteDirectoryCmd(MessagePtr);
+ Result = FM_DeleteDirectoryCmd(BufPtr);
break;
case FM_GET_DIR_FILE_CC:
- Result = FM_GetDirListFileCmd(MessagePtr);
+ Result = FM_GetDirListFileCmd(BufPtr);
break;
case FM_GET_DIR_PKT_CC:
- Result = FM_GetDirListPktCmd(MessagePtr);
+ Result = FM_GetDirListPktCmd(BufPtr);
break;
case FM_GET_FREE_SPACE_CC:
- Result = FM_GetFreeSpaceCmd(MessagePtr);
+ Result = FM_GetFreeSpaceCmd(BufPtr);
break;
case FM_SET_TABLE_STATE_CC:
- Result = FM_SetTableStateCmd(MessagePtr);
+ Result = FM_SetTableStateCmd(BufPtr);
break;
case FM_DELETE_INT_CC:
- Result = FM_DeleteFileCmd(MessagePtr);
+ Result = FM_DeleteFileCmd(BufPtr);
break;
-
+
case FM_SET_FILE_PERM_CC:
- Result = FM_SetPermissionsCmd(MessagePtr);
+ Result = FM_SetPermissionsCmd(BufPtr);
break;
default:
- Result = FALSE;
- CFE_EVS_SendEvent(FM_CC_ERR_EID, CFE_EVS_ERROR,
- "Main loop error: invalid command code: cc = %d", CommandCode);
+ Result = false;
+ CFE_EVS_SendEvent(FM_CC_ERR_EID, CFE_EVS_EventType_ERROR, "Main loop error: invalid command code: cc = %d",
+ CommandCode);
break;
}
- if (Result == TRUE)
+ if (Result == true)
{
/* Increment command success counter */
if ((CommandCode != FM_RESET_CC) && (CommandCode != FM_DELETE_INT_CC))
@@ -391,67 +397,58 @@ void FM_ProcessCmd(CFE_SB_MsgPtr_t MessagePtr)
return;
-} /* End of FM_ProcessCmd */
-
+} // End of FM_ProcessCmd
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM application -- housekeeping request packet processor */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-void FM_ReportHK(CFE_SB_MsgPtr_t MessagePtr)
+void FM_ReportHK(const CFE_MSG_CommandHeader_t *Msg)
{
- char *CmdText = "HK Request";
- boolean Result = TRUE;
+ const char *CmdText = "HK Request";
+ bool Result = true;
/* Verify command packet length */
- Result = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_HousekeepingCmd_t),
- FM_HK_REQ_ERR_EID, CmdText);
+ Result = FM_IsValidCmdPktLength(&Msg->Msg,
+ sizeof(FM_HousekeepingCmd_t),
+ FM_HK_REQ_ERR_EID,
+ CmdText);
- /* Report FM housekeeping telemetry data */
- if (Result == TRUE)
+ if (Result == true)
{
- /* Release table pointers */
FM_ReleaseTablePointers();
- /* Allow cFE chance to dump, update, etc. */
FM_AcquireTablePointers();
/* Initialize housekeeping telemetry message */
- CFE_SB_InitMsg(&FM_GlobalData.HousekeepingPkt, FM_HK_TLM_MID,
- sizeof(FM_HousekeepingPkt_t), TRUE);
+ CFE_MSG_Init(&FM_GlobalData.HousekeepingPkt.TlmHeader.Msg, FM_HK_TLM_MID, sizeof(FM_HousekeepingPkt_t));
/* Report application command counters */
- FM_GlobalData.HousekeepingPkt.CommandCounter = FM_GlobalData.CommandCounter;
+ FM_GlobalData.HousekeepingPkt.CommandCounter = FM_GlobalData.CommandCounter;
FM_GlobalData.HousekeepingPkt.CommandErrCounter = FM_GlobalData.CommandErrCounter;
- /* Report current number of open files */
FM_GlobalData.HousekeepingPkt.NumOpenFiles = FM_GetOpenFilesData(NULL);
/* Report child task command counters */
- FM_GlobalData.HousekeepingPkt.ChildCmdCounter = FM_GlobalData.ChildCmdCounter;
- FM_GlobalData.HousekeepingPkt.ChildCmdErrCounter = FM_GlobalData.ChildCmdErrCounter;
+ FM_GlobalData.HousekeepingPkt.ChildCmdCounter = FM_GlobalData.ChildCmdCounter;
+ FM_GlobalData.HousekeepingPkt.ChildCmdErrCounter = FM_GlobalData.ChildCmdErrCounter;
FM_GlobalData.HousekeepingPkt.ChildCmdWarnCounter = FM_GlobalData.ChildCmdWarnCounter;
- /* Report number of commands in child task queue */
FM_GlobalData.HousekeepingPkt.ChildQueueCount = FM_GlobalData.ChildQueueCount;
/* Report current and previous commands executed by the child task */
- FM_GlobalData.HousekeepingPkt.ChildCurrentCC = FM_GlobalData.ChildCurrentCC;
+ FM_GlobalData.HousekeepingPkt.ChildCurrentCC = FM_GlobalData.ChildCurrentCC;
FM_GlobalData.HousekeepingPkt.ChildPreviousCC = FM_GlobalData.ChildPreviousCC;
- /* Timestamp and send housekeeping telemetry packet */
- CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.HousekeepingPkt);
- CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.HousekeepingPkt);
+ CFE_SB_TimeStampMsg(&FM_GlobalData.HousekeepingPkt.TlmHeader.Msg);
+ CFE_SB_TransmitMsg(&FM_GlobalData.HousekeepingPkt.TlmHeader.Msg, true);
}
return;
-} /* End of FM_ReportHK */
-
+} // End of FM_ReportHK
/************************/
/* End of File Comment */
/************************/
-
diff --git a/fsw/src/fm_app.h b/fsw/src/fm_app.h
index 47f70bc..39c2657 100644
--- a/fsw/src/fm_app.h
+++ b/fsw/src/fm_app.h
@@ -5,19 +5,19 @@
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
**
** Title: CFS File Manager (FM) Application Header File
**
@@ -35,13 +35,21 @@
#include "cfe.h"
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM application global function prototypes */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+** \brief Wakeup for FM
+**
+** \par Description
+** Wakes up FM every 1 second for routine maintenance whether a
+** message was received or not.
+*/
+#define FM_SB_TIMEOUT 1000
+
/**
** \brief Application entry point and main process loop
**
@@ -61,7 +69,6 @@
**/
void FM_AppMain(void);
-
/**
** \brief FM Application Initialization Function
**
@@ -88,7 +95,6 @@ void FM_AppMain(void);
**/
int32 FM_AppInit(void);
-
/**
** \brief Process Input Command Packets
**
@@ -98,12 +104,11 @@ int32 FM_AppInit(void);
**
** \par Assumptions, External Events, and Notes: None
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus message buffer.
**
** \sa #FM_ReportHK, #FM_ProcessCmd
**/
-void FM_ProcessPkt(CFE_SB_MsgPtr_t MessagePtr);
-
+void FM_ProcessPkt(const CFE_SB_Buffer_t *MessagePtr);
/**
** \brief Process FM Ground Commands
@@ -114,15 +119,14 @@ void FM_ProcessPkt(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes: None
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus message buffer.
**
** \sa #FM_Noop, #FM_Reset, #FM_Copy, #FM_Move, #FM_Rename, #FM_Delete,
** #FM_DeleteAll, #FM_Decompress, #FM_Concat, #FM_GetFileInfo,
** #FM_GetOpenFiles, #FM_CreateDir, #FM_DeleteDir, #FM_GetDirFile,
** #FM_GetDirPkt, #FM_GetFreeSpace
**/
-void FM_ProcessCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+void FM_ProcessCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Housekeeping Request Command Handler
@@ -131,18 +135,17 @@ void FM_ProcessCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** Allow CFE Table Services the opportunity to manage the File System
** Free Space Table. This provides a mechanism to receive table updates.
-**
+**
** Populate the FM application Housekeeping Telemetry packet. Timestamp
** the packet and send it to ground via the Software Bus.
**
** \par Assumptions, External Events, and Notes: None
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] Msg - Pointer to Software Bus command packet.
**
** \sa #FM_HousekeepingCmd_t, #FM_HousekeepingPkt_t
**/
-void FM_ReportHK(CFE_SB_MsgPtr_t MessagePtr);
-
+void FM_ReportHK(const CFE_MSG_CommandHeader_t *Msg);
#endif /* _fm_app_h_ */
diff --git a/fsw/src/fm_child.c b/fsw/src/fm_child.c
index cb83704..4fdd585 100644
--- a/fsw/src/fm_child.c
+++ b/fsw/src/fm_child.c
@@ -1,23 +1,23 @@
/*
-** Filename: fm_child.c
+** Filename: fm_child.c
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
**
** Purpose: File Manager (FM) Child task (low priority command handler)
**
@@ -40,16 +40,19 @@
#include
+#ifdef FM_INCLUDE_DECOMPRESS
+#include "cfs_fs_lib.h"
+#endif
+
/************************************************************************
** OSAL Compatibility for directory name access
** New OSAL version have an access macro to get the string. If that
** macro is defined, use it, otherwise assume "d_name" structure member.
*************************************************************************/
#ifndef OS_DIRENTRY_NAME
-#define OS_DIRENTRY_NAME(x) ((x).d_name)
+#define OS_DIRENTRY_NAME(x) ((x).d_name)
#endif
-
#define FM_QUEUE_SEM_NAME "FM_QUEUE_SEM"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -60,11 +63,10 @@
int32 FM_ChildInit(void)
{
- int32 TaskTextLen = OS_MAX_PATH_LEN;
- char TaskText[OS_MAX_PATH_LEN] = "\0";
- int32 Result = CFE_SUCCESS;
- uint32 TaskEID = 0;
-
+ int32 TaskTextLen = OS_MAX_PATH_LEN;
+ char TaskText[OS_MAX_PATH_LEN] = "\0";
+ int32 Result = CFE_SUCCESS;
+ uint32 TaskEID = 0;
/* Create counting semaphore (given by parent to wake-up child) */
Result = OS_CountSemCreate(&FM_GlobalData.ChildSemaphore, FM_CHILD_SEM_NAME, 0, 0);
@@ -72,7 +74,7 @@ int32 FM_ChildInit(void)
{
TaskEID = FM_CHILD_INIT_SEM_ERR_EID;
strncpy(TaskText, "create semaphore failed", TaskTextLen - 1);
- TaskText[TaskTextLen - 1] = '\0';
+ TaskText[TaskTextLen - 1] = '\0';
}
else
{
@@ -84,37 +86,32 @@ int32 FM_ChildInit(void)
TaskEID = FM_CHILD_INIT_QSEM_ERR_EID;
strncpy(TaskText, "create queue count semaphore failed", TaskTextLen - 1);
- TaskText[TaskTextLen - 1] = '\0';
+ TaskText[TaskTextLen - 1] = '\0';
}
else
{
/* Create child task (low priority command handler) */
- Result = CFE_ES_CreateChildTask(&FM_GlobalData.ChildTaskID,
- FM_CHILD_TASK_NAME,
- FM_ChildTask, 0,
- FM_CHILD_TASK_STACK_SIZE,
- FM_CHILD_TASK_PRIORITY, 0);
+ Result = CFE_ES_CreateChildTask(&FM_GlobalData.ChildTaskID, FM_CHILD_TASK_NAME, FM_ChildTask, 0,
+ FM_CHILD_TASK_STACK_SIZE, FM_CHILD_TASK_PRIORITY, 0);
if (Result != CFE_SUCCESS)
{
TaskEID = FM_CHILD_INIT_CREATE_ERR_EID;
strncpy(TaskText, "create task failed", TaskTextLen - 1);
- TaskText[TaskTextLen - 1] = '\0';
+ TaskText[TaskTextLen - 1] = '\0';
}
}
}
-
+
if (Result != CFE_SUCCESS)
- {
- CFE_EVS_SendEvent(TaskEID, CFE_EVS_ERROR,
- "Child Task initialization error: %s: result = %d",
- TaskText, (int)Result);
+ {
+ CFE_EVS_SendEvent(TaskEID, CFE_EVS_EventType_ERROR, "Child Task initialization error: %s: result = %d",
+ TaskText, (int)Result);
}
- return(Result);
+ return (Result);
} /* End of FM_ChildInit() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task -- task entry point */
@@ -123,29 +120,16 @@ int32 FM_ChildInit(void)
void FM_ChildTask(void)
{
- char *TaskText = "Child Task";
- int32 Result = CFE_SUCCESS;
+ const char *TaskText = "Child Task";
/*
** The child task runs until the parent dies (normal end) or
** until it encounters a fatal error (semaphore error, etc.)...
*/
- Result = CFE_ES_RegisterChildTask();
-
- if (Result != CFE_SUCCESS)
- {
- /* Can't call CFE_EVS_SendEvent if child was not successfully registered */
- CFE_ES_WriteToSysLog("%s initialization error: register child failed: result = %d",
- TaskText, (int)Result);
- }
- else
- {
- CFE_EVS_SendEvent(FM_CHILD_INIT_EID, CFE_EVS_INFORMATION,
- "%s initialization complete", TaskText);
+ CFE_EVS_SendEvent(FM_CHILD_INIT_EID, CFE_EVS_EventType_INFORMATION, "%s initialization complete", TaskText);
- /* Child task process loop */
- FM_ChildLoop();
- }
+ /* Child task process loop */
+ FM_ChildLoop();
/* Stop the parent from invoking the child task */
FM_GlobalData.ChildSemaphore = FM_CHILD_SEM_INVALID;
@@ -157,7 +141,6 @@ void FM_ChildTask(void)
} /* End of FM_ChildTask() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task -- main process loop */
@@ -166,8 +149,8 @@ void FM_ChildTask(void)
void FM_ChildLoop(void)
{
- char *TaskText = "Child Task termination error: ";
- int32 Result = CFE_SUCCESS;
+ const char *TaskText = "Child Task termination error: ";
+ int32 Result = CFE_SUCCESS;
while (Result == CFE_SUCCESS)
{
@@ -183,21 +166,19 @@ void FM_ChildLoop(void)
if (FM_GlobalData.ChildQueueCount == 0)
{
FM_GlobalData.ChildCmdErrCounter++;
- CFE_EVS_SendEvent(FM_CHILD_TERM_EMPTYQ_ERR_EID, CFE_EVS_ERROR,
- "%s empty queue", TaskText);
+ CFE_EVS_SendEvent(FM_CHILD_TERM_EMPTYQ_ERR_EID, CFE_EVS_EventType_ERROR, "%s empty queue", TaskText);
/* Set result that will terminate child task run loop */
- Result = CFE_OS_ERROR;
+ Result = OS_ERROR;
}
else if (FM_GlobalData.ChildReadIndex >= FM_CHILD_QUEUE_DEPTH)
{
FM_GlobalData.ChildCmdErrCounter++;
- CFE_EVS_SendEvent(FM_CHILD_TERM_QIDX_ERR_EID, CFE_EVS_ERROR,
- "%s invalid queue index: index = %d",
- TaskText, (int)FM_GlobalData.ChildReadIndex);
+ CFE_EVS_SendEvent(FM_CHILD_TERM_QIDX_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s invalid queue index: index = %d", TaskText, (int)FM_GlobalData.ChildReadIndex);
/* Set result that will terminate child task run loop */
- Result = CFE_OS_ERROR;
+ Result = OS_ERROR;
}
else
{
@@ -207,9 +188,8 @@ void FM_ChildLoop(void)
}
else
{
- CFE_EVS_SendEvent(FM_CHILD_TERM_SEM_ERR_EID, CFE_EVS_ERROR,
- "%s semaphore take failed: result = %d",
- TaskText, (int)Result);
+ CFE_EVS_SendEvent(FM_CHILD_TERM_SEM_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s semaphore take failed: result = %d", TaskText, (int)Result);
}
CFE_ES_PerfLogExit(FM_CHILD_TASK_PERF_ID);
@@ -219,7 +199,6 @@ void FM_ChildLoop(void)
} /* End of FM_ChildLoop() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task -- interface handshake processor */
@@ -228,8 +207,8 @@ void FM_ChildLoop(void)
void FM_ChildProcess(void)
{
- char *TaskText = "Child Task";
- FM_ChildQueueEntry_t *CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex];
+ const char * TaskText = "Child Task";
+ FM_ChildQueueEntry_t *CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex];
/* Invoke the command specific handler */
switch (CmdArgs->CommandCode)
@@ -253,11 +232,11 @@ void FM_ChildProcess(void)
case FM_DELETE_ALL_CC:
FM_ChildDeleteAllCmd(CmdArgs);
break;
-
+#ifdef FM_INCLUDE_DECOMPRESS
case FM_DECOMPRESS_CC:
FM_ChildDecompressCmd(CmdArgs);
break;
-
+#endif
case FM_CONCAT_CC:
FM_ChildConcatCmd(CmdArgs);
break;
@@ -285,16 +264,15 @@ void FM_ChildProcess(void)
case FM_DELETE_INT_CC:
FM_ChildDeleteCmd(CmdArgs);
break;
-
+
case FM_SET_FILE_PERM_CC:
FM_ChildSetPermissionsCmd(CmdArgs);
break;
default:
FM_GlobalData.ChildCmdErrCounter++;
- CFE_EVS_SendEvent(FM_CHILD_EXE_ERR_EID, CFE_EVS_ERROR,
- "%s execution error: invalid command code: cc = %d",
- TaskText, (int)CmdArgs->CommandCode);
+ CFE_EVS_SendEvent(FM_CHILD_EXE_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s execution error: invalid command code: cc = %d", TaskText, (int)CmdArgs->CommandCode);
break;
}
@@ -315,17 +293,16 @@ void FM_ChildProcess(void)
} /* End of FM_ChildProcess() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Copy File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildCopyCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildCopyCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Copy File";
- int32 OS_Status = OS_SUCCESS;
+ const char *CmdText = "Copy File";
+ int32 OS_Status = OS_SUCCESS;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
@@ -338,39 +315,37 @@ void FM_ChildCopyCmd(FM_ChildQueueEntry_t *CmdArgs)
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_COPY_OS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_cp failed: result = %d, src = %s, tgt = %s",
- CmdText, (int)OS_Status, CmdArgs->Source1, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_COPY_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_cp failed: result = %d, src = %s, tgt = %s", CmdText, (int)OS_Status,
+ CmdArgs->Source1, CmdArgs->Target);
}
else
{
FM_GlobalData.ChildCmdCounter++;
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_COPY_CMD_EID, CFE_EVS_DEBUG,
- "%s command: src = %s, tgt = %s",
- CmdText, CmdArgs->Source1, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_COPY_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: src = %s, tgt = %s", CmdText,
+ CmdArgs->Source1, CmdArgs->Target);
}
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildCopyCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Move File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildMoveCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildMoveCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Move File";
- int32 OS_Status = OS_SUCCESS;
+ const char *CmdText = "Move File";
+ int32 OS_Status = OS_SUCCESS;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
@@ -382,39 +357,37 @@ void FM_ChildMoveCmd(FM_ChildQueueEntry_t *CmdArgs)
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_MOVE_OS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_mv failed: result = %d, src = %s, tgt = %s",
- CmdText, (int)OS_Status, CmdArgs->Source1, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_MOVE_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_mv failed: result = %d, src = %s, tgt = %s", CmdText, (int)OS_Status,
+ CmdArgs->Source1, CmdArgs->Target);
}
else
{
FM_GlobalData.ChildCmdCounter++;
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_MOVE_CMD_EID, CFE_EVS_DEBUG,
- "%s command: src = %s, tgt = %s",
- CmdText, CmdArgs->Source1, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_MOVE_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: src = %s, tgt = %s", CmdText,
+ CmdArgs->Source1, CmdArgs->Target);
}
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildMoveCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Rename File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildRenameCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildRenameCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Rename File";
- int32 OS_Status = OS_SUCCESS;
+ const char *CmdText = "Rename File";
+ int32 OS_Status = OS_SUCCESS;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
@@ -426,39 +399,37 @@ void FM_ChildRenameCmd(FM_ChildQueueEntry_t *CmdArgs)
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_RENAME_OS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_rename failed: result = %d, src = %s, tgt = %s",
- CmdText, (int)OS_Status, CmdArgs->Source1, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_RENAME_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_rename failed: result = %d, src = %s, tgt = %s", CmdText, (int)OS_Status,
+ CmdArgs->Source1, CmdArgs->Target);
}
else
{
FM_GlobalData.ChildCmdCounter++;
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_RENAME_CMD_EID, CFE_EVS_DEBUG,
- "%s command: src = %s, tgt = %s",
- CmdText, CmdArgs->Source1, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_RENAME_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: src = %s, tgt = %s", CmdText,
+ CmdArgs->Source1, CmdArgs->Target);
}
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildRenameCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Delete File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildDeleteCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildDeleteCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Delete File";
- int32 OS_Status = OS_SUCCESS;
+ const char *CmdText = "Delete File";
+ int32 OS_Status = OS_SUCCESS;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
@@ -470,9 +441,9 @@ void FM_ChildDeleteCmd(FM_ChildQueueEntry_t *CmdArgs)
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_DELETE_OS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_remove failed: result = %d, file = %s",
- CmdText, (int)OS_Status, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_DELETE_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_remove failed: result = %d, file = %s", CmdText, (int)OS_Status,
+ CmdArgs->Source1);
}
else
{
@@ -481,20 +452,19 @@ void FM_ChildDeleteCmd(FM_ChildQueueEntry_t *CmdArgs)
if (CmdArgs->CommandCode != FM_DELETE_INT_CC)
{
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_DELETE_CMD_EID, CFE_EVS_DEBUG,
- "%s command: file = %s", CmdText, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_DELETE_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: file = %s", CmdText,
+ CmdArgs->Source1);
}
}
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildDeleteCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Delete All Files */
@@ -503,16 +473,16 @@ void FM_ChildDeleteCmd(FM_ChildQueueEntry_t *CmdArgs)
void FM_ChildDeleteAllCmd(FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Delete All Files";
- os_dirp_t DirPtr = NULL;
- os_dirent_t *DirEntry = NULL;
- int32 OS_Status = OS_SUCCESS;
- uint32 FilenameState = FM_NAME_IS_INVALID;
- uint32 NameLength = 0;
- uint32 DeleteCount = 0;
- uint32 FilesNotDeletedCount = 0;
- uint32 DirectoriesSkippedCount = 0;
- char Filename[OS_MAX_PATH_LEN] = "\0";
+ const char *CmdText = "Delete All Files";
+ uint32 DirId = 0;
+ os_dirent_t DirEntry;
+ int32 OS_Status = OS_SUCCESS;
+ uint32 FilenameState = FM_NAME_IS_INVALID;
+ uint32 NameLength = 0;
+ uint32 DeleteCount = 0;
+ uint32 FilesNotDeletedCount = 0;
+ uint32 DirectoriesSkippedCount = 0;
+ char Filename[OS_MAX_PATH_LEN] = "\0";
/*
** Command argument useage for this command:
@@ -528,178 +498,174 @@ void FM_ChildDeleteAllCmd(FM_ChildQueueEntry_t *CmdArgs)
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
/* Open directory so that we can read from it */
- DirPtr = OS_opendir(Directory);
+ OS_Status = OS_DirectoryOpen(&DirId, Directory);
- if (DirPtr == NULL)
+ if (OS_Status != OS_SUCCESS)
{
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_DELETE_ALL_OS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_opendir failed: dir = %s",
- CmdText, Directory);
+ CFE_EVS_SendEvent(FM_DELETE_ALL_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_DirectoryOpen failed: dir = %s", CmdText, Directory);
}
else
{
/* Read each directory entry and delete the files */
- while ((DirEntry = OS_readdir(DirPtr)) != NULL )
+
+ while (OS_DirectoryRead(DirId, &DirEntry) == OS_SUCCESS)
{
- /*
- ** Ignore the "." and ".." directory entries
+ /*
+ ** Ignore the "." and ".." directory entries
*/
- if ((strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_THIS_DIRECTORY) != 0) &&
- (strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_PARENT_DIRECTORY) != 0))
+ if ((strcmp(OS_DIRENTRY_NAME(DirEntry), FM_THIS_DIRECTORY) != 0) &&
+ (strcmp(OS_DIRENTRY_NAME(DirEntry), FM_PARENT_DIRECTORY) != 0))
{
/* Construct full path filename */
- NameLength = strlen(DirWithSep) + strlen(OS_DIRENTRY_NAME(*DirEntry));
+ NameLength = strlen(DirWithSep) + strlen(OS_DIRENTRY_NAME(DirEntry));
if (NameLength >= OS_MAX_PATH_LEN)
{
- FilesNotDeletedCount++;
+ FilesNotDeletedCount++;
}
else
{
/* Note: Directory name already has trailing "/" appended */
- strncpy(Filename, DirWithSep, OS_MAX_PATH_LEN - 1);
- Filename[OS_MAX_PATH_LEN - 1] = '\0';
-
- strncat(Filename, OS_DIRENTRY_NAME(*DirEntry), (NameLength - strlen(DirWithSep)));
+ snprintf(Filename, sizeof(Filename), "%s%s", DirWithSep, OS_DIRENTRY_NAME(DirEntry));
/* What kind of directory entry is this? */
- FilenameState = FM_GetFilenameState(Filename, OS_MAX_PATH_LEN, FALSE);
+ FilenameState = FM_GetFilenameState(Filename, OS_MAX_PATH_LEN, false);
- /* FilenameState cannot have a value beyond five macros in cases below */
- switch (FilenameState)
- {
- case FM_NAME_IS_INVALID:
- FilesNotDeletedCount++;
- break;
+ /* FilenameState cannot have a value beyond five macros in cases below */
+ switch (FilenameState)
+ {
+ case FM_NAME_IS_INVALID:
+ FilesNotDeletedCount++;
+ break;
case FM_NAME_IS_NOT_IN_USE:
-
+
/* This result is very unlikely - the */
/* name existed a moment ago when */
/* the directory entry was read but */
/* now the call to OS_stat() failed */
/* implying that the entry is gone */
FilesNotDeletedCount++;
- break;
-
- case FM_NAME_IS_DIRECTORY:
+ break;
+
+ case FM_NAME_IS_DIRECTORY:
DirectoriesSkippedCount++;
- break;
-
- case FM_NAME_IS_FILE_OPEN:
+ break;
+
+ case FM_NAME_IS_FILE_OPEN:
FilesNotDeletedCount++;
- break;
-
- case FM_NAME_IS_FILE_CLOSED:
+ break;
+
+ case FM_NAME_IS_FILE_CLOSED:
if ((OS_Status = OS_remove(Filename)) == OS_SUCCESS)
{
- /*
- ** After deleting the file, rewind the directory
- ** to keep the file system from getting confused
- */
- OS_rewinddir(DirPtr);
-
- /* Increment delete count */
- DeleteCount++;
+ /*
+ ** After deleting the file, rewind the directory
+ ** to keep the file system from getting confused
+ */
+ OS_DirectoryRewind(DirId);
+
+ /* Increment delete count */
+ DeleteCount++;
}
else
{
- FilesNotDeletedCount++;
+ FilesNotDeletedCount++;
}
- break;
- default:
+ break;
+ default:
FilesNotDeletedCount++;
break;
} /* end switch statement */
}
} /* end if "." or ".." directory entries */
- } /* End while OS_readdir */
+ } /* End while OS_ReadDirectory */
+
+ OS_DirectoryClose(DirId);
- OS_closedir(DirPtr);
-
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG,
- "%s command: deleted %d files: dir = %s",
+ CFE_EVS_SendEvent(FM_DELETE_ALL_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: deleted %d files: dir = %s",
CmdText, (int)DeleteCount, Directory);
FM_GlobalData.ChildCmdCounter++;
- if ( FilesNotDeletedCount > 0 )
+ if (FilesNotDeletedCount > 0)
{
- /* If errors occured, report generic event(s) */
- CFE_EVS_SendEvent(FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION,
- "%s command: one or more files could not be deleted. Files may be open : dir = %s",
- CmdText, Directory);
- FM_GlobalData.ChildCmdWarnCounter++;
+ /* If errors occured, report generic event(s) */
+ CFE_EVS_SendEvent(FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_EventType_INFORMATION,
+ "%s command: one or more files could not be deleted. Files may be open : dir = %s",
+ CmdText, Directory);
+ FM_GlobalData.ChildCmdWarnCounter++;
}
- if ( DirectoriesSkippedCount > 0 )
+ if (DirectoriesSkippedCount > 0)
{
- /* If errors occured, report generic event(s) */
- CFE_EVS_SendEvent(FM_DELETE_ALL_SKIP_WARNING_EID, CFE_EVS_INFORMATION,
- "%s command: one or more directories skipped : dir = %s",
- CmdText, Directory);
- FM_GlobalData.ChildCmdWarnCounter++;
+ /* If errors occured, report generic event(s) */
+ CFE_EVS_SendEvent(FM_DELETE_ALL_SKIP_WARNING_EID, CFE_EVS_EventType_INFORMATION,
+ "%s command: one or more directories skipped : dir = %s", CmdText, Directory);
+ FM_GlobalData.ChildCmdWarnCounter++;
}
- } /* end if DirPtr == NULL */
+ } /* end if OS_Status != OS_SUCCESS */
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildDeleteAllCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Decompress File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildDecompressCmd(FM_ChildQueueEntry_t *CmdArgs)
+#ifdef FM_INCLUDE_DECOMPRESS
+
+void FM_ChildDecompressCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Decompress File";
- int32 CFE_Status = CFE_SUCCESS;
+ const char *CmdText = "Decompress File";
+ int32 CFE_Status = CFE_SUCCESS;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
/* Decompress source file into target file */
- CFE_Status = CFE_FS_Decompress(CmdArgs->Source1, CmdArgs->Target);
+ CFE_Status = FS_LIB_Decompress(&FM_GlobalData.DecompressState, CmdArgs->Source1, CmdArgs->Target);
if (CFE_Status != CFE_SUCCESS)
{
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_DECOM_CFE_ERR_EID, CFE_EVS_ERROR,
- "%s error: CFE_FS_Decompress failed: result = %d, src = %s, tgt = %s",
- CmdText, (int)CFE_Status, CmdArgs->Source1, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_DECOM_CFE_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: CFE_FS_Decompress failed: result = %d, src = %s, tgt = %s", CmdText,
+ (int)CFE_Status, CmdArgs->Source1, CmdArgs->Target);
}
else
{
FM_GlobalData.ChildCmdCounter++;
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_DECOM_CMD_EID, CFE_EVS_DEBUG,
- "%s command: src = %s, tgt = %s",
- CmdText, CmdArgs->Source1, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_DECOM_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: src = %s, tgt = %s", CmdText,
+ CmdArgs->Source1, CmdArgs->Target);
}
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildDecompressCmd() */
+#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -707,20 +673,20 @@ void FM_ChildDecompressCmd(FM_ChildQueueEntry_t *CmdArgs)
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildConcatCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildConcatCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Concat Files";
- boolean ConcatResult = FALSE;
- boolean CopyInProgress = FALSE;
- boolean CreatedTgtFile = FALSE;
- boolean OpenedSource2 = FALSE;
- boolean OpenedTgtFile = FALSE;
- int32 LoopCount = 0;
- int32 OS_Status = OS_SUCCESS;
- int32 FileHandleSrc = 0;
- int32 FileHandleTgt = 0;
- int32 BytesRead = 0;
- int32 BytesWritten = 0;
+ const char *CmdText = "Concat Files";
+ bool ConcatResult = false;
+ bool CopyInProgress = false;
+ bool CreatedTgtFile = false;
+ bool OpenedSource2 = false;
+ bool OpenedTgtFile = false;
+ int32 LoopCount = 0;
+ int32 OS_Status = OS_SUCCESS;
+ osal_id_t FileHandleSrc = 0;
+ osal_id_t FileHandleTgt = 0;
+ int32 BytesRead = 0;
+ int32 BytesWritten = 0;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
@@ -733,52 +699,52 @@ void FM_ChildConcatCmd(FM_ChildQueueEntry_t *CmdArgs)
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_CONCAT_OSCPY_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_cp failed: result = %d, src = %s, tgt = %s",
- CmdText, (int)OS_Status, CmdArgs->Source1, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_CONCAT_OSCPY_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_cp failed: result = %d, src = %s, tgt = %s", CmdText, (int)OS_Status,
+ CmdArgs->Source1, CmdArgs->Target);
}
else
{
- CreatedTgtFile = TRUE;
+ CreatedTgtFile = true;
}
/* Open source file #2 */
if (CreatedTgtFile)
{
- FileHandleSrc = OS_open(CmdArgs->Source2, OS_READ_ONLY, 0);
+ OS_Status = OS_OpenCreate(&FileHandleSrc, CmdArgs->Source2, OS_FILE_FLAG_NONE, OS_READ_ONLY);
- if (FileHandleSrc < 0)
+ if (OS_Status != OS_SUCCESS)
{
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_CONCAT_OPEN_SRC2_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_open failed: result = %d, src2 = %s",
- CmdText, (int)FileHandleSrc, CmdArgs->Source2);
+ CFE_EVS_SendEvent(FM_CONCAT_OPEN_SRC2_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_OpenCreate failed: result = %d, src2 = %s", CmdText, (int)OS_Status,
+ CmdArgs->Source2);
}
else
{
- OpenedSource2 = TRUE;
+ OpenedSource2 = true;
}
}
/* Open target file */
if (OpenedSource2)
{
- FileHandleTgt = OS_open(CmdArgs->Target, OS_READ_WRITE, 0);
+ OS_Status = OS_OpenCreate(&FileHandleTgt, CmdArgs->Target, OS_FILE_FLAG_NONE, OS_READ_WRITE);
- if (FileHandleTgt < 0)
+ if (OS_Status != OS_SUCCESS)
{
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_CONCAT_OPEN_TGT_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_open failed: result = %d, tgt = %s",
- CmdText, (int)FileHandleTgt, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_CONCAT_OPEN_TGT_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_OpenCreate failed: result = %d, tgt = %s", CmdText, (int)OS_Status,
+ CmdArgs->Target);
}
else
{
- OpenedTgtFile = TRUE;
+ OpenedTgtFile = true;
}
}
@@ -787,29 +753,28 @@ void FM_ChildConcatCmd(FM_ChildQueueEntry_t *CmdArgs)
{
/* Seek to end of target file */
OS_lseek(FileHandleTgt, 0, OS_SEEK_END);
- CopyInProgress = TRUE;
- LoopCount = 0;
+ CopyInProgress = true;
+ LoopCount = 0;
while (CopyInProgress)
{
- BytesRead = OS_read(FileHandleSrc, FM_GlobalData.ChildBuffer,
- FM_CHILD_FILE_BLOCK_SIZE);
+ BytesRead = OS_read(FileHandleSrc, FM_GlobalData.ChildBuffer, FM_CHILD_FILE_BLOCK_SIZE);
if (BytesRead == 0)
{
/* Success - finished reading source file #2 */
- CopyInProgress = FALSE;
- ConcatResult = TRUE;
+ CopyInProgress = false;
+ ConcatResult = true;
}
else if (BytesRead < 0)
{
- CopyInProgress = FALSE;
+ CopyInProgress = false;
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_CONCAT_OSRD_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_read failed: result = %d, file = %s",
- CmdText, (int)BytesRead, CmdArgs->Source2);
+ CFE_EVS_SendEvent(FM_CONCAT_OSRD_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_read failed: result = %d, file = %s", CmdText, (int)BytesRead,
+ CmdArgs->Source2);
}
else
{
@@ -818,13 +783,13 @@ void FM_ChildConcatCmd(FM_ChildQueueEntry_t *CmdArgs)
if (BytesWritten != BytesRead)
{
- CopyInProgress = FALSE;
+ CopyInProgress = false;
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_CONCAT_OSWR_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_write failed: result = %d, expected = %d",
- CmdText, (int)BytesWritten, (int)BytesRead);
+ CFE_EVS_SendEvent(FM_CONCAT_OSWR_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_write failed: result = %d, expected = %d", CmdText,
+ (int)BytesWritten, (int)BytesRead);
}
}
@@ -856,31 +821,29 @@ void FM_ChildConcatCmd(FM_ChildQueueEntry_t *CmdArgs)
OS_close(FileHandleSrc);
}
- if ((CreatedTgtFile == TRUE) && (ConcatResult == FALSE))
+ if ((CreatedTgtFile == true) && (ConcatResult == false))
{
/* Remove partial target file after concat error */
OS_remove(CmdArgs->Target);
}
- if (ConcatResult == TRUE)
+ if (ConcatResult == true)
{
FM_GlobalData.ChildCmdCounter++;
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_CONCAT_CMD_EID, CFE_EVS_DEBUG,
- "%s command: src1 = %s, src2 = %s, tgt = %s",
- CmdText, CmdArgs->Source1, CmdArgs->Source2, CmdArgs->Target);
+ CFE_EVS_SendEvent(FM_CONCAT_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: src1 = %s, src2 = %s, tgt = %s",
+ CmdText, CmdArgs->Source1, CmdArgs->Source2, CmdArgs->Target);
}
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildConcatCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Get File Info */
@@ -889,12 +852,13 @@ void FM_ChildConcatCmd(FM_ChildQueueEntry_t *CmdArgs)
void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Get File Info";
- boolean GettingCRC = FALSE;
- uint32 CurrentCRC = 0;
- int32 LoopCount = 0;
- int32 BytesRead = 0;
- int32 FileHandle = 0;
+ const char *CmdText = "Get File Info";
+ bool GettingCRC = false;
+ uint32 CurrentCRC = 0;
+ int32 LoopCount = 0;
+ int32 BytesRead = 0;
+ osal_id_t FileHandle = 0;
+ int32 Status = 0;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
@@ -910,16 +874,16 @@ void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
*/
/* Initialize file info packet (set all data to zero) */
- CFE_SB_InitMsg(&FM_GlobalData.FileInfoPkt, FM_FILE_INFO_TLM_MID,
- sizeof(FM_FileInfoPkt_t), TRUE);
+ CFE_MSG_Init(&FM_GlobalData.FileInfoPkt.TlmHeader.Msg, FM_FILE_INFO_TLM_MID, sizeof(FM_FileInfoPkt_t));
/* Report directory or filename state, name, size and time */
- FM_GlobalData.FileInfoPkt.FileStatus = (uint8) CmdArgs->FileInfoState;
+ FM_GlobalData.FileInfoPkt.FileStatus = (uint8)CmdArgs->FileInfoState;
strncpy(FM_GlobalData.FileInfoPkt.Filename, CmdArgs->Source1, OS_MAX_PATH_LEN - 1);
FM_GlobalData.FileInfoPkt.Filename[OS_MAX_PATH_LEN - 1] = '\0';
- FM_GlobalData.FileInfoPkt.FileSize = CmdArgs->FileInfoSize;
+ FM_GlobalData.FileInfoPkt.FileSize = CmdArgs->FileInfoSize;
FM_GlobalData.FileInfoPkt.LastModifiedTime = CmdArgs->FileInfoTime;
+ FM_GlobalData.FileInfoPkt.Mode = CmdArgs->Mode;
/* Validate CRC algorithm */
if (CmdArgs->FileInfoCRC != FM_IGNORE_CRC)
@@ -929,22 +893,21 @@ void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
/* Can only calculate CRC for closed files */
FM_GlobalData.ChildCmdWarnCounter++;
- CFE_EVS_SendEvent(FM_GET_FILE_INFO_STATE_WARNING_EID, CFE_EVS_INFORMATION,
- "%s warning: unable to compute CRC: invalid file state = %d, file = %s",
- CmdText, (int)CmdArgs->FileInfoState, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_GET_FILE_INFO_STATE_WARNING_EID, CFE_EVS_EventType_INFORMATION,
+ "%s warning: unable to compute CRC: invalid file state = %d, file = %s", CmdText,
+ (int)CmdArgs->FileInfoState, CmdArgs->Source1);
CmdArgs->FileInfoCRC = FM_IGNORE_CRC;
}
- else if ((CmdArgs->FileInfoCRC != CFE_ES_CRC_8) &&
- (CmdArgs->FileInfoCRC != CFE_ES_CRC_16) &&
- (CmdArgs->FileInfoCRC != CFE_ES_CRC_32))
+ else if ((CmdArgs->FileInfoCRC != CFE_MISSION_ES_CRC_8) && (CmdArgs->FileInfoCRC != CFE_MISSION_ES_CRC_16) &&
+ (CmdArgs->FileInfoCRC != CFE_MISSION_ES_CRC_32))
{
/* Can only calculate CRC using known algorithms */
FM_GlobalData.ChildCmdWarnCounter++;
- CFE_EVS_SendEvent(FM_GET_FILE_INFO_TYPE_WARNING_EID, CFE_EVS_INFORMATION,
- "%s warning: unable to compute CRC: invalid CRC type = %d, file = %s",
- CmdText, (int)CmdArgs->FileInfoCRC, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_GET_FILE_INFO_TYPE_WARNING_EID, CFE_EVS_EventType_INFORMATION,
+ "%s warning: unable to compute CRC: invalid CRC type = %d, file = %s", CmdText,
+ (int)CmdArgs->FileInfoCRC, CmdArgs->Source1);
CmdArgs->FileInfoCRC = FM_IGNORE_CRC;
}
@@ -953,57 +916,56 @@ void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
/* Compute CRC */
if (CmdArgs->FileInfoCRC != FM_IGNORE_CRC)
{
- FileHandle = OS_open(CmdArgs->Source1, OS_READ_ONLY, 0);
+ Status = OS_OpenCreate(&FileHandle, CmdArgs->Source1, OS_FILE_FLAG_NONE, OS_READ_ONLY);
- if (FileHandle < 0)
+ if (Status != OS_SUCCESS)
{
FM_GlobalData.ChildCmdWarnCounter++;
/* Send CRC failure event (warning) */
- CFE_EVS_SendEvent(FM_GET_FILE_INFO_OPEN_ERR_EID, CFE_EVS_ERROR,
- "%s warning: unable to compute CRC: OS_open result = %d, file = %s",
- CmdText, (int)FileHandle, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_GET_FILE_INFO_OPEN_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s warning: unable to compute CRC: OS_OpenCreate result = %d, file = %s", CmdText,
+ (int)Status, CmdArgs->Source1);
- GettingCRC = FALSE;
+ GettingCRC = false;
}
else
{
- GettingCRC = TRUE;
+ GettingCRC = true;
}
while (GettingCRC)
{
- BytesRead = OS_read(FileHandle, FM_GlobalData.ChildBuffer,
- FM_CHILD_FILE_BLOCK_SIZE);
+ BytesRead = OS_read(FileHandle, FM_GlobalData.ChildBuffer, FM_CHILD_FILE_BLOCK_SIZE);
if (BytesRead == 0)
{
/* Finished reading file */
- GettingCRC = FALSE;
+ GettingCRC = false;
OS_close(FileHandle);
/* Add CRC to telemetry packet */
- FM_GlobalData.FileInfoPkt.CRC_Computed = TRUE;
- FM_GlobalData.FileInfoPkt.CRC = CurrentCRC;
+ FM_GlobalData.FileInfoPkt.CRC_Computed = true;
+ FM_GlobalData.FileInfoPkt.CRC = CurrentCRC;
}
else if (BytesRead < 0)
{
/* Error reading file */
CurrentCRC = 0;
- GettingCRC = FALSE;
+ GettingCRC = false;
OS_close(FileHandle);
/* Send CRC failure event (warning) */
FM_GlobalData.ChildCmdWarnCounter++;
- CFE_EVS_SendEvent(FM_GET_FILE_INFO_READ_WARNING_EID, CFE_EVS_INFORMATION,
- "%s warning: unable to compute CRC: OS_read result = %d, file = %s",
- CmdText, (int)BytesRead, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_GET_FILE_INFO_READ_WARNING_EID, CFE_EVS_EventType_INFORMATION,
+ "%s warning: unable to compute CRC: OS_read result = %d, file = %s", CmdText,
+ (int)BytesRead, CmdArgs->Source1);
}
else
{
/* Continue CRC calculation */
- CurrentCRC = CFE_ES_CalculateCRC(FM_GlobalData.ChildBuffer, BytesRead,
- CurrentCRC, CmdArgs->FileInfoCRC);
+ CurrentCRC =
+ CFE_ES_CalculateCRC(FM_GlobalData.ChildBuffer, BytesRead, CurrentCRC, CmdArgs->FileInfoCRC);
}
/* Avoid CPU hogging */
@@ -1025,34 +987,33 @@ void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
}
/* Timestamp and send file info telemetry packet */
- CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.FileInfoPkt);
- CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.FileInfoPkt);
+ CFE_SB_TimeStampMsg(&FM_GlobalData.FileInfoPkt.TlmHeader.Msg);
+ CFE_SB_TransmitMsg(&FM_GlobalData.FileInfoPkt.TlmHeader.Msg, true);
FM_GlobalData.ChildCmdCounter++;
/* Send command completion event (debug) */
- CFE_EVS_SendEvent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG,
- "%s command: file = %s", CmdText, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: file = %s", CmdText,
+ CmdArgs->Source1);
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildFileInfoCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Create Directory */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildCreateDirCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildCreateDirCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Create Directory";
- int32 OS_Status = OS_SUCCESS;
+ const char *CmdText = "Create Directory";
+ int32 OS_Status = OS_SUCCESS;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
@@ -1064,75 +1025,72 @@ void FM_ChildCreateDirCmd(FM_ChildQueueEntry_t *CmdArgs)
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_CREATE_DIR_OS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_mkdir failed: result = %d, dir = %s",
- CmdText, (int)OS_Status, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_CREATE_DIR_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_mkdir failed: result = %d, dir = %s", CmdText, (int)OS_Status,
+ CmdArgs->Source1);
}
else
{
FM_GlobalData.ChildCmdCounter++;
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_CREATE_DIR_CMD_EID, CFE_EVS_DEBUG,
- "%s command: src = %s", CmdText, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_CREATE_DIR_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: src = %s", CmdText,
+ CmdArgs->Source1);
}
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildCreateDirCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Delete Directory */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildDeleteDirCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildDeleteDirCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Delete Directory";
- boolean RemoveTheDir = TRUE;
- os_dirp_t DirPtr = NULL;
- os_dirent_t *DirEntry = NULL;
- int32 OS_Status = OS_SUCCESS;
+ const char *CmdText = "Delete Directory";
+ bool RemoveTheDir = true;
+ uint32 DirId = 0;
+ os_dirent_t DirEntry;
+ int32 OS_Status = OS_SUCCESS;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
/* Open the dir so we can see if it is empty */
- DirPtr = OS_opendir(CmdArgs->Source1);
+ OS_Status = OS_DirectoryOpen(&DirId, CmdArgs->Source1);
- if (DirPtr == NULL)
+ if (OS_Status != OS_SUCCESS)
{
- CFE_EVS_SendEvent(FM_DELETE_OPENDIR_OS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_opendir failed: dir = %s",
- CmdText, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_DELETE_OPENDIR_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_DirectoryOpen failed: dir = %s", CmdText, CmdArgs->Source1);
- RemoveTheDir = FALSE;
+ RemoveTheDir = false;
FM_GlobalData.ChildCmdErrCounter++;
}
else
{
/* Look for a directory entry that is not "." or ".." */
- while (((DirEntry = OS_readdir(DirPtr)) != NULL) && (RemoveTheDir == TRUE))
+ while ((OS_DirectoryRead(DirId, &DirEntry) == OS_SUCCESS) && (RemoveTheDir == true))
{
- if ((strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_THIS_DIRECTORY) != 0) &&
- (strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_PARENT_DIRECTORY) != 0))
+ if ((strcmp(OS_DIRENTRY_NAME(DirEntry), FM_THIS_DIRECTORY) != 0) &&
+ (strcmp(OS_DIRENTRY_NAME(DirEntry), FM_PARENT_DIRECTORY) != 0))
{
- CFE_EVS_SendEvent(FM_DELETE_DIR_EMPTY_ERR_EID, CFE_EVS_ERROR,
- "%s error: directory is not empty: dir = %s",
- CmdText, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_DELETE_DIR_EMPTY_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: directory is not empty: dir = %s", CmdText, CmdArgs->Source1);
- RemoveTheDir = FALSE;
+ RemoveTheDir = false;
FM_GlobalData.ChildCmdErrCounter++;
}
}
- OS_closedir(DirPtr);
+ OS_DirectoryClose(DirId);
}
if (RemoveTheDir)
@@ -1143,17 +1101,17 @@ void FM_ChildDeleteDirCmd(FM_ChildQueueEntry_t *CmdArgs)
if (OS_Status != OS_SUCCESS)
{
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_DELETE_RMDIR_OS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_rmdir failed: result = %d, dir = %s",
- CmdText, (int)OS_Status, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_DELETE_RMDIR_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_rmdir failed: result = %d, dir = %s", CmdText, (int)OS_Status,
+ CmdArgs->Source1);
FM_GlobalData.ChildCmdErrCounter++;
}
else
{
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_DELETE_DIR_CMD_EID, CFE_EVS_DEBUG,
- "%s command: src = %s", CmdText, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_DELETE_DIR_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: src = %s", CmdText,
+ CmdArgs->Source1);
FM_GlobalData.ChildCmdCounter++;
}
@@ -1161,26 +1119,25 @@ void FM_ChildDeleteDirCmd(FM_ChildQueueEntry_t *CmdArgs)
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
-
} /* End of FM_ChildDeleteDirCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Get Directory List (to file) */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildDirListFileCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildDirListFileCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Directory List to File";
- boolean Result = FALSE;
- int32 FileHandle = 0;
- os_dirp_t DirPtr = NULL;
+ const char *CmdText = "Directory List to File";
+ bool Result = false;
+ int32 FileHandle = 0;
+ uint32 DirId = 0;
+ int32 Status = 0;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
@@ -1195,63 +1152,61 @@ void FM_ChildDirListFileCmd(FM_ChildQueueEntry_t *CmdArgs)
*/
/* Open directory for reading directory list */
- DirPtr = OS_opendir(CmdArgs->Source1);
+ Status = OS_DirectoryOpen(&DirId, CmdArgs->Source1);
- if (DirPtr == NULL)
+ if (Status != OS_SUCCESS)
{
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_GET_DIR_FILE_OSOPENDIR_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_opendir failed: dir = %s",
- CmdText, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_GET_DIR_FILE_OSOPENDIR_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_DirectoryOpen failed: dir = %s", CmdText, CmdArgs->Source1);
}
else
{
/* Create output file, write placeholder for statistics, etc. */
- Result = FM_ChildDirListFileInit(&FileHandle, CmdArgs->Source1,
- CmdArgs->Target);
- if (Result == TRUE)
+ Result = FM_ChildDirListFileInit(&FileHandle, CmdArgs->Source1, CmdArgs->Target);
+ if (Result == true)
{
/* Read directory listing and write contents to output file */
- FM_ChildDirListFileLoop(DirPtr, FileHandle, CmdArgs->Source1,
- CmdArgs->Source2, CmdArgs->Target, CmdArgs->GetSizeTimeMode);
+ FM_ChildDirListFileLoop(DirId, FileHandle, CmdArgs->Source1, CmdArgs->Source2, CmdArgs->Target,
+ CmdArgs->GetSizeTimeMode);
/* Close output file */
OS_close(FileHandle);
}
/* Close directory list access handle */
- OS_closedir(DirPtr);
+ OS_DirectoryClose(DirId);
}
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildDirListFileCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Get Directory List (to pkt) */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildDirListPktCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildDirListPktCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- char *CmdText = "Directory List to Packet";
- char LogicalName[OS_MAX_PATH_LEN] = "\0";
- boolean StillProcessing = TRUE;
- os_dirp_t DirPtr = NULL;
- os_dirent_t *DirEntry = NULL;
- int32 ListIndex = 0;
- FM_DirListEntry_t *ListEntry = NULL;
- int32 PathLength = 0;
- int32 EntryLength = 0;
- int32 FilesTillSleep = FM_CHILD_STAT_SLEEP_FILECOUNT;
+ const char * CmdText = "Directory List to Packet";
+ char LogicalName[OS_MAX_PATH_LEN] = "\0";
+ bool StillProcessing = true;
+ uint32 DirId = 0;
+ os_dirent_t DirEntry;
+ int32 ListIndex = 0;
+ FM_DirListEntry_t *ListEntry = NULL;
+ int32 PathLength = 0;
+ int32 EntryLength = 0;
+ int32 FilesTillSleep = FM_CHILD_STAT_SLEEP_FILECOUNT;
+ int32 Status;
/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
@@ -1267,40 +1222,38 @@ void FM_ChildDirListPktCmd(FM_ChildQueueEntry_t *CmdArgs)
PathLength = strlen(CmdArgs->Source2);
/* Open source directory for reading directory list */
- DirPtr = OS_opendir(CmdArgs->Source1);
+ Status = OS_DirectoryOpen(&DirId, CmdArgs->Source1);
- if (DirPtr == NULL)
+ if (Status != OS_SUCCESS)
{
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_GET_DIR_PKT_OS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_opendir failed: dir = %s",
- CmdText, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_GET_DIR_PKT_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_DirectoryOpen failed: dir = %s", CmdText, CmdArgs->Source1);
}
else
{
/* Initialize the directory list telemetry packet */
- CFE_SB_InitMsg(&FM_GlobalData.DirListPkt, FM_DIR_LIST_TLM_MID,
- sizeof(FM_DirListPkt_t), TRUE);
+ CFE_MSG_Init(&FM_GlobalData.DirListPkt.TlmHeader.Msg, FM_DIR_LIST_TLM_MID, sizeof(FM_DirListPkt_t));
strncpy(FM_GlobalData.DirListPkt.DirName, CmdArgs->Source1, OS_MAX_PATH_LEN - 1);
- FM_GlobalData.DirListPkt.DirName[OS_MAX_PATH_LEN - 1] = '\0';
- FM_GlobalData.DirListPkt.FirstFile = CmdArgs->DirListOffset;
+ FM_GlobalData.DirListPkt.DirName[OS_MAX_PATH_LEN - 1] = '\0';
+ FM_GlobalData.DirListPkt.FirstFile = CmdArgs->DirListOffset;
- StillProcessing = TRUE;
- while (StillProcessing == TRUE)
+ StillProcessing = true;
+ while (StillProcessing == true)
{
/* Read next directory entry */
- DirEntry = OS_readdir(DirPtr);
+ Status = OS_DirectoryRead(DirId, &DirEntry);
- if (DirEntry == NULL)
+ if (Status != OS_SUCCESS)
{
/* Stop reading directory - no more entries */
- StillProcessing = FALSE;
+ StillProcessing = false;
}
- else if ((strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_THIS_DIRECTORY) != 0) &&
- (strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_PARENT_DIRECTORY) != 0))
+ else if ((strcmp(OS_DIRENTRY_NAME(DirEntry), FM_THIS_DIRECTORY) != 0) &&
+ (strcmp(OS_DIRENTRY_NAME(DirEntry), FM_PARENT_DIRECTORY) != 0))
{
/* Do not count the "." and ".." directory entries */
FM_GlobalData.DirListPkt.TotalFiles++;
@@ -1314,21 +1267,20 @@ void FM_ChildDirListPktCmd(FM_ChildQueueEntry_t *CmdArgs)
ListIndex = FM_GlobalData.DirListPkt.PacketFiles;
ListEntry = &FM_GlobalData.DirListPkt.FileList[ListIndex];
- EntryLength = strlen(OS_DIRENTRY_NAME(*DirEntry));
+ EntryLength = strlen(OS_DIRENTRY_NAME(DirEntry));
/* Verify combined directory plus filename length */
- if ((EntryLength < sizeof(ListEntry->EntryName)) &&
- ((PathLength + EntryLength) < OS_MAX_PATH_LEN))
+ if ((EntryLength < sizeof(ListEntry->EntryName)) && ((PathLength + EntryLength) < OS_MAX_PATH_LEN))
{
/* Add filename to directory listing telemetry packet */
- strncpy(ListEntry->EntryName, OS_DIRENTRY_NAME(*DirEntry), EntryLength);
- ListEntry->EntryName[EntryLength] = '\0';
+ strncpy(ListEntry->EntryName, OS_DIRENTRY_NAME(DirEntry), EntryLength);
+ ListEntry->EntryName[EntryLength] = '\0';
/* Build filename - Directory already has path separator */
strncpy(LogicalName, CmdArgs->Source2, PathLength);
- LogicalName[PathLength] = '\0';
-
- strncat(LogicalName, OS_DIRENTRY_NAME(*DirEntry), (OS_MAX_PATH_LEN - PathLength));
+ LogicalName[PathLength] = '\0';
+
+ strncat(LogicalName, OS_DIRENTRY_NAME(DirEntry), (OS_MAX_PATH_LEN - PathLength));
FM_ChildSleepStat(LogicalName, ListEntry, &FilesTillSleep, CmdArgs->GetSizeTimeMode);
@@ -1340,47 +1292,45 @@ void FM_ChildDirListPktCmd(FM_ChildQueueEntry_t *CmdArgs)
FM_GlobalData.ChildCmdWarnCounter++;
/* Send command warning event (info) */
- CFE_EVS_SendEvent(FM_GET_DIR_PKT_WARNING_EID, CFE_EVS_INFORMATION,
- "%s warning: dir + entry is too long: dir = %s, entry = %s",
- CmdText, CmdArgs->Source2, OS_DIRENTRY_NAME(*DirEntry));
+ CFE_EVS_SendEvent(FM_GET_DIR_PKT_WARNING_EID, CFE_EVS_EventType_INFORMATION,
+ "%s warning: dir + entry is too long: dir = %s, entry = %s", CmdText,
+ CmdArgs->Source2, OS_DIRENTRY_NAME(DirEntry));
}
}
}
}
- OS_closedir(DirPtr);
+ OS_DirectoryClose(DirId);
/* Timestamp and send directory listing telemetry packet */
- CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.DirListPkt);
- CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.DirListPkt);
+ CFE_SB_TimeStampMsg(&FM_GlobalData.DirListPkt.TlmHeader.Msg);
+ CFE_SB_TransmitMsg(&FM_GlobalData.DirListPkt.TlmHeader.Msg, true);
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_GET_DIR_PKT_CMD_EID, CFE_EVS_DEBUG,
- "%s command: offset = %d, dir = %s",
- CmdText, (int)CmdArgs->DirListOffset, CmdArgs->Source1);
+ CFE_EVS_SendEvent(FM_GET_DIR_PKT_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: offset = %d, dir = %s", CmdText,
+ (int)CmdArgs->DirListOffset, CmdArgs->Source1);
FM_GlobalData.ChildCmdCounter++;
}
/* Report previous child task activity */
FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- FM_GlobalData.ChildCurrentCC = 0;
+ FM_GlobalData.ChildCurrentCC = 0;
return;
} /* End of FM_ChildDirListPktCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handler -- Set File Permissions */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildSetPermissionsCmd(FM_ChildQueueEntry_t *CmdArgs)
+void FM_ChildSetPermissionsCmd(const FM_ChildQueueEntry_t *CmdArgs)
{
- int32 OS_Status = OS_SUCCESS;
- char *CmdText = "Set Permissions";
-
+ int32 OS_Status = OS_SUCCESS;
+ const char *CmdText = "Set Permissions";
+
OS_Status = OS_chmod(CmdArgs->Source1, CmdArgs->Mode);
if (OS_Status == OS_SUCCESS)
@@ -1388,22 +1338,25 @@ void FM_ChildSetPermissionsCmd(FM_ChildQueueEntry_t *CmdArgs)
FM_GlobalData.ChildCmdCounter++;
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_SET_PERM_CMD_EID, CFE_EVS_DEBUG,
- "%s command: file = %s, access = %d",
- CmdText, CmdArgs->Source1, (int)CmdArgs->Mode);
+ CFE_EVS_SendEvent(FM_SET_PERM_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command: file = %s, access = %d", CmdText,
+ CmdArgs->Source1, (int)CmdArgs->Mode);
}
else
{
FM_GlobalData.ChildCmdErrCounter++;
/* Send OS error message */
- CFE_EVS_SendEvent(FM_SET_PERM_OS_ERR_EID, CFE_EVS_ERROR,
- "%s command: OS_chmod error, RC=0x%08X, file = %s, access = %d",
- CmdText, (unsigned int)OS_Status, CmdArgs->Source1, (int)CmdArgs->Mode);
+ CFE_EVS_SendEvent(FM_SET_PERM_OS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s command: OS_chmod error, RC=0x%08X, file = %s, access = %d", CmdText,
+ (unsigned int)OS_Status, CmdArgs->Source1, (int)CmdArgs->Mode);
}
-
+
+ /* Report previous child task activity */
+ FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
+ FM_GlobalData.ChildCurrentCC = 0;
+
return;
-} /* End of FM_ChildSetPermissionsCmd() */
+} /* End of FM_ChildSetPermissionsCmd() */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -1411,13 +1364,14 @@ void FM_ChildSetPermissionsCmd(FM_ChildQueueEntry_t *CmdArgs)
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_ChildDirListFileInit(int32 *FileHandlePtr, char *Directory, char *Filename)
+bool FM_ChildDirListFileInit(int32 *FileHandlePtr, const char *Directory, const char *Filename)
{
- char *CmdText = "Directory List to File";
- boolean CommandResult = TRUE;
- CFE_FS_Header_t FileHeader;
- int32 FileHandle = 0;
- int32 BytesWritten = 0;
+ const char * CmdText = "Directory List to File";
+ bool CommandResult = true;
+ CFE_FS_Header_t FileHeader;
+ osal_id_t FileHandle = 0;
+ int32 BytesWritten = 0;
+ int32 Status = 0;
/* Initialize the standard cFE File Header for the Directory Listing File */
CFE_PSP_MemSet(&FileHeader, 0, sizeof(CFE_FS_Header_t));
@@ -1426,8 +1380,9 @@ boolean FM_ChildDirListFileInit(int32 *FileHandlePtr, char *Directory, char *Fil
FileHeader.Description[sizeof(FileHeader.Description) - 1] = '\0';
/* Create directory listing output file */
- FileHandle = OS_creat(Filename, OS_READ_WRITE);
- if (FileHandle >= OS_SUCCESS)
+ Status = OS_OpenCreate(&FileHandle, Filename, OS_FILE_FLAG_CREATE | OS_FILE_FLAG_TRUNCATE, OS_READ_WRITE);
+
+ if (Status == OS_SUCCESS)
{
/* Write the standard CFE file header */
BytesWritten = CFE_FS_WriteHeader(FileHandle, &FileHeader);
@@ -1436,7 +1391,7 @@ boolean FM_ChildDirListFileInit(int32 *FileHandlePtr, char *Directory, char *Fil
/* Initialize directory statistics structure */
CFE_PSP_MemSet(&FM_GlobalData.DirListFileStats, 0, sizeof(FM_DirListFileStats_t));
strncpy(FM_GlobalData.DirListFileStats.DirName, Directory, OS_MAX_PATH_LEN - 1);
- FM_GlobalData.DirListFileStats.DirName[OS_MAX_PATH_LEN - 1] = '\0';
+ FM_GlobalData.DirListFileStats.DirName[OS_MAX_PATH_LEN - 1] = '\0';
/* Write blank FM directory statistics structure as a place holder */
BytesWritten = OS_write(FileHandle, &FM_GlobalData.DirListFileStats, sizeof(FM_DirListFileStats_t));
@@ -1447,86 +1402,84 @@ boolean FM_ChildDirListFileInit(int32 *FileHandlePtr, char *Directory, char *Fil
}
else
{
- CommandResult = FALSE;
+ CommandResult = false;
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_GET_DIR_FILE_WRBLANK_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_write blank stats failed: result = %d, expected = %d",
- CmdText, (int)BytesWritten, sizeof(FM_DirListFileStats_t));
+ CFE_EVS_SendEvent(FM_GET_DIR_FILE_WRBLANK_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_write blank stats failed: result = %d, expected = %u", CmdText,
+ (int)BytesWritten, (unsigned int)sizeof(FM_DirListFileStats_t));
}
}
else
{
- CommandResult = FALSE;
+ CommandResult = false;
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_GET_DIR_FILE_WRHDR_ERR_EID, CFE_EVS_ERROR,
- "%s error: CFE_FS_WriteHeader failed: result = %d, expected = %d",
- CmdText, (int)BytesWritten, sizeof(CFE_FS_Header_t));
+ CFE_EVS_SendEvent(FM_GET_DIR_FILE_WRHDR_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: CFE_FS_WriteHeader failed: result = %d, expected = %u", CmdText,
+ (int)BytesWritten, (unsigned int)sizeof(CFE_FS_Header_t));
}
/* Close output file after write error */
- if (CommandResult == FALSE)
+ if (CommandResult == false)
{
OS_close(FileHandle);
}
}
else
{
- CommandResult = FALSE;
+ CommandResult = false;
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_GET_DIR_FILE_OSCREAT_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_creat failed: result = %d, file = %s",
- CmdText, (int)FileHandle, Filename);
+ CFE_EVS_SendEvent(FM_GET_DIR_FILE_OSCREAT_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_OpenCreate failed: result = %d, file = %s", CmdText, (int)Status, Filename);
}
- return(CommandResult);
+ return (CommandResult);
} /* End FM_ChildDirListFileInit */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task utility function -- write to dir list output file */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildDirListFileLoop(os_dirp_t DirPtr, int32 FileHandle,
- char *Directory, char *DirWithSep, char *Filename, uint8 getSizeTimeMode)
+void FM_ChildDirListFileLoop(uint32 DirId, int32 FileHandle, const char *Directory, const char *DirWithSep,
+ const char *Filename, uint8 getSizeTimeMode)
{
- char *CmdText = "Directory List to File";
- int32 WriteLength = sizeof(FM_DirListEntry_t);
- boolean ReadingDirectory = TRUE;
- boolean CommandResult = TRUE;
- uint32 DirEntries = 0;
- uint32 FileEntries = 0;
- int32 EntryLength = 0;
- int32 PathLength = 0;
- int32 BytesWritten = 0;
- int32 FilesTillSleep = FM_CHILD_STAT_SLEEP_FILECOUNT;
- char TempName[OS_MAX_PATH_LEN] = "\0";
- os_dirent_t *DirEntry = NULL;
- FM_DirListEntry_t DirListData;
-
+ const char * CmdText = "Directory List to File";
+ int32 WriteLength = sizeof(FM_DirListEntry_t);
+ bool ReadingDirectory = true;
+ bool CommandResult = true;
+ uint32 DirEntries = 0;
+ uint32 FileEntries = 0;
+ int32 EntryLength = 0;
+ int32 PathLength = 0;
+ int32 BytesWritten = 0;
+ int32 FilesTillSleep = FM_CHILD_STAT_SLEEP_FILECOUNT;
+ int32 Status = 0;
+ char TempName[OS_MAX_PATH_LEN] = "\0";
+ os_dirent_t DirEntry;
+ FM_DirListEntry_t DirListData;
PathLength = strlen(DirWithSep);
/* Until end of directory entries or output file write error */
- while ((CommandResult == TRUE) && (ReadingDirectory == TRUE))
+ while ((CommandResult == true) && (ReadingDirectory == true))
{
- DirEntry = OS_readdir(DirPtr);
+ Status = OS_DirectoryRead(DirId, &DirEntry);
/* Normal loop end - no more directory entries */
- if (DirEntry == NULL)
+ if (Status != OS_SUCCESS)
{
- ReadingDirectory = FALSE;
+ ReadingDirectory = false;
}
- else if ((strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_THIS_DIRECTORY) != 0) &&
- (strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_PARENT_DIRECTORY) != 0))
+ else if ((strcmp(OS_DIRENTRY_NAME(DirEntry), FM_THIS_DIRECTORY) != 0) &&
+ (strcmp(OS_DIRENTRY_NAME(DirEntry), FM_PARENT_DIRECTORY) != 0))
{
/* Do not count the "." and ".." files */
DirEntries++;
@@ -1534,20 +1487,19 @@ void FM_ChildDirListFileLoop(os_dirp_t DirPtr, int32 FileHandle,
/* Count all files - write limited number */
if (FileEntries < FM_DIR_LIST_FILE_ENTRIES)
{
- EntryLength = strlen(OS_DIRENTRY_NAME(*DirEntry));
+ EntryLength = strlen(OS_DIRENTRY_NAME(DirEntry));
- if ((EntryLength < sizeof(DirListData.EntryName)) &&
- ((PathLength + EntryLength) < OS_MAX_PATH_LEN))
+ if ((EntryLength < sizeof(DirListData.EntryName)) && ((PathLength + EntryLength) < OS_MAX_PATH_LEN))
{
/* Build qualified directory entry name */
strncpy(TempName, DirWithSep, PathLength);
- TempName[PathLength] = '\0';
-
- strncat(TempName, OS_DIRENTRY_NAME(*DirEntry), (OS_MAX_PATH_LEN - PathLength));
+ TempName[PathLength] = '\0';
+
+ strncat(TempName, OS_DIRENTRY_NAME(DirEntry), (OS_MAX_PATH_LEN - PathLength));
/* Populate directory list file entry */
- strncpy(DirListData.EntryName, OS_DIRENTRY_NAME(*DirEntry), EntryLength);
- DirListData.EntryName[EntryLength] = '\0';
+ strncpy(DirListData.EntryName, OS_DIRENTRY_NAME(DirEntry), EntryLength);
+ DirListData.EntryName[EntryLength] = '\0';
FM_ChildSleepStat(TempName, (FM_DirListEntry_t *)&DirListData, &FilesTillSleep, getSizeTimeMode);
@@ -1560,13 +1512,13 @@ void FM_ChildDirListFileLoop(os_dirp_t DirPtr, int32 FileHandle,
}
else
{
- CommandResult = FALSE;
+ CommandResult = false;
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_GET_DIR_FILE_WRENTRY_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_write entry failed: result = %d, expected = %d",
- CmdText, (int)BytesWritten, (int)WriteLength);
+ CFE_EVS_SendEvent(FM_GET_DIR_FILE_WRENTRY_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_write entry failed: result = %d, expected = %d", CmdText,
+ (int)BytesWritten, (int)WriteLength);
}
}
else
@@ -1574,48 +1526,48 @@ void FM_ChildDirListFileLoop(os_dirp_t DirPtr, int32 FileHandle,
FM_GlobalData.ChildCmdWarnCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_GET_DIR_FILE_WARNING_EID, CFE_EVS_INFORMATION,
- "%s error: combined directory and entry name too long: dir = %s, entry = %s",
- CmdText, Directory, OS_DIRENTRY_NAME(*DirEntry));
+ CFE_EVS_SendEvent(FM_GET_DIR_FILE_WARNING_EID, CFE_EVS_EventType_INFORMATION,
+ "%s error: combined directory and entry name too long: dir = %s, entry = %s",
+ CmdText, Directory, OS_DIRENTRY_NAME(DirEntry));
}
}
}
}
/* Update directory statistics in output file */
- if ((CommandResult == TRUE) && (DirEntries != 0))
+ if ((CommandResult == true) && (DirEntries != 0))
{
/* Update entries found in directory vs entries written to file */
- FM_GlobalData.DirListFileStats.DirEntries = DirEntries;
+ FM_GlobalData.DirListFileStats.DirEntries = DirEntries;
FM_GlobalData.DirListFileStats.FileEntries = FileEntries;
/* Back up to the start of the statisitics data */
OS_lseek(FileHandle, sizeof(CFE_FS_Header_t), OS_SEEK_SET);
/* Write an updated version of the statistics data */
- WriteLength = sizeof(FM_DirListFileStats_t);
+ WriteLength = sizeof(FM_DirListFileStats_t);
BytesWritten = OS_write(FileHandle, &FM_GlobalData.DirListFileStats, WriteLength);
if (BytesWritten != WriteLength)
{
- CommandResult = FALSE;
+ CommandResult = false;
FM_GlobalData.ChildCmdErrCounter++;
/* Send command failure event (error) */
- CFE_EVS_SendEvent(FM_GET_DIR_FILE_UPSTATS_ERR_EID, CFE_EVS_ERROR,
- "%s error: OS_write update stats failed: result = %d, expected = %d",
- CmdText, (int)BytesWritten, (int)WriteLength);
+ CFE_EVS_SendEvent(FM_GET_DIR_FILE_UPSTATS_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: OS_write update stats failed: result = %d, expected = %d", CmdText,
+ (int)BytesWritten, (int)WriteLength);
}
}
/* Send command completion event (info) */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
FM_GlobalData.ChildCmdCounter++;
- CFE_EVS_SendEvent(FM_GET_DIR_FILE_CMD_EID, CFE_EVS_DEBUG,
- "%s command: wrote %d of %d names: dir = %s, filename = %s",
- CmdText, (int)FileEntries, (int)DirEntries, Directory, Filename);
+ CFE_EVS_SendEvent(FM_GET_DIR_FILE_CMD_EID, CFE_EVS_EventType_DEBUG,
+ "%s command: wrote %d of %d names: dir = %s, filename = %s", CmdText, (int)FileEntries,
+ (int)DirEntries, Directory, Filename);
}
return;
@@ -1630,9 +1582,8 @@ void FM_ChildDirListFileLoop(os_dirp_t DirPtr, int32 FileHandle,
int32 FM_ChildSizeTimeMode(const char *Filename, uint32 *FileSize, uint32 *FileTime, uint32 *FileMode)
{
- int32 Result = OS_SUCCESS;
- os_fstat_t FileStatus;
- uint32 FileStatTime = 0;
+ int32 Result = OS_SUCCESS;
+ os_fstat_t FileStatus;
CFE_PSP_MemSet(&FileStatus, 0, sizeof(os_fstat_t));
@@ -1646,43 +1597,39 @@ int32 FM_ChildSizeTimeMode(const char *Filename, uint32 *FileSize, uint32 *FileT
else
{
#ifdef OS_FILESTAT_TIME
- FileStatTime = OS_FILESTAT_TIME(FileStatus);
+ *FileTime = OS_FILESTAT_TIME(FileStatus);
#else
- FileStatTime = FileStatus.st_mtime;
+ *FileTime = FileStatus.st_mtime;
#endif
- /* Convert the file system time to spacecraft time */
- *FileTime = CFE_TIME_FS2CFESeconds(FileStatTime);
#ifdef OS_FILESTAT_SIZE
*FileSize = OS_FILESTAT_SIZE(FileStatus);
#else
*FileSize = FileStatus.st_size;
-#endif
+#endif
#ifdef OS_FILESTAT_MODE
*FileMode = OS_FILESTAT_MODE(FileStatus);
#else
*FileMode = FileStatus.st_mode;
#endif
-
}
- return(Result);
+ return (Result);
} /* End of FM_ChildSizeTimeMode */
-
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task utility function -- sleep between OS_stat on files*/
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void FM_ChildSleepStat(const char *Filename, FM_DirListEntry_t *DirListData, int32 *FilesTillSleep, boolean getSizeTimeMode)
+void FM_ChildSleepStat(const char *Filename, FM_DirListEntry_t *DirListData, int32 *FilesTillSleep,
+ bool getSizeTimeMode)
{
/* Check if command requested size and time */
- if (getSizeTimeMode == TRUE)
+ if (getSizeTimeMode == true)
{
if (*FilesTillSleep <= 0)
{
@@ -1693,10 +1640,8 @@ void FM_ChildSleepStat(const char *Filename, FM_DirListEntry_t *DirListData, int
}
/* Get file size, date, and mode */
- FM_ChildSizeTimeMode(Filename, &(DirListData->EntrySize),
- &(DirListData->ModifyTime),
- &(DirListData ->Mode));
-
+ FM_ChildSizeTimeMode(Filename, &(DirListData->EntrySize), &(DirListData->ModifyTime), &(DirListData->Mode));
+
(*FilesTillSleep)--;
}
else
@@ -1710,4 +1655,3 @@ void FM_ChildSleepStat(const char *Filename, FM_DirListEntry_t *DirListData, int
/************************/
/* End of File Comment */
/************************/
-
diff --git a/fsw/src/fm_child.h b/fsw/src/fm_child.h
index 2bda8d6..6890bdb 100644
--- a/fsw/src/fm_child.h
+++ b/fsw/src/fm_child.h
@@ -1,23 +1,23 @@
/*
-** Filename: fm_child.h
+** Filename: fm_child.h
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
**
** Title: CFS File Manager (FM) Child Task Header File
**
@@ -36,6 +36,9 @@
#include "cfe.h"
#include "fm_msg.h"
+#ifdef FM_INCLUDE_DECOMPRESS
+#include "cfs_fs_lib.h"
+#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -66,7 +69,6 @@
**/
int32 FM_ChildInit(void);
-
/**
** \brief Child Task Entry Point Function
**
@@ -90,7 +92,6 @@ int32 FM_ChildInit(void);
**/
void FM_ChildTask(void);
-
/**
** \brief Child Task Main Loop Processor Function
**
@@ -116,7 +117,6 @@ void FM_ChildTask(void);
**/
void FM_ChildLoop(void);
-
/**
** \brief Child Task Command Queue Processor Function
**
@@ -137,7 +137,6 @@ void FM_ChildLoop(void);
**/
void FM_ChildProcess(void);
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task command handlers */
@@ -163,8 +162,7 @@ void FM_ChildProcess(void);
**
** \sa #FM_ChildQueueEntry_t, #FM_Copy, #FM_CopyFileCmd_t
**/
-void FM_ChildCopyCmd(FM_ChildQueueEntry_t *CmdArgs);
-
+void FM_ChildCopyCmd(const FM_ChildQueueEntry_t *CmdArgs);
/**
** \brief Child Task Move File Command Handler
@@ -185,8 +183,7 @@ void FM_ChildCopyCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_Move, #FM_MoveFileCmd_t
**/
-void FM_ChildMoveCmd(FM_ChildQueueEntry_t *CmdArgs);
-
+void FM_ChildMoveCmd(const FM_ChildQueueEntry_t *CmdArgs);
/**
** \brief Child Task Rename File Command Handler
@@ -207,8 +204,7 @@ void FM_ChildMoveCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_Rename, #FM_RenameFileCmd_t
**/
-void FM_ChildRenameCmd(FM_ChildQueueEntry_t *CmdArgs);
-
+void FM_ChildRenameCmd(const FM_ChildQueueEntry_t *CmdArgs);
/**
** \brief Child Task Delete File Command Handler
@@ -229,8 +225,7 @@ void FM_ChildRenameCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_Delete, #FM_DeleteFileCmd_t
**/
-void FM_ChildDeleteCmd(FM_ChildQueueEntry_t *CmdArgs);
-
+void FM_ChildDeleteCmd(const FM_ChildQueueEntry_t *CmdArgs);
/**
** \brief Child Task Delete All Files Command Handler
@@ -253,6 +248,7 @@ void FM_ChildDeleteCmd(FM_ChildQueueEntry_t *CmdArgs);
**/
void FM_ChildDeleteAllCmd(FM_ChildQueueEntry_t *CmdArgs);
+#ifdef FM_INCLUDE_DECOMPRESS
/**
** \brief Child Task Decompress File Command Handler
@@ -273,8 +269,9 @@ void FM_ChildDeleteAllCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_Decompress, #FM_DecompressCmd_t
**/
-void FM_ChildDecompressCmd(FM_ChildQueueEntry_t *CmdArgs);
+void FM_ChildDecompressCmd(const FM_ChildQueueEntry_t *CmdArgs);
+#endif
/**
** \brief Child Task Concatenate Files Command Handler
@@ -295,8 +292,7 @@ void FM_ChildDecompressCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_Concat, #FM_ConcatCmd_t
**/
-void FM_ChildConcatCmd(FM_ChildQueueEntry_t *CmdArgs);
-
+void FM_ChildConcatCmd(const FM_ChildQueueEntry_t *CmdArgs);
/**
** \brief Child Task Get File Info Command Handler
@@ -319,7 +315,6 @@ void FM_ChildConcatCmd(FM_ChildQueueEntry_t *CmdArgs);
**/
void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs);
-
/**
** \brief Child Task Create Directory Command Handler
**
@@ -339,8 +334,7 @@ void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_CreateDir, #FM_CreateDirCmd_t
**/
-void FM_ChildCreateDirCmd(FM_ChildQueueEntry_t *CmdArgs);
-
+void FM_ChildCreateDirCmd(const FM_ChildQueueEntry_t *CmdArgs);
/**
** \brief Child Task Delete Directory Command Handler
@@ -361,8 +355,7 @@ void FM_ChildCreateDirCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_DeleteDir, #FM_DeleteDirCmd_t
**/
-void FM_ChildDeleteDirCmd(FM_ChildQueueEntry_t *CmdArgs);
-
+void FM_ChildDeleteDirCmd(const FM_ChildQueueEntry_t *CmdArgs);
/**
** \brief Child Task Get Dir List to File Command Handler
@@ -383,8 +376,7 @@ void FM_ChildDeleteDirCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_GetDirFile, #FM_GetDirFileCmd_t
**/
-void FM_ChildDirListFileCmd(FM_ChildQueueEntry_t *CmdArgs);
-
+void FM_ChildDirListFileCmd(const FM_ChildQueueEntry_t *CmdArgs);
/**
** \brief Child Task Get Dir List to Packet Command Handler
@@ -405,7 +397,7 @@ void FM_ChildDirListFileCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_GetDirPkt, #FM_GetDirPktCmd_t
**/
-void FM_ChildDirListPktCmd(FM_ChildQueueEntry_t *CmdArgs);
+void FM_ChildDirListPktCmd(const FM_ChildQueueEntry_t *CmdArgs);
/**
** \brief Child Task Set Permissions Command Handler
@@ -426,8 +418,7 @@ void FM_ChildDirListPktCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_ChildQueueEntry_t, #FM_SetPermCmd_t
**/
-void FM_ChildSetPermissionsCmd(FM_ChildQueueEntry_t *CmdArgs);
-
+void FM_ChildSetPermissionsCmd(const FM_ChildQueueEntry_t *CmdArgs);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -460,8 +451,7 @@ void FM_ChildSetPermissionsCmd(FM_ChildQueueEntry_t *CmdArgs);
**
** \sa #FM_GetDirFile
**/
-boolean FM_ChildDirListFileInit(int32 *FileHandlePtr, char *Directory, char *Filename);
-
+bool FM_ChildDirListFileInit(int32 *FileHandlePtr, const char *Directory, const char *Filename);
/**
** \brief Child Task Get Dir List to File Loop Processor Function
@@ -485,9 +475,8 @@ boolean FM_ChildDirListFileInit(int32 *FileHandlePtr, char *Directory, char *Fil
**
** \sa #FM_GetDirFile
**/
-void FM_ChildDirListFileLoop(os_dirp_t DirPtr, int32 FileHandle,
- char *Directory, char *DirWithSep, char *Filename, uint8 GetSizeTimeMode);
-
+void FM_ChildDirListFileLoop(uint32 DirPtr, int32 FileHandle, const char *Directory, const char *DirWithSep,
+ const char *Filename, uint8 GetSizeTimeMode);
/**
** \brief Child Task File Size Time and Mode Utility Function
@@ -513,7 +502,6 @@ void FM_ChildDirListFileLoop(os_dirp_t DirPtr, int32 FileHandle,
**/
int32 FM_ChildSizeTimeMode(const char *Filename, uint32 *FileSize, uint32 *FileTime, uint32 *FileMode);
-
/**
** \brief Child Task Sleep and Stat Utility Function
**
@@ -523,7 +511,7 @@ int32 FM_ChildSizeTimeMode(const char *Filename, uint32 *FileSize, uint32 *FileT
** or Get Directory List to Packet commands.
** However it only will sleep if FM_CHILD_STAT_SLEEP_FILECOUNT reaches zero and call FM_ChildSizeTimeMode if
** getSizeTimeMode is TRUE, otherwise this function has no effect
-**
+**
** \par Assumptions, External Events, and Notes:
**
** \param [in] Filename - Pointer to the combined directory and entry names.
@@ -539,12 +527,11 @@ int32 FM_ChildSizeTimeMode(const char *Filename, uint32 *FileSize, uint32 *FileT
**
** \sa #FM_GetDirFile, #FM_GetDirPkt
**/
-void FM_ChildSleepStat(const char *Filename, FM_DirListEntry_t *DirListData, int32 *FilesTillSleep, boolean GetSizeTimeMode);
-
+void FM_ChildSleepStat(const char *Filename, FM_DirListEntry_t *DirListData, int32 *FilesTillSleep,
+ bool GetSizeTimeMode);
#endif /* _fm_child_h_ */
/************************/
/* End of File Comment */
/************************/
-
diff --git a/fsw/src/fm_cmd_utils.c b/fsw/src/fm_cmd_utils.c
index 2a10be5..47ca121 100644
--- a/fsw/src/fm_cmd_utils.c
+++ b/fsw/src/fm_cmd_utils.c
@@ -1,23 +1,23 @@
/*
-** Filename: fm_cmd_utils.c
+** Filename: fm_cmd_utils.c
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: File Manager (FM) Command Utility Functions
**
@@ -40,7 +40,7 @@
#include
static uint32 OpenFileCount = 0;
-static boolean FileIsOpen = FALSE;
+static bool FileIsOpen = false;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -48,103 +48,93 @@ static boolean FileIsOpen = FALSE;
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_IsValidCmdPktLength(CFE_SB_MsgPtr_t CmdPacket, uint16 ExpectedLength,
- uint32 EventID, char *CmdText)
+bool FM_IsValidCmdPktLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength, uint32 EventID, const char *CmdText)
{
- boolean FunctionResult = TRUE;
- uint16 ActualLength = 0;
+ bool FunctionResult = true;
+ size_t ActualLength = 0;
- ActualLength = CFE_SB_GetTotalMsgLength(CmdPacket);
+ CFE_MSG_GetSize(MsgPtr, &ActualLength);
/* Verify command packet length */
if (ActualLength != ExpectedLength)
{
- FunctionResult = FALSE;
+ FunctionResult = false;
- CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- "%s error: invalid command packet length: expected = %d, actual = %d",
- CmdText, ExpectedLength, ActualLength);
+ CFE_EVS_SendEvent(EventID, CFE_EVS_EventType_ERROR,
+ "%s error: invalid command packet length: expected = %d, actual = %d", CmdText,
+ (int)ExpectedLength, (int)ActualLength);
}
- return(FunctionResult);
+ return (FunctionResult);
} /* FM_IsValidCmdPktLength */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- verify state is not invalid */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_VerifyOverwrite(uint16 Overwrite, uint32 EventID, char *CmdText)
+bool FM_VerifyOverwrite(uint16 Overwrite, uint32 EventID, const char *CmdText)
{
- boolean FunctionResult = TRUE;
+ bool FunctionResult = true;
- /* Acceptable values are TRUE (one) and FALSE (zero) */
- if ((Overwrite != TRUE) && (Overwrite != FALSE))
+ /* Acceptable values are true (one) and false (zero) */
+ if ((Overwrite != true) && (Overwrite != false))
{
- CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- "%s error: invalid overwrite = %d", CmdText, Overwrite);
+ CFE_EVS_SendEvent(EventID, CFE_EVS_EventType_ERROR, "%s error: invalid overwrite = %d", CmdText, Overwrite);
- FunctionResult = FALSE;
+ FunctionResult = false;
}
- return(FunctionResult);
+ return (FunctionResult);
} /* End FM_VerifyOverwrite */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- get open files data */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-static void LoadOpenFileData(uint32 ObjId, void* CallbackArg)
+static void LoadOpenFileData(uint32 ObjId, void *CallbackArg)
{
- FM_OpenFilesEntry_t *OpenFilesData = (FM_OpenFilesEntry_t*)CallbackArg;
- CFE_ES_TaskInfo_t TaskInfo;
+ FM_OpenFilesEntry_t *OpenFilesData = (FM_OpenFilesEntry_t *)CallbackArg;
+ OS_task_prop_t TaskInfo;
OS_file_prop_t FdProp;
- if(OS_IdentifyObject(ObjId) == OS_OBJECT_TYPE_OS_STREAM)
+ if (OS_IdentifyObject(ObjId) == OS_OBJECT_TYPE_OS_STREAM)
{
- if(OpenFilesData != (FM_OpenFilesEntry_t*) NULL)
+ if (OpenFilesData != (FM_OpenFilesEntry_t *)NULL)
{
- if(OS_FDGetInfo(ObjId, &FdProp) == OS_SUCCESS)
+ if (OS_FDGetInfo(ObjId, &FdProp) == OS_SUCCESS)
{
- strncpy(OpenFilesData[OpenFileCount].LogicalName,
- FdProp.Path,
- OS_MAX_PATH_LEN);
+ strncpy(OpenFilesData[OpenFileCount].LogicalName, FdProp.Path, OS_MAX_PATH_LEN);
/* Get the name of the application that opened the file */
memset(&TaskInfo, 0, sizeof(CFE_ES_TaskInfo_t));
- if(CFE_ES_GetTaskInfo(&TaskInfo, FdProp.User) == CFE_SUCCESS)
+ if (OS_TaskGetInfo(FdProp.User, &TaskInfo) == OS_SUCCESS)
{
- strncpy(OpenFilesData[OpenFileCount].AppName,
- (char*)TaskInfo.AppName,
- OS_MAX_API_NAME);
+ strncpy(OpenFilesData[OpenFileCount].AppName, (char *)TaskInfo.name, OS_MAX_API_NAME);
}
}
- }
+ }
OpenFileCount++;
}
} /* End LoadOpenFileData() */
-uint32 FM_GetOpenFilesData(FM_OpenFilesEntry_t *OpenFilesData)
+uint32 FM_GetOpenFilesData(const FM_OpenFilesEntry_t *OpenFilesData)
{
OpenFileCount = 0;
-
- OS_ForEachObject(0, LoadOpenFileData, (void*)OpenFilesData);
- return(OpenFileCount);
+ OS_ForEachObject(0, LoadOpenFileData, (void *)OpenFilesData);
-} /* End FM_GetOpenFilesData */
+ return (OpenFileCount);
+} /* End FM_GetOpenFilesData */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -152,56 +142,56 @@ uint32 FM_GetOpenFilesData(FM_OpenFilesEntry_t *OpenFilesData)
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-static void SearchOpenFileData(uint32 ObjId, void* CallbackArg)
+static void SearchOpenFileData(uint32 ObjId, void *CallbackArg)
{
- char* Fname = (char*)CallbackArg;
- OS_file_prop_t FdProp;
+ char * Fname = (char *)CallbackArg;
+ OS_file_prop_t FdProp;
- if(Fname == NULL)
+ if (Fname == NULL)
{
return;
}
- if(OS_IdentifyObject(ObjId) == OS_OBJECT_TYPE_OS_STREAM)
+ if (OS_IdentifyObject(ObjId) == OS_OBJECT_TYPE_OS_STREAM)
{
/* Get system info for each file descriptor table entry */
/* If the FD table entry is valid - then the file is open */
- if (OS_FDGetInfo(ObjId, &FdProp) == OS_FS_SUCCESS)
+ if (OS_FDGetInfo(ObjId, &FdProp) == OS_SUCCESS)
{
if (strcmp(Fname, FdProp.Path) == 0)
{
- FileIsOpen = TRUE;
+ FileIsOpen = true;
}
}
}
} /* End SearchOpenFileData() */
-
-uint32 FM_GetFilenameState(char *Filename, uint32 BufferSize, boolean FileInfoCmd)
+uint32 FM_GetFilenameState(char *Filename, uint32 BufferSize, bool FileInfoCmd)
{
os_fstat_t FileStatus;
- uint32 FilenameState = FM_NAME_IS_INVALID;
- boolean FilenameIsValid = FALSE;
- int32 StringLength = 0;
-
+ uint32 FilenameState = FM_NAME_IS_INVALID;
+ bool FilenameIsValid = false;
+ int32 StringLength = 0;
- /* Search Filename for a string terminator */
- for (StringLength = 0; StringLength < BufferSize; StringLength++)
+ if (Filename != NULL)
{
- if (Filename[StringLength] == '\0')
+ /* Search Filename for a string terminator */
+ for (StringLength = 0; StringLength < BufferSize; StringLength++)
{
- break;
+ if (Filename[StringLength] == '\0')
+ {
+ break;
+ }
}
- }
- /* Verify that Filename is not empty and has a terminator */
- if ((StringLength > 0) && (StringLength < BufferSize))
- {
- /* Verify that the string characters are OK for a filename */
- FilenameIsValid = CFS_IsValidFilename(Filename, StringLength);
+ /* Verify that Filename is not empty and has a terminator */
+ if ((StringLength > 0) && (StringLength < BufferSize))
+ {
+ /* Verify that the string characters are OK for a filename */
+ FilenameIsValid = CFS_IsValidFilename(Filename, StringLength);
+ }
}
/* If Filename is valid, then determine its state */
@@ -224,12 +214,11 @@ uint32 FM_GetFilenameState(char *Filename, uint32 BufferSize, boolean FileInfoCm
{
/* Filename is a file, but is it open? */
FilenameState = FM_NAME_IS_FILE_CLOSED;
- FileIsOpen = FALSE;
-
+ FileIsOpen = false;
OS_ForEachObject(0, SearchOpenFileData, Filename);
- if(FileIsOpen == TRUE)
+ if (FileIsOpen == true)
{
FilenameState = FM_NAME_IS_FILE_OPEN;
}
@@ -247,6 +236,11 @@ uint32 FM_GetFilenameState(char *Filename, uint32 BufferSize, boolean FileInfoCm
FM_GlobalData.FileStatSize = OS_FILESTAT_SIZE(FileStatus);
#else
FM_GlobalData.FileStatSize = FileStatus.st_size;
+#endif
+#ifdef OS_FILESTAT_MODE
+ FM_GlobalData.FileStatMode = OS_FILESTAT_MODE(FileStatus);
+#else
+ FM_GlobalData.FileStatMode = FileStatus.st_mode;
#endif
}
}
@@ -260,349 +254,333 @@ uint32 FM_GetFilenameState(char *Filename, uint32 BufferSize, boolean FileInfoCm
{
FM_GlobalData.FileStatSize = 0;
FM_GlobalData.FileStatTime = 0;
+ FM_GlobalData.FileStatMode = 0;
}
}
}
- return(FilenameState);
+ return (FilenameState);
} /* End FM_GetFilenameState */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- verify state is not invalid */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-uint32 FM_VerifyNameValid(char *Name, uint32 BufferSize, uint32 EventID, char *CmdText)
+uint32 FM_VerifyNameValid(char *Name, uint32 BufferSize, uint32 EventID, const char *CmdText)
{
uint32 FilenameState = FM_NAME_IS_INVALID;
/* Looking for filename state != FM_NAME_IS_INVALID */
- FilenameState = FM_GetFilenameState(Name, BufferSize, TRUE);
+ FilenameState = FM_GetFilenameState(Name, BufferSize, true);
if (FilenameState == FM_NAME_IS_INVALID)
{
/* Insert a terminator in case the invalid string did not have one */
Name[BufferSize - 1] = '\0';
- CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- "%s error: invalid name: name = %s", CmdText, Name);
+ CFE_EVS_SendEvent(EventID, CFE_EVS_EventType_ERROR, "%s error: invalid name: name = %s", CmdText, Name);
}
- return(FilenameState);
+ return (FilenameState);
} /* End FM_VerifyNameValid */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- verify state is closed file */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_VerifyFileClosed(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText)
+bool FM_VerifyFileClosed(char *Filename, uint32 BufferSize, uint32 EventID, const char *CmdText)
{
- boolean Result = FALSE;
+ bool Result = false;
uint32 FilenameState = FM_NAME_IS_INVALID;
/* Looking for filename state = file (closed) */
- FilenameState = FM_GetFilenameState(Filename, BufferSize, FALSE);
+ FilenameState = FM_GetFilenameState(Filename, BufferSize, false);
if (FilenameState == FM_NAME_IS_INVALID)
{
/* Insert a terminator in case the invalid string did not have one */
Filename[BufferSize - 1] = '\0';
- CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename is invalid: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename is invalid: name = %s", CmdText, Filename);
}
else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: file does not exist: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: file does not exist: name = %s", CmdText, Filename);
}
else if (FilenameState == FM_NAME_IS_FILE_OPEN)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: file is already open: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: file is already open: name = %s", CmdText, Filename);
}
else if (FilenameState == FM_NAME_IS_FILE_CLOSED)
{
- Result = TRUE;
+ Result = true;
}
else if (FilenameState == FM_NAME_IS_DIRECTORY)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename is a directory: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename is a directory: name = %s", CmdText, Filename);
}
else
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename has unknown state: name = %s, state = %d",
- CmdText, Filename, FilenameState);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename has unknown state: name = %s, state = %d", CmdText, Filename,
+ FilenameState);
}
- return(Result);
+ return (Result);
} /* End FM_VerifyFileClosed */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- verify state is open or closed file */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_VerifyFileExists(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText)
+bool FM_VerifyFileExists(char *Filename, uint32 BufferSize, uint32 EventID, const char *CmdText)
{
- boolean Result = FALSE;
+ bool Result = false;
uint32 FilenameState = FM_NAME_IS_INVALID;
/* Looking for filename state = file (open or closed) */
- FilenameState = FM_GetFilenameState(Filename, BufferSize, FALSE);
+ FilenameState = FM_GetFilenameState(Filename, BufferSize, false);
if (FilenameState == FM_NAME_IS_INVALID)
{
/* Insert a terminator in case the invalid string did not have one */
Filename[BufferSize - 1] = '\0';
- CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET) , CFE_EVS_ERROR,
- "%s error: filename is invalid: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename is invalid: name = %s", CmdText, Filename);
}
else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: file does not exist: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: file does not exist: name = %s", CmdText, Filename);
}
- else if ((FilenameState == FM_NAME_IS_FILE_OPEN) ||
- (FilenameState == FM_NAME_IS_FILE_CLOSED))
+ else if ((FilenameState == FM_NAME_IS_FILE_OPEN) || (FilenameState == FM_NAME_IS_FILE_CLOSED))
{
- Result = TRUE;
+ Result = true;
}
else if (FilenameState == FM_NAME_IS_DIRECTORY)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename is a directory: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename is a directory: name = %s", CmdText, Filename);
}
else
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename has unknown state: name = %s, state = %d",
- CmdText, Filename, FilenameState);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename has unknown state: name = %s, state = %d", CmdText, Filename,
+ FilenameState);
}
- return(Result);
+ return (Result);
} /* End FM_VerifyFileExists */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- verify state is unused */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_VerifyFileNoExist(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText)
+bool FM_VerifyFileNoExist(char *Filename, uint32 BufferSize, uint32 EventID, const char *CmdText)
{
- boolean Result = FALSE;
+ bool Result = false;
uint32 FilenameState = FM_NAME_IS_INVALID;
-
+
/* Looking for filename state = not in use */
- FilenameState = FM_GetFilenameState(Filename, BufferSize, FALSE);
+ FilenameState = FM_GetFilenameState(Filename, BufferSize, false);
if (FilenameState == FM_NAME_IS_INVALID)
{
/* Insert a terminator in case the invalid string did not have one */
Filename[BufferSize - 1] = '\0';
- CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename is invalid: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename is invalid: name = %s", CmdText, Filename);
}
else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
{
- Result = TRUE;
+ Result = true;
}
- else if ((FilenameState == FM_NAME_IS_FILE_OPEN) ||
- (FilenameState == FM_NAME_IS_FILE_CLOSED))
+ else if ((FilenameState == FM_NAME_IS_FILE_OPEN) || (FilenameState == FM_NAME_IS_FILE_CLOSED))
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_EXIST_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: file already exists: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_EXIST_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: file already exists: name = %s", CmdText, Filename);
}
else if (FilenameState == FM_NAME_IS_DIRECTORY)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename is a directory: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename is a directory: name = %s", CmdText, Filename);
}
else
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: directory name has unknown state: name = %s, state = %d",
- CmdText, Filename, FilenameState);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: directory name has unknown state: name = %s, state = %d", CmdText, Filename,
+ FilenameState);
}
- return(Result);
+ return (Result);
} /* End FM_VerifyFileNoExist */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- verify state is unused or closed file */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_VerifyFileNotOpen(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText)
+bool FM_VerifyFileNotOpen(char *Filename, uint32 BufferSize, uint32 EventID, const char *CmdText)
{
- boolean Result = FALSE;
+ bool Result = false;
uint32 FilenameState = FM_NAME_IS_INVALID;
/* Looking for filename state = file (closed) or name not in use */
- FilenameState = FM_GetFilenameState(Filename, BufferSize, FALSE);
+ FilenameState = FM_GetFilenameState(Filename, BufferSize, false);
if (FilenameState == FM_NAME_IS_INVALID)
{
/* Insert a terminator in case the invalid string did not have one */
Filename[BufferSize - 1] = '\0';
- CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename is invalid: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename is invalid: name = %s", CmdText, Filename);
}
else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
{
- Result = TRUE;
+ Result = true;
}
else if (FilenameState == FM_NAME_IS_FILE_OPEN)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: file exists as an open file: name = %s",
- CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: file exists as an open file: name = %s", CmdText, Filename);
}
else if (FilenameState == FM_NAME_IS_FILE_CLOSED)
{
- Result = TRUE;
+ Result = true;
}
else if (FilenameState == FM_NAME_IS_DIRECTORY)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename is a directory: name = %s", CmdText, Filename);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename is a directory: name = %s", CmdText, Filename);
}
else
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: filename has unknown state: name = %s, state = %d",
- CmdText, Filename, FilenameState);
-
+ CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: filename has unknown state: name = %s, state = %d", CmdText, Filename,
+ FilenameState);
}
- return(Result);
+ return (Result);
} /* End FM_VerifyFileNotOpen */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- verify state is directory */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_VerifyDirExists(char *Directory, uint32 BufferSize, uint32 EventID, char *CmdText)
+bool FM_VerifyDirExists(char *Directory, uint32 BufferSize, uint32 EventID, const char *CmdText)
{
- boolean Result = FALSE;
+ bool Result = false;
uint32 FilenameState = FM_NAME_IS_INVALID;
/* Looking for filename state = directory */
- FilenameState = FM_GetFilenameState(Directory, BufferSize, FALSE);
+ FilenameState = FM_GetFilenameState(Directory, BufferSize, false);
if (FilenameState == FM_NAME_IS_INVALID)
{
/* Insert a terminator in case the invalid string did not have one */
Directory[BufferSize - 1] = '\0';
- CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: directory name is invalid: name = %s",
- CmdText, Directory);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: directory name is invalid: name = %s", CmdText, Directory);
}
else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: directory does not exist: name = %s",
- CmdText, Directory);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: directory does not exist: name = %s", CmdText, Directory);
}
- else if ((FilenameState == FM_NAME_IS_FILE_OPEN) ||
- (FilenameState == FM_NAME_IS_FILE_CLOSED))
+ else if ((FilenameState == FM_NAME_IS_FILE_OPEN) || (FilenameState == FM_NAME_IS_FILE_CLOSED))
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_ISFILE_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: directory name exists as a file: name %s",
- CmdText, Directory);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_ISFILE_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: directory name exists as a file: name %s", CmdText, Directory);
}
else if (FilenameState == FM_NAME_IS_DIRECTORY)
{
- Result = TRUE;
+ Result = true;
}
- else {
- CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: directory name has unknown state: name = %s, state = %d",
- CmdText, Directory, FilenameState);
+ else
+ {
+ CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: directory name has unknown state: name = %s, state = %d", CmdText, Directory,
+ FilenameState);
}
- return(Result);
+ return (Result);
} /* End FM_VerifyDirExists */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- verify state is unused */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_VerifyDirNoExist(char *Name, uint32 BufferSize, uint32 EventID, char *CmdText)
+bool FM_VerifyDirNoExist(char *Name, uint32 BufferSize, uint32 EventID, const char *CmdText)
{
- boolean Result = FALSE;
+ bool Result = false;
uint32 FilenameState = FM_NAME_IS_INVALID;
/* Looking for filename state = unused */
- FilenameState = FM_GetFilenameState(Name, BufferSize, FALSE);
+ FilenameState = FM_GetFilenameState(Name, BufferSize, false);
if (FilenameState == FM_NAME_IS_INVALID)
{
/* Insert a terminator in case the invalid string did not have one */
Name[BufferSize - 1] = '\0';
- CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: directory name is invalid: name = %s", CmdText, Name);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: directory name is invalid: name = %s", CmdText, Name);
}
else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
{
- Result = TRUE;
+ Result = true;
}
- else if ((FilenameState == FM_NAME_IS_FILE_OPEN) ||
- (FilenameState == FM_NAME_IS_FILE_CLOSED))
+ else if ((FilenameState == FM_NAME_IS_FILE_OPEN) || (FilenameState == FM_NAME_IS_FILE_CLOSED))
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: directory name exists as a file: name = %s", CmdText, Name);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: directory name exists as a file: name = %s", CmdText, Name);
}
else if (FilenameState == FM_NAME_IS_DIRECTORY)
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: directory already exists: name = %s", CmdText, Name);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: directory already exists: name = %s", CmdText, Name);
}
else
{
- CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: directory name has unknown state: name = %s, state = %d",
- CmdText, Name, FilenameState);
+ CFE_EVS_SendEvent((EventID + FM_FNAME_UNKNOWN_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: directory name has unknown state: name = %s, state = %d", CmdText, Name,
+ FilenameState);
}
- return(Result);
+ return (Result);
} /* End FM_VerifyDirNoExist */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- verify child task interface is alive */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_VerifyChildTask(uint32 EventID, char *CmdText)
+bool FM_VerifyChildTask(uint32 EventID, const char *CmdText)
{
- boolean Result = FALSE;
+ bool Result = false;
/* Copy of child queue count that child task cannot change */
uint8 LocalQueueCount = FM_GlobalData.ChildQueueCount;
@@ -610,44 +588,41 @@ boolean FM_VerifyChildTask(uint32 EventID, char *CmdText)
/* Verify child task is active and queue interface is healthy */
if (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID)
{
- CFE_EVS_SendEvent((EventID + FM_CHILD_DISABLED_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: child task is disabled", CmdText);
+ CFE_EVS_SendEvent((EventID + FM_CHILD_DISABLED_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: child task is disabled", CmdText);
/* Child task disabled - cannot add another command */
- Result = FALSE;
+ Result = false;
}
else if (LocalQueueCount == FM_CHILD_QUEUE_DEPTH)
{
- CFE_EVS_SendEvent((EventID + FM_CHILD_Q_FULL_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: child task queue is full", CmdText);
+ CFE_EVS_SendEvent((EventID + FM_CHILD_Q_FULL_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: child task queue is full", CmdText);
/* Queue full - cannot add another command */
- Result = FALSE;
+ Result = false;
}
- else if ((LocalQueueCount > FM_CHILD_QUEUE_DEPTH) ||
- (FM_GlobalData.ChildWriteIndex >= FM_CHILD_QUEUE_DEPTH))
+ else if ((LocalQueueCount > FM_CHILD_QUEUE_DEPTH) || (FM_GlobalData.ChildWriteIndex >= FM_CHILD_QUEUE_DEPTH))
{
- CFE_EVS_SendEvent((EventID + FM_CHILD_BROKEN_EID_OFFSET), CFE_EVS_ERROR,
- "%s error: child task interface is broken: count = %d, index = %d",
- CmdText, LocalQueueCount, FM_GlobalData.ChildWriteIndex);
+ CFE_EVS_SendEvent((EventID + FM_CHILD_BROKEN_EID_OFFSET), CFE_EVS_EventType_ERROR,
+ "%s error: child task interface is broken: count = %d, index = %d", CmdText, LocalQueueCount,
+ FM_GlobalData.ChildWriteIndex);
/* Queue broken - cannot add another command */
- Result = FALSE;
+ Result = false;
}
else
{
- CFE_PSP_MemSet(&FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex],
- 0, sizeof(FM_ChildQueueEntry_t));
+ CFE_PSP_MemSet(&FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex], 0, sizeof(FM_ChildQueueEntry_t));
/* OK to add another command to the queue */
- Result = TRUE;
+ Result = true;
}
- return(Result);
+ return (Result);
} /* End FM_VerifyChildTask */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- invoke child task command processor */
@@ -680,7 +655,6 @@ void FM_InvokeChildTask(void)
} /* End of FM_InvokeChildTask */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM utility function -- add path separator to directory name */
@@ -695,11 +669,11 @@ void FM_AppendPathSep(char *Directory, uint32 BufferSize)
** of the string buffer.
*/
uint32 StringLength = 0;
-
+
StringLength = strlen(Directory);
/* Do nothing if string already ends with a path separator */
- if (Directory[StringLength - 1] != '/')
+ if ((StringLength != 0) && (Directory[StringLength - 1] != '/'))
{
/* Verify that string buffer has room for a path separator */
if (StringLength < (BufferSize - 1))
@@ -712,7 +686,6 @@ void FM_AppendPathSep(char *Directory, uint32 BufferSize)
} /* End of FM_AppendPathSep */
-
/************************/
/* End of File Comment */
/************************/
diff --git a/fsw/src/fm_cmd_utils.h b/fsw/src/fm_cmd_utils.h
index a14c512..1c2e101 100644
--- a/fsw/src/fm_cmd_utils.h
+++ b/fsw/src/fm_cmd_utils.h
@@ -1,23 +1,23 @@
/*
-** Filename: fm_cmd_utils.h
+** Filename: fm_cmd_utils.h
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
**
** Title: File Manager (FM) Application Command Utility Function
** Header File
@@ -36,7 +36,7 @@
#define _fm_cmd_utils_h_
#include "cfe.h"
-
+#include "fm_msg.h"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -66,8 +66,8 @@
**
** \sa #CFE_SB_GetTotalMsgLength
**/
-boolean FM_IsValidCmdPktLength(CFE_SB_MsgPtr_t CmdPacket, uint16 ExpectedLength, uint32 EventID, char *CmdText);
-
+bool FM_IsValidCmdPktLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength, uint32 EventID,
+ const char *CmdText);
/**
** \brief Verify Target File Overwrite Function
@@ -91,8 +91,7 @@ boolean FM_IsValidCmdPktLength(CFE_SB_MsgPtr_t CmdPacket, uint16 ExpectedLength,
**
** \sa #FM_COPY_CC, #FM_MOVE_CC
**/
-boolean FM_VerifyOverwrite(uint16 Overwrite, uint32 EventID, char *CmdText);
-
+bool FM_VerifyOverwrite(uint16 Overwrite, uint32 EventID, const char *CmdText);
/**
** \brief Get Open Files Data Function
@@ -111,8 +110,7 @@ boolean FM_VerifyOverwrite(uint16 Overwrite, uint32 EventID, char *CmdText);
**
** \sa #OS_FDGetInfo
**/
-uint32 FM_GetOpenFilesData(FM_OpenFilesEntry_t *OpenFilesData);
-
+uint32 FM_GetOpenFilesData(const FM_OpenFilesEntry_t *OpenFilesData);
/**
** \brief Get Filename State Function
@@ -141,8 +139,7 @@ uint32 FM_GetOpenFilesData(FM_OpenFilesEntry_t *OpenFilesData);
**
** \sa #CFS_IsValidFilename, #OS_stat, #OS_FDGetInfo
**/
-uint32 FM_GetFilenameState(char *Filename, uint32 BufferSize, boolean FileInfoCmd);
-
+uint32 FM_GetFilenameState(char *Filename, uint32 BufferSize, bool FileInfoCmd);
/**
** \brief Verify Name Function
@@ -168,8 +165,7 @@ uint32 FM_GetFilenameState(char *Filename, uint32 BufferSize, boolean FileInfoCm
**
** \sa #FM_GetFilenameState
**/
-uint32 FM_VerifyNameValid(char *Name, uint32 BufferSize, uint32 EventID, char *CmdText);
-
+uint32 FM_VerifyNameValid(char *Name, uint32 BufferSize, uint32 EventID, const char *CmdText);
/**
** \brief Verify File is Closed Function
@@ -193,8 +189,7 @@ uint32 FM_VerifyNameValid(char *Name, uint32 BufferSize, uint32 EventID, char *C
**
** \sa #FM_GetFilenameState
**/
-boolean FM_VerifyFileClosed(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText);
-
+bool FM_VerifyFileClosed(char *Filename, uint32 BufferSize, uint32 EventID, const char *CmdText);
/**
** \brief Verify File Exists Function
@@ -219,8 +214,7 @@ boolean FM_VerifyFileClosed(char *Filename, uint32 BufferSize, uint32 EventID, c
**
** \sa #FM_GetFilenameState
**/
-boolean FM_VerifyFileExists(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText);
-
+bool FM_VerifyFileExists(char *Filename, uint32 BufferSize, uint32 EventID, const char *CmdText);
/**
** \brief Verify File Does Not Exist Function
@@ -245,8 +239,7 @@ boolean FM_VerifyFileExists(char *Filename, uint32 BufferSize, uint32 EventID, c
**
** \sa #FM_GetFilenameState
**/
-boolean FM_VerifyFileNoExist(char *Name, uint32 BufferSize, uint32 EventID, char *CmdText);
-
+bool FM_VerifyFileNoExist(char *Name, uint32 BufferSize, uint32 EventID, const char *CmdText);
/**
** \brief Verify File Is Not Open Function
@@ -270,8 +263,7 @@ boolean FM_VerifyFileNoExist(char *Name, uint32 BufferSize, uint32 EventID, char
**
** \sa #FM_GetFilenameState
**/
-boolean FM_VerifyFileNotOpen(char *Name, uint32 BufferSize, uint32 EventID, char *CmdText);
-
+bool FM_VerifyFileNotOpen(char *Name, uint32 BufferSize, uint32 EventID, const char *CmdText);
/**
** \brief Verify Directory Exists Function
@@ -295,8 +287,7 @@ boolean FM_VerifyFileNotOpen(char *Name, uint32 BufferSize, uint32 EventID, char
**
** \sa #FM_GetFilenameState
**/
-boolean FM_VerifyDirExists(char *Directory, uint32 BufferSize, uint32 EventID, char *CmdText);
-
+bool FM_VerifyDirExists(char *Directory, uint32 BufferSize, uint32 EventID, const char *CmdText);
/**
** \brief Verify Directory Does Not Exist Function
@@ -320,8 +311,7 @@ boolean FM_VerifyDirExists(char *Directory, uint32 BufferSize, uint32 EventID, c
**
** \sa #FM_GetFilenameState
**/
-boolean FM_VerifyDirNoExist(char *Name, uint32 BufferSize, uint32 EventID, char *CmdText);
-
+bool FM_VerifyDirNoExist(char *Name, uint32 BufferSize, uint32 EventID, const char *CmdText);
/**
** \brief Verify Child Task Interface Function
@@ -341,8 +331,7 @@ boolean FM_VerifyDirNoExist(char *Name, uint32 BufferSize, uint32 EventID, char
** \retstmt Boolean TRUE indicates the child task queue is available \endcode
** \endreturns
**/
-boolean FM_VerifyChildTask(uint32 EventID, char *CmdText);
-
+bool FM_VerifyChildTask(uint32 EventID, const char *CmdText);
/**
** \brief Invoke Child Task Function
@@ -371,7 +360,6 @@ boolean FM_VerifyChildTask(uint32 EventID, char *CmdText);
**/
void FM_InvokeChildTask(void);
-
/**
** \brief Append Path Separator Function
**
@@ -395,7 +383,6 @@ void FM_InvokeChildTask(void);
**/
void FM_AppendPathSep(char *Directory, uint32 BufferSize);
-
#endif /* _fm_cmd_utils_h_ */
/************************/
diff --git a/fsw/src/fm_cmds.c b/fsw/src/fm_cmds.c
index 647565a..75d3a66 100644
--- a/fsw/src/fm_cmds.c
+++ b/fsw/src/fm_cmds.c
@@ -1,23 +1,23 @@
/*
-** Filename: fm_cmds.c
+** Filename: fm_cmds.c
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
**
** Title: File Manager (FM) Application Ground Commands
**
@@ -42,197 +42,180 @@
#include
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- NOOP */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_NoopCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_NoopCmd(const CFE_SB_Buffer_t *BufPtr)
{
- char *CmdText = "No-op";
- boolean CommandResult = FALSE;
+ const char *CmdText = "No-op";
+ bool CommandResult = false;
/* Verify message length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_NoopCmd_t),
- FM_NOOP_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_NoopCmd_t), FM_NOOP_PKT_ERR_EID, CmdText);
/* Send command completion event (info) */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CFE_EVS_SendEvent(FM_NOOP_CMD_EID, CFE_EVS_INFORMATION,
- "%s command: FM version %d.%d.%d.%d", CmdText,
+ CFE_EVS_SendEvent(FM_NOOP_CMD_EID, CFE_EVS_EventType_INFORMATION, "%s command: FM version %d.%d.%d.%d", CmdText,
FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV);
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_NoopCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Reset Counters */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_ResetCountersCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_ResetCountersCmd(const CFE_SB_Buffer_t *BufPtr)
{
- char *CmdText = "Reset Counters";
- boolean CommandResult = FALSE;
+ const char *CmdText = "Reset Counters";
+ bool CommandResult = false;
/* Verify message length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_ResetCmd_t),
- FM_RESET_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_ResetCmd_t), FM_RESET_PKT_ERR_EID, CmdText);
/* Reset command counters */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- FM_GlobalData.CommandCounter = 0;
+ FM_GlobalData.CommandCounter = 0;
FM_GlobalData.CommandErrCounter = 0;
- FM_GlobalData.ChildCmdCounter = 0;
- FM_GlobalData.ChildCmdErrCounter = 0;
+ FM_GlobalData.ChildCmdCounter = 0;
+ FM_GlobalData.ChildCmdErrCounter = 0;
FM_GlobalData.ChildCmdWarnCounter = 0;
/* Send command completion event (debug) */
- CFE_EVS_SendEvent(FM_RESET_CMD_EID, CFE_EVS_DEBUG, "%s command", CmdText);
+ CFE_EVS_SendEvent(FM_RESET_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command", CmdText);
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_ResetCountersCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Copy File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_CopyFileCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_CopyFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_CopyFileCmd_t *CmdPtr = (FM_CopyFileCmd_t *) MessagePtr;
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- char *CmdText = "Copy File";
- boolean CommandResult = FALSE;
+ FM_CopyFileCmd_t * CmdPtr = (FM_CopyFileCmd_t *)BufPtr;
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ const char * CmdText = "Copy File";
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_CopyFileCmd_t),
- FM_COPY_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_CopyFileCmd_t), FM_COPY_PKT_ERR_EID, CmdText);
/* Verify that overwrite argument is valid */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyOverwrite(CmdPtr->Overwrite,
- FM_COPY_OVR_ERR_EID, CmdText);
+ CommandResult = FM_VerifyOverwrite(CmdPtr->Overwrite, FM_COPY_OVR_ERR_EID, CmdText);
}
/* Verify that source file exists and is not a directory */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileExists(CmdPtr->Source, sizeof(CmdPtr->Source),
- FM_COPY_SRC_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileExists(CmdPtr->Source, sizeof(CmdPtr->Source), FM_COPY_SRC_BASE_EID, CmdText);
}
/* Verify target filename per the overwrite argument */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
if (CmdPtr->Overwrite == 0)
{
- CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- FM_COPY_TGT_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target), FM_COPY_TGT_BASE_EID, CmdText);
}
else
{
- CommandResult = FM_VerifyFileNotOpen(CmdPtr->Target, sizeof(CmdPtr->Target),
- FM_COPY_TGT_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileNotOpen(CmdPtr->Target, sizeof(CmdPtr->Target), FM_COPY_TGT_BASE_EID, CmdText);
}
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_COPY_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Set handshake queue command args */
CmdArgs->CommandCode = FM_COPY_CC;
strncpy(CmdArgs->Source1, CmdPtr->Source, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
- strncpy(CmdArgs->Target, CmdPtr->Target, OS_MAX_PATH_LEN - 1);
- CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
+ strncpy(CmdArgs->Target, CmdPtr->Target, OS_MAX_PATH_LEN - 1);
+ CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_CopyFileCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Move File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_MoveFileCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_MoveFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_MoveFileCmd_t *CmdPtr = (FM_MoveFileCmd_t *) MessagePtr;
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- char *CmdText = "Move File";
- boolean CommandResult = FALSE;
+ FM_MoveFileCmd_t * CmdPtr = (FM_MoveFileCmd_t *)BufPtr;
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ const char * CmdText = "Move File";
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_MoveFileCmd_t),
- FM_MOVE_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_MoveFileCmd_t), FM_MOVE_PKT_ERR_EID, CmdText);
/* Verify that overwrite argument is valid */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyOverwrite(CmdPtr->Overwrite,
- FM_MOVE_OVR_ERR_EID, CmdText);
+ CommandResult = FM_VerifyOverwrite(CmdPtr->Overwrite, FM_MOVE_OVR_ERR_EID, CmdText);
}
/* Verify that source file exists and not a directory */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileExists(CmdPtr->Source, sizeof(CmdPtr->Source),
- FM_MOVE_SRC_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileExists(CmdPtr->Source, sizeof(CmdPtr->Source), FM_MOVE_SRC_BASE_EID, CmdText);
}
/* Verify target filename per the overwrite argument */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
if (CmdPtr->Overwrite == 0)
{
- CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- FM_MOVE_TGT_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target), FM_MOVE_TGT_BASE_EID, CmdText);
}
else
{
- CommandResult = FM_VerifyFileNotOpen(CmdPtr->Target, sizeof(CmdPtr->Target),
- FM_MOVE_TGT_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileNotOpen(CmdPtr->Target, sizeof(CmdPtr->Target), FM_MOVE_TGT_BASE_EID, CmdText);
}
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_MOVE_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
@@ -240,59 +223,55 @@ boolean FM_MoveFileCmd(CFE_SB_MsgPtr_t MessagePtr)
CmdArgs->CommandCode = FM_MOVE_CC;
strncpy(CmdArgs->Source1, CmdPtr->Source, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
- strncpy(CmdArgs->Target, CmdPtr->Target, OS_MAX_PATH_LEN - 1);
- CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
+ strncpy(CmdArgs->Target, CmdPtr->Target, OS_MAX_PATH_LEN - 1);
+ CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_MoveFileCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Rename File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_RenameFileCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_RenameFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_RenameFileCmd_t *CmdPtr = (FM_RenameFileCmd_t *) MessagePtr;
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- char *CmdText = "Rename File";
- boolean CommandResult = FALSE;
+ FM_RenameFileCmd_t * CmdPtr = (FM_RenameFileCmd_t *)BufPtr;
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ const char * CmdText = "Rename File";
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_RenameFileCmd_t),
- FM_RENAME_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_RenameFileCmd_t), FM_RENAME_PKT_ERR_EID, CmdText);
/* Verify that source file exists and is not a directory */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileExists(CmdPtr->Source, sizeof(CmdPtr->Source),
- FM_RENAME_SRC_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileExists(CmdPtr->Source, sizeof(CmdPtr->Source), FM_RENAME_SRC_BASE_EID, CmdText);
}
/* Verify that target file does not exist */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- FM_RENAME_TGT_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target), FM_RENAME_TGT_BASE_EID, CmdText);
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_RENAME_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
@@ -300,100 +279,95 @@ boolean FM_RenameFileCmd(CFE_SB_MsgPtr_t MessagePtr)
CmdArgs->CommandCode = FM_RENAME_CC;
strncpy(CmdArgs->Source1, CmdPtr->Source, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
- strncpy(CmdArgs->Target, CmdPtr->Target, OS_MAX_PATH_LEN - 1);
- CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
+ strncpy(CmdArgs->Target, CmdPtr->Target, OS_MAX_PATH_LEN - 1);
+ CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_RenameFileCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Delete File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_DeleteFileCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_DeleteFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_DeleteFileCmd_t *CmdPtr = (FM_DeleteFileCmd_t *) MessagePtr;
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- char *CmdText = "Delete File";
- boolean CommandResult = FALSE;
+ FM_DeleteFileCmd_t * CmdPtr = (FM_DeleteFileCmd_t *)BufPtr;
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ const char * CmdText = "Delete File";
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_DeleteFileCmd_t),
- FM_DELETE_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_DeleteFileCmd_t), FM_DELETE_PKT_ERR_EID, CmdText);
/* Verify that file exists, is not a directory and is not open */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileClosed(CmdPtr->Filename, sizeof(CmdPtr->Filename),
- FM_DELETE_SRC_BASE_EID, CmdText);
+ CommandResult =
+ FM_VerifyFileClosed(CmdPtr->Filename, sizeof(CmdPtr->Filename), FM_DELETE_SRC_BASE_EID, CmdText);
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_DELETE_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Set handshake queue command args - might be global or internal CC */
- CmdArgs->CommandCode = CFE_SB_GetCmdCode(MessagePtr);
+ CFE_MSG_GetFcnCode(&BufPtr->Msg, &CmdArgs->CommandCode);
strncpy(CmdArgs->Source1, CmdPtr->Filename, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
-
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_DeleteFileCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Delete All Files */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_DeleteAllFilesCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_DeleteAllFilesCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_DeleteAllCmd_t *CmdPtr = (FM_DeleteAllCmd_t *) MessagePtr;
- char *CmdText = "Delete All Files";
- char DirWithSep[OS_MAX_PATH_LEN] = "\0";
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- boolean CommandResult = FALSE;
+ FM_DeleteAllCmd_t * CmdPtr = (FM_DeleteAllCmd_t *)BufPtr;
+ const char * CmdText = "Delete All Files";
+ char DirWithSep[OS_MAX_PATH_LEN] = "\0";
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ bool CommandResult = false;
/* Verify message length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_DeleteAllCmd_t),
- FM_DELETE_ALL_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_DeleteAllCmd_t), FM_DELETE_ALL_PKT_ERR_EID, CmdText);
/* Verify that the directory exists */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- FM_DELETE_ALL_SRC_BASE_EID, CmdText);
+ CommandResult =
+ FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory), FM_DELETE_ALL_SRC_BASE_EID, CmdText);
}
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
/* Append a path separator to the end of the directory name */
strncpy(DirWithSep, CmdPtr->Directory, OS_MAX_PATH_LEN - 1);
- DirWithSep[OS_MAX_PATH_LEN - 1] = '\0';
+ DirWithSep[OS_MAX_PATH_LEN - 1] = '\0';
FM_AppendPathSep(DirWithSep, OS_MAX_PATH_LEN);
/* Check for lower priority child task availability */
@@ -401,84 +375,82 @@ boolean FM_DeleteAllFilesCmd(CFE_SB_MsgPtr_t MessagePtr)
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Set handshake queue command args */
CmdArgs->CommandCode = FM_DELETE_ALL_CC;
strncpy(CmdArgs->Source1, CmdPtr->Directory, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
strncpy(CmdArgs->Source2, DirWithSep, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source2[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source2[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_DeleteAllFilesCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Decompress File */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#ifdef FM_INCLUDE_DECOMPRESS
-boolean FM_DecompressFileCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_DecompressFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_DecompressCmd_t *CmdPtr = (FM_DecompressCmd_t *) MessagePtr;
- char *CmdText = "Decompress File";
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- boolean CommandResult = FALSE;
+ FM_DecompressCmd_t * CmdPtr = (FM_DecompressCmd_t *)BufPtr;
+ const char * CmdText = "Decompress File";
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_DecompressCmd_t),
- FM_DECOM_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_DecompressCmd_t), FM_DECOM_PKT_ERR_EID, CmdText);
/* Verify that source file exists, is not a directory and is not open */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileClosed(CmdPtr->Source, sizeof(CmdPtr->Source),
- FM_DECOM_SRC_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileClosed(CmdPtr->Source, sizeof(CmdPtr->Source), FM_DECOM_SRC_BASE_EID, CmdText);
}
/* Verify that target file does not exist */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- FM_DECOM_TGT_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target), FM_DECOM_TGT_BASE_EID, CmdText);
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_DECOM_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Set handshake queue command args */
CmdArgs->CommandCode = FM_DECOMPRESS_CC;
strncpy(CmdArgs->Source1, CmdPtr->Source, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
strncpy(CmdArgs->Target, CmdPtr->Target, OS_MAX_PATH_LEN - 1);
- CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_DecompressFileCmd() */
+#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -486,301 +458,288 @@ boolean FM_DecompressFileCmd(CFE_SB_MsgPtr_t MessagePtr)
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_ConcatFilesCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_ConcatFilesCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_ConcatCmd_t *CmdPtr = (FM_ConcatCmd_t *) MessagePtr;
- char *CmdText = "Concat Files";
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- boolean CommandResult = FALSE;
+ FM_ConcatCmd_t * CmdPtr = (FM_ConcatCmd_t *)BufPtr;
+ const char * CmdText = "Concat Files";
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_ConcatCmd_t),
- FM_CONCAT_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_ConcatCmd_t), FM_CONCAT_PKT_ERR_EID, CmdText);
/* Verify that source file #1 exists, is not a directory and is not open */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileClosed(CmdPtr->Source1, sizeof(CmdPtr->Source1),
- FM_CONCAT_SRC1_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileClosed(CmdPtr->Source1, sizeof(CmdPtr->Source1), FM_CONCAT_SRC1_BASE_EID, CmdText);
}
/* Verify that source file #2 exists, is not a directory and is not open */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileClosed(CmdPtr->Source2, sizeof(CmdPtr->Source2),
- FM_CONCAT_SRC2_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileClosed(CmdPtr->Source2, sizeof(CmdPtr->Source2), FM_CONCAT_SRC2_BASE_EID, CmdText);
}
/* Verify that target file does not exist */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- FM_CONCAT_TGT_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target), FM_CONCAT_TGT_BASE_EID, CmdText);
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_CONCAT_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Set handshake queue command args */
CmdArgs->CommandCode = FM_CONCAT_CC;
strncpy(CmdArgs->Source1, CmdPtr->Source1, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
strncpy(CmdArgs->Source2, CmdPtr->Source2, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source2[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source2[OS_MAX_PATH_LEN - 1] = '\0';
strncpy(CmdArgs->Target, CmdPtr->Target, OS_MAX_PATH_LEN - 1);
- CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_ConcatFilesCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Get File Info */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_GetFileInfoCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_GetFileInfoCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_GetFileInfoCmd_t *CmdPtr = (FM_GetFileInfoCmd_t *) MessagePtr;
- char *CmdText = "Get File Info";
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- boolean CommandResult = FALSE;
- uint32 FilenameState = FM_NAME_IS_INVALID;
+ FM_GetFileInfoCmd_t * CmdPtr = (FM_GetFileInfoCmd_t *)BufPtr;
+ const char * CmdText = "Get File Info";
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ bool CommandResult = false;
+ uint32 FilenameState = FM_NAME_IS_INVALID;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetFileInfoCmd_t),
- FM_GET_FILE_INFO_PKT_ERR_EID, CmdText);
+ CommandResult =
+ FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetFileInfoCmd_t), FM_GET_FILE_INFO_PKT_ERR_EID, CmdText);
/* Verify that the source name is valid for a file or directory */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- FilenameState = FM_VerifyNameValid(CmdPtr->Filename, sizeof(CmdPtr->Filename),
- FM_GET_FILE_INFO_SRC_ERR_EID, CmdText);
+ FilenameState =
+ FM_VerifyNameValid(CmdPtr->Filename, sizeof(CmdPtr->Filename), FM_GET_FILE_INFO_SRC_ERR_EID, CmdText);
if (FilenameState == FM_NAME_IS_INVALID)
{
- CommandResult = FALSE;
+ CommandResult = false;
}
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_FILE_INFO_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Set handshake queue command args */
CmdArgs->CommandCode = FM_GET_FILE_INFO_CC;
strncpy(CmdArgs->Source1, CmdPtr->Filename, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
CmdArgs->FileInfoState = FilenameState;
- CmdArgs->FileInfoCRC = CmdPtr->FileInfoCRC;
+ CmdArgs->FileInfoCRC = CmdPtr->FileInfoCRC;
/* Global data set during call to FM_VerifyNameValid */
CmdArgs->FileInfoSize = FM_GlobalData.FileStatSize;
- CmdArgs->FileInfoTime = CFE_TIME_FS2CFESeconds(FM_GlobalData.FileStatTime);
+ CmdArgs->FileInfoTime = FM_GlobalData.FileStatTime;
+ CmdArgs->Mode = FM_GlobalData.FileStatMode;
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_GetFileInfoCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Get List of Open Files */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_GetOpenFilesCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_GetOpenFilesCmd(const CFE_SB_Buffer_t *BufPtr)
{
- char *CmdText = "Get Open Files";
- boolean CommandResult = FALSE;
- uint32 NumOpenFiles = 0;
+ const char *CmdText = "Get Open Files";
+ bool CommandResult = false;
+ uint32 NumOpenFiles = 0;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetOpenFilesCmd_t),
- FM_GET_OPEN_FILES_PKT_ERR_EID, CmdText);
- if (CommandResult == TRUE)
+ CommandResult =
+ FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetOpenFilesCmd_t), FM_GET_OPEN_FILES_PKT_ERR_EID, CmdText);
+ if (CommandResult == true)
{
/* Initialize open files telemetry packet */
- CFE_SB_InitMsg(&FM_GlobalData.OpenFilesPkt, FM_OPEN_FILES_TLM_MID,
- sizeof(FM_OpenFilesPkt_t), TRUE);
+ CFE_MSG_Init(&FM_GlobalData.OpenFilesPkt.TlmHeader.Msg, FM_OPEN_FILES_TLM_MID, sizeof(FM_OpenFilesPkt_t));
/* Get list of open files and count */
- NumOpenFiles = FM_GetOpenFilesData(FM_GlobalData.OpenFilesPkt.OpenFilesList);
+ NumOpenFiles = FM_GetOpenFilesData(FM_GlobalData.OpenFilesPkt.OpenFilesList);
FM_GlobalData.OpenFilesPkt.NumOpenFiles = NumOpenFiles;
/* Timestamp and send open files telemetry packet */
- CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.OpenFilesPkt);
- CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.OpenFilesPkt);
+ CFE_SB_TimeStampMsg(&FM_GlobalData.OpenFilesPkt.TlmHeader.Msg);
+ CFE_SB_TransmitMsg(&FM_GlobalData.OpenFilesPkt.TlmHeader.Msg, true);
/* Send command completion event (debug) */
- CFE_EVS_SendEvent(FM_GET_OPEN_FILES_CMD_EID, CFE_EVS_DEBUG,
- "%s command", CmdText);
+ CFE_EVS_SendEvent(FM_GET_OPEN_FILES_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command", CmdText);
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_GetOpenFilesCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Create Directory */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_CreateDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_CreateDirectoryCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_CreateDirCmd_t *CmdPtr = (FM_CreateDirCmd_t *) MessagePtr;
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- char *CmdText = "Create Directory";
- boolean CommandResult = FALSE;
+ FM_CreateDirCmd_t * CmdPtr = (FM_CreateDirCmd_t *)BufPtr;
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ const char * CmdText = "Create Directory";
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_CreateDirCmd_t),
- FM_CREATE_DIR_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_CreateDirCmd_t), FM_CREATE_DIR_PKT_ERR_EID, CmdText);
/* Verify that the directory name is not already in use */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyDirNoExist(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- FM_CREATE_DIR_SRC_BASE_EID, CmdText);
+ CommandResult =
+ FM_VerifyDirNoExist(CmdPtr->Directory, sizeof(CmdPtr->Directory), FM_CREATE_DIR_SRC_BASE_EID, CmdText);
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_CREATE_DIR_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Set handshake queue command args */
CmdArgs->CommandCode = FM_CREATE_DIR_CC;
strncpy(CmdArgs->Source1, CmdPtr->Directory, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_CreateDirectoryCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Delete Directory */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_DeleteDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_DeleteDirectoryCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_DeleteDirCmd_t *CmdPtr = (FM_DeleteDirCmd_t *) MessagePtr;
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- char *CmdText = "Delete Directory";
- boolean CommandResult = FALSE;
+ FM_DeleteDirCmd_t * CmdPtr = (FM_DeleteDirCmd_t *)BufPtr;
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ const char * CmdText = "Delete Directory";
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_DeleteDirCmd_t),
- FM_DELETE_DIR_PKT_ERR_EID, CmdText);
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_DeleteDirCmd_t), FM_DELETE_DIR_PKT_ERR_EID, CmdText);
/* Verify that the directory exists */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- FM_DELETE_DIR_SRC_BASE_EID, CmdText);
+ CommandResult =
+ FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory), FM_DELETE_DIR_SRC_BASE_EID, CmdText);
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_DELETE_DIR_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Set handshake queue command args */
CmdArgs->CommandCode = FM_DELETE_DIR_CC;
strncpy(CmdArgs->Source1, CmdPtr->Directory, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
-
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_DeleteDirectoryCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Get List of Directory Entries (to file) */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_GetDirListFileCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_GetDirListFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_GetDirFileCmd_t *CmdPtr = (FM_GetDirFileCmd_t *) MessagePtr;
- char *CmdText = "Directory List to File";
- char DirWithSep[OS_MAX_PATH_LEN] = "\0";
- char Filename[OS_MAX_PATH_LEN] = "\0";
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- boolean CommandResult = FALSE;
+ FM_GetDirFileCmd_t * CmdPtr = (FM_GetDirFileCmd_t *)BufPtr;
+ const char * CmdText = "Directory List to File";
+ char DirWithSep[OS_MAX_PATH_LEN] = "\0";
+ char Filename[OS_MAX_PATH_LEN] = "\0";
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetDirFileCmd_t),
- FM_GET_DIR_FILE_PKT_ERR_EID, CmdText);
+ CommandResult =
+ FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetDirFileCmd_t), FM_GET_DIR_FILE_PKT_ERR_EID, CmdText);
/* Verify that source directory exists */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- FM_GET_DIR_FILE_SRC_BASE_EID, CmdText);
+ CommandResult =
+ FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory), FM_GET_DIR_FILE_SRC_BASE_EID, CmdText);
}
/* Verify that target file is not already open */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
/* Use default filename if not specified in the command */
if (CmdPtr->Filename[0] == '\0')
{
strncpy(Filename, FM_DIR_LIST_FILE_DEFNAME, OS_MAX_PATH_LEN - 1);
- Filename[OS_MAX_PATH_LEN - 1] = '\0';
+ Filename[OS_MAX_PATH_LEN - 1] = '\0';
}
else
{
@@ -788,139 +747,135 @@ boolean FM_GetDirListFileCmd(CFE_SB_MsgPtr_t MessagePtr)
}
/* Note: it is OK for this file to overwrite a previous version of the file */
- CommandResult = FM_VerifyFileNotOpen(Filename, sizeof(Filename),
- FM_GET_DIR_FILE_TGT_BASE_EID, CmdText);
+ CommandResult = FM_VerifyFileNotOpen(Filename, sizeof(Filename), FM_GET_DIR_FILE_TGT_BASE_EID, CmdText);
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_GET_DIR_FILE_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Append a path separator to the end of the directory name */
strncpy(DirWithSep, CmdPtr->Directory, OS_MAX_PATH_LEN - 1);
- DirWithSep[OS_MAX_PATH_LEN - 1] = '\0';
+ DirWithSep[OS_MAX_PATH_LEN - 1] = '\0';
FM_AppendPathSep(DirWithSep, OS_MAX_PATH_LEN);
/* Set handshake queue command args */
- CmdArgs->CommandCode = FM_GET_DIR_FILE_CC;
+ CmdArgs->CommandCode = FM_GET_DIR_FILE_CC;
CmdArgs->GetSizeTimeMode = CmdPtr->GetSizeTimeMode;
strncpy(CmdArgs->Source1, CmdPtr->Directory, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
strncpy(CmdArgs->Source2, DirWithSep, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source2[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source2[OS_MAX_PATH_LEN - 1] = '\0';
strncpy(CmdArgs->Target, Filename, OS_MAX_PATH_LEN - 1);
- CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Target[OS_MAX_PATH_LEN - 1] = '\0';
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_GetDirListFileCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Get List of Directory Entries (to pkt) */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_GetDirListPktCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_GetDirListPktCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_GetDirPktCmd_t *CmdPtr = (FM_GetDirPktCmd_t *) MessagePtr;
- char *CmdText = "Directory List to Packet";
- char DirWithSep[OS_MAX_PATH_LEN] = "\0";
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- boolean CommandResult = FALSE;
+ FM_GetDirPktCmd_t * CmdPtr = (FM_GetDirPktCmd_t *)BufPtr;
+ const char * CmdText = "Directory List to Packet";
+ char DirWithSep[OS_MAX_PATH_LEN] = "\0";
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetDirPktCmd_t),
- FM_GET_DIR_PKT_PKT_ERR_EID, CmdText);
+ CommandResult =
+ FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetDirPktCmd_t), FM_GET_DIR_PKT_PKT_ERR_EID, CmdText);
/* Verify that source directory exists */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
- CommandResult = FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- FM_GET_DIR_PKT_SRC_BASE_EID, CmdText);
+ CommandResult =
+ FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory), FM_GET_DIR_PKT_SRC_BASE_EID, CmdText);
}
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_GET_DIR_PKT_CHILD_BASE_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Append a path separator to the end of the directory name */
strncpy(DirWithSep, CmdPtr->Directory, OS_MAX_PATH_LEN - 1);
- DirWithSep[OS_MAX_PATH_LEN - 1] = '\0';
+ DirWithSep[OS_MAX_PATH_LEN - 1] = '\0';
FM_AppendPathSep(DirWithSep, OS_MAX_PATH_LEN);
/* Set handshake queue command args */
- CmdArgs->CommandCode = FM_GET_DIR_PKT_CC;
+ CmdArgs->CommandCode = FM_GET_DIR_PKT_CC;
CmdArgs->GetSizeTimeMode = CmdPtr->GetSizeTimeMode;
strncpy(CmdArgs->Source1, CmdPtr->Directory, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
strncpy(CmdArgs->Source2, DirWithSep, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source2[OS_MAX_PATH_LEN - 1] = '\0';
- CmdArgs->DirListOffset = CmdPtr->DirListOffset;
+ CmdArgs->Source2[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->DirListOffset = CmdPtr->DirListOffset;
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_GetDirListPktCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Get File System Free Space */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_GetFreeSpaceCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_GetFreeSpaceCmd(const CFE_SB_Buffer_t *BufPtr)
{
- char *CmdText = "Get Free Space";
- boolean CommandResult = FALSE;
- uint32 i = 0;
- uint64 FreeSpace64 = 0;
-
+ const char * CmdText = "Get Free Space";
+ bool CommandResult = false;
+ int32 OS_Status = OS_SUCCESS;
+ uint32 i = 0;
+ OS_statvfs_t FileStats;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetFreeSpaceCmd_t),
- FM_GET_FREE_SPACE_PKT_ERR_EID, CmdText);
- if (CommandResult == TRUE)
+ CommandResult =
+ FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetFreeSpaceCmd_t), FM_GET_FREE_SPACE_PKT_ERR_EID, CmdText);
+ if (CommandResult == true)
{
/* Verify that we have a pointer to the file system table data */
- if (FM_GlobalData.FreeSpaceTablePtr == (FM_FreeSpaceTable_t *) NULL)
+ if (FM_GlobalData.FreeSpaceTablePtr == (FM_FreeSpaceTable_t *)NULL)
{
- CommandResult = FALSE;
+ CommandResult = false;
- CFE_EVS_SendEvent(FM_GET_FREE_SPACE_TBL_ERR_EID, CFE_EVS_ERROR,
- "%s error: file system free space table is not loaded", CmdText);
+ CFE_EVS_SendEvent(FM_GET_FREE_SPACE_TBL_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: file system free space table is not loaded", CmdText);
}
else
{
/* Initialize the file system free space telemetry packet */
- CFE_SB_InitMsg(&FM_GlobalData.FreeSpacePkt, FM_FREE_SPACE_TLM_MID,
- sizeof(FM_FreeSpacePkt_t), TRUE);
+ CFE_MSG_Init(&FM_GlobalData.FreeSpacePkt.TlmHeader.Msg, FM_FREE_SPACE_TLM_MID, sizeof(FM_FreeSpacePkt_t));
/* Process enabled file system table entries */
for (i = 0; i < FM_TABLE_ENTRY_COUNT; i++)
@@ -929,83 +884,89 @@ boolean FM_GetFreeSpaceCmd(CFE_SB_MsgPtr_t MessagePtr)
{
/* Get file system name */
strncpy(FM_GlobalData.FreeSpacePkt.FileSys[i].Name,
- FM_GlobalData.FreeSpaceTablePtr->FileSys[i].Name, OS_MAX_PATH_LEN - 1);
- FM_GlobalData.FreeSpacePkt.FileSys[i].Name[OS_MAX_PATH_LEN - 1] = '\0';
+ FM_GlobalData.FreeSpaceTablePtr->FileSys[i].Name, OS_MAX_PATH_LEN - 1);
+ FM_GlobalData.FreeSpacePkt.FileSys[i].Name[OS_MAX_PATH_LEN - 1] = '\0';
/* Get file system free space */
- FreeSpace64 = 0;
- OS_fsBytesFree(FM_GlobalData.FreeSpacePkt.FileSys[i].Name, &FreeSpace64);
-
- /* Store as bytes to avoid boundary, endian and strict-aliasing issues */
- CFE_PSP_MemCpy(&FM_GlobalData.FreeSpacePkt.FileSys[i].FreeSpace_A,
- &FreeSpace64, sizeof(uint64));
+ OS_Status = OS_FileSysStatVolume(FM_GlobalData.FreeSpacePkt.FileSys[i].Name, &FileStats);
+ if (OS_Status == OS_SUCCESS)
+ {
+ FM_GlobalData.FreeSpacePkt.FileSys[i].FreeSpace = FileStats.blocks_free;
+ }
+ else
+ {
+ CFE_EVS_SendEvent(FM_OS_SYS_STAT_ERR_EID, CFE_EVS_EventType_ERROR,
+ "Could not get file system free space for %s. Returned 0x%08X",
+ FM_GlobalData.FreeSpacePkt.FileSys[i].Name, OS_Status);
+
+ FM_GlobalData.FreeSpacePkt.FileSys[i].FreeSpace = 0;
+ }
}
}
/* Timestamp and send file system free space telemetry packet */
- CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.FreeSpacePkt);
- CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.FreeSpacePkt);
+ CFE_SB_TimeStampMsg(&FM_GlobalData.FreeSpacePkt.TlmHeader.Msg);
+ CFE_SB_TransmitMsg(&FM_GlobalData.FreeSpacePkt.TlmHeader.Msg, true);
/* Send command completion event (debug) */
- CFE_EVS_SendEvent(FM_GET_FREE_SPACE_CMD_EID, CFE_EVS_DEBUG,
- "%s command", CmdText);
+ CFE_EVS_SendEvent(FM_GET_FREE_SPACE_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command", CmdText);
}
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_GetFreeSpaceCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Set Table Entry Enable/Disable State */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_SetTableStateCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_SetTableStateCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_SetTableStateCmd_t *CmdPtr = (FM_SetTableStateCmd_t *) MessagePtr;
- char *CmdText = "Set Table State";
- boolean CommandResult = FALSE;
+ FM_SetTableStateCmd_t *CmdPtr = (FM_SetTableStateCmd_t *)BufPtr;
+ const char * CmdText = "Set Table State";
+ bool CommandResult = false;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_SetTableStateCmd_t),
- FM_SET_TABLE_STATE_PKT_ERR_EID, CmdText);
- if (CommandResult == TRUE)
+ CommandResult =
+ FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_SetTableStateCmd_t), FM_SET_TABLE_STATE_PKT_ERR_EID, CmdText);
+ if (CommandResult == true)
{
- if (FM_GlobalData.FreeSpaceTablePtr == (FM_FreeSpaceTable_t *) NULL)
+ if (FM_GlobalData.FreeSpaceTablePtr == (FM_FreeSpaceTable_t *)NULL)
{
/* File system table has not been loaded */
- CommandResult = FALSE;
+ CommandResult = false;
- CFE_EVS_SendEvent(FM_SET_TABLE_STATE_TBL_ERR_EID, CFE_EVS_ERROR,
- "%s error: file system free space table is not loaded", CmdText);
+ CFE_EVS_SendEvent(FM_SET_TABLE_STATE_TBL_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: file system free space table is not loaded", CmdText);
}
else if (CmdPtr->TableEntryIndex >= FM_TABLE_ENTRY_COUNT)
{
/* Table index argument is out of range */
- CommandResult = FALSE;
+ CommandResult = false;
- CFE_EVS_SendEvent(FM_SET_TABLE_STATE_ARG_IDX_ERR_EID, CFE_EVS_ERROR,
- "%s error: invalid command argument: index = %d", CmdText, (int)CmdPtr->TableEntryIndex);
+ CFE_EVS_SendEvent(FM_SET_TABLE_STATE_ARG_IDX_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: invalid command argument: index = %d", CmdText, (int)CmdPtr->TableEntryIndex);
}
else if ((CmdPtr->TableEntryState != FM_TABLE_ENTRY_ENABLED) &&
- (CmdPtr->TableEntryState != FM_TABLE_ENTRY_DISABLED))
+ (CmdPtr->TableEntryState != FM_TABLE_ENTRY_DISABLED))
{
/* State argument must be either enabled or disabled */
- CommandResult = FALSE;
+ CommandResult = false;
- CFE_EVS_SendEvent(FM_SET_TABLE_STATE_ARG_STATE_ERR_EID, CFE_EVS_ERROR,
- "%s error: invalid command argument: state = %d", CmdText, (int)CmdPtr->TableEntryState);
+ CFE_EVS_SendEvent(FM_SET_TABLE_STATE_ARG_STATE_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: invalid command argument: state = %d", CmdText, (int)CmdPtr->TableEntryState);
}
else if (FM_GlobalData.FreeSpaceTablePtr->FileSys[CmdPtr->TableEntryIndex].State == FM_TABLE_ENTRY_UNUSED)
{
/* Current table entry state must not be unused */
- CommandResult = FALSE;
+ CommandResult = false;
- CFE_EVS_SendEvent(FM_SET_TABLE_STATE_UNUSED_ERR_EID, CFE_EVS_ERROR,
- "%s error: cannot modify unused table entry: index = %d", CmdText, (int)CmdPtr->TableEntryIndex);
+ CFE_EVS_SendEvent(FM_SET_TABLE_STATE_UNUSED_ERR_EID, CFE_EVS_EventType_ERROR,
+ "%s error: cannot modify unused table entry: index = %d", CmdText,
+ (int)CmdPtr->TableEntryIndex);
}
else
{
@@ -1016,71 +977,67 @@ boolean FM_SetTableStateCmd(CFE_SB_MsgPtr_t MessagePtr)
CFE_TBL_Modified(FM_GlobalData.FreeSpaceTableHandle);
/* Send command completion event (info) */
- CFE_EVS_SendEvent(FM_SET_TABLE_STATE_CMD_EID, CFE_EVS_INFORMATION,
- "%s command: index = %d, state = %d", CmdText, (int)CmdPtr->TableEntryIndex, (int)CmdPtr->TableEntryState);
+ CFE_EVS_SendEvent(FM_SET_TABLE_STATE_CMD_EID, CFE_EVS_EventType_INFORMATION,
+ "%s command: index = %d, state = %d", CmdText, (int)CmdPtr->TableEntryIndex,
+ (int)CmdPtr->TableEntryState);
}
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_SetTableStateCmd() */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- Set Permissions for a file */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-boolean FM_SetPermissionsCmd(CFE_SB_MsgPtr_t MessagePtr)
+bool FM_SetPermissionsCmd(const CFE_SB_Buffer_t *BufPtr)
{
- FM_SetPermCmd_t *CmdPtr = (FM_SetPermCmd_t *) MessagePtr;
- FM_ChildQueueEntry_t *CmdArgs = NULL;
- char *CmdText = "Set Permissions";
- boolean CommandResult = FALSE;
- boolean FilenameState = FM_NAME_IS_INVALID;
+ FM_SetPermCmd_t * CmdPtr = (FM_SetPermCmd_t *)BufPtr;
+ FM_ChildQueueEntry_t *CmdArgs = NULL;
+ const char * CmdText = "Set Permissions";
+ bool CommandResult = false;
+ bool FilenameState = FM_NAME_IS_INVALID;
/* Verify command packet length */
- CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_SetPermCmd_t),
- FM_SET_PERM_ERR_EID, CmdText);
-
-
- if(CommandResult == TRUE)
+ CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_SetPermCmd_t), FM_SET_PERM_ERR_EID, CmdText);
+
+ if (CommandResult == true)
{
- FilenameState = FM_VerifyNameValid(CmdPtr->FileName, sizeof(CmdPtr->FileName),
- 0, CmdText);
-
+ FilenameState = FM_VerifyNameValid(CmdPtr->FileName, sizeof(CmdPtr->FileName), 0, CmdText);
+
if (FilenameState == FM_NAME_IS_INVALID)
{
- CommandResult = FALSE;
+ CommandResult = false;
}
}
-
+
/* Check for lower priority child task availability */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CommandResult = FM_VerifyChildTask(FM_SET_PERM_ERR_EID, CmdText);
}
/* Prepare command for child task execution */
- if (CommandResult == TRUE)
+ if (CommandResult == true)
{
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
/* Set handshake queue command args */
CmdArgs->CommandCode = FM_SET_FILE_PERM_CC;
strncpy(CmdArgs->Source1, CmdPtr->FileName, OS_MAX_PATH_LEN - 1);
- CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
- CmdArgs->Mode = CmdPtr->Mode;
+ CmdArgs->Source1[OS_MAX_PATH_LEN - 1] = '\0';
+ CmdArgs->Mode = CmdPtr->Mode;
/* Invoke lower priority child task */
FM_InvokeChildTask();
}
- return(CommandResult);
+ return (CommandResult);
} /* End of FM_SetPermissionsCmd() */
/************************/
/* End of File Comment */
/************************/
-
diff --git a/fsw/src/fm_cmds.h b/fsw/src/fm_cmds.h
index 591c07e..cadd0ed 100644
--- a/fsw/src/fm_cmds.h
+++ b/fsw/src/fm_cmds.h
@@ -1,23 +1,23 @@
/*
-** Filename: fm_cmds.h
+** Filename: fm_cmds.h
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: CFS File Manager (FM) Application Ground Commands Header File
**
@@ -50,7 +50,7 @@
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -60,8 +60,7 @@
**
** \sa #FM_NOOP_CC, #FM_Noop, #FM_NoopCmd_t
**/
-boolean FM_NoopCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_NoopCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Reset Counters Command Handler Function
@@ -71,7 +70,7 @@ boolean FM_NoopCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -81,8 +80,7 @@ boolean FM_NoopCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_RESET_CC, #FM_Reset, #FM_ResetCmd_t
**/
-boolean FM_ResetCountersCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_ResetCountersCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Copy File Command Handler Function
@@ -100,7 +98,7 @@ boolean FM_ResetCountersCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -110,8 +108,7 @@ boolean FM_ResetCountersCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_COPY_CC, #FM_Copy, #FM_CopyFileCmd_t
**/
-boolean FM_CopyFileCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_CopyFileCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Move File Command Handler Function
@@ -122,7 +119,7 @@ boolean FM_CopyFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -132,8 +129,7 @@ boolean FM_CopyFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_MOVE_CC, #FM_Move, #FM_MoveFileCmd_t
**/
-boolean FM_MoveFileCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_MoveFileCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Rename File Command Handler Function
@@ -144,7 +140,7 @@ boolean FM_MoveFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -154,8 +150,7 @@ boolean FM_MoveFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_RENAME_CC, #FM_Rename, #FM_RenameFileCmd_t
**/
-boolean FM_RenameFileCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_RenameFileCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Delete File Command Handler Function
@@ -165,7 +160,7 @@ boolean FM_RenameFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -175,8 +170,7 @@ boolean FM_RenameFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_DELETE_CC, #FM_Delete, #FM_DeleteFileCmd_t
**/
-boolean FM_DeleteFileCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_DeleteFileCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Delete All Files Command Handler Function
@@ -194,7 +188,7 @@ boolean FM_DeleteFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -204,8 +198,9 @@ boolean FM_DeleteFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_DELETE_ALL_CC, #FM_DeleteAll, #FM_DeleteAllCmd_t
**/
-boolean FM_DeleteAllFilesCmd(CFE_SB_MsgPtr_t MessagePtr);
+bool FM_DeleteAllFilesCmd(const CFE_SB_Buffer_t *BufPtr);
+#ifdef FM_INCLUDE_DECOMPRESS
/**
** \brief Decompress Files Command Handler Function
@@ -224,7 +219,7 @@ boolean FM_DeleteAllFilesCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -234,8 +229,9 @@ boolean FM_DeleteAllFilesCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_DECOMPRESS_CC, #FM_Decompress, #FM_DecompressCmd_t
**/
-boolean FM_DecompressFileCmd(CFE_SB_MsgPtr_t MessagePtr);
+bool FM_DecompressFileCmd(const CFE_SB_Buffer_t *BufPtr);
+#endif
/**
** \brief Concatenate Files Command Handler Function
@@ -255,7 +251,7 @@ boolean FM_DecompressFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -265,8 +261,7 @@ boolean FM_DecompressFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_CONCAT_CC, #FM_Concat, #FM_ConcatCmd_t
**/
-boolean FM_ConcatFilesCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_ConcatFilesCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Get File Information Command Handler Function
@@ -285,7 +280,7 @@ boolean FM_ConcatFilesCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -295,8 +290,7 @@ boolean FM_ConcatFilesCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_GET_FILE_INFO_CC, #FM_GetFileInfo, #FM_GetFileInfoCmd_t, #FM_FileInfoPkt_t
**/
-boolean FM_GetFileInfoCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_GetFileInfoCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Get Open Files List Command Handler Function
@@ -307,7 +301,7 @@ boolean FM_GetFileInfoCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -317,8 +311,7 @@ boolean FM_GetFileInfoCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_GET_OPEN_FILES_CC, #FM_GetOpenFiles, #FM_GetOpenFilesCmd_t, #FM_OpenFilesPkt_t
**/
-boolean FM_GetOpenFilesCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_GetOpenFilesCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Create Directory Command Handler Function
@@ -328,7 +321,7 @@ boolean FM_GetOpenFilesCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -338,8 +331,7 @@ boolean FM_GetOpenFilesCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_CREATE_DIR_CC, #FM_CreateDir, #FM_CreateDirCmd_t
**/
-boolean FM_CreateDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_CreateDirectoryCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Delete Directory Command Handler Function
@@ -349,7 +341,7 @@ boolean FM_CreateDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -359,8 +351,7 @@ boolean FM_CreateDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_DELETE_DIR_CC, #FM_DeleteDir, #FM_DeleteDirCmd_t
**/
-boolean FM_DeleteDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_DeleteDirectoryCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Get Directory List to Packet Command Handler Function
@@ -378,7 +369,7 @@ boolean FM_DeleteDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -389,8 +380,7 @@ boolean FM_DeleteDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr);
** \sa #FM_GET_DIR_FILE_CC, #FM_GetDirFile, #FM_GetDirFileCmd_t,
#FM_DirListFileStats_t, FM_DirListEntry_t
**/
-boolean FM_GetDirListFileCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_GetDirListFileCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Get Directory List to Packet Command Handler Function
@@ -409,7 +399,7 @@ boolean FM_GetDirListFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -419,8 +409,7 @@ boolean FM_GetDirListFileCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_GET_DIR_PKT_CC, #FM_GetDirPkt, #FM_GetDirPktCmd_t, #FM_DirListPkt_t
**/
-boolean FM_GetDirListPktCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_GetDirListPktCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Get Free Space Command Handler Function
@@ -432,7 +421,7 @@ boolean FM_GetDirListPktCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -442,8 +431,7 @@ boolean FM_GetDirListPktCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_GET_FREE_SPACE_CC, #FM_GetFreeSpace, #FM_GetFreeSpaceCmd_t, #FM_FreeSpacePkt_t
**/
-boolean FM_GetFreeSpaceCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_GetFreeSpaceCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Set Table Entry State Command Handler Function
@@ -454,7 +442,7 @@ boolean FM_GetFreeSpaceCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -464,8 +452,7 @@ boolean FM_GetFreeSpaceCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_SET_TABLE_STATE_CC, #FM_SetTableState, #FM_SetTableStateCmd_t, #FM_TableEntry_t
**/
-boolean FM_SetTableStateCmd(CFE_SB_MsgPtr_t MessagePtr);
-
+bool FM_SetTableStateCmd(const CFE_SB_Buffer_t *BufPtr);
/**
** \brief Set File Permissions of a file
@@ -476,7 +463,7 @@ boolean FM_SetTableStateCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \par Assumptions, External Events, and Notes:
**
-** \param [in] MessagePtr - Pointer to Software Bus command packet.
+** \param [in] BufPtr - Pointer to Software Bus command packet.
**
** \returns
** \retcode #TRUE \retdesc \copydoc TRUE \endcode
@@ -486,11 +473,10 @@ boolean FM_SetTableStateCmd(CFE_SB_MsgPtr_t MessagePtr);
**
** \sa #FM_SET_PERM_CC, #FM_SetPermCmd_t, #FM_SET_PERM_CMD_EID, #FM_SET_PERM_ERR_EID
**/
-boolean FM_SetPermissionsCmd(CFE_SB_MsgPtr_t MessagePtr);
+bool FM_SetPermissionsCmd(const CFE_SB_Buffer_t *BufPtr);
#endif /* _fm_cmds_h_ */
/************************/
/* End of File Comment */
/************************/
-
diff --git a/fsw/src/fm_defs.h b/fsw/src/fm_defs.h
index 8014df1..94ad232 100644
--- a/fsw/src/fm_defs.h
+++ b/fsw/src/fm_defs.h
@@ -5,19 +5,19 @@
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: CFS File Manager (FM) Macro Definitions File
**
@@ -33,15 +33,13 @@
#ifndef _fm_defs_h_
#define _fm_defs_h_
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM child task semaphore does not exist */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define FM_CHILD_SEM_INVALID 0xFFFFFFFF
-
+#define FM_CHILD_SEM_INVALID 0xFFFFFFFF
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -49,8 +47,7 @@
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define FM_IGNORE_CRC 0
-
+#define FM_IGNORE_CRC 0
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -58,9 +55,8 @@
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define FM_THIS_DIRECTORY "."
-#define FM_PARENT_DIRECTORY ".."
-
+#define FM_THIS_DIRECTORY "."
+#define FM_PARENT_DIRECTORY ".."
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -68,12 +64,11 @@
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define FM_NAME_IS_INVALID 0
-#define FM_NAME_IS_NOT_IN_USE 1
-#define FM_NAME_IS_FILE_OPEN 2
-#define FM_NAME_IS_FILE_CLOSED 3
-#define FM_NAME_IS_DIRECTORY 4
-
+#define FM_NAME_IS_INVALID 0
+#define FM_NAME_IS_NOT_IN_USE 1
+#define FM_NAME_IS_FILE_OPEN 2
+#define FM_NAME_IS_FILE_CLOSED 3
+#define FM_NAME_IS_DIRECTORY 4
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -81,14 +76,12 @@
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#define FM_TABLE_ENTRY_DISABLED 0
-#define FM_TABLE_ENTRY_ENABLED 1
-#define FM_TABLE_ENTRY_UNUSED 2
-
+#define FM_TABLE_ENTRY_DISABLED 0
+#define FM_TABLE_ENTRY_ENABLED 1
+#define FM_TABLE_ENTRY_UNUSED 2
#endif /* _fm_defs_h_ */
/************************/
/* End of File Comment */
/************************/
-
diff --git a/fsw/src/fm_events.h b/fsw/src/fm_events.h
index f75e70f..3fa6923 100644
--- a/fsw/src/fm_events.h
+++ b/fsw/src/fm_events.h
@@ -1,23 +1,23 @@
/*
-** Filename: fm_events.h
+** Filename: fm_events.h
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: CFS File Manager (FM) Application Event ID Header File
**
@@ -33,7 +33,6 @@
#ifndef _fm_events_h_
#define _fm_events_h_
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM event message ID's */
@@ -53,8 +52,7 @@
** The version numbers indicate the application major version number,
** minor version number, revision number and mission revision number.
*/
-#define FM_STARTUP_EID 1
-
+#define FM_STARTUP_EID 1
/** \brief 'Initialization Error: Register for Event Services'
** \event 'Initialization error: register for event services: result = 0x\%08X'
@@ -73,8 +71,7 @@
** The result number in the message text is the error code returned
** from the the call to the API function #CFE_EVS_Register.
*/
-#define FM_STARTUP_EVENTS_ERR_EID 2
-
+#define FM_STARTUP_EVENTS_ERR_EID 2
/** \brief 'Initialization Error: Create SB Input Pipe'
** \event 'Initialization error: create SB input pipe: result = 0x\%08X'
@@ -93,8 +90,7 @@
** The result number in the message text is the error code returned
** from the the call to the API function #CFE_SB_CreatePipe.
*/
-#define FM_STARTUP_CREAT_PIPE_ERR_EID 3
-
+#define FM_STARTUP_CREAT_PIPE_ERR_EID 3
/** \brief 'Initialization Error: Subscribe to HK Request'
** \event 'Initialization error: subscribe to HK request: result = 0x\%08X'
@@ -113,8 +109,7 @@
** The result number in the message text is the error code returned
** from the the call to the API function #CFE_SB_Subscribe.
*/
-#define FM_STARTUP_SUBSCRIB_HK_ERR_EID 4
-
+#define FM_STARTUP_SUBSCRIB_HK_ERR_EID 4
/** \brief 'Initialization Error: Subscribe to FM Commands'
** \event 'Initialization error: subscribe to FM commands: result = 0x\%08X'
@@ -133,8 +128,7 @@
** The result number in the message text is the error code returned
** from the the call to the API function #CFE_SB_Subscribe.
*/
-#define FM_STARTUP_SUBSCRIB_GCMD_ERR_EID 5
-
+#define FM_STARTUP_SUBSCRIB_GCMD_ERR_EID 5
/** \brief 'Initialization Error: Register Free Space Table'
** \event 'Initialization error: register free space table: result = 0x\%08X'
@@ -153,8 +147,7 @@
** The result number in the message text is the error code returned
** from the the call to the API function #CFE_TBL_Register.
*/
- #define FM_STARTUP_TABLE_INIT_ERR_EID 6
-
+#define FM_STARTUP_TABLE_INIT_ERR_EID 6
/** \brief 'Main Loop Error: Software Bus Receive'
** \event 'Main Loop Error: SB receive: result = 0x\%08X'
@@ -173,8 +166,7 @@
** The result number in the message text is the error code returned
** from the the call to the API function #CFE_SB_RcvMsg.
*/
-#define FM_SB_RECEIVE_ERR_EID 7
-
+#define FM_SB_RECEIVE_ERR_EID 7
/** \brief 'Application Terminating'
** \event 'Application terminating: result = 0x\%08X'
@@ -193,11 +185,10 @@
** If the result value in the event text is zero, then it is likely that
** the CFE has terminated the FM application, presumably by command.
*/
-#define FM_EXIT_ERR_EID 8
-
+#define FM_EXIT_ERR_EID 8
/** \brief 'Main Loop Error: Invalid Message ID'
-** \event 'Main loop error: invalid message ID: mid = 0x\%04X'
+** \event 'Main loop error: invalid message ID: mid = 0x\%08X'
**
** \par Type: ERROR
**
@@ -209,8 +200,7 @@
**
** The number in the message text is the unexpected MessageID.
*/
-#define FM_MID_ERR_EID 9
-
+#define FM_MID_ERR_EID 9
/** \brief 'Main Loop Error: Invalid Command Code'
** \event 'Main loop error: invalid command code: cc = \%d'
@@ -228,8 +218,7 @@
**
** The number in the message text is the unexpected command code.
*/
-#define FM_CC_ERR_EID 10
-
+#define FM_CC_ERR_EID 10
/** \brief 'HK Request Error: Invalid Command Packet Length'
** \event 'HK Request error: invalid command packet length: expected = \%d, actual = \%d'
@@ -241,8 +230,7 @@
** This event message is generated upon receipt of a housekeeping
** request command packet with an invalid length.
*/
-#define FM_HK_REQ_ERR_EID 11
-
+#define FM_HK_REQ_ERR_EID 11
/** \brief 'No-op Command Success'
** \event 'No-op command: version \%d.\%d.\%d.\%d'
@@ -257,8 +245,7 @@
** The version data includes the application major version, minor version,
** revision and mission revision numbers.
*/
-#define FM_NOOP_CMD_EID 12
-
+#define FM_NOOP_CMD_EID 12
/** \brief 'No-op Error: Invalid Command Packet Length'
** \event 'No-op error: invalid command packet length: expected = \%d, actual = \%d'
@@ -270,8 +257,7 @@
** This event message is generated upon receipt of a /FM_Noop
** command packet with an invalid length.
*/
-#define FM_NOOP_PKT_ERR_EID 13
-
+#define FM_NOOP_PKT_ERR_EID 13
/** \brief 'Reset Counters Command Success'
** \event 'Reset Counters command'
@@ -286,8 +272,7 @@
** This event message signals the successful completion of a
** /FM_ResetCtrs command.
*/
-#define FM_RESET_CMD_EID 14
-
+#define FM_RESET_CMD_EID 14
/** \brief 'Reset Counters Error: Invalid Command Packet Length'
** \event 'Reset Counters error: invalid command packet length: expected = \%d, actual = \%d'
@@ -299,8 +284,7 @@
** This event message is generated upon receipt of a /FM_ResetCtrs
** command packet with an invalid length.
*/
-#define FM_RESET_PKT_ERR_EID 15
-
+#define FM_RESET_PKT_ERR_EID 15
/** \brief 'Copy File Command Success'
** \event 'Copy File command: src = \%s, tgt = \%s'
@@ -317,8 +301,7 @@
** occur until some time after the command was invoked. However, this
** event message does signal the actual completion of the command.
*/
- #define FM_COPY_CMD_EID 16
-
+#define FM_COPY_CMD_EID 16
/** \brief 'Copy File Error: Invalid Command Packet Length'
** \event 'Copy File error: invalid command packet length: expected = \%d, actual = \%d'
@@ -330,8 +313,7 @@
** This event message is generated upon receipt of a /FM_Copy
** command packet with an invalid length.
*/
-#define FM_COPY_PKT_ERR_EID 17
-
+#define FM_COPY_PKT_ERR_EID 17
/** \brief 'Copy File Error: Invalid Overwrite'
** \event 'Copy File error: invalid overwrite = \%d'
@@ -344,8 +326,7 @@
** command packet with an invalid overwrite argument. Overwrite
** must be set to TRUE (one) or FALSE (zero).
*/
-#define FM_COPY_OVR_ERR_EID 18
-
+#define FM_COPY_OVR_ERR_EID 18
/** \brief 'Copy File Error: OS Error'
** \event 'Copy File error: OS_cp failed: result = \%d, src = \%s, tgt = \%s'
@@ -366,8 +347,7 @@
** function call. The string data identifies the source and
** target names for the file being copied.
*/
-#define FM_COPY_OS_ERR_EID 19
-
+#define FM_COPY_OS_ERR_EID 19
/** \brief 'Move File Command Success'
** \event 'Move File command: src = \%s, tgt = \%s'
@@ -379,8 +359,7 @@
** This event message signals the successful completion of a
** /FM_Move command.
*/
-#define FM_MOVE_CMD_EID 20
-
+#define FM_MOVE_CMD_EID 20
/** \brief 'Move File Error: Invalid Command Packet Length'
** \event 'Move File error: invalid command packet length: expected = \%d, actual = \%d'
@@ -392,8 +371,7 @@
** This event message is generated upon receipt of a /FM_Move
** command packet with an invalid length.
*/
-#define FM_MOVE_PKT_ERR_EID 21
-
+#define FM_MOVE_PKT_ERR_EID 21
/** \brief 'Move File Error: Invalid Overwrite'
** \event 'Move File error: invalid overwrite = \%d'
@@ -406,8 +384,7 @@
** command packet with an invalid overwrite argument. Overwrite
** must be set to TRUE (one) or FALSE (zero).
*/
-#define FM_MOVE_OVR_ERR_EID 22
-
+#define FM_MOVE_OVR_ERR_EID 22
/** \brief 'Move File Error: OS Error'
** \event 'Move File error: OS_mv error = 0x\%08X, src = \%s, tgt = \%s'
@@ -428,8 +405,7 @@
** function call. The string data identifies the source and
** target names for the file being moved.
*/
-#define FM_MOVE_OS_ERR_EID 23
-
+#define FM_MOVE_OS_ERR_EID 23
/** \brief 'Rename File Command Success'
** \event 'Rename File command: src = \%s, tgt = \%s'
@@ -441,8 +417,7 @@
** This event message signals the successful completion of a
** /FM_Rename command.
*/
-#define FM_RENAME_CMD_EID 24
-
+#define FM_RENAME_CMD_EID 24
/** \brief 'Rename File Error: Invalid Command Packet Length'
** \event 'Rename File error: invalid command packet length: expected = \%d, actual = \%d'
@@ -454,8 +429,20 @@
** This event message is generated upon receipt of a /FM_Rename
** command packet with an invalid length.
*/
-#define FM_RENAME_PKT_ERR_EID 25
+#define FM_RENAME_PKT_ERR_EID 25
+/** \brief 'Rename File Error: Invalid Overwrite'
+** \event 'Rename File error: invalid overwrite = \%d'
+**
+** \par Type: ERROR
+**
+** \par Cause
+**
+** This event message is generated upon receipt of a /FM_Rename
+** command packet with an invalid overwrite argument. Overwrite
+** must be set to TRUE (one) or FALSE (zero).
+*/
+#define FM_RENAME_OVR_ERR_EID 26
/** \brief 'Rename File Error: OS Error'
** \event 'Rename File error: OS_rename error = 0x\%08X, src = \%s, tgt = \%s'
@@ -476,8 +463,7 @@
** function call. The string data identifies the source and
** target names for the file being renamed.
*/
-#define FM_RENAME_OS_ERR_EID 26
-
+#define FM_RENAME_OS_ERR_EID 27
/** \brief 'Delete File Command Success'
** \event 'Delete File command: file = \%s'
@@ -489,8 +475,7 @@
** This event message signals the successful completion of a
** /FM_Delete command.
*/
-#define FM_DELETE_CMD_EID 27
-
+#define FM_DELETE_CMD_EID 28
/** \brief 'Delete File Error: Invalid Command Packet Length'
** \event 'Delete File error: invalid command packet length: expected = \%d, actual = \%d'
@@ -502,8 +487,7 @@
** This event message is generated upon receipt of a /FM_Delete
** command packet with an invalid length.
*/
-#define FM_DELETE_PKT_ERR_EID 28
-
+#define FM_DELETE_PKT_ERR_EID 29
/** \brief 'Delete File Error: OS Error'
** \event 'Delete File error: OS_remove error = 0x\%08X, file = \%s'
@@ -522,8 +506,7 @@
** function call. The string data identifies the name of the file
** being deleted.
*/
-#define FM_DELETE_OS_ERR_EID 29
-
+#define FM_DELETE_OS_ERR_EID 30
/** \brief 'Delete All Files Command Success'
** \event 'Delete All Files command: deleted \%d of \%d dir entries: dir = \%s'
@@ -540,8 +523,7 @@
** occur until some time after the command was invoked. However, this
** event message does signal the actual completion of the command.
*/
-#define FM_DELETE_ALL_CMD_EID 30
-
+#define FM_DELETE_ALL_CMD_EID 31
/** \brief 'Delete All Files command: one or more files could not be deleted. Files may be open : dir = %s'
** \event 'Delete All Files command: one or more files could not be deleted. Files may be open : dir = %s'
@@ -550,11 +532,10 @@
**
** \par Cause
**
-** This general event message is issued if for any reason some files
+** This general event message is issued if for any reason some files
** could not be deleted.
*/
-#define FM_DELETE_ALL_FILES_ND_WARNING_EID 31
-
+#define FM_DELETE_ALL_FILES_ND_WARNING_EID 32
/** \brief 'Delete All Files command: one or more directories skipped : dir = %s'
** \event 'Delete All Files command: one or more directories skipped : dir = %s'
@@ -566,8 +547,7 @@
** This general event message is issued if for any reason a directory
** skipped when processing a /FM_DeleteAll command.
*/
-#define FM_DELETE_ALL_SKIP_WARNING_EID 32
-
+#define FM_DELETE_ALL_SKIP_WARNING_EID 33
/** \brief 'Delete All Files Error: Invalid Command Packet Length'
** \event 'Delete All Files error: invalid command packet length: expected = \%d, actual = \%d'
@@ -579,11 +559,10 @@
** This event message is generated upon receipt of a /FM_DeleteAll
** command packet with an invalid length.
*/
-#define FM_DELETE_ALL_PKT_ERR_EID 33
-
+#define FM_DELETE_ALL_PKT_ERR_EID 34
/** \brief 'Delete All Files Error: OS Error'
-** \event 'Delete All Files error: OS_opendir failed: dir = \%s'
+** \event 'Delete All Files error: OS_DirectoryOpen failed: dir = \%s'
**
** \par Type: ERROR
**
@@ -595,14 +574,11 @@
** return value for an indication of what might have caused this
** error.
**
-** Note: the call to OS_opendir returns a pointer, or NULL.
-**
** The numeric data in the event is the return value from the OS
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_DELETE_ALL_OS_ERR_EID 34
-
+#define FM_DELETE_ALL_OS_ERR_EID 35
/** \brief 'Decompress File Command Success'
** \event 'Decompress File command: src = \%s, tgt = \%s'
@@ -619,8 +595,7 @@
** occur until some time after the command was invoked. However, this
** event message does signal the actual completion of the command.
*/
-#define FM_DECOM_CMD_EID 35
-
+#define FM_DECOM_CMD_EID 36
/** \brief 'Decompress File Error: Invalid Command Packet Length'
** \event 'Decompress File error: invalid command packet length: expected = \%d, actual = \%d'
@@ -632,8 +607,7 @@
** This event message is generated upon receipt of a /FM_Decompress
** command packet with an invalid length.
*/
-#define FM_DECOM_PKT_ERR_EID 36
-
+#define FM_DECOM_PKT_ERR_EID 37
/** \brief 'Decompress File Error: CFE Error'
** \event 'Decompress File error: CFE_FS_Decompress failed: result = \%d, src = \%s, tgt = \%s'
@@ -652,8 +626,7 @@
** function call. The string data identifies the names of the
** source and target files.
*/
-#define FM_DECOM_CFE_ERR_EID 37
-
+#define FM_DECOM_CFE_ERR_EID 38
/** \brief 'Concat Files Command Success'
** \event 'Concat Files command: src1 = \%s, src2 = \%s, tgt = \%s'
@@ -670,8 +643,7 @@
** occur until some time after the command was invoked. However, this
** event message does signal the actual completion of the command.
*/
-#define FM_CONCAT_CMD_EID 38
-
+#define FM_CONCAT_CMD_EID 39
/** \brief 'Concat Files Error: Invalid Command Packet Length'
** \event 'Concat Files error: invalid command packet length: expected = \%d, actual = \%d'
@@ -683,8 +655,7 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with an invalid length.
*/
-#define FM_CONCAT_PKT_ERR_EID 39
-
+#define FM_CONCAT_PKT_ERR_EID 40
/** \brief 'Concat File Error: OS_cp failed: result = \%d, src = \%s, tgt = \%s'
** \event 'Concat File error: OS_cp failed: result = \%d, src = \%s, tgt = \%s'
@@ -693,7 +664,7 @@
**
** \par Cause
**
-** This event message is generated when the first source file cannot be
+** This event message is generated when the first source file cannot be
** copied.
**
** This event message is generated due to an API function error that
@@ -706,8 +677,7 @@
** function call. The string data identifies the name of the file(s)
** being operated on by the API function.
*/
-#define FM_CONCAT_OSCPY_ERR_EID 40
-
+#define FM_CONCAT_OSCPY_ERR_EID 41
/** \brief 'Concat File Error: OS_open failed: result = \%d, src2 = \%s'
** \event 'Concat File error: OS_open failed: result = \%d, src2 = \%s'
@@ -716,8 +686,8 @@
**
** \par Cause
**
-** This event message is generated when the second source file cannot
-** be opened.
+** This event message is generated when the second source file cannot
+** be opened.
**
** This event message is generated due to an API function error that
** occurred after preliminary command argument verification tests
@@ -729,8 +699,7 @@
** function call. The string data identifies the name of the file
** being operated on by the API function.
*/
-#define FM_CONCAT_OPEN_SRC2_ERR_EID 41
-
+#define FM_CONCAT_OPEN_SRC2_ERR_EID 42
/** \brief 'Concat File Error: OS_open failed: result = \%d, tgt = \%s'
** \event 'Concat File error: OS_open failed: result = \%d, tgt = \%s'
@@ -741,7 +710,7 @@
**
** This event message is generated when the target file cannot
** be opened.
-**
+**
** This event message is generated due to an API function error that
** occurred after preliminary command argument verification tests
** indicated that the source files exist. Refer to the function
@@ -752,8 +721,7 @@
** function call. The string data identifies the name of the file(s)
** being operated on by the API function.
*/
-#define FM_CONCAT_OPEN_TGT_ERR_EID 42
-
+#define FM_CONCAT_OPEN_TGT_ERR_EID 43
/** \brief 'Concat File Error: OS_read failed: result = \%d, file = \%s'
** \event 'Concat File error: OS_read failed: result = \%d, file = \%s'
@@ -774,8 +742,7 @@
** function call. The string data identifies the name of the file
** being operated on by the API function.
*/
-#define FM_CONCAT_OSRD_ERR_EID 43
-
+#define FM_CONCAT_OSRD_ERR_EID 44
/** \brief 'Concat File Error: OS_write failed: result = \%d, expected = \%d'
** \event 'Concat File error: OS_write failed: result = \%d, expected = \%d'
@@ -784,7 +751,7 @@
**
** \par Cause
**
-** This event message is generated when the target file cannot be written.
+** This event message is generated when the target file cannot be written.
**
** This event message is generated due to an API function error that
** occurred after preliminary command argument verification tests
@@ -796,15 +763,14 @@
** function call. The string data identifies the name of the file(s)
** being operated on by the API function.
*/
-#define FM_CONCAT_OSWR_ERR_EID 44
-
+#define FM_CONCAT_OSWR_ERR_EID 45
/** \brief 'Get File Info Command Success'
** \event 'Get File Info command: name = \%s'
**
** \par Type: DEBUG
**
-** This event is type debug because the command generates a telemetry
+** This event is type debug because the command generates a telemetry
** packet that also signals the completion of the command.
**
** \par Cause
@@ -817,8 +783,7 @@
** occur until some time after the command was invoked. However, this
** event message does signal the actual completion of the command.
*/
-#define FM_GET_FILE_INFO_CMD_EID 45
-
+#define FM_GET_FILE_INFO_CMD_EID 46
/** \brief 'Get File Info Warning: unable to compute CRC: invalid file state = \%d, file = \%s'
** \event 'Get File Info warning: unable to compute CRC: invalid file state = \%d, file = \%s'
@@ -827,7 +792,7 @@
**
** \par Cause
**
-** This event message is generated when the CRC of a file cannot be
+** This event message is generated when the CRC of a file cannot be
** computed because the file has an invalid state.
**
** This event message is generated due to an API function error that
@@ -840,8 +805,7 @@
** function call. The string data identifies the name of the file
** being operated on by the API function.
*/
-#define FM_GET_FILE_INFO_STATE_WARNING_EID 46
-
+#define FM_GET_FILE_INFO_STATE_WARNING_EID 47
/** \brief 'Get File Info Warning: unable to compute CRC: invalid CRC type = \%d, file = \%s'
** \event 'Get File Info warning: unable to compute CRC: invalid CRC type = \%d, file = \%s'
@@ -851,8 +815,8 @@
** \par Cause
**
** This event message is generated when the CRC of a file cannot be
-** computed because the CRC type is invalid.
-**
+** computed because the CRC type is invalid.
+**
** This event message is generated due to an API function error that
** occurred after preliminary command argument verification tests
** indicated that the source files exist. Refer to the function
@@ -863,8 +827,7 @@
** function call. The string data identifies the name of the file
** being operated on by the API function.
*/
-#define FM_GET_FILE_INFO_TYPE_WARNING_EID 47
-
+#define FM_GET_FILE_INFO_TYPE_WARNING_EID 48
/** \brief 'Get File Info Warning: unable to compute CRC: OS_open result = \%d, file = \%s'
** \event 'Get File Info warning: unable to compute CRC: OS_open result = \%d, file = \%s'
@@ -873,8 +836,8 @@
**
** \par Cause
**
-** This event message is generated when the CRC of a file cannot be
-** computed because the file cannot be opened.
+** This event message is generated when the CRC of a file cannot be
+** computed because the file cannot be opened.
**
** This event message is generated due to an API function error that
** occurred after preliminary command argument verification tests
@@ -886,8 +849,7 @@
** function call. The string data identifies the name of the file
** being operated on by the API function.
*/
-#define FM_GET_FILE_INFO_OPEN_ERR_EID 48
-
+#define FM_GET_FILE_INFO_OPEN_ERR_EID 49
/** \brief 'Get File Info Warning: unable to compute CRC: OS_read result = \%d, file = \%s'
** \event 'Get File Info warning: unable to compute CRC: OS_read result = \%d, file = \%s'
@@ -909,8 +871,7 @@
** function call. The string data identifies the name of the file
** being operated on by the API function.
*/
-#define FM_GET_FILE_INFO_READ_WARNING_EID 49
-
+#define FM_GET_FILE_INFO_READ_WARNING_EID 50
/** \brief 'Get File Info Error: Invalid Command Packet Length'
** \event 'Get File Info error: invalid command packet length: expected = \%d, actual = \%d'
@@ -922,8 +883,7 @@
** This event message is generated upon receipt of a /FM_GetFileInfo
** command packet with an invalid length.
*/
-#define FM_GET_FILE_INFO_PKT_ERR_EID 50
-
+#define FM_GET_FILE_INFO_PKT_ERR_EID 51
/** \brief 'Get File Info Error: Source Filename'
** \event 'Get File Info error: invalid name: name = \%s'
@@ -935,15 +895,14 @@
** This event message is generated upon receipt of a /FM_GetFileInfo
** command packet with an invalid filename.
*/
-#define FM_GET_FILE_INFO_SRC_ERR_EID 51
-
+#define FM_GET_FILE_INFO_SRC_ERR_EID 52
/** \brief 'Get Open Files Command Success'
** \event 'Get Open Files command'
**
** \par Type: DEBUG
**
-** This event is type debug because the command generates a telemetry
+** This event is type debug because the command generates a telemetry
** packet that also signals the completion of the command.
**
** \par Cause
@@ -951,8 +910,7 @@
** This event message signals the successful completion of a
** /FM_GetOpenFiles command.
*/
-#define FM_GET_OPEN_FILES_CMD_EID 52
-
+#define FM_GET_OPEN_FILES_CMD_EID 53
/** \brief 'Get Open Files Error: Invalid Command Packet Length'
** \event 'Get Open Files error: invalid command packet length: expected = \%d, actual = \%d'
@@ -964,8 +922,7 @@
** This event message is generated upon receipt of a /FM_GetOpenFiles
** command packet with an invalid length.
*/
-#define FM_GET_OPEN_FILES_PKT_ERR_EID 53
-
+#define FM_GET_OPEN_FILES_PKT_ERR_EID 54
/** \brief 'Create Directory Command Success'
** \event 'Create Directory command: dir = \%s'
@@ -977,8 +934,7 @@
** This event message signals the successful completion of a
** /FM_CreateDir command.
*/
-#define FM_CREATE_DIR_CMD_EID 54
-
+#define FM_CREATE_DIR_CMD_EID 55
/** \brief 'Create Directory Error: Invalid Command Packet Length'
** \event 'Create Directory error: invalid command packet length: expected = \%d, actual = \%d'
@@ -990,8 +946,7 @@
** This event message is generated upon receipt of a /FM_CreateDir
** command packet with an invalid length.
*/
-#define FM_CREATE_DIR_PKT_ERR_EID 55
-
+#define FM_CREATE_DIR_PKT_ERR_EID 56
/** \brief 'Create Directory Error: OS Error'
** \event 'Create Directory error: OS_mkdir failed: result = \%d, dir = \%s'
@@ -1008,8 +963,7 @@
** The numeric data in the event is the return value from the OS
** function call. The string data identifies the directory name.
*/
-#define FM_CREATE_DIR_OS_ERR_EID 56
-
+#define FM_CREATE_DIR_OS_ERR_EID 57
/** \brief 'Delete Directory Command Success'
** \event 'Delete Directory command: dir = \%s'
@@ -1021,8 +975,7 @@
** This event message signals the successful completion of a
** /FM_DeleteDir command.
*/
-#define FM_DELETE_DIR_CMD_EID 57
-
+#define FM_DELETE_DIR_CMD_EID 58
/** \brief 'Delete Directory Error: Invalid Command Packet Length'
** \event 'Delete Directory error: invalid command packet length: expected = \%d, actual = \%d'
@@ -1034,8 +987,7 @@
** This event message is generated upon receipt of a /FM_DeleteDir
** command packet with an invalid length.
*/
-#define FM_DELETE_DIR_PKT_ERR_EID 58
-
+#define FM_DELETE_DIR_PKT_ERR_EID 59
/** \brief 'Delete Directory Error: Source Filename'
** \event 'Delete Directory error: directory is not empty: dir = \%s'
@@ -1047,11 +999,10 @@
** This event message is generated upon receipt of a /FM_DeleteDir
** command packet that references a directory that is not empty.
*/
-#define FM_DELETE_DIR_EMPTY_ERR_EID 59
-
+#define FM_DELETE_DIR_EMPTY_ERR_EID 60
-/** \brief 'Delete Directory Error: OS_opendir failed: dir = \%s'
-** \event 'Delete Directory error: OS_opendir failed: dir = \%s'
+/** \brief 'Delete Directory Error: OS_DirectoryOpen failed: dir = \%s'
+** \event 'Delete Directory error: OS_DirectoryOpen failed: dir = \%s'
**
** \par Type: ERROR
**
@@ -1062,14 +1013,11 @@
** indicated that the directory exists and appears to be valid.
** Refer to the OS specific return values.
**
-** Note: the call to OS_opendir returns a pointer, or NULL.
-**
** The numeric data in the event is the return value from the OS
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_DELETE_OPENDIR_OS_ERR_EID 60
-
+#define FM_DELETE_OPENDIR_OS_ERR_EID 61
/** \brief 'Delete Directory Error: OS_rmdir failed: result = \%d, dir = \%s'
** \event 'Delete Directory error: OS_rmdir failed: result = \%d, dir = \%s'
@@ -1087,8 +1035,7 @@
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_DELETE_RMDIR_OS_ERR_EID 61
-
+#define FM_DELETE_RMDIR_OS_ERR_EID 62
/** \brief 'Directory List to File command'
** \event 'Directory List to File command: wrote \%d of \%d names: dir = \%s, filename = \%s'
@@ -1110,8 +1057,7 @@
** occur until some time after the command was invoked. However, this
** event message does signal the actual completion of the command.
*/
-#define FM_GET_DIR_FILE_CMD_EID 62
-
+#define FM_GET_DIR_FILE_CMD_EID 63
/** \brief 'Directory List to File Error: Invalid Command Packet Length'
** \event 'Directory List to File error: invalid command packet length: expected = \%d, actual = \%d'
@@ -1123,11 +1069,11 @@
** This event message is generated upon receipt of a /FM_GetDirFile
** command packet with an invalid length.
*/
-#define FM_GET_DIR_FILE_PKT_ERR_EID 63
-
+#define FM_GET_DIR_FILE_PKT_ERR_EID 64
/** \brief 'Directory List to File Warning: Pathname'
-** \event 'Directory List to File warning: combined directory and entry name too long: dir = \%s, entry = \%s'
+** \event 'Directory List to File warning: combined directory and entry name too long: dir = \%s, entry = \%s'
+*
**
** \par Type: INFORMATION
**
@@ -1142,11 +1088,10 @@
** The /FM_GetDirFile command handler will not write information
** regarding this directory entry to the output file.
*/
-#define FM_GET_DIR_FILE_WARNING_EID 64
-
+#define FM_GET_DIR_FILE_WARNING_EID 65
-/** \brief 'Directory List to File Error: OS_opendir failed: dir = \%s'
-** \event 'Directory List to File error: OS_opendir failed: dir = \%s'
+/** \brief 'Directory List to File Error: OS_DirectoryOpen failed: dir = \%s'
+** \event 'Directory List to File error: OS_DirectoryOpen failed: dir = \%s'
**
** \par Type: ERROR
**
@@ -1160,14 +1105,11 @@
** sufficient free space for this operation. Then refer to the OS
** specific return values.
**
-** Note: the call to OS_opendir returns a pointer, or NULL.
-**
** The numeric data in the event is the return value from the OS
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_GET_DIR_FILE_OSOPENDIR_ERR_EID 65
-
+#define FM_GET_DIR_FILE_OSOPENDIR_ERR_EID 66
/** \brief 'Directory List to File Error: OS_write blank stats failed: result = \%d, expected = \%d'
** \event 'Directory List to File error: OS_write blank stats failed: result = \%d, expected = \%d'
@@ -1176,8 +1118,8 @@
**
** \par Cause
**
-** This event message is generated due to an error when writing a
-** blank stats structure using the OS_write function. This
+** This event message is generated due to an error when writing a
+** blank stats structure using the OS_write function. This
** occurred after preliminary command argument verification tests
** indicated that the directory exists and the output filename
** is unused and appears to be valid. Verify that the output
@@ -1189,8 +1131,7 @@
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_GET_DIR_FILE_WRBLANK_ERR_EID 66
-
+#define FM_GET_DIR_FILE_WRBLANK_ERR_EID 67
/** \brief 'Directory List to File Error: CFE_FS_WriteHeader failed: result = \%d, expected = \%d'
** \event 'Directory List to File error: CFE_FS_WriteHeader failed: result = \%d, expected = \%d'
@@ -1212,8 +1153,7 @@
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_GET_DIR_FILE_WRHDR_ERR_EID 67
-
+#define FM_GET_DIR_FILE_WRHDR_ERR_EID 68
/** \brief 'Directory List to File Error: OS_creat failed: result = \%d, file = \%s'
** \event 'Directory List to File error: OS_creat failed: result = \%d, file = \%s'
@@ -1222,7 +1162,7 @@
**
** \par Cause
**
-** This event message is generated due to an OS function error that
+** This event message is generated due to an OS function error that
** prevents the output file from being created. This error
** occurred after preliminary command argument verification tests
** indicated that the directory exists and the output filename
@@ -1235,8 +1175,7 @@
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_GET_DIR_FILE_OSCREAT_ERR_EID 68
-
+#define FM_GET_DIR_FILE_OSCREAT_ERR_EID 69
/** \brief 'Directory List to File Error: OS_write entry failed: result = \%d, expected = \%d''
** \event 'Directory List to File error: OS_write entry failed: result = \%d, expected = \%d'
@@ -1258,8 +1197,7 @@
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_GET_DIR_FILE_WRENTRY_ERR_EID 69
-
+#define FM_GET_DIR_FILE_WRENTRY_ERR_EID 70
/** \brief 'Directory List to File Error: OS_write update stats failed: result = \%d, expected = \%d'
** \event 'Directory List to File error: OS_write update stats failed: result = \%d, expected = \%d'
@@ -1281,15 +1219,14 @@
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_GET_DIR_FILE_UPSTATS_ERR_EID 70
-
+#define FM_GET_DIR_FILE_UPSTATS_ERR_EID 71
/** \brief 'Directory List to Packet command'
** \event 'Directory List to Packet command: offset = \%d, dir = \%s'
**
** \par Type: DEBUG
**
-** This event is type debug because the command generates a telemetry
+** This event is type debug because the command generates a telemetry
** packet that also signals the completion of the command.
**
** \par Cause
@@ -1302,8 +1239,7 @@
** occur until some time after the command was invoked. However, this
** event message does signal the actual completion of the command.
*/
-#define FM_GET_DIR_PKT_CMD_EID 71
-
+#define FM_GET_DIR_PKT_CMD_EID 72
/** \brief 'Directory List to Packet Warning'
** \event 'Directory List to Packet warning: dir + entry is too long: dir = \%s, entry = \%s'
@@ -1318,8 +1254,7 @@
** might arise, but since we are copying both strings into a fixed
** length buffer, we must first verify the length.
*/
-#define FM_GET_DIR_PKT_WARNING_EID 72
-
+#define FM_GET_DIR_PKT_WARNING_EID 73
/** \brief 'Directory List to Packet Error: Invalid Command Packet Length'
** \event 'Directory List to Packet error: invalid command packet length: expected = \%d, actual = \%d'
@@ -1331,31 +1266,27 @@
** This event message is generated upon receipt of a /FM_GetDirPkt
** command packet with an invalid length.
*/
-#define FM_GET_DIR_PKT_PKT_ERR_EID 73
-
+#define FM_GET_DIR_PKT_PKT_ERR_EID 74
/** \brief 'Directory List to Packet Error: OS Error'
-** \event 'Directory List to Packet error: OS_opendir failed: dir = \%s'
+** \event 'Directory List to Packet error: OS_DirectoryOpen failed: dir = \%s'
**
** \par Type: ERROR
**
** \par Cause
**
-** Note: the call to OS_opendir returns a pointer, or NULL.
-**
** The numeric data in the event is the return value from the OS
** function call. The string data identifies the name of the
** directory or the directory entry.
*/
-#define FM_GET_DIR_PKT_OS_ERR_EID 74
-
+#define FM_GET_DIR_PKT_OS_ERR_EID 75
/** \brief 'Get Free Space Command'
** \event 'Get Free Space command'
**
** \par Type: DEBUG
**
-** This event is type debug because the command generates a telemetry
+** This event is type debug because the command generates a telemetry
** packet that also signals the completion of the command.
**
** \par Cause
@@ -1363,8 +1294,7 @@
** This event message signals the successful completion of a
** /FM_GetFreeSpace command.
*/
-#define FM_GET_FREE_SPACE_CMD_EID 75
-
+#define FM_GET_FREE_SPACE_CMD_EID 76
/** \brief 'Get Free Space Error: Invalid Command Packet Length'
** \event 'Get Free Space error: invalid command packet length: expected = \%d, actual = \%d'
@@ -1376,8 +1306,7 @@
** This event message is generated upon receipt of a /FM_GetFreeSpace
** command packet with an invalid length.
*/
-#define FM_GET_FREE_SPACE_PKT_ERR_EID 76
-
+#define FM_GET_FREE_SPACE_PKT_ERR_EID 77
/** \brief 'Get Free Space Error: Table Not Loaded'
** \event 'Get Free Space error: file system free space table is not loaded'
@@ -1390,8 +1319,7 @@
** command packet when the FM file system free space table has not yet
** been loaded.
*/
-#define FM_GET_FREE_SPACE_TBL_ERR_EID 77
-
+#define FM_GET_FREE_SPACE_TBL_ERR_EID 78
/** \brief 'Set Table State Command'
** \event 'Set Table State command: index = \%d, state = \%d'
@@ -1403,8 +1331,7 @@
** This event message signals the successful completion of a
** /FM_SetTableState command.
*/
-#define FM_SET_TABLE_STATE_CMD_EID 78
-
+#define FM_SET_TABLE_STATE_CMD_EID 79
/** \brief 'Set Table State Error: Invalid Command Packet Length'
** \event 'Set Table State error: invalid command packet length: expected = \%d, actual = \%d'
@@ -1416,8 +1343,7 @@
** This event message is generated upon receipt of a /FM_SetTableState
** command packet with an invalid length.
*/
-#define FM_SET_TABLE_STATE_PKT_ERR_EID 79
-
+#define FM_SET_TABLE_STATE_PKT_ERR_EID 80
/** \brief 'Set Table State Error: Table Not Loaded'
** \event 'Set Table State error: file system free space table is not loaded'
@@ -1430,8 +1356,7 @@
** command packet when the FM file system free space table has not yet
** been loaded.
*/
-#define FM_SET_TABLE_STATE_TBL_ERR_EID 80
-
+#define FM_SET_TABLE_STATE_TBL_ERR_EID 81
/** \brief 'Set Table State Error: invalid command argument: index = \%d'
** \event 'Set Table State error: invalid command argument: index = \%d'
@@ -1443,8 +1368,7 @@
** This event message is generated upon receipt of a FM_SetTableState
** command packet with an invalid table index argument.
*/
-#define FM_SET_TABLE_STATE_ARG_IDX_ERR_EID 81
-
+#define FM_SET_TABLE_STATE_ARG_IDX_ERR_EID 82
/** \brief 'Set Table State Error: invalid command argument: state = \%d'
** \event 'Set Table State error: invalid command argument: state = \%d'
@@ -1456,8 +1380,7 @@
** This event message is generated upon receipt of a FM_SetTableState
** command packet with an invalid entry state argument.
*/
-#define FM_SET_TABLE_STATE_ARG_STATE_ERR_EID 82
-
+#define FM_SET_TABLE_STATE_ARG_STATE_ERR_EID 83
/** \brief 'Set Table State Error: Unused Table Entry'
** \event 'Set Table State error: cannot modify unused table entry: index = \%d'
@@ -1469,8 +1392,7 @@
** This event message is generated upon receipt of a /FM_SetTableState
** command packet that references an unused free space table entry.
*/
-#define FM_SET_TABLE_STATE_UNUSED_ERR_EID 83
-
+#define FM_SET_TABLE_STATE_UNUSED_ERR_EID 84
/** \brief 'Free Space Table Verify Error: index = \%d, empty name string'
** \event 'Free Space Table verify error: index = \%d, empty name string'
@@ -1480,10 +1402,10 @@
** \par Cause
**
** This event message is generated when a file system free space table fails the table
-** verification process because the file system name is an empty string. Each file
-** system table entry has only 2 fields: table entry state and file system name.
-** The table entry state field must be either enabled or disabled. The file system
-** name string must have a non-zero length, include a string terminator and not
+** verification process because the file system name is an empty string. Each file
+** system table entry has only 2 fields: table entry state and file system name.
+** The table entry state field must be either enabled or disabled. The file system
+** name string must have a non-zero length, include a string terminator and not
** contain characters considered invalid for filenames.
**
** If the file system free space table loaded at startup fails verification, the FM
@@ -1493,8 +1415,7 @@
** attempt to load a new table fails verification, the FM application will continue
** to use the previous table.
*/
-#define FM_TABLE_VERIFY_EMPTY_ERR_EID 84
-
+#define FM_TABLE_VERIFY_EMPTY_ERR_EID 85
/** \brief 'Free Space Table Verify Error: index = \%d, name too long'
** \event 'Free Space Table verify error: index = \%d, name too long'
@@ -1504,10 +1425,10 @@
** \par Cause
**
** This event message is generated when a file system free space table fails the table
-** verification process because the file system name is too long. Each file
-** system table entry has only 2 fields: table entry state and file system name.
-** The table entry state field must be either enabled or disabled. The file system
-** name string must have a non-zero length, include a string terminator and not
+** verification process because the file system name is too long. Each file
+** system table entry has only 2 fields: table entry state and file system name.
+** The table entry state field must be either enabled or disabled. The file system
+** name string must have a non-zero length, include a string terminator and not
** contain characters considered invalid for filenames.
*
** If the file system free space table loaded at startup fails verification, the FM
@@ -1517,8 +1438,7 @@
** attempt to load a new table fails verification, the FM application will continue
** to use the previous table.
*/
-#define FM_TABLE_VERIFY_TOOLONG_ERR_EID 85
-
+#define FM_TABLE_VERIFY_TOOLONG_ERR_EID 86
/** \brief 'Free Space Table Verify Error: index = \%d, invalid name = \%s'
** \event 'Free Space Table verify error: index = \%d, invalid name = \%s'
@@ -1528,10 +1448,10 @@
** \par Cause
**
** This event message is generated when a file system free space table fails the table
-** verification process because the file system name has invalid characters. Each file
-** system table entry has only 2 fields: table entry state and file system name.
-** The table entry state field must be either enabled or disabled. The file system
-** name string must have a non-zero length, include a string terminator and not
+** verification process because the file system name has invalid characters. Each file
+** system table entry has only 2 fields: table entry state and file system name.
+** The table entry state field must be either enabled or disabled. The file system
+** name string must have a non-zero length, include a string terminator and not
** contain characters considered invalid for filenames.
*
** If the file system free space table loaded at startup fails verification, the FM
@@ -1541,8 +1461,7 @@
** attempt to load a new table fails verification, the FM application will continue
** to use the previous table.
*/
-#define FM_TABLE_VERIFY_INVALID_ERR_EID 86
-
+#define FM_TABLE_VERIFY_INVALID_ERR_EID 87
/** \brief 'Free Space Table Verify Error: index = \%d, invalid state = \%d'
** \event 'Free Space Table verify error: index = \%d, invalid state = \%d'
@@ -1552,10 +1471,10 @@
** \par Cause
**
** This event message is generated when a file system free space table fails the table
-** verification process because a table entry has an invalid state. Each file
-** system table entry has only 2 fields: table entry state and file system name.
-** The table entry state field must be either enabled or disabled. The file system
-** name string must have a non-zero length, include a string terminator and not
+** verification process because a table entry has an invalid state. Each file
+** system table entry has only 2 fields: table entry state and file system name.
+** The table entry state field must be either enabled or disabled. The file system
+** name string must have a non-zero length, include a string terminator and not
** contain characters considered invalid for filenames.
*
** If the file system free space table loaded at startup fails verification, the FM
@@ -1565,8 +1484,7 @@
** attempt to load a new table fails verification, the FM application will continue
** to use the previous table.
*/
-#define FM_TABLE_VERIFY_BAD_STATE_ERR_EID 87
-
+#define FM_TABLE_VERIFY_BAD_STATE_ERR_EID 88
/** \brief 'Child Task Initialization Complete'
** \event 'Child Task initialization complete'
@@ -1578,8 +1496,7 @@
** This event message signals the successful completion of the initialization
** process for the FM child task.
*/
-#define FM_CHILD_INIT_EID 88
-
+#define FM_CHILD_INIT_EID 89
/** \brief 'Child Task Initialization Error: create semaphore failed: result = \%d'
** \event 'Child Task initialization error: create semaphore failed: result = \%d'
@@ -1589,12 +1506,11 @@
** \par Cause
**
** This event message indicates an unsuccessful attempt to create the sempahore
-** for the low priority FM child task. Commands which would have otherwise been
-** handed off to the child task for execution, will now be processed by the main FM
+** for the low priority FM child task. Commands which would have otherwise been
+** handed off to the child task for execution, will now be processed by the main FM
** application.
*/
-#define FM_CHILD_INIT_SEM_ERR_EID 89
-
+#define FM_CHILD_INIT_SEM_ERR_EID 90
/** \brief 'Child Task Initialization Error: create queue count semaphore failed: result = \%d'
** \event 'Child Task initialization error: create queue count semaphore failed: result = \%d'
@@ -1608,8 +1524,7 @@
** to the child task for execution, will now be processed by the main FM application.
** Refer to the return code in the event text for the exact cause of the error.
*/
-#define FM_CHILD_INIT_QSEM_ERR_EID 90
-
+#define FM_CHILD_INIT_QSEM_ERR_EID 91
/** \brief 'Child Task Initialization Error: create task failed: result = \%d'
** \event 'Child Task initialization error: create task failed: result = \%d'
@@ -1623,8 +1538,7 @@
** to the child task for execution, will now be processed by the main FM application.
** Refer to the return code in the event text for the exact cause of the error.
*/
-#define FM_CHILD_INIT_CREATE_ERR_EID 91
-
+#define FM_CHILD_INIT_CREATE_ERR_EID 92
/** \brief 'Child Task Termination Error: empty queue'
** \event 'Child Task termination error: empty queue'
@@ -1634,12 +1548,11 @@
** \par Cause
**
** This event message indicates that the FM child task has suffered a fatal error
-** and has terminated. The error occurred because the child queue was empty,
-** indicating that the handshake between the main task and child task was
-** broken.
+** and has terminated. The error occurred because the child queue was empty,
+** indicating that the handshake between the main task and child task was
+** broken.
*/
-#define FM_CHILD_TERM_EMPTYQ_ERR_EID 92
-
+#define FM_CHILD_TERM_EMPTYQ_ERR_EID 93
/** \brief 'Child Task Termination Error: invalid queue index: index = \%d'
** \event 'Child Task termination error: invalid queue index: index = \%d'
@@ -1649,11 +1562,10 @@
** \par Cause
**
** This event message indicates that the FM child task has suffered a fatal error
-** and has terminated. The error occurred because the child read index was
+** and has terminated. The error occurred because the child read index was
** invalid (larger than the child queue depth).
*/
-#define FM_CHILD_TERM_QIDX_ERR_EID 93
-
+#define FM_CHILD_TERM_QIDX_ERR_EID 94
/** \brief 'Child Task Termination Error: semaphore take failed: result = \%d'
** \event 'Child Task termination error: semaphore take failed: result = \%d'
@@ -1663,11 +1575,10 @@
** \par Cause
**
** This event message indicates that the FM child task has suffered a fatal error
-** and has terminated. The error occurred when trying to take the child
+** and has terminated. The error occurred when trying to take the child
** handshake semaphore.
*/
-#define FM_CHILD_TERM_SEM_ERR_EID 94
-
+#define FM_CHILD_TERM_SEM_ERR_EID 95
/** \brief 'Child Task Execution Error'
** \event 'Child Task execution error: invalid command code: cc = \%d'
@@ -1682,8 +1593,7 @@
** or there has been some sort of data corruption that affected the interface data.
** It may be necessary to restart the FM application to resync the handshake interface.
*/
-#define FM_CHILD_EXE_ERR_EID 95
-
+#define FM_CHILD_EXE_ERR_EID 96
/**
** \brief 'Free Space Table Validation Results'
@@ -1705,8 +1615,7 @@
** table entries (unused). Thus, the sum of good + bad
** + unused results will equal the total number of table entries.
*/
-#define FM_TABLE_VERIFY_EID 96
-
+#define FM_TABLE_VERIFY_EID 97
/** \brief 'Set Permissions error: Invalid Command Packet Length'
** \event 'Set Permissions error: invalid command packet length: expected = \%d, actual = \%d'
@@ -1718,8 +1627,7 @@
** This event message is generated upon receipt of a /FM_SetPermissions
** command packet with an invalid length.
*/
-#define FM_SET_PERM_ERR_EID 97
-
+#define FM_SET_PERM_ERR_EID 98
/** \brief 'Set Permissions Command'
** \event 'Set Permissions command: filename = \%s, state = \%d'
@@ -1731,8 +1639,7 @@
** This event message signals the successful completion of a
** /FM_SetPerm command.
*/
-#define FM_SET_PERM_CMD_EID 98
-
+#define FM_SET_PERM_CMD_EID 99
/** \brief 'Set Permissions: OS_chmod error: '
** \event 'Set Permissions: OS_chmod error, RC=0x%08X, file = %s, access = %d'
@@ -1744,28 +1651,64 @@
** This event message is generated upon receipt of a /FM_SetPerm
** command packet with an invalid length.
*/
-#define FM_SET_PERM_OS_ERR_EID 99
+#define FM_SET_PERM_OS_ERR_EID 100
+
+/** \brief 'Free Space Table verify error - null pointer detected'
+** \event 'Free Space Table verify error - null pointer detected'
+**
+** \par Type: ERROR
+**
+** \par Cause
+**
+** This event message occurs when the FM validate table callback function
+** receives a NULL pointer as the input argument.
+*/
+#define FM_TABLE_VERIFY_NULL_PTR_ERR_EID 101
+
+/** \brief 'Main loop error: SB returned NULL pointer on success'
+** \event 'Main loop error: SB returned NULL pointer on success'
+**
+** \par Type: ERROR
+**
+** \par Cause
+**
+** This event message occurs if the Software Bus returns a success status
+** in the main loop but provided a NULL pointer as the return argument.
+*/
+#define FM_SB_RECEIVE_NULL_PTR_ERR_EID 102
+
+/** \brief 'Could not get file system free space for \%s. Returned 0x\%08X'
+** \event 'Could not get file system free space for \%s. Returned 0x\%08X'
+**
+** \par Type: ERROR
+**
+** \par Cause:
+**
+** This event message occurs if the free space for a file system cannot be read
+** when processing the #FM_GetFreeSpaceCmd command.
+*/
+#define FM_OS_SYS_STAT_ERR_EID 103
/** -------------------------------------------------------------
-** NOTE: From here on, the event IDs will take the form of a
+** NOTE: From here on, the event IDs will take the form of a
** "base" EID + an offset. This is done to allow unique event
** IDs to be sent from utility functions.
** --------------------------------------------------------------*/
-#define FM_FNAME_INVALID_EID_OFFSET 0
-#define FM_FNAME_DNE_EID_OFFSET 1
-#define FM_FNAME_EXIST_EID_OFFSET 1 /* mutually exclusive with DNE */
-#define FM_FNAME_ISDIR_EID_OFFSET 2
-#define FM_FNAME_ISFILE_EID_OFFSET 2 /* mutually exclusive with ISDIR */
-#define FM_FNAME_ISOPEN_EID_OFFSET 3
-#define FM_FNAME_ISCLOSED_EID_OFFSET 4
-#define FM_FNAME_UNKNOWN_EID_OFFSET 5
-#define FM_FNAME_NUM_OFFSETS 6
-
-#define FM_CHILD_DISABLED_EID_OFFSET 0
-#define FM_CHILD_Q_FULL_EID_OFFSET 1
-#define FM_CHILD_BROKEN_EID_OFFSET 2
-#define FM_CHILD_NUM_OFFSETS 3
+#define FM_FNAME_INVALID_EID_OFFSET 0
+#define FM_FNAME_DNE_EID_OFFSET 1
+#define FM_FNAME_EXIST_EID_OFFSET 1 /* mutually exclusive with DNE */
+#define FM_FNAME_ISDIR_EID_OFFSET 2
+#define FM_FNAME_ISFILE_EID_OFFSET 2 /* mutually exclusive with ISDIR */
+#define FM_FNAME_ISOPEN_EID_OFFSET 3
+#define FM_FNAME_ISCLOSED_EID_OFFSET 4
+#define FM_FNAME_UNKNOWN_EID_OFFSET 5
+#define FM_FNAME_NUM_OFFSETS 6
+
+#define FM_CHILD_DISABLED_EID_OFFSET 0
+#define FM_CHILD_Q_FULL_EID_OFFSET 1
+#define FM_CHILD_BROKEN_EID_OFFSET 2
+#define FM_CHILD_NUM_OFFSETS 3
/** \brief 'Copy File Error: Source Filename'
** \event 'Copy File error: filename is invalid: name = \%s'
@@ -1776,10 +1719,10 @@
**
** \par Cause
**
-** This is the base for a number of error events generated when the
+** This is the base for a number of error events generated when the
** /FM_Copy is received with an unusable source filename.
*/
-#define FM_COPY_SRC_BASE_EID 100
+#define FM_COPY_SRC_BASE_EID 151
/** \brief 'Copy File error: filename is invalid: name = \%s'
** \event 'Copy File error: filename is invalid: name = \%s'
@@ -1790,10 +1733,10 @@
**
** This event message is generated upon receipt of a /FM_Copy
** command packet with an invalid source filename.
-**
-** Value: 100
+**
+** Value: 151
*/
-#define FM_COPY_SRC_INVALID_ERR_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_COPY_SRC_INVALID_ERR_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Copy File error: file does not exist: name = \%s'
** \event 'Copy File error: file does not exist: name = \%s'
@@ -1804,10 +1747,10 @@
**
** This event message is generated upon receipt of a /FM_Copy
** command packet with a source filename that does not exist.
-**
-** Value: 101
+**
+** Value: 152
*/
-#define FM_COPY_SRC_DNE_ERR_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_COPY_SRC_DNE_ERR_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Copy File error: filename is a directory: name = \%s'
** \event 'Copy File error: filename is a directory: name = \%s'
@@ -1819,9 +1762,9 @@
** This event message is generated upon receipt of a /FM_Copy
** command packet with a source filename that is a directory.
**
-** Value: 102
+** Value: 153
*/
-#define FM_COPY_SRC_ISDIR_ERR_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+#define FM_COPY_SRC_ISDIR_ERR_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Copy File error: filename has unknown state: name = \%s, state = \%d'
** \event 'Copy File error: filename has unknown state: name = \%s, state = \%d'
@@ -1833,9 +1776,9 @@
** This event message is generated upon receipt of a /FM_Copy
** command packet with a source filename of unknown state.
**
-** Value: 105
+** Value: 156
*/
-#define FM_COPY_SRC_UNKNOWN_ERR_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_UNKNOWN_EID_OFFSET)
+#define FM_COPY_SRC_UNKNOWN_ERR_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_UNKNOWN_EID_OFFSET)
/** \brief 'Copy File Error: Target Filename'
** \event 'Copy File error: filename is invalid: name = \%s'
@@ -1849,9 +1792,9 @@
** This is the base EID for a number of error events related to the
** target file in an /FM_COPY command.
**
-** Value: 106
+** Value: 157
*/
-#define FM_COPY_TGT_BASE_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
+#define FM_COPY_TGT_BASE_EID (FM_COPY_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Copy File Error: filename is invalid: name = \%s'
** \event 'Copy File error: filename is invalid: name = \%s'
@@ -1863,9 +1806,9 @@
** This event message is generated upon receipt of a /FM_Copy
** command packet with an invalid target filename.
**
-** Value: 106
+** Value: 157
*/
-#define FM_COPY_TGT_INVALID_ERR_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_COPY_TGT_INVALID_ERR_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Copy File error: file already exists: name = \%s'
** \event 'Copy File error: file already exists: name = \%s'
@@ -1876,10 +1819,10 @@
**
** This event message is generated upon receipt of a /FM_Copy
** command packet with a target filename that already exists.
-**
-** Value: 107
+**
+** Value: 158
*/
-#define FM_COPY_TGT_EXIST_ERR_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_EXIST_EID_OFFSET)
+#define FM_COPY_TGT_EXIST_ERR_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_EXIST_EID_OFFSET)
/** \brief 'Copy File error: filename is a directory: name = \%s'
** \event 'Copy File error: filename is a directory: name = \%s'
@@ -1891,9 +1834,23 @@
** This event message is generated upon receipt of a /FM_Copy
** command packet with a target filename that is a directory.
**
-** Value: 108
+** Value: 159
+*/
+#define FM_COPY_TGT_ISDIR_ERR_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+
+/** \brief 'Copy File error: filename exists as an open file: name = \%s'
+** \event 'Copy File error: filename exists as an open file: name = \%s'
+**
+** \par Type: ERROR
+**
+** \par Cause
+**
+** This event message is generated upon receipt of a /FM_Copy
+** command packet with a target filename that is open.
+**
+** Value: 160
*/
-#define FM_COPY_TGT_ISDIR_ERR_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+#define FM_COPY_TGT_ISOPEN_ERR_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
/** \brief 'Copy File error: filename has unknown state: name = \%s, state = \%d'
** \event 'Copy File error: filename has unknown state: name = \%s, state = \%d'
@@ -1903,12 +1860,11 @@
** \par Cause
**
** This event message is generated upon receipt of a /FM_Copy
-** command packet with an invalid target filename.
+** command packet with a target filename with unknown state.
**
-** Value: 111
+** Value: 162
*/
-#define FM_COPY_TGT_UNKNOWN_ERR_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_UNKNOWN_EID_OFFSET)
-
+#define FM_COPY_TGT_UNKNOWN_ERR_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_UNKNOWN_EID_OFFSET)
/** \brief 'Copy File Error: Child Task'
** \event 'Copy File error: child task is disabled'
@@ -1919,13 +1875,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 112
+** Value: 163
*/
-#define FM_COPY_CHILD_BASE_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_COPY_CHILD_BASE_EID (FM_COPY_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Copy File Error: child task is disabled'
** \event 'Copy File error: child task is disabled'
@@ -1937,10 +1892,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 112
+** Value: 163
*/
-#define FM_COPY_CHILD_DISABLED_ERR_EID (FM_COPY_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_COPY_CHILD_DISABLED_ERR_EID (FM_COPY_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Copy File Error: child task queue is full'
** \event 'Copy File error: child task queue is full'
@@ -1959,10 +1913,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 113
+** Value: 164
*/
-#define FM_COPY_CHILD_FULL_ERR_EID (FM_COPY_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_COPY_CHILD_FULL_ERR_EID (FM_COPY_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Copy File Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Copy File error: child task interface is broken: count = \%d, index = \%d'
@@ -1972,7 +1925,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -1980,11 +1933,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 114
+** Value: 165
**
*/
-#define FM_COPY_CHILD_BROKEN_ERR_EID (FM_COPY_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_COPY_CHILD_BROKEN_ERR_EID (FM_COPY_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Move File Error: Source Filename'
** \event 'Move File error: filename is invalid: name = \%s'
@@ -1997,11 +1949,11 @@
**
** This event message is generated upon receipt of a /FM_Move
** command packet with a source filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 115
+** Value: 166
*/
-#define FM_MOVE_SRC_BASE_EID (FM_COPY_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
+#define FM_MOVE_SRC_BASE_EID (FM_COPY_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Move File Error: filename is invalid: name = \%s'
** \event 'Move File error: filename is invalid: name = \%s'
@@ -2013,9 +1965,9 @@
** This event message is generated upon receipt of a /FM_Move
** command packet with an invalid source filename.
**
-** Value: 115
+** Value: 166
*/
-#define FM_MOVE_SRC_INVALID_ERR_EID (FM_MOVE_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_MOVE_SRC_INVALID_ERR_EID (FM_MOVE_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Move File Error: file does not exist: name = \%s'
** \event 'Move File error: file does not exist: name = \%s'
@@ -2027,9 +1979,9 @@
** This event message is generated upon receipt of a /FM_Move
** command packet with a source filename that does not exist.
**
-** Value: 116
+** Value: 167
*/
-#define FM_MOVE_SRC_DNE_ERR_EID (FM_MOVE_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_MOVE_SRC_DNE_ERR_EID (FM_MOVE_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Move File Error: filename is a directory: name = \%s'
** \event 'Move File error: filename is a directory: name = \%s'
@@ -2041,10 +1993,9 @@
** This event message is generated upon receipt of a /FM_Move
** command packet with a source filename that is a directory.
**
-** Value: 117
+** Value: 168
*/
-#define FM_MOVE_SRC_ISDIR_ERR_EID (FM_MOVE_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
-
+#define FM_MOVE_SRC_ISDIR_ERR_EID (FM_MOVE_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Move File Error: Target Filename'
** \event 'Move File error: filename is invalid: name = \%s'
@@ -2057,11 +2008,11 @@
**
** This event message is generated upon receipt of a /FM_Move
** command packet with a target filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 121
+** Value: 172
*/
-#define FM_MOVE_TGT_BASE_EID (FM_MOVE_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
+#define FM_MOVE_TGT_BASE_EID (FM_MOVE_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Move File Error: filename is invalid: name = \%s'
** \event 'Move File error: filename is invalid: name = \%s'
@@ -2073,23 +2024,23 @@
** This event message is generated upon receipt of a /FM_Move
** command packet with an invalid target filename.
**
-** Value: 121
+** Value: 172
*/
-#define FM_MOVE_TGT_INVALID_ERR_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_MOVE_TGT_INVALID_ERR_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
-/** \brief 'Move File Error: file does not exist: name = \%s'
-** \event 'Move File error: file does not exist: name = \%s'
+/** \brief 'Move File Error: file already exists: name = \%s'
+** \event 'Move File error: file already exists: name = \%s'
**
** \par Type: ERROR
**
** \par Cause
**
** This event message is generated upon receipt of a /FM_Move
-** command packet with a target filename that does not exist.
+** command packet with a target filename that already exists
**
-** Value: 122
+** Value: 173
*/
-#define FM_MOVE_TGT_DNE_ERR_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_MOVE_TGT_EXIST_ERR_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_EXIST_EID_OFFSET)
/** \brief 'Move File Error: filename is a directory: name = \%s'
** \event 'Move File error: filename is a directory: name = \%s'
@@ -2101,10 +2052,37 @@
** This event message is generated upon receipt of a /FM_Move
** command packet with a target filename that is a directory.
**
-** Value: 123
+** Value: 174
*/
-#define FM_MOVE_TGT_ISDIR_ERR_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+#define FM_MOVE_TGT_ISDIR_ERR_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+/** \brief 'Move File error: filename exists as an open file: name = \%s'
+** \event 'Move File error: filename exists as an open file: name = \%s'
+**
+** \par Type: ERROR
+**
+** \par Cause
+**
+** This event message is generated upon receipt of a /FM_Move
+** command packet with a target filename that is open.
+**
+** Value: 175
+*/
+#define FM_MOVE_TGT_ISOPEN_ERR_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
+
+/** \brief 'Move File error: filename has unknown state: name = \%s, state = \%d'
+** \event 'Move File error: filename has unknown state: name = \%s, state = \%d'
+**
+** \par Type: ERROR
+**
+** \par Cause
+**
+** This event message is generated upon receipt of a /FM_Copy
+** command packet with a target file with unknown state..
+**
+** Value: 177
+*/
+#define FM_MOVE_TGT_UNKNOWN_ERR_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_UNKNOWN_EID_OFFSET)
/** \brief 'Move File Error: Child Task'
** \event 'Move File error: child task is disabled'
@@ -2115,13 +2093,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 127
+** Value: 178
*/
-#define FM_MOVE_CHILD_BASE_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_MOVE_CHILD_BASE_EID (FM_MOVE_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Move File Error: child task is disabled'
** \event 'Move File error: child task is disabled'
@@ -2133,10 +2110,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 127
+** Value: 178
*/
-#define FM_MOVE_CHILD_DISABLED_ERR_EID (FM_MOVE_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_MOVE_CHILD_DISABLED_ERR_EID (FM_MOVE_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Move File Error: child task queue is full'
** \event 'Move File error: child task queue is full'
@@ -2155,10 +2131,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 128
+** Value: 179
*/
-#define FM_MOVE_CHILD_FULL_ERR_EID (FM_MOVE_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_MOVE_CHILD_FULL_ERR_EID (FM_MOVE_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Move File Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Move File error: child task interface is broken: count = \%d, index = \%d'
@@ -2168,7 +2143,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -2176,11 +2151,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 129
+** Value: 180
**
*/
-#define FM_MOVE_CHILD_BROKEN_ERR_EID (FM_MOVE_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_MOVE_CHILD_BROKEN_ERR_EID (FM_MOVE_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Rename File Error: Source Filename'
** \event 'Rename File error: filename is invalid: name = \%s'
@@ -2193,11 +2167,11 @@
**
** This event message is generated upon receipt of a /FM_Rename
** command packet with a source filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 130
+** Value: 181
*/
-#define FM_RENAME_SRC_BASE_EID (FM_MOVE_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
+#define FM_RENAME_SRC_BASE_EID (FM_MOVE_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Rename File Error: filename is invalid: name = \%s'
** \event 'Rename File error: filename is invalid: name = \%s'
@@ -2209,9 +2183,9 @@
** This event message is generated upon receipt of a /FM_Rename
** command packet with an invalid source filename.
**
-** Value: 130
+** Value: 181
*/
-#define FM_RENAME_SRC_INVALID_ERR_EID (FM_RENAME_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_RENAME_SRC_INVALID_ERR_EID (FM_RENAME_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Rename File Error: file does not exist: name = \%s'
** \event 'Rename File error: file does not exist: name = \%s'
@@ -2223,9 +2197,9 @@
** This event message is generated upon receipt of a /FM_Rename
** command packet with a source filename that does not exist.
**
-** Value: 131
+** Value: 182
*/
-#define FM_RENAME_SRC_DNE_ERR_EID (FM_RENAME_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_RENAME_SRC_DNE_ERR_EID (FM_RENAME_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Rename File Error: filename is a directory: name = \%s'
** \event 'Rename File error: filename is a directory: name = \%s'
@@ -2237,10 +2211,9 @@
** This event message is generated upon receipt of a /FM_Rename
** command packet with a source filename that is a directory.
**
-** Value: 132
+** Value: 183
*/
-#define FM_RENAME_SRC_ISDIR_ERR_EID (FM_RENAME_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
-
+#define FM_RENAME_SRC_ISDIR_ERR_EID (FM_RENAME_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Rename File Error: Target Filename'
** \event 'Rename File error: filename is invalid: name = \%s'
@@ -2253,11 +2226,11 @@
**
** This event message is generated upon receipt of a /FM_Rename
** command packet with a target filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 136
+** Value: 187
*/
-#define FM_RENAME_TGT_BASE_EID (FM_RENAME_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
+#define FM_RENAME_TGT_BASE_EID (FM_RENAME_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Rename File Error: filename is invalid: name = \%s'
** \event 'Rename File error: filename is invalid: name = \%s'
@@ -2269,23 +2242,23 @@
** This event message is generated upon receipt of a /FM_Rename
** command packet with an invalid target filename.
**
-** Value: 136
+** Value: 187
*/
-#define FM_RENAME_TGT_INVALID_ERR_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_RENAME_TGT_INVALID_ERR_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
-/** \brief 'Rename File Error: file does not exist: name = \%s'
-** \event 'Rename File error: file does not exist: name = \%s'
+/** \brief 'Rename File Error: file already exists: name = \%s'
+** \event 'Rename File error: file already exists: name = \%s'
**
** \par Type: ERROR
**
** \par Cause
**
** This event message is generated upon receipt of a /FM_Rename
-** command packet with a target filename that does not exist.
+** command packet with a target filename that already exists.
**
-** Value: 137
+** Value: 188
*/
-#define FM_RENAME_TGT_DNE_ERR_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_RENAME_TGT_EXIST_ERR_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_EXIST_EID_OFFSET)
/** \brief 'Rename File Error: filename is a directory: name = \%s'
** \event 'Rename File error: filename is a directory: name = \%s'
@@ -2297,10 +2270,37 @@
** This event message is generated upon receipt of a /FM_Rename
** command packet with a target filename that is a directory.
**
-** Value: 138
+** Value: 189
+*/
+#define FM_RENAME_TGT_ISDIR_ERR_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+
+/** \brief 'Rename File error: filename exists as an open file: name = \%s'
+** \event 'Rename File error: filename exists as an open file: name = \%s'
+**
+** \par Type: ERROR
+**
+** \par Cause
+**
+** This event message is generated upon receipt of a /FM_Rename
+** command packet with a target filename that is open.
+**
+** Value: 190
*/
-#define FM_RENAME_TGT_ISDIR_ERR_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+#define FM_RENAME_TGT_ISOPEN_ERR_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
+/** \brief 'Rename File error: filename has unknown state: name = \%s, state = \%d'
+** \event 'Rename File error: filename has unknown state: name = \%s, state = \%d'
+**
+** \par Type: ERROR
+**
+** \par Cause
+**
+** This event message is generated upon receipt of a /FM_Rename
+** command packet with a target file with unknown state.
+**
+** Value: 192
+*/
+#define FM_RENAME_TGT_UNKNOWN_ERR_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_UNKNOWN_EID_OFFSET)
/** \brief 'Rename File Error: Child Task'
** \event 'Rename File error: child task is disabled'
@@ -2311,13 +2311,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 142
+** Value: 193
*/
-#define FM_RENAME_CHILD_BASE_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_RENAME_CHILD_BASE_EID (FM_RENAME_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Rename File Error: child task is disabled'
** \event 'Rename File error: child task is disabled'
@@ -2329,10 +2328,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 142
+** Value: 193
*/
-#define FM_RENAME_CHILD_DISABLED_ERR_EID (FM_RENAME_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_RENAME_CHILD_DISABLED_ERR_EID (FM_RENAME_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Rename File Error: child task queue is full'
** \event 'Rename File error: child task queue is full'
@@ -2351,10 +2349,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 143
+** Value: 194
*/
-#define FM_RENAME_CHILD_FULL_ERR_EID (FM_RENAME_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_RENAME_CHILD_FULL_ERR_EID (FM_RENAME_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Rename File Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Rename File error: child task interface is broken: count = \%d, index = \%d'
@@ -2364,7 +2361,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -2372,11 +2369,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 144
+** Value: 195
**
*/
-#define FM_RENAME_CHILD_BROKEN_ERR_EID (FM_RENAME_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_RENAME_CHILD_BROKEN_ERR_EID (FM_RENAME_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Delete File Error: Source Filename'
** \event 'Delete File error: filename is invalid: name = \%s'
@@ -2390,11 +2386,11 @@
**
** This event message is generated upon receipt of a /FM_Delete
** command packet with a source filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 145
+** Value: 196
*/
-#define FM_DELETE_SRC_BASE_EID (FM_RENAME_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
+#define FM_DELETE_SRC_BASE_EID (FM_RENAME_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Delete File Error: filename is invalid: name = \%s'
** \event 'Delete File error: filename is invalid: name = \%s'
@@ -2406,9 +2402,9 @@
** This event message is generated upon receipt of a /FM_Delete
** command packet with an invalid source filename.
**
-** Value: 145
+** Value: 196
*/
-#define FM_DELETE_SRC_INVALID_ERR_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_DELETE_SRC_INVALID_ERR_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Delete File Error: file does not exist: name = \%s'
** \event 'Delete File error: file does not exist: name = \%s'
@@ -2420,9 +2416,9 @@
** This event message is generated upon receipt of a /FM_Delete
** command packet with a source filename that does not exist.
**
-** Value: 146
+** Value: 197
*/
-#define FM_DELETE_SRC_DNE_ERR_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_DELETE_SRC_DNE_ERR_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Delete File Error: filename is a directory: name = \%s'
** \event 'Delete File error: filename is a directory: name = \%s'
@@ -2434,10 +2430,9 @@
** This event message is generated upon receipt of a /FM_Delete
** command packet with a source filename that is a directory.
**
-** Value: 147
+** Value: 198
*/
-#define FM_DELETE_SRC_ISDIR_ERR_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
-
+#define FM_DELETE_SRC_ISDIR_ERR_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Delete File Error: file is already open: name = \%s'
** \event 'Delete File error: file is already open: name = \%s'
@@ -2449,10 +2444,9 @@
** This event message is generated upon receipt of a /FM_Delete
** command packet with a source filename that is already open.
**
-** Value: 148
+** Value: 199
*/
-#define FM_DELETE_SRC_OPEN_ERR_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
-
+#define FM_DELETE_SRC_OPEN_ERR_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
/** \brief 'Delete File Error: Child Task'
** \event 'Delete File error: child task is disabled'
@@ -2463,13 +2457,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 151
+** Value: 202
*/
-#define FM_DELETE_CHILD_BASE_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_DELETE_CHILD_BASE_EID (FM_DELETE_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Delete File Error: child task is disabled'
** \event 'Delete File error: child task is disabled'
@@ -2481,10 +2474,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 151
+** Value: 202
*/
-#define FM_DELETE_CHILD_DISABLED_ERR_EID (FM_DELETE_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_DELETE_CHILD_DISABLED_ERR_EID (FM_DELETE_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Delete File Error: child task queue is full'
** \event 'Delete File error: child task queue is full'
@@ -2503,10 +2495,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 152
+** Value: 203
*/
-#define FM_DELETE_CHILD_FULL_ERR_EID (FM_DELETE_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_DELETE_CHILD_FULL_ERR_EID (FM_DELETE_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Delete File Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Delete File error: child task interface is broken: count = \%d, index = \%d'
@@ -2516,7 +2507,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -2524,11 +2515,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 153
+** Value: 204
**
*/
-#define FM_DELETE_CHILD_BROKEN_ERR_EID (FM_DELETE_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_DELETE_CHILD_BROKEN_ERR_EID (FM_DELETE_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Delete All Files Error: Directory name'
** \event 'Delete All Files error: directory name is invalid: name = \%s'
@@ -2541,11 +2531,11 @@
**
** This event message is generated upon receipt of a /FM_DeleteAll
** command packet with a directory name that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 154
+** Value: 205
*/
-#define FM_DELETE_ALL_SRC_BASE_EID (FM_DELETE_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
+#define FM_DELETE_ALL_SRC_BASE_EID (FM_DELETE_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Delete File Error: directory name is invalid: name = \%s'
** \event 'Delete File error: directory name is invalid: name = \%s'
@@ -2557,9 +2547,9 @@
** This event message is generated upon receipt of a /FM_Delete
** command packet with an invalid source filename.
**
-** Value: 154
+** Value: 205
*/
-#define FM_DELETE_ALL_SRC_INVALID_ERR_EID (FM_DELETE_ALL_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_DELETE_ALL_SRC_INVALID_ERR_EID (FM_DELETE_ALL_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Delete File Error: directory does not exist: name = \%s'
** \event 'Delete File error: directory does not exist: name = \%s'
@@ -2571,9 +2561,9 @@
** This event message is generated upon receipt of a /FM_DeleteAll
** command packet with a directory name that does not exist.
**
-** Value: 155
+** Value: 206
*/
-#define FM_DELETE_ALL_SRC_DNE_ERR_EID (FM_DELETE_ALL_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_DELETE_ALL_SRC_DNE_ERR_EID (FM_DELETE_ALL_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Delete File Error: directory name exists as a file: name = \%s'
** \event 'Delete File error: directory name exists as a file: name = \%s'
@@ -2585,9 +2575,9 @@
** This event message is generated upon receipt of a /FM_Delete
** command packet with a directory name that is a file.
**
-** Value: 156
+** Value: 207
*/
-#define FM_DELETE_ALL_SRC_FILE_ERR_EID (FM_DELETE_ALL_SRC_BASE_EID + FM_FNAME_ISFILE_EID_OFFSET)
+#define FM_DELETE_ALL_SRC_FILE_ERR_EID (FM_DELETE_ALL_SRC_BASE_EID + FM_FNAME_ISFILE_EID_OFFSET)
/** \brief 'Delete All Files Error: Child Task'
** \event 'Delete All Files error: child task is disabled'
@@ -2598,12 +2588,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 160
+** Value: 211
*/
-#define FM_DELETE_ALL_CHILD_BASE_EID (FM_DELETE_ALL_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
+#define FM_DELETE_ALL_CHILD_BASE_EID (FM_DELETE_ALL_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Delete All Files Error: child task is disabled'
** \event 'Delete All Files error: child task is disabled'
@@ -2615,10 +2605,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 160
+** Value: 211
*/
-#define FM_DELETE_ALL_CHILD_DISABLED_ERR_EID (FM_DELETE_ALL_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_DELETE_ALL_CHILD_DISABLED_ERR_EID (FM_DELETE_ALL_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Delete All Files Error: child task queue is full'
** \event 'Delete All Files error: child task queue is full'
@@ -2637,10 +2626,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 161
-*/
-#define FM_DELETE_ALL_CHILD_FULL_ERR_EID (FM_DELETE_ALL_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+** Value: 212
+*/
+#define FM_DELETE_ALL_CHILD_FULL_ERR_EID (FM_DELETE_ALL_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Delete All Files Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Delete All Files error: child task interface is broken: count = \%d, index = \%d'
@@ -2650,7 +2638,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -2658,11 +2646,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 162
+** Value: 213
**
*/
-#define FM_DELETE_ALL_CHILD_BROKEN_ERR_EID (FM_DELETE_ALL_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_DELETE_ALL_CHILD_BROKEN_ERR_EID (FM_DELETE_ALL_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Decompress File Error: Source Filename'
** \event 'Decompress File error: filename is invalid: name = \%s'
@@ -2676,11 +2663,11 @@
**
** This event message is generated upon receipt of a /FM_Decompress
** command packet with a source filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 163
+** Value: 214
*/
-#define FM_DECOM_SRC_BASE_EID (FM_DELETE_ALL_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
+#define FM_DECOM_SRC_BASE_EID (FM_DELETE_ALL_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Decompress File Error: filename is invalid: name = \%s'
** \event 'Decompress File error: filename is invalid: name = \%s'
@@ -2692,9 +2679,9 @@
** This event message is generated upon receipt of a /FM_Decompress
** command packet with an invalid source filename.
**
-** Value: 163
+** Value: 214
*/
-#define FM_DECOM_SRC_INVALID_ERR_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_DECOM_SRC_INVALID_ERR_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Decompress File Error: file does not exist: name = \%s'
** \event 'Decompress File error: file does not exist: name = \%s'
@@ -2706,9 +2693,9 @@
** This event message is generated upon receipt of a /FM_Decompress
** command packet with a source filename that does not exist.
**
-** Value: 164
+** Value: 215
*/
-#define FM_DECOM_SRC_DNE_ERR_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_DECOM_SRC_DNE_ERR_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Decompress File Error: filename is a directory: name = \%s'
** \event 'Decompress File error: filename is a directory: name = \%s'
@@ -2720,9 +2707,9 @@
** This event message is generated upon receipt of a /FM_Decompress
** command packet with a source filename that is a directory.
**
-** Value: 165
+** Value: 216
*/
-#define FM_DECOM_SRC_ISDIR_ERR_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+#define FM_DECOM_SRC_ISDIR_ERR_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Decompress File Error: file is already open: name = \%s'
** \event 'Decompress File error: file is already open: name = \%s'
@@ -2734,10 +2721,9 @@
** This event message is generated upon receipt of a /FM_Decompress
** command packet with a source filename that is already open.
**
-** Value: 166
+** Value: 217
*/
-#define FM_DECOM_SRC_OPEN_ERR_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
-
+#define FM_DECOM_SRC_OPEN_ERR_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
/** \brief 'Decompress File Error: Target Filename'
** \event 'Decompress File error: filename is invalid: name = \%s'
@@ -2750,11 +2736,11 @@
**
** This event message is generated upon receipt of a /FM_Decompress
** command packet with a target filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 169
+** Value: 220
*/
-#define FM_DECOM_TGT_BASE_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
+#define FM_DECOM_TGT_BASE_EID (FM_DECOM_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Decompress File Error: filename is invalid: name = \%s'
** \event 'Decompress File error: filename is invalid: name = \%s'
@@ -2766,9 +2752,9 @@
** This event message is generated upon receipt of a /FM_Decompress
** command packet with an invalid target filename.
**
-** Value: 169
+** Value: 220
*/
-#define FM_DECOM_TGT_INVALID_ERR_EID (FM_DECOM_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_DECOM_TGT_INVALID_ERR_EID (FM_DECOM_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Decompress File Error: file already exists: name = \%s'
** \event 'Decompress File error: file already exists: name = \%s'
@@ -2780,9 +2766,9 @@
** This event message is generated upon receipt of a /FM_Decompress
** command packet with a target filename that already exists.
**
-** Value: 170
+** Value: 221
*/
-#define FM_DECOM_TGT_EXIST_ERR_EID (FM_DECOM_TGT_BASE_EID + FM_FNAME_EXIST_EID_OFFSET)
+#define FM_DECOM_TGT_EXIST_ERR_EID (FM_DECOM_TGT_BASE_EID + FM_FNAME_EXIST_EID_OFFSET)
/** \brief 'Decompress File Error: filename is a directory: name = \%s'
** \event 'Decompress File error: filename is a directory: name = \%s'
@@ -2794,10 +2780,9 @@
** This event message is generated upon receipt of a /FM_Decompress
** command packet with a target filename that is a directory.
**
-** Value: 171
+** Value: 222
*/
-#define FM_DECOM_TGT_ISDIR_ERR_EID (FM_DECOM_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
-
+#define FM_DECOM_TGT_ISDIR_ERR_EID (FM_DECOM_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Decompress File Error: Child Task'
** \event 'Decompress File error: child task is disabled'
@@ -2808,13 +2793,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 175
+** Value: 226
*/
-#define FM_DECOM_CHILD_BASE_EID (FM_DECOM_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_DECOM_CHILD_BASE_EID (FM_DECOM_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Decompress File Error: child task is disabled'
** \event 'Decompress File error: child task is disabled'
@@ -2826,10 +2810,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 175
+** Value: 226
*/
-#define FM_DECOM_CHILD_DISABLED_ERR_EID (FM_DECOM_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_DECOM_CHILD_DISABLED_ERR_EID (FM_DECOM_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Decompress File Error: child task queue is full'
** \event 'Decompress File error: child task queue is full'
@@ -2848,10 +2831,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 176
+** Value: 227
*/
-#define FM_DECOM_CHILD_FULL_ERR_EID (FM_DECOM_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_DECOM_CHILD_FULL_ERR_EID (FM_DECOM_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Decompress File Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Decompress File error: child task interface is broken: count = \%d, index = \%d'
@@ -2861,7 +2843,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -2869,11 +2851,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 177
+** Value: 228
**
*/
-#define FM_DECOM_CHILD_BROKEN_ERR_EID (FM_DECOM_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_DECOM_CHILD_BROKEN_ERR_EID (FM_DECOM_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Concat Files Error: Source 1 Filename'
** \event 'Concat Files error: filename is invalid: name = \%s'
@@ -2887,11 +2868,11 @@
**
** This event message is generated upon receipt of a /FM_Concat
** command packet with a source 1 filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 178
+** Value: 229
*/
-#define FM_CONCAT_SRC1_BASE_EID (FM_DECOM_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
+#define FM_CONCAT_SRC1_BASE_EID (FM_DECOM_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Concat Files Error: filename is invalid: name = \%s'
** \event 'Concat Files error: filename is invalid: name = \%s'
@@ -2903,9 +2884,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with an invalid source 1 filename.
**
-** Value: 178
+** Value: 229
*/
-#define FM_CONCAT_SRC1_INVALID_ERR_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_CONCAT_SRC1_INVALID_ERR_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Concat Files Error: file does not exist: name = \%s'
** \event 'Concat Files error: file does not exist: name = \%s'
@@ -2917,9 +2898,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with a source 1 filename that does not exist.
**
-** Value: 179
+** Value: 230
*/
-#define FM_CONCAT_SRC1_DNE_ERR_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_CONCAT_SRC1_DNE_ERR_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Concat Files Error: filename is a directory: name = \%s'
** \event 'Concat Files error: filename is a directory: name = \%s'
@@ -2931,9 +2912,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with a source filename that is a directory.
**
-** Value: 180
+** Value: 231
*/
-#define FM_CONCAT_SRC1_ISDIR_ERR_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+#define FM_CONCAT_SRC1_ISDIR_ERR_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Concat File Error: file is already open: name = \%s'
** \event 'Concat File error: file is already open: name = \%s'
@@ -2945,10 +2926,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with a source filename that is already open.
**
-** Value: 181
+** Value: 232
*/
-#define FM_CONCAT_SRC1_OPEN_ERR_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
-
+#define FM_CONCAT_SRC1_OPEN_ERR_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
/** \brief 'Concat Files Error: Source 2 Filename'
** \event 'Concat Files error: filename is invalid: name = \%s'
@@ -2962,11 +2942,11 @@
**
** This event message is generated upon receipt of a /FM_Concat
** command packet with a source 2 filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 184
+** Value: 235
*/
-#define FM_CONCAT_SRC2_BASE_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_NUM_OFFSETS)
+#define FM_CONCAT_SRC2_BASE_EID (FM_CONCAT_SRC1_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Concat Files Error: filename is invalid: name = \%s'
** \event 'Concat Files error: filename is invalid: name = \%s'
@@ -2978,9 +2958,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with an invalid source 2 filename.
**
-** Value: 184
+** Value: 235
*/
-#define FM_CONCAT_SRC2_INVALID_ERR_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_CONCAT_SRC2_INVALID_ERR_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Concat Files Error: file does not exist: name = \%s'
** \event 'Concat Files error: file does not exist: name = \%s'
@@ -2992,9 +2972,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with a source 2 filename that does not exist.
**
-** Value: 185
+** Value: 236
*/
-#define FM_CONCAT_SRC2_DNE_ERR_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_CONCAT_SRC2_DNE_ERR_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Concat Files Error: filename is a directory: name = \%s'
** \event 'Concat Files error: filename is a directory: name = \%s'
@@ -3006,9 +2986,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with a source filename that is a directory.
**
-** Value: 186
+** Value: 237
*/
-#define FM_CONCAT_SRC2_ISDIR_ERR_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
+#define FM_CONCAT_SRC2_ISDIR_ERR_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Concat File Error: file is already open: name = \%s'
** \event 'Concat File error: file is already open: name = \%s'
@@ -3020,10 +3000,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with a source filename that is already open.
**
-** Value: 187
+** Value: 238
*/
-#define FM_CONCAT_SRC2_OPEN_ERR_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
-
+#define FM_CONCAT_SRC2_OPEN_ERR_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_ISOPEN_EID_OFFSET)
/** \brief 'Concat Files Error: Target Filename'
** \event 'Concat Files error: filename is invalid: name = \%s'
@@ -3036,11 +3015,11 @@
**
** This event message is generated upon receipt of a /FM_Concat
** command packet with a target filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 190
+** Value: 241
*/
-#define FM_CONCAT_TGT_BASE_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_NUM_OFFSETS)
+#define FM_CONCAT_TGT_BASE_EID (FM_CONCAT_SRC2_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Concat File Error: filename is invalid: name = \%s'
** \event 'Concat File error: filename is invalid: name = \%s'
@@ -3052,11 +3031,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with an invalid target filename.
**
-** Value: 190
+** Value: 241
*/
-#define FM_CONCAT_TGT_INVALID_ERR_EID (FM_CONCAT_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
-
-
+#define FM_CONCAT_TGT_INVALID_ERR_EID (FM_CONCAT_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Concat Files Error: file already exists: name = \%s'
** \event 'Concat Files error: file already exists: name = \%s'
@@ -3068,11 +3045,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with a target filename that already exists.
**
-** Value: 191
+** Value: 242
*/
-#define FM_CONCAT_TGT_EXIST_ERR_EID (FM_CONCAT_TGT_BASE_EID + FM_FNAME_EXIST_EID_OFFSET)
-
-
+#define FM_CONCAT_TGT_EXIST_ERR_EID (FM_CONCAT_TGT_BASE_EID + FM_FNAME_EXIST_EID_OFFSET)
/** \brief 'Concat File Error: filename is a directory: name = \%s'
** \event 'Concat File error: filename is a directory: name = \%s'
@@ -3084,11 +3059,9 @@
** This event message is generated upon receipt of a /FM_Concat
** command packet with a target filename that is a directory.
**
-** Value: 192
+** Value: 243
*/
-#define FM_CONCAT_TGT_ISDIR_ERR_EID (FM_CONCAT_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
-
-
+#define FM_CONCAT_TGT_ISDIR_ERR_EID (FM_CONCAT_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Concat Files Error: Child Task'
** \event 'Concat Files error: child task is disabled'
@@ -3099,13 +3072,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 196
+** Value: 247
*/
-#define FM_CONCAT_CHILD_BASE_EID (FM_CONCAT_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_CONCAT_CHILD_BASE_EID (FM_CONCAT_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Concat Files Error: child task is disabled'
** \event 'Concat Files error: child task is disabled'
@@ -3117,10 +3089,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 196
+** Value: 247
*/
-#define FM_CONCAT_CHILD_DISABLED_ERR_EID (FM_CONCAT_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_CONCAT_CHILD_DISABLED_ERR_EID (FM_CONCAT_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Concat Files Error: child task queue is full'
** \event 'Concat Files error: child task queue is full'
@@ -3139,10 +3110,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 197
+** Value: 248
*/
-#define FM_CONCAT_CHILD_FULL_ERR_EID (FM_CONCAT_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_CONCAT_CHILD_FULL_ERR_EID (FM_CONCAT_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Concat File Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Concat File error: child task interface is broken: count = \%d, index = \%d'
@@ -3152,7 +3122,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -3160,11 +3130,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 198
+** Value: 249
**
*/
-#define FM_CONCAT_CHILD_BROKEN_ERR_EID (FM_CONCAT_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_CONCAT_CHILD_BROKEN_ERR_EID (FM_CONCAT_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Get File Info Error: Child Task'
** \event 'Get File Info error: child task is disabled'
@@ -3175,13 +3144,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 199
+** Value: 250
*/
-#define FM_FILE_INFO_CHILD_BASE_EID (FM_CONCAT_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
-
+#define FM_FILE_INFO_CHILD_BASE_EID (FM_CONCAT_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Get File Info Error: child task is disabled'
** \event 'Get File Info error: child task is disabled'
@@ -3193,10 +3161,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 199
+** Value: 250
*/
-#define FM_FILE_INFO_CHILD_DISABLED_ERR_EID (FM_FILE_INFO_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_FILE_INFO_CHILD_DISABLED_ERR_EID (FM_FILE_INFO_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Get File Info Error: child task queue is full'
** \event 'Get File Info error: child task queue is full'
@@ -3215,10 +3182,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 200
+** Value: 251
*/
-#define FM_FILE_INFO_CHILD_FULL_ERR_EID (FM_FILE_INFO_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_FILE_INFO_CHILD_FULL_ERR_EID (FM_FILE_INFO_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Get File Info Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Get File Info error: child task interface is broken: count = \%d, index = \%d'
@@ -3228,7 +3194,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -3236,10 +3202,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 201
+** Value: 252
**
*/
-#define FM_FILE_INFO_CHILD_BROKEN_ERR_EID (FM_FILE_INFO_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
+#define FM_FILE_INFO_CHILD_BROKEN_ERR_EID (FM_FILE_INFO_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Create Directory Error: Directory Name'
** \event 'Create Directory error: directory name is invalid: name = \%s'
@@ -3252,11 +3218,11 @@
**
** This event message is generated upon receipt of a /FM_Create
** command packet with a directory name that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 202
+** Value: 253
*/
-#define FM_CREATE_DIR_SRC_BASE_EID (FM_FILE_INFO_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
+#define FM_CREATE_DIR_SRC_BASE_EID (FM_FILE_INFO_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Create Directory error: directory name is invalid: name = \%s'
** \event 'Create Directory error: directory name is invalid: name = \%s'
@@ -3268,12 +3234,13 @@
** This event message is generated upon receipt of a /FM_Create
** command packet with an invalid directory name.
**
-** Value: 202
+** Value: 253
*/
-#define FM_CREATE_DIR_SRC_INVALID_ERR_EID (FM_CREATE_DIR_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_CREATE_DIR_SRC_INVALID_ERR_EID (FM_CREATE_DIR_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Create Directory error: directory name exists as a file: name = \%s'
** \event 'Create Directory error: directory name exists as a file: name = \%s'
+**
** \par Type: ERROR
**
** \par Cause
@@ -3281,9 +3248,9 @@
** This event message is generated upon receipt of a /FM_Create
** command packet with a directory name that exists as a file.
**
-** Value: 203
+** Value: 254
*/
-#define FM_CREATE_DIR_SRC_DNE_ERR_EID (FM_CREATE_DIR_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_CREATE_DIR_SRC_DNE_ERR_EID (FM_CREATE_DIR_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Create Directory Error: directory already exists: name = \%s'
** \event 'Create Directory error: directory already exists: name = \%s'
@@ -3295,10 +3262,9 @@
** This event message is generated upon receipt of a /FM_Create
** command pasket with a directory that already exists.
**
-** Value: 204
+** Value: 255
*/
-#define FM_CREATE_DIR_SRC_ISDIR_ERR_EID (FM_CREATE_DIR_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
-
+#define FM_CREATE_DIR_SRC_ISDIR_ERR_EID (FM_CREATE_DIR_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Create Directory Error: Child Task'
** \event 'Create Directory error: child task is disabled'
@@ -3309,13 +3275,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 208
+** Value: 259
*/
-#define FM_CREATE_DIR_CHILD_BASE_EID (FM_CREATE_DIR_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_CREATE_DIR_CHILD_BASE_EID (FM_CREATE_DIR_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Create Directory error: child task is disabled'
** \event 'Create Directory error: child task is disabled'
@@ -3327,10 +3292,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 208
+** Value: 259
*/
-#define FM_CREATE_DIR_CHILD_DISABLED_ERR_EID (FM_CREATE_DIR_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_CREATE_DIR_CHILD_DISABLED_ERR_EID (FM_CREATE_DIR_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Create Directory Error: child task queue is full'
** \event 'Create Directory error: child task queue is full'
@@ -3349,10 +3313,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 209
+** Value: 260
*/
-#define FM_CREATE_DIR_CHILD_FULL_ERR_EID (FM_CREATE_DIR_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_CREATE_DIR_CHILD_FULL_ERR_EID (FM_CREATE_DIR_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Create Directory Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Create Directory error: child task interface is broken: count = \%d, index = \%d'
@@ -3362,7 +3325,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -3370,11 +3333,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 210
+** Value: 261
**
*/
-#define FM_CREATE_DIR_CHILD_BROKEN_ERR_EID (FM_CREATE_DIR_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_CREATE_DIR_CHILD_BROKEN_ERR_EID (FM_CREATE_DIR_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Delete Directory Error: Directory Name'
** \event 'Delete Directory error: directory name is invalid: name = \%s'
@@ -3387,11 +3349,11 @@
**
** This event message is generated upon receipt of a /FM_DeleteDir
** command packet with a directory name that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 211
+** Value: 262
*/
-#define FM_DELETE_DIR_SRC_BASE_EID (FM_CREATE_DIR_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
+#define FM_DELETE_DIR_SRC_BASE_EID (FM_CREATE_DIR_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Delete Directory error: directory name is invalid: name = \%s'
** \event 'Delete Directory error: directory name is invalid: name = \%s'
@@ -3403,12 +3365,13 @@
** This event message is generated upon receipt of a /FM_DeleteDir
** command packet with an invalid directory name.
**
-** Value: 211
+** Value: 262
*/
-#define FM_DELETE_DIR_SRC_INVALID_ERR_EID (FM_DELETE_DIR_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_DELETE_DIR_SRC_INVALID_ERR_EID (FM_DELETE_DIR_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Delete Directory error: directory name exists as a file: name = \%s'
** \event 'Delete Directory error: directory name exists as a file: name = \%s'
+**
** \par Type: ERROR
**
** \par Cause
@@ -3416,9 +3379,9 @@
** This event message is generated upon receipt of a /FM_DeleteDir
** command packet with a directory name that exists as a file.
**
-** Value: 212
+** Value: 263
*/
-#define FM_DELETE_DIR_SRC_DNE_ERR_EID (FM_DELETE_DIR_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_DELETE_DIR_SRC_DNE_ERR_EID (FM_DELETE_DIR_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Delete Directory Error: directory already exists: name = \%s'
** \event 'Delete Directory error: directory already exists: name = \%s'
@@ -3430,10 +3393,9 @@
** This event message is generated upon receipt of a /FM_DeleteDir
** command pasket with a directory that already exists.
**
-** Value: 213
+** Value: 264
*/
-#define FM_DELETE_DIR_SRC_ISDIR_ERR_EID (FM_DELETE_DIR_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
-
+#define FM_DELETE_DIR_SRC_ISDIR_ERR_EID (FM_DELETE_DIR_SRC_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Delete Directory Error: Child Task'
** \event 'Delete Directory error: child task is disabled'
@@ -3444,13 +3406,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 217
+** Value: 268
*/
-#define FM_DELETE_DIR_CHILD_BASE_EID (FM_DELETE_DIR_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_DELETE_DIR_CHILD_BASE_EID (FM_DELETE_DIR_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Delete Directory error: child task is disabled'
** \event 'Delete Directory error: child task is disabled'
@@ -3462,10 +3423,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 217
+** Value: 268
*/
-#define FM_DELETE_DIR_CHILD_DISABLED_ERR_EID (FM_DELETE_DIR_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_DELETE_DIR_CHILD_DISABLED_ERR_EID (FM_DELETE_DIR_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Delete Directory Error: child task queue is full'
** \event 'Delete Directory error: child task queue is full'
@@ -3484,10 +3444,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 218
+** Value: 269
*/
-#define FM_DELETE_DIR_CHILD_FULL_ERR_EID (FM_DELETE_DIR_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_DELETE_DIR_CHILD_FULL_ERR_EID (FM_DELETE_DIR_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Delete Directory Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Delete Directory error: child task interface is broken: count = \%d, index = \%d'
@@ -3497,7 +3456,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -3505,11 +3464,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 219
+** Value: 270
**
*/
-#define FM_DELETE_DIR_CHILD_BROKEN_ERR_EID (FM_DELETE_DIR_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_DELETE_DIR_CHILD_BROKEN_ERR_EID (FM_DELETE_DIR_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Directory List to File Error: Source Filename'
** \event 'Directory List to File error: directory name is invalid: name = \%s'
@@ -3522,12 +3480,11 @@
**
** This event message is generated upon receipt of a /FM_GetDirFile
** command packet with a source directory name that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 220
+** Value: 271
*/
-#define FM_GET_DIR_FILE_SRC_BASE_EID (FM_DELETE_DIR_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
-
+#define FM_GET_DIR_FILE_SRC_BASE_EID (FM_DELETE_DIR_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Directory List to File Error: directory name is invalid: name = \%s'
** \event 'Directory List to File error: directory name is invalid: name = \%s'
@@ -3539,9 +3496,9 @@
** This event message is generated upon receipt of a /FM_GetDirFile
** command packet with an invalid source directory name.
**
-** Value: 220
+** Value: 271
*/
-#define FM_GET_DIR_FILE_SRC_INVALID_ERR_EID (FM_GET_DIR_FILE_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_GET_DIR_FILE_SRC_INVALID_ERR_EID (FM_GET_DIR_FILE_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Directory List to File Error: directory does not exist: name = \%s'
** \event 'Directory List to File error: directory does not exist: name = \%s'
@@ -3553,9 +3510,9 @@
** This event message is generated upon receipt of a /FM_GetDirFile
** command packet with a source directory name that does not exist.
**
-** Value: 221
+** Value: 272
*/
-#define FM_GET_DIR_FILE_SRC_DNE_ERR_EID (FM_GET_DIR_FILE_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_GET_DIR_FILE_SRC_DNE_ERR_EID (FM_GET_DIR_FILE_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Directory List to File Error: directory name is a file: name = \%s'
** \event 'Directory List to File error: directory name is a file: name = \%s'
@@ -3567,10 +3524,9 @@
** This event message is generated upon receipt of a /FM_GetDirFile
** command packet with a source directory name that is a file.
**
-** Value: 222
+** Value: 273
*/
-#define FM_GET_DIR_FILE_SRC_ISDIR_ERR_EID (FM_GET_DIR_FILE_SRC_BASE_EID + FM_FNAME_ISFILE_EID_OFFSET)
-
+#define FM_GET_DIR_FILE_SRC_ISDIR_ERR_EID (FM_GET_DIR_FILE_SRC_BASE_EID + FM_FNAME_ISFILE_EID_OFFSET)
/** \brief 'Directory List to File Error: Output Filename'
** \event 'Directory List to File error: filename is invalid: name = \%s'
@@ -3583,11 +3539,11 @@
**
** This event message is generated upon receipt of a /FM_GetDirFile
** command packet with a target filename that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 226
+** Value: 277
*/
-#define FM_GET_DIR_FILE_TGT_BASE_EID (FM_GET_DIR_FILE_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
+#define FM_GET_DIR_FILE_TGT_BASE_EID (FM_GET_DIR_FILE_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Directory List to File Error: filename is invalid: name = \%s'
** \event 'Directory List to File error: filename is invalid: name = \%s'
@@ -3599,9 +3555,9 @@
** This event message is generated upon receipt of a /FM_GetDirFile
** command packet with an invalid target directory name.
**
-** Value: 226
+** Value: 277
*/
-#define FM_GET_DIR_FILE_TGT_INVALID_ERR_EID (FM_GET_DIR_FILE_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_GET_DIR_FILE_TGT_INVALID_ERR_EID (FM_GET_DIR_FILE_TGT_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Directory List to File Error: file does not exist: name = \%s'
** \event 'Directory List to File error: file does not exist: name = \%s'
@@ -3613,9 +3569,9 @@
** This event message is generated upon receipt of a /FM_GetDirFile
** command packet with a target directory name that does not exist.
**
-** Value: 227
+** Value: 278
*/
-#define FM_GET_DIR_FILE_TGT_DNE_ERR_EID (FM_GET_DIR_FILE_TGT_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_GET_DIR_FILE_TGT_DNE_ERR_EID (FM_GET_DIR_FILE_TGT_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Directory List to File Error: filename is a directory: name = \%s'
** \event 'Directory List to File error: filename is a directory: name = \%s'
@@ -3627,10 +3583,9 @@
** This event message is generated upon receipt of a /FM_GetDirFile
** command packet with a target filename that is a directory.
**
-** Value: 228
+** Value: 279
*/
-#define FM_GET_DIR_FILE_TGT_ISDIR_ERR_EID (FM_GET_DIR_FILE_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
-
+#define FM_GET_DIR_FILE_TGT_ISDIR_ERR_EID (FM_GET_DIR_FILE_TGT_BASE_EID + FM_FNAME_ISDIR_EID_OFFSET)
/** \brief 'Directory List to File Error: Child Task'
** \event 'Directory List to File error: child task is disabled'
@@ -3641,13 +3596,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 232
+** Value: 283
*/
-#define FM_GET_DIR_FILE_CHILD_BASE_EID (FM_GET_DIR_FILE_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_GET_DIR_FILE_CHILD_BASE_EID (FM_GET_DIR_FILE_TGT_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Directory List to File Error: child task is disabled'
** \event 'Directory List to File error: child task is disabled'
@@ -3659,10 +3613,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 232
+** Value: 283
*/
-#define FM_GET_DIR_FILE_CHILD_DISABLED_ERR_EID (FM_GET_DIR_FILE_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_GET_DIR_FILE_CHILD_DISABLED_ERR_EID (FM_GET_DIR_FILE_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Directory List to File Error: child task queue is full'
** \event 'Directory List to File error: child task queue is full'
@@ -3681,10 +3634,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 233
+** Value: 284
*/
-#define FM_GET_DIR_FILE_CHILD_FULL_ERR_EID (FM_GET_DIR_FILE_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_GET_DIR_FILE_CHILD_FULL_ERR_EID (FM_GET_DIR_FILE_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Directory List to File Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Directory List to File error: child task interface is broken: count = \%d, index = \%d'
@@ -3694,7 +3646,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -3702,11 +3654,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 234
+** Value: 285
**
*/
-#define FM_GET_DIR_FILE_CHILD_BROKEN_ERR_EID (FM_GET_DIR_FILE_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_GET_DIR_FILE_CHILD_BROKEN_ERR_EID (FM_GET_DIR_FILE_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
/** \brief 'Directory List to Packet Error: Source Filename'
** \event 'Directory List to Packet error: directory name is invalid: name = \%s'
@@ -3719,12 +3670,11 @@
**
** This event message is generated upon receipt of a /FM_GetDirPkt
** command packet with a source directory name that is unusable for one
-** of several reasons.
+** of several reasons.
**
-** Value: 235
+** Value: 286
*/
-#define FM_GET_DIR_PKT_SRC_BASE_EID (FM_GET_DIR_FILE_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
-
+#define FM_GET_DIR_PKT_SRC_BASE_EID (FM_GET_DIR_FILE_CHILD_BASE_EID + FM_CHILD_NUM_OFFSETS)
/** \brief 'Directory List to Packet Error: directory name is invalid: name = \%s'
** \event 'Directory List to Packet error: directory name is invalid: name = \%s'
@@ -3736,9 +3686,9 @@
** This event message is generated upon receipt of a /FM_GetDirPkt
** command packet with an invalid source directory name.
**
-** Value: 235
+** Value: 286
*/
-#define FM_GET_DIR_PKT_SRC_INVALID_ERR_EID (FM_GET_DIR_PKT_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
+#define FM_GET_DIR_PKT_SRC_INVALID_ERR_EID (FM_GET_DIR_PKT_SRC_BASE_EID + FM_FNAME_INVALID_EID_OFFSET)
/** \brief 'Directory List to Packet Error: directory does not exist: name = \%s'
** \event 'Directory List to Packet error: directory does not exist: name = \%s'
@@ -3750,9 +3700,9 @@
** This event message is generated upon receipt of a /FM_GetDirPkt
** command packet with a source directory name that does not exist.
**
-** Value: 236
+** Value: 287
*/
-#define FM_GET_DIR_PKT_SRC_DNE_ERR_EID (FM_GET_DIR_PKT_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
+#define FM_GET_DIR_PKT_SRC_DNE_ERR_EID (FM_GET_DIR_PKT_SRC_BASE_EID + FM_FNAME_DNE_EID_OFFSET)
/** \brief 'Directory List to Packet Error: directory name is a file: name = \%s'
** \event 'Directory List to Packet error: directory name is a file: name = \%s'
@@ -3764,10 +3714,9 @@
** This event message is generated upon receipt of a /FM_GetDirPkt
** command packet with a source directory name that is a file.
**
-** Value: 237
+** Value: 288
*/
-#define FM_GET_DIR_PKT_SRC_ISDIR_ERR_EID (FM_GET_DIR_PKT_SRC_BASE_EID + FM_FNAME_ISFILE_EID_OFFSET)
-
+#define FM_GET_DIR_PKT_SRC_ISDIR_ERR_EID (FM_GET_DIR_PKT_SRC_BASE_EID + FM_FNAME_ISFILE_EID_OFFSET)
/** \brief 'Directory List to Packet Error: Child Task'
** \event 'Directory List to Packet error: child task is disabled'
@@ -3778,13 +3727,12 @@
**
** \par Cause
**
-** This is the base for any of several messages that are generated when
-** the FM child task command queue interface cannot be used.
+** This is the base for any of several messages that are generated when
+** the FM child task command queue interface cannot be used.
**
-** Value: 241
+** Value: 292
*/
-#define FM_GET_DIR_PKT_CHILD_BASE_EID (FM_GET_DIR_PKT_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
-
+#define FM_GET_DIR_PKT_CHILD_BASE_EID (FM_GET_DIR_PKT_SRC_BASE_EID + FM_FNAME_NUM_OFFSETS)
/** \brief 'Directory List to Packet Error: child task is disabled'
** \event 'Directory List to Packet error: child task is disabled'
@@ -3796,10 +3744,9 @@
** This event message is generated when the FM child task command queue
** interface cannot be used because the child task is disabled.
**
-** Value: 241
+** Value: 292
*/
-#define FM_GET_DIR_PKT_CHILD_DISABLED_ERR_EID (FM_GET_DIR_PKT_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
-
+#define FM_GET_DIR_PKT_CHILD_DISABLED_ERR_EID (FM_GET_DIR_PKT_CHILD_BASE_EID + FM_CHILD_DISABLED_EID_OFFSET)
/** \brief 'Directory List to Packet Error: child task queue is full'
** \event 'Directory List to Packet error: child task queue is full'
@@ -3818,10 +3765,9 @@
** terminate the child task, which should then cause FM to process all
** commands in the main task.
**
-** Value: 242
+** Value: 293
*/
-#define FM_GET_DIR_PKT_CHILD_FULL_ERR_EID (FM_GET_DIR_PKT_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
-
+#define FM_GET_DIR_PKT_CHILD_FULL_ERR_EID (FM_GET_DIR_PKT_CHILD_BASE_EID + FM_CHILD_Q_FULL_EID_OFFSET)
/** \brief 'Directory List to Packet Error: child task interface is broken: count = \%d, index = \%d'
** \event 'Directory List to Packet error: child task interface is broken: count = \%d, index = \%d'
@@ -3831,7 +3777,7 @@
** \par Cause
**
** This event message is generated when the FM child task command queue
-** interface cannot be used because the interface between the main task
+** interface cannot be used because the interface between the main task
** and child task is broken.
**
** If the child task queue is broken then either the handshake interface
@@ -3839,11 +3785,10 @@
** affected the interface control variables. In either case, it may be
** necessary to restart the FM application to resync the interface.
**
-** Value: 243
+** Value: 294
**
*/
-#define FM_GET_DIR_PKT_CHILD_BROKEN_ERR_EID (FM_GET_DIR_PKT_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
-
+#define FM_GET_DIR_PKT_CHILD_BROKEN_ERR_EID (FM_GET_DIR_PKT_CHILD_BASE_EID + FM_CHILD_BROKEN_EID_OFFSET)
#endif /* _fm_events_h_ */
diff --git a/fsw/src/fm_msg.h b/fsw/src/fm_msg.h
index 3e1c0a9..7da9efc 100644
--- a/fsw/src/fm_msg.h
+++ b/fsw/src/fm_msg.h
@@ -1,23 +1,23 @@
/*
-** Filename: fm_msg.h
+** Filename: fm_msg.h
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: CFS File Manager (FM) Application Command and Telemetry
** Packet Header File
@@ -38,6 +38,9 @@
#include "fm_platform_cfg.h"
#include "fm_defs.h"
+#ifdef FM_INCLUDE_DECOMPRESS
+#include "cfs_fs_lib.h"
+#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -50,11 +53,10 @@
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
} FM_HousekeepingCmd_t;
-
/*
** \brief No-Operation command packet structure
**
@@ -62,10 +64,10 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
-} FM_NoopCmd_t;
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+} FM_NoopCmd_t;
/*
** \brief Reset Counters command packet structure
@@ -74,10 +76,10 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
-} FM_ResetCmd_t;
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+} FM_ResetCmd_t;
/*
** \brief Copy File command packet structure
@@ -86,13 +88,14 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- uint16 Overwrite; /**< \brief Allow overwrite */
- char Source[OS_MAX_PATH_LEN]; /**< \brief Source filename */
- char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
-} FM_CopyFileCmd_t;
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+ uint16 Overwrite; /**< \brief Allow overwrite */
+ char Source[OS_MAX_PATH_LEN]; /**< \brief Source filename */
+ char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
+
+} FM_CopyFileCmd_t;
/*
** \brief Move File command packet structure
@@ -101,13 +104,13 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- uint16 Overwrite; /**< \brief Allow overwrite */
- char Source[OS_MAX_PATH_LEN]; /**< \brief Source filename */
- char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
-} FM_MoveFileCmd_t;
+ uint16 Overwrite; /**< \brief Allow overwrite */
+ char Source[OS_MAX_PATH_LEN]; /**< \brief Source filename */
+ char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
+} FM_MoveFileCmd_t;
/*
** \brief Rename File command packet structure
@@ -116,12 +119,12 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Source[OS_MAX_PATH_LEN]; /**< \brief Source filename */
- char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
-} FM_RenameFileCmd_t;
+ char Source[OS_MAX_PATH_LEN]; /**< \brief Source filename */
+ char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
+} FM_RenameFileCmd_t;
/*
** \brief Delete File command packet structure
@@ -130,12 +133,11 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Filename[OS_MAX_PATH_LEN]; /**< \brief Delete filename */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+ char Filename[OS_MAX_PATH_LEN]; /**< \brief Delete filename */
} FM_DeleteFileCmd_t;
-
/*
** \brief Delete All command packet structure
**
@@ -143,12 +145,11 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+ char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
} FM_DeleteAllCmd_t;
-
/*
** \brief Decompress File command packet structure
**
@@ -156,13 +157,12 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Source[OS_MAX_PATH_LEN]; /**< \brief Source filename */
- char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+ char Source[OS_MAX_PATH_LEN]; /**< \brief Source filename */
+ char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
} FM_DecompressCmd_t;
-
/*
** \brief Concatenate Files command packet structure
**
@@ -170,13 +170,13 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Source1[OS_MAX_PATH_LEN]; /**< \brief Source 1 filename */
- char Source2[OS_MAX_PATH_LEN]; /**< \brief Source 2 filename */
- char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
-} FM_ConcatCmd_t;
+ char Source1[OS_MAX_PATH_LEN]; /**< \brief Source 1 filename */
+ char Source2[OS_MAX_PATH_LEN]; /**< \brief Source 2 filename */
+ char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename */
+} FM_ConcatCmd_t;
/*
** \brief Get File Info command packet structure
@@ -185,12 +185,12 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Filename[OS_MAX_PATH_LEN]; /**< \brief Filename */
- uint32 FileInfoCRC; /**< \brief File info CRC method */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
-} FM_GetFileInfoCmd_t;
+ char Filename[OS_MAX_PATH_LEN]; /**< \brief Filename */
+ uint32 FileInfoCRC; /**< \brief File info CRC method */
+} FM_GetFileInfoCmd_t;
/*
** \brief Get Open Files command packet structure
@@ -199,10 +199,10 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
-} FM_GetOpenFilesCmd_t;
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+} FM_GetOpenFilesCmd_t;
/*
** \brief Create Directory command packet structure
@@ -211,11 +211,11 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
-} FM_CreateDirCmd_t;
+ char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
+} FM_CreateDirCmd_t;
/*
** \brief Delete Directory command packet structure
@@ -224,11 +224,11 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
-} FM_DeleteDirCmd_t;
+ char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
+} FM_DeleteDirCmd_t;
/*
** \brief Get DIR List to File command packet structure
@@ -237,14 +237,14 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
- char Filename[OS_MAX_PATH_LEN]; /**< \brief Filename */
- uint8 GetSizeTimeMode; /**< \brief Option to query size, time, and mode of files (CPU intensive) */
- uint8 Spare01[3]; /**< \brief Padding to 32 bit boundary */
-
-} FM_GetDirFileCmd_t;
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+ char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
+ char Filename[OS_MAX_PATH_LEN]; /**< \brief Filename */
+ uint8 GetSizeTimeMode; /**< \brief Option to query size, time, and mode of files (CPU intensive) */
+ uint8 Spare01[3]; /**< \brief Padding to 32 bit boundary */
+
+} FM_GetDirFileCmd_t;
/*
** \brief Get DIR List to Packet command packet structure
@@ -253,14 +253,15 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
- uint32 DirListOffset; /**< \brief Index of 1st dir entry to put in packet */
- uint8 GetSizeTimeMode; /**< \brief Option to query size, time, and mode of files (CPU intensive) */
- uint8 Spare01[3]; /**< \brief Padding to 32 bit boundary */
-} FM_GetDirPktCmd_t;
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+ char Directory[OS_MAX_PATH_LEN]; /**< \brief Directory name */
+ uint32 DirListOffset; /**< \brief Index of 1st dir entry to put in packet */
+ uint8 GetSizeTimeMode; /**< \brief Option to query size, time, and mode of files (CPU intensive) */
+ uint8 Spare01[3]; /**< \brief Padding to 32 bit boundary */
+
+} FM_GetDirPktCmd_t;
/*
** \brief Get Free Space command packet structure
@@ -269,10 +270,10 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
-} FM_GetFreeSpaceCmd_t;
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
+} FM_GetFreeSpaceCmd_t;
/*
** \brief Set Table State command packet structure
@@ -281,12 +282,12 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- uint32 TableEntryIndex; /**< \brief Table entry index */
- uint32 TableEntryState; /**< \brief New table entry state */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
-} FM_SetTableStateCmd_t;
+ uint32 TableEntryIndex; /**< \brief Table entry index */
+ uint32 TableEntryState; /**< \brief New table entry state */
+} FM_SetTableStateCmd_t;
/*
** \brief Set Permissions for a file
@@ -295,12 +296,12 @@ typedef struct
*/
typedef struct
{
- uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE SB cmd hdr */
- char FileName[OS_MAX_PATH_LEN]; /**< \brief File name of the permissions to set */
- uint32 Mode; /**< \brief Permissions, passed directly to OS_chmod */
+ CFE_MSG_CommandHeader_t CmdHeader; /**< \brief cFE SB cmd hdr */
-} FM_SetPermCmd_t;
+ char FileName[OS_MAX_PATH_LEN]; /**< \brief File name of the permissions to set */
+ uint32 Mode; /**< \brief Permissions, passed directly to OS_chmod */
+} FM_SetPermCmd_t;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -313,14 +314,14 @@ typedef struct
**/
typedef struct
{
- char EntryName[OS_MAX_PATH_LEN]; /**< \fmtlmmnemonic \FM_DLFileName
- \brief Directory Listing Filename */
- uint32 EntrySize; /**< \fmtlmmnemonic \FM_DLFileSize
- \brief Directory Listing File Size */
- uint32 ModifyTime; /**< \fmtlmmnemonic \FM_DLModTime
- \brief Directory Listing File Last Modification Times */
- uint32 Mode; /**< \fmtlmmnemonic \FM_DLMode
- \brief Mode of the file (Permissions) */
+ char EntryName[OS_MAX_PATH_LEN]; /**< \fmtlmmnemonic \FM_DLFileName
+ \brief Directory Listing Filename */
+ uint32 EntrySize; /**< \fmtlmmnemonic \FM_DLFileSize
+ \brief Directory Listing File Size */
+ uint32 ModifyTime; /**< \fmtlmmnemonic \FM_DLModTime
+ \brief Directory Listing File Last Modification Times */
+ uint32 Mode; /**< \fmtlmmnemonic \FM_DLMode
+ \brief Mode of the file (Permissions) */
} FM_DirListEntry_t;
/**
@@ -328,21 +329,20 @@ typedef struct
**/
typedef struct
{
- uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE SB tlm hdr */
+ CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief cFE SB tlm hdr */
- char DirName[OS_MAX_PATH_LEN]; /**< \fmtlmmnemonic \FM_DirName
- \brief Directory Name */
- uint32 TotalFiles; /**< \fmtlmmnemonic \FM_TotalFiles
- \brief Number of files in the directory */
- uint32 PacketFiles; /**< \fmtlmmnemonic \FM_PacketFiles
- \brief Number of files in this packet */
- uint32 FirstFile; /**< \fmtlmmnemonic \FM_FirstFile
- \brief Index into directory files of first packet file */
- FM_DirListEntry_t FileList[FM_DIR_LIST_PKT_ENTRIES]; /**< \fmtlmmnemonic \FM_DLFileList
- \brief Directory listing file data */
+ char DirName[OS_MAX_PATH_LEN]; /**< \fmtlmmnemonic \FM_DirName
+ \brief Directory Name */
+ uint32 TotalFiles; /**< \fmtlmmnemonic \FM_TotalFiles
+ \brief Number of files in the directory */
+ uint32 PacketFiles; /**< \fmtlmmnemonic \FM_PacketFiles
+ \brief Number of files in this packet */
+ uint32 FirstFile; /**< \fmtlmmnemonic \FM_FirstFile
+ \brief Index into directory files of first packet file */
+ FM_DirListEntry_t FileList[FM_DIR_LIST_PKT_ENTRIES]; /**< \fmtlmmnemonic \FM_DLFileList
+ \brief Directory listing file data */
} FM_DirListPkt_t;
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- get directory listing to file structures */
@@ -354,13 +354,12 @@ typedef struct
**/
typedef struct
{
- char DirName[OS_MAX_PATH_LEN]; /**< \brief Directory name */
- uint32 DirEntries; /**< \brief Number of entries in the directory */
- uint32 FileEntries; /**< \brief Number of entries written to output file */
+ char DirName[OS_MAX_PATH_LEN]; /**< \brief Directory name */
+ uint32 DirEntries; /**< \brief Number of entries in the directory */
+ uint32 FileEntries; /**< \brief Number of entries written to output file */
} FM_DirListFileStats_t;
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- get file information telemetry structure */
@@ -372,29 +371,27 @@ typedef struct
**/
typedef struct
{
- uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE SB tlm hdr */
-
- uint8 FileStatus; /**< \fmtlmmnemonic \FM_FileStatus
- \brief Status indicating whether the file is open or closed */
- uint8 CRC_Computed; /**< \fmtlmmnemonic \FM_ComputeCRC
- \brief Flag indicating whether a CRC was computed or not */
- uint8 Spare[2]; /**< \fmtlmmnemonic \FM_InfoPad
- \brief Structure padding */
- uint32 CRC; /**< \fmtlmmnemonic \FM_CRC
- \brief CRC value if computed */
- uint32 FileSize; /**< \fmtlmmnemonic \FM_InfoFileSize
- \brief File Size */
- uint32 LastModifiedTime; /**< \fmtlmmnemonic \FM_ModTime
- \brief Last Modification Time of File */
- uint32 Mode; /**< \fmtlmmnemonic \FM_Mode
- \brief Mode of the file (Permissions) */
-
- char Filename[OS_MAX_PATH_LEN]; /**< \fmtlmmnemonic \FM_InfoFileName
- \brief Name of File */
+ CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief cFE SB tlm hdr */
+
+ uint8 FileStatus; /**< \fmtlmmnemonic \FM_FileStatus
+ \brief Status indicating whether the file is open or closed */
+ uint8 CRC_Computed; /**< \fmtlmmnemonic \FM_ComputeCRC
+ \brief Flag indicating whether a CRC was computed or not */
+ uint8 Spare[2]; /**< \fmtlmmnemonic \FM_InfoPad
+ \brief Structure padding */
+ uint32 CRC; /**< \fmtlmmnemonic \FM_CRC
+ \brief CRC value if computed */
+ uint32 FileSize; /**< \fmtlmmnemonic \FM_InfoFileSize
+ \brief File Size */
+ uint32 LastModifiedTime; /**< \fmtlmmnemonic \FM_ModTime
+ \brief Last Modification Time of File */
+ uint32 Mode; /**< \fmtlmmnemonic \FM_Mode
+ \brief Mode of the file (Permissions) */
+
+ char Filename[OS_MAX_PATH_LEN]; /**< \fmtlmmnemonic \FM_InfoFileName
+ \brief Name of File */
} FM_FileInfoPkt_t;
-
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- get open files list telemetry structures */
@@ -406,27 +403,24 @@ typedef struct
**/
typedef struct
{
- char LogicalName[OS_MAX_PATH_LEN]; /**< \brief Logical filename */
- char AppName[OS_MAX_API_NAME]; /**< \brief Application that opened file */
+ char LogicalName[OS_MAX_PATH_LEN]; /**< \brief Logical filename */
+ char AppName[OS_MAX_API_NAME]; /**< \brief Application that opened file */
} FM_OpenFilesEntry_t;
-
/**
** \fmtlm Get Open Files telemetry packet
**/
typedef struct
{
- uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE SB tlm hdr */
+ CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief cFE SB tlm hdr */
- uint32 NumOpenFiles; /**< \fmtlmmnemonic \FM_TotalOpenFiles
- \brief Number of files opened via cFE */
- FM_OpenFilesEntry_t OpenFilesList[OS_MAX_NUM_OPEN_FILES]; /**< \fmtlmmnemonic \FM_OpenFilesList
- \brief List of files opened via cFE */
+ uint32 NumOpenFiles; /**< \fmtlmmnemonic \FM_TotalOpenFiles
+ \brief Number of files opened via cFE */
+ FM_OpenFilesEntry_t OpenFilesList[OS_MAX_NUM_OPEN_FILES]; /**< \fmtlmmnemonic \FM_OpenFilesList
+ \brief List of files opened via cFE */
} FM_OpenFilesPkt_t;
-
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- get file system free space telemetry structures */
@@ -438,27 +432,23 @@ typedef struct
**/
typedef struct
{
- uint32 FreeSpace_A; /**< \fmtlmmnemonic \FM_FreeSpace_A
- \brief First 32 bit portion of a 64 bit value */
- uint32 FreeSpace_B; /**< \fmtlmmnemonic \FM_FreeSpace_B
- \brief Second 32 bit portion of a 64 bit value */
- char Name[OS_MAX_PATH_LEN]; /**< \fmtlmmnemonic \FM_PktFsName
- \brief File system name */
+ osal_blockcount_t FreeSpace; /**< \fmtlmmnemonic \FM_FreeSpace
+ \brief Blocks free in filesystem */
+ char Name[OS_MAX_PATH_LEN]; /**< \fmtlmmnemonic \FM_PktFsName
+ \brief File system name */
} FM_FreeSpacePktEntry_t;
-
/**
** \fmtlm Get Free Space telemetry packet
**/
typedef struct
{
- uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE SB tlm hdr */
+ CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief cFE SB tlm hdr */
- FM_FreeSpacePktEntry_t FileSys[FM_TABLE_ENTRY_COUNT]; /**< \fmtlmmnemonic \FM_PktFsList
- \brief Array of file system free space entries */
+ FM_FreeSpacePktEntry_t FileSys[FM_TABLE_ENTRY_COUNT]; /**< \fmtlmmnemonic \FM_PktFsList
+ \brief Array of file system free space entries */
} FM_FreeSpacePkt_t;
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- housekeeping telemetry structure */
@@ -470,35 +460,34 @@ typedef struct
**/
typedef struct
{
- uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE SB tlm hdr */
+ CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief cFE SB tlm hdr */
- uint8 CommandCounter; /**< \fmtlmmnemonic \FM_CMDPC
- \brief Application command counter */
- uint8 CommandErrCounter; /**< \fmtlmmnemonic \FM_CMDEC
- \brief Application command error counter */
- uint8 Spare; /**< \brief Placeholder for unused command warning counter */
+ uint8 CommandCounter; /**< \fmtlmmnemonic \FM_CMDPC
+ \brief Application command counter */
+ uint8 CommandErrCounter; /**< \fmtlmmnemonic \FM_CMDEC
+ \brief Application command error counter */
+ uint8 Spare; /**< \brief Placeholder for unused command warning counter */
- uint8 NumOpenFiles; /**< \fmtlmmnemonic \FM_NumOpen
- \brief Number of open files in the system */
+ uint8 NumOpenFiles; /**< \fmtlmmnemonic \FM_NumOpen
+ \brief Number of open files in the system */
- uint8 ChildCmdCounter; /**< \fmtlmmnemonic \FM_ChildCMDPC
- \brief Child task command counter */
- uint8 ChildCmdErrCounter; /**< \fmtlmmnemonic \FM_ChildCMDEC
- \brief Child task command error counter */
- uint8 ChildCmdWarnCounter; /**< \fmtlmmnemonic \FM_ChildWarnCtr
- \brief Child task command warning counter */
+ uint8 ChildCmdCounter; /**< \fmtlmmnemonic \FM_ChildCMDPC
+ \brief Child task command counter */
+ uint8 ChildCmdErrCounter; /**< \fmtlmmnemonic \FM_ChildCMDEC
+ \brief Child task command error counter */
+ uint8 ChildCmdWarnCounter; /**< \fmtlmmnemonic \FM_ChildWarnCtr
+ \brief Child task command warning counter */
- uint8 ChildQueueCount; /**< \fmtlmmnemonic \FM_ChildQueueCount
- \brief Number of pending commands in queue */
+ uint8 ChildQueueCount; /**< \fmtlmmnemonic \FM_ChildQueueCount
+ \brief Number of pending commands in queue */
- uint8 ChildCurrentCC; /**< \fmtlmmnemonic \FM_ChildCurrCC
- \brief Command code currently executing */
- uint8 ChildPreviousCC; /**< \fmtlmmnemonic \FM_ChildPrevCC
- \brief Command code previously executed */
+ uint8 ChildCurrentCC; /**< \fmtlmmnemonic \FM_ChildCurrCC
+ \brief Command code currently executing */
+ uint8 ChildPreviousCC; /**< \fmtlmmnemonic \FM_ChildPrevCC
+ \brief Command code previously executed */
} FM_HousekeepingPkt_t;
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- file system free space table structures */
@@ -510,12 +499,11 @@ typedef struct
**/
typedef struct
{
- uint32 State; /**< \brief Table entry enable/disable state */
- char Name[OS_MAX_PATH_LEN]; /**< \brief File system name = string */
+ uint32 State; /**< \brief Table entry enable/disable state */
+ char Name[OS_MAX_PATH_LEN]; /**< \brief File system name = string */
} FM_TableEntry_t;
-
/**
** \brief Get Free Space table definition
**/
@@ -525,7 +513,6 @@ typedef struct
} FM_FreeSpaceTable_t;
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- child task interface command queue entry */
@@ -537,20 +524,19 @@ typedef struct
**/
typedef struct
{
- uint32 CommandCode; /**< \brief Command code - identifies the command */
- uint32 DirListOffset; /**< \brief Starting entry for dir list commands */
- uint32 FileInfoState; /**< \brief File info state */
- uint32 FileInfoSize; /**< \brief File info size */
- uint32 FileInfoTime; /**< \brief File info time */
- uint32 FileInfoCRC; /**< \brief File info CRC method */
- char Source1[OS_MAX_PATH_LEN]; /**< \brief First source file or directory name command argument */
- char Source2[OS_MAX_PATH_LEN]; /**< \brief Second source filename command argument */
- char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename command argument */
- uint8 GetSizeTimeMode; /**< \brief Whether to invoke stat call for size and time (CPU intensive) */
- uint32 Mode; /**< \brief File Mode */
+ CFE_MSG_FcnCode_t CommandCode; /**< \brief Command code - identifies the command */
+ uint32 DirListOffset; /**< \brief Starting entry for dir list commands */
+ uint32 FileInfoState; /**< \brief File info state */
+ uint32 FileInfoSize; /**< \brief File info size */
+ uint32 FileInfoTime; /**< \brief File info time */
+ uint32 FileInfoCRC; /**< \brief File info CRC method */
+ char Source1[OS_MAX_PATH_LEN]; /**< \brief First source file or directory name command argument */
+ char Source2[OS_MAX_PATH_LEN]; /**< \brief Second source filename command argument */
+ char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename command argument */
+ uint8 GetSizeTimeMode; /**< \brief Whether to invoke stat call for size and time (CPU intensive) */
+ uint32 Mode; /**< \brief File Mode */
} FM_ChildQueueEntry_t;
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- application global data structure */
@@ -562,52 +548,57 @@ typedef struct
**/
typedef struct
{
- FM_FreeSpaceTable_t *FreeSpaceTablePtr; /**< \brief File System Table Pointer */
- CFE_TBL_Handle_t FreeSpaceTableHandle; /**< \brief File System Table Handle */
+ FM_FreeSpaceTable_t *FreeSpaceTablePtr; /**< \brief File System Table Pointer */
+ CFE_TBL_Handle_t FreeSpaceTableHandle; /**< \brief File System Table Handle */
- CFE_SB_PipeId_t CmdPipe; /**< \brief cFE software bus command pipe */
+ CFE_SB_PipeId_t CmdPipe; /**< \brief cFE software bus command pipe */
- uint32 ChildTaskID; /**< \brief Child task ID */
- uint32 ChildSemaphore; /**< \brief Child task wakeup counting semaphore */
- uint32 ChildQueueCountSem; /**< \brief Child queue counter mutex semaphore */
+ CFE_ES_TaskId_t ChildTaskID; /**< \brief Child task ID */
+ uint32 ChildSemaphore; /**< \brief Child task wakeup counting semaphore */
+ uint32 ChildQueueCountSem; /**< \brief Child queue counter mutex semaphore */
- uint8 ChildCmdCounter; /**< \brief Child task command success counter */
- uint8 ChildCmdErrCounter; /**< \brief Child task command error counter */
- uint8 ChildCmdWarnCounter; /**< \brief Child task command warning counter */
+ uint8 ChildCmdCounter; /**< \brief Child task command success counter */
+ uint8 ChildCmdErrCounter; /**< \brief Child task command error counter */
+ uint8 ChildCmdWarnCounter; /**< \brief Child task command warning counter */
- uint8 ChildWriteIndex; /**< \brief Array index for next write to command args */
- uint8 ChildReadIndex; /**< \brief Array index for next read from command args */
- uint8 ChildQueueCount; /**< \brief Number of pending commands in queue */
+ uint8 ChildWriteIndex; /**< \brief Array index for next write to command args */
+ uint8 ChildReadIndex; /**< \brief Array index for next read from command args */
+ uint8 ChildQueueCount; /**< \brief Number of pending commands in queue */
- uint8 CommandCounter; /**< \brief Application command success counter */
- uint8 CommandErrCounter; /**< \brief Application command error counter */
- uint8 Spare8a; /**< \brief Placeholder for unused command warning counter */
+ uint8 CommandCounter; /**< \brief Application command success counter */
+ uint8 CommandErrCounter; /**< \brief Application command error counter */
+ uint8 Spare8a; /**< \brief Placeholder for unused command warning counter */
- uint8 ChildCurrentCC; /**< \brief Command code currently executing */
- uint8 ChildPreviousCC; /**< \brief Command code previously executed */
- uint8 Spare8b; /**< \brief Structure alignment spare */
+ uint8 ChildCurrentCC; /**< \brief Command code currently executing */
+ uint8 ChildPreviousCC; /**< \brief Command code previously executed */
+ uint8 Spare8b; /**< \brief Structure alignment spare */
- uint32 FileStatTime; /**< \brief Modify time from most recent OS_stat */
- uint32 FileStatSize; /**< \brief File size from most recent OS_stat */
+ uint32 FileStatTime; /**< \brief Modify time from most recent OS_stat */
+ uint32 FileStatSize; /**< \brief File size from most recent OS_stat */
+ uint32 FileStatMode; /**< \brief File mode from most recent OS_stat */
FM_DirListFileStats_t DirListFileStats; /**< \brief Get dir list to file statistics structure */
- FM_DirListPkt_t DirListPkt; /**< \brief Get dir list to packet telemetry packet */
+ FM_DirListPkt_t DirListPkt; /**< \brief Get dir list to packet telemetry packet */
- FM_FreeSpacePkt_t FreeSpacePkt; /**< \brief Get free space telemetry packet */
+ FM_FreeSpacePkt_t FreeSpacePkt; /**< \brief Get free space telemetry packet */
- FM_FileInfoPkt_t FileInfoPkt; /**< \brief Get file info telemetry packet */
+ FM_FileInfoPkt_t FileInfoPkt; /**< \brief Get file info telemetry packet */
- FM_OpenFilesPkt_t OpenFilesPkt; /**< \brief Get open files telemetry packet */
+ FM_OpenFilesPkt_t OpenFilesPkt; /**< \brief Get open files telemetry packet */
- FM_HousekeepingPkt_t HousekeepingPkt; /**< \brief Application housekeeping telemetry packet */
+ FM_HousekeepingPkt_t HousekeepingPkt; /**< \brief Application housekeeping telemetry packet */
- char ChildBuffer[FM_CHILD_FILE_BLOCK_SIZE]; /**< \brief Child task file I/O buffer */
+ char ChildBuffer[FM_CHILD_FILE_BLOCK_SIZE]; /**< \brief Child task file I/O buffer */
- FM_ChildQueueEntry_t ChildQueue[FM_CHILD_QUEUE_DEPTH]; /**< \brief Child task command queue */
+ FM_ChildQueueEntry_t ChildQueue[FM_CHILD_QUEUE_DEPTH]; /**< \brief Child task command queue */
-} FM_GlobalData_t;
+#ifdef FM_INCLUDE_DECOMPRESS
+ FS_LIB_Decompress_State_t DecompressState;
+#endif
+
+} FM_GlobalData_t;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -615,8 +606,7 @@ typedef struct
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-extern FM_GlobalData_t FM_GlobalData;
-
+extern FM_GlobalData_t FM_GlobalData;
#endif /* _fm_msg_h_ */
diff --git a/fsw/src/fm_msgdefs.h b/fsw/src/fm_msgdefs.h
index 6c7bb57..25d05a2 100644
--- a/fsw/src/fm_msgdefs.h
+++ b/fsw/src/fm_msgdefs.h
@@ -1,23 +1,23 @@
/*
-** Filename: fm_msgdefs.h
+** Filename: fm_msgdefs.h
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: CFS File Manager (FM) Application Command and Telemetry
** Packet Definitions Header File
@@ -69,8 +69,7 @@
** \par Criticality
** - There are no critical issues related to this command.
*/
-#define FM_NOOP_CC 0
-
+#define FM_NOOP_CC 0
/** \fmcmd Reset Counters
**
@@ -102,8 +101,7 @@
** - There are no critical issues related to this command.
**
*/
-#define FM_RESET_CC 1
-
+#define FM_RESET_CC 1
/** \fmcmd Copy File
**
@@ -115,7 +113,7 @@
** an existing file, provided that the file is closed.
** If the Overwrite command argument is FALSE, then the target must not exist.
** The source and target may be on different file systems.
-**
+**
** Because of the possibility that this command might take a very long time
** to complete, command argument validation will be done immediately but
** copying the file will be performed by a lower priority child task.
@@ -161,7 +159,7 @@
** - Error event #FM_COPY_TGT_UNKNOWN_ERR_EID may be sent
** - Error event #FM_COPY_CHILD_DISABLED_ERR_EID may be sent
** - Error event #FM_COPY_CHILD_FULL_ERR_EID may be sent
-** - Error event #FM_COPY_CHILD_BROKEN_ERR_EID may be sent
+** - Error event #FM_COPY_CHILD_BROKEN_ERR_EID may be sent
** - Error event #FM_COPY_OS_ERR_EID may be sent
**
** \par Criticality
@@ -171,8 +169,7 @@
**
** \sa #FM_MOVE_CC, #FM_RENAME_CC
*/
-#define FM_COPY_CC 2
-
+#define FM_COPY_CC 2
/** \fmcmd Move File
**
@@ -240,8 +237,7 @@
**
** \sa #FM_COPY_CC, #FM_RENAME_CC
*/
-#define FM_MOVE_CC 3
-
+#define FM_MOVE_CC 3
/** \fmcmd Rename File
**
@@ -302,8 +298,7 @@
**
** \sa #FM_COPY_CC, #FM_MOVE_CC
*/
-#define FM_RENAME_CC 4
-
+#define FM_RENAME_CC 4
/** \fmcmd Delete File
**
@@ -355,8 +350,7 @@
**
** \sa #FM_DELETE_ALL_CC, #FM_DELETE_DIR_CC
*/
-#define FM_DELETE_CC 5
-
+#define FM_DELETE_CC 5
/** \fmcmd Delete All Files
**
@@ -427,8 +421,7 @@
**
** \sa #FM_DELETE_CC, #FM_DELETE_DIR_CC
*/
-#define FM_DELETE_ALL_CC 7
-
+#define FM_DELETE_ALL_CC 7
/** \fmcmd Decompress File
**
@@ -446,6 +439,8 @@
** of command argument verification and being able to place the command on
** the child task interface queue.
**
+** This command is only valid if FM_INCLUDE_DECOMPRESS is defined.
+**
** \fmcmdmnemonic \FM_Decompress
**
** \par Command Packet Structure
@@ -484,8 +479,7 @@
** Decompressing a very large file may consume more CPU resource than
** anticipated.
*/
-#define FM_DECOMPRESS_CC 8
-
+#define FM_DECOMPRESS_CC 8
/** \fmcmd Concatenate Files
**
@@ -494,7 +488,7 @@
** file.
** Sources must both be existing files and target must not exist.
** Sources and target may be on different file systems.
-**
+**
** Because of the possibility that this command might take a very long time
** to complete, command argument validation will be done immediately but
** copying the first source file to the target file and then appending the
@@ -552,8 +546,7 @@
**
** \sa #FM_COPY_CC
*/
-#define FM_CONCAT_CC 9
-
+#define FM_CONCAT_CC 9
/** \fmcmd Get File Information
**
@@ -565,7 +558,7 @@
** or does not exist.
** The file information data also includes a CRC, file size,
** last modify time and the source name.
-**
+**
** Because of the possibility that this command might take a very long time
** to complete, command argument validation will be done immediately but
** collecting the status data and calculating the CRC will be performed by
@@ -616,8 +609,7 @@
**
** \sa #FM_GET_OPEN_FILES_CC, #FM_GET_DIR_FILE_CC, #FM_GET_DIR_PKT_CC
*/
-#define FM_GET_FILE_INFO_CC 10
-
+#define FM_GET_FILE_INFO_CC 10
/** \fmcmd Get Open Files Listing
**
@@ -648,8 +640,7 @@
**
** \sa #FM_GET_FILE_INFO_CC, #FM_GET_DIR_FILE_CC, #FM_GET_DIR_PKT_CC
*/
-#define FM_GET_OPEN_FILES_CC 11
-
+#define FM_GET_OPEN_FILES_CC 11
/** \fmcmd Create Directory
**
@@ -697,8 +688,7 @@
**
** \sa #FM_DELETE_DIR_CC
*/
-#define FM_CREATE_DIR_CC 12
-
+#define FM_CREATE_DIR_CC 12
/** \fmcmd Remove Directory
**
@@ -752,8 +742,7 @@
**
** \sa #FM_CREATE_DIR_CC
*/
-#define FM_DELETE_DIR_CC 13
-
+#define FM_DELETE_DIR_CC 13
/** \fmcmd Get Directory Listing to a File
**
@@ -825,8 +814,7 @@
**
** \sa #FM_GET_DIR_PKT_CC
*/
-#define FM_GET_DIR_FILE_CC 14
-
+#define FM_GET_DIR_FILE_CC 14
/** \fmcmd Get Directory Listing to a Packet
**
@@ -901,8 +889,7 @@
**
** \sa #FM_GET_DIR_FILE_CC
*/
-#define FM_GET_DIR_PKT_CC 15
-
+#define FM_GET_DIR_PKT_CC 15
/** \fmcmd Get Free Space
**
@@ -933,8 +920,7 @@
** \par Criticality
** - There are no critical issues related to this command.
*/
-#define FM_GET_FREE_SPACE_CC 16
-
+#define FM_GET_FREE_SPACE_CC 16
/** \fmcmd Set Free Space Table Entry State
**
@@ -971,8 +957,7 @@
** \par Criticality
** - There are no critical issues related to this command.
*/
-#define FM_SET_TABLE_STATE_CC 17
-
+#define FM_SET_TABLE_STATE_CC 17
/** \fmcmd Delete File (internal)
**
@@ -988,7 +973,7 @@
**
** \sa #FM_DELETE_CC
*/
-#define FM_DELETE_INT_CC 18
+#define FM_DELETE_INT_CC 18
/** \fmcmd Set Permissions of a file
**
@@ -996,8 +981,8 @@
** This command sets the permissions for a file. This is a direct interface
** to OS_chmod in the OSAL. OS_chmod accepts a uint32 to set the file's mode.
** The mode value also contains the type of file (regular or directory, etc) so
-** care should be taken to not change the file type from regular to directory
-** or vice-versa.
+** care should be taken to not change the file type from regular to directory
+** or vice-versa.
**
** Because of the possibility that this command might take a very long time
** to complete, command argument validation will be done immediately but
@@ -1007,16 +992,16 @@
** the child task interface queue.
**
** Examples for a regular file:
-**
+**
** 0100700 (Decimal: 33216) - Read, Write and Execute
** 0100600 (Decimal: 33152) - Read, and Write
** 0100400 (Decimal: 33024) - Read Only
-**
+**
** Examples for a directory:
** 0040700 (Decimal: 16832) - Read, Write and Execute
** 0040600 (Decimal: 16786) - Read, and Write
** 0040400 (Decimal: 16640) - Read Only
-**
+**
** S_IFMT 0170000 bit mask for the file type bit field
**
** S_IFSOCK 0140000 socket
@@ -1050,7 +1035,7 @@
** \par Criticality
** - There are no critical issues related to this command.
*/
-#define FM_SET_FILE_PERM_CC 19
+#define FM_SET_FILE_PERM_CC 19
#endif /* _fm_msgdefs_h_ */
diff --git a/fsw/src/fm_tbl.c b/fsw/src/fm_tbl.c
index ff0f7f6..47cad35 100644
--- a/fsw/src/fm_tbl.c
+++ b/fsw/src/fm_tbl.c
@@ -1,23 +1,23 @@
/*
-** Filename: fm_tbl.c
+** Filename: fm_tbl.c
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: File Manager (FM) Application Table Definitions
**
@@ -29,7 +29,6 @@
**
*/
-#include "cfe.h"
#include "fm_platform_cfg.h"
#include "fm_msg.h"
#include "fm_tbl.h"
@@ -38,7 +37,6 @@
#include
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM table function -- startup initialization */
@@ -50,29 +48,26 @@ int32 FM_TableInit(void)
int32 Status = CFE_SUCCESS;
/* Initialize file system free space table pointer */
- FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *) NULL;
+ FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *)NULL;
/* Register the file system free space table - this must succeed! */
- Status = CFE_TBL_Register(&FM_GlobalData.FreeSpaceTableHandle,
- FM_TABLE_CFE_NAME, sizeof(FM_FreeSpaceTable_t),
- (CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_LOAD_DUMP),
- (CFE_TBL_CallbackFuncPtr_t) FM_ValidateTable);
+ Status = CFE_TBL_Register(&FM_GlobalData.FreeSpaceTableHandle, FM_TABLE_CFE_NAME, sizeof(FM_FreeSpaceTable_t),
+ (CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_LOAD_DUMP),
+ (CFE_TBL_CallbackFuncPtr_t)FM_ValidateTable);
if (Status == CFE_SUCCESS)
{
/* Make an attempt to load the default table data - OK if this fails */
- CFE_TBL_Load(FM_GlobalData.FreeSpaceTableHandle,
- CFE_TBL_SRC_FILE, FM_TABLE_DEF_NAME);
+ CFE_TBL_Load(FM_GlobalData.FreeSpaceTableHandle, CFE_TBL_SRC_FILE, FM_TABLE_DEF_NAME);
/* Allow cFE a chance to dump, update, etc. */
FM_AcquireTablePointers();
}
- return(Status);
+ return (Status);
} /* End FM_TableInit */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM table function -- table data verification */
@@ -81,14 +76,23 @@ int32 FM_TableInit(void)
int32 FM_ValidateTable(FM_FreeSpaceTable_t *TablePtr)
{
- int32 Result = CFE_SUCCESS;
- int32 NameLength = 0;
- int32 i = 0;
+ int32 Result = CFE_SUCCESS;
+ int32 NameLength = 0;
+ int32 i = 0;
int32 CountGood = 0;
int32 CountBad = 0;
int32 CountUnused = 0;
+ /* Verify the table pointer is valid */
+ if (TablePtr == NULL)
+ {
+ CFE_EVS_SendEvent(FM_TABLE_VERIFY_NULL_PTR_ERR_EID, CFE_EVS_EventType_ERROR,
+ "Free Space Table verify error - null pointer detected");
+
+ return (FM_TABLE_VALIDATION_ERR);
+ }
+
/*
** Free space table data verification
**
@@ -125,8 +129,8 @@ int32 FM_ValidateTable(FM_FreeSpaceTable_t *TablePtr)
/* Send event describing first error only*/
if (CountBad == 1)
{
- CFE_EVS_SendEvent(FM_TABLE_VERIFY_EMPTY_ERR_EID, CFE_EVS_ERROR,
- "Free Space Table verify error: index = %d, empty name string", (int)i);
+ CFE_EVS_SendEvent(FM_TABLE_VERIFY_EMPTY_ERR_EID, CFE_EVS_EventType_ERROR,
+ "Free Space Table verify error: index = %d, empty name string", (int)i);
}
}
else if (NameLength == OS_MAX_PATH_LEN)
@@ -137,8 +141,8 @@ int32 FM_ValidateTable(FM_FreeSpaceTable_t *TablePtr)
/* Send event describing first error only*/
if (CountBad == 1)
{
- CFE_EVS_SendEvent(FM_TABLE_VERIFY_TOOLONG_ERR_EID, CFE_EVS_ERROR,
- "Free Space Table verify error: index = %d, name too long", (int)i);
+ CFE_EVS_SendEvent(FM_TABLE_VERIFY_TOOLONG_ERR_EID, CFE_EVS_EventType_ERROR,
+ "Free Space Table verify error: index = %d, name too long", (int)i);
}
}
else if (!CFS_IsValidFilename(TablePtr->FileSys[i].Name, NameLength))
@@ -149,9 +153,9 @@ int32 FM_ValidateTable(FM_FreeSpaceTable_t *TablePtr)
/* Send event describing first error only*/
if (CountBad == 1)
{
- CFE_EVS_SendEvent(FM_TABLE_VERIFY_INVALID_ERR_EID, CFE_EVS_ERROR,
- "Free Space Table verify error: index = %d, invalid name = %s",
- (int)i, TablePtr->FileSys[i].Name);
+ CFE_EVS_SendEvent(FM_TABLE_VERIFY_INVALID_ERR_EID, CFE_EVS_EventType_ERROR,
+ "Free Space Table verify error: index = %d, invalid name = %s", (int)i,
+ TablePtr->FileSys[i].Name);
}
}
else
@@ -173,28 +177,27 @@ int32 FM_ValidateTable(FM_FreeSpaceTable_t *TablePtr)
/* Send event describing first error only*/
if (CountBad == 1)
{
- CFE_EVS_SendEvent(FM_TABLE_VERIFY_BAD_STATE_ERR_EID, CFE_EVS_ERROR,
- "Table verify error: index = %d, invalid state = %d",
- (int)i, (int)TablePtr->FileSys[i].State);
+ CFE_EVS_SendEvent(FM_TABLE_VERIFY_BAD_STATE_ERR_EID, CFE_EVS_EventType_ERROR,
+ "Table verify error: index = %d, invalid state = %d", (int)i,
+ (int)TablePtr->FileSys[i].State);
}
}
}
/* Display verify results */
- CFE_EVS_SendEvent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION,
- "Free Space Table verify results: good entries = %d, bad = %d, unused = %d",
- (int)CountGood, (int)CountBad, (int)CountUnused);
+ CFE_EVS_SendEvent(FM_TABLE_VERIFY_EID, CFE_EVS_EventType_INFORMATION,
+ "Free Space Table verify results: good entries = %d, bad = %d, unused = %d", (int)CountGood,
+ (int)CountBad, (int)CountUnused);
if (CountBad != 0)
{
Result = FM_TABLE_VALIDATION_ERR;
}
- return(Result);
+ return (Result);
} /* End FM_ValidateTable */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM table function -- acquire table data pointer */
@@ -203,26 +206,24 @@ int32 FM_ValidateTable(FM_FreeSpaceTable_t *TablePtr)
void FM_AcquireTablePointers(void)
{
- int32 Status = CFE_TBL_ERR_NEVER_LOADED;
+ int32 Status = CFE_TBL_ERR_NEVER_LOADED;
/* Allow cFE an opportunity to make table updates */
CFE_TBL_Manage(FM_GlobalData.FreeSpaceTableHandle);
/* Acquire pointer to file system free space table */
- Status = CFE_TBL_GetAddress((void *) &FM_GlobalData.FreeSpaceTablePtr,
- FM_GlobalData.FreeSpaceTableHandle);
+ Status = CFE_TBL_GetAddress((void *)&FM_GlobalData.FreeSpaceTablePtr, FM_GlobalData.FreeSpaceTableHandle);
if (Status == CFE_TBL_ERR_NEVER_LOADED)
{
/* Make sure we don't try to use the empty table buffer */
- FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *) NULL;
+ FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *)NULL;
}
return;
} /* End FM_AcquireTablePointers */
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM table function -- release table data pointer */
@@ -235,14 +236,12 @@ void FM_ReleaseTablePointers(void)
CFE_TBL_ReleaseAddress(FM_GlobalData.FreeSpaceTableHandle);
/* Prevent table pointer use while released */
- FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *) NULL;
+ FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *)NULL;
return;
} /* End FM_ReleaseTablePointers */
-
/************************/
/* End of File Comment */
/************************/
-
diff --git a/fsw/src/fm_tbl.h b/fsw/src/fm_tbl.h
index c902394..60a6276 100644
--- a/fsw/src/fm_tbl.h
+++ b/fsw/src/fm_tbl.h
@@ -1,23 +1,23 @@
/*
-** Filename: fm_tbl.h
+** Filename: fm_tbl.h
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: File Manager (FM) Table Definitions
**
@@ -63,7 +63,6 @@
**/
int32 FM_TableInit(void);
-
/**
** \brief Table Verification Function
**
@@ -86,7 +85,6 @@ int32 FM_TableInit(void);
**/
int32 FM_ValidateTable(FM_FreeSpaceTable_t *TableData);
-
/**
** \brief Acquire Table Data Pointer Function
**
@@ -104,8 +102,7 @@ int32 FM_ValidateTable(FM_FreeSpaceTable_t *TableData);
**
** \sa #FM_GlobalData_t
**/
-void FM_AcquireTablePointers(void);
-
+void FM_AcquireTablePointers(void);
/**
** \brief Release Table Data Pointer Function
@@ -125,8 +122,7 @@ void FM_AcquireTablePointers(void);
**
** \sa #FM_GlobalData_t
**/
-void FM_ReleaseTablePointers(void);
-
+void FM_ReleaseTablePointers(void);
#endif /* _fm_tbl_h_ */
diff --git a/fsw/src/fm_verify.h b/fsw/src/fm_verify.h
index e6b7446..d0fbc99 100644
--- a/fsw/src/fm_verify.h
+++ b/fsw/src/fm_verify.h
@@ -1,23 +1,23 @@
/*
-** Filename: fm_verify.h
+** Filename: fm_verify.h
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: File Manager (FM) Configuration Parameter Verification Header File
**
@@ -39,7 +39,6 @@
#include "fm_platform_cfg.h"
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM platform configuration parameters - application definitions */
@@ -48,23 +47,20 @@
/* Application name */
#ifndef FM_APP_NAME
- #error FM_APP_NAME must be defined!
+#error FM_APP_NAME must be defined!
#endif
-
/* Input command pipe */
#ifndef FM_APP_PIPE_NAME
- #error FM_APP_PIPE_NAME must be defined!
+#error FM_APP_PIPE_NAME must be defined!
#endif
-
/* Mission specific portion of application revision number */
#ifndef FM_MISSION_REV
- #error FM_MISSION_REV must be defined!
+#error FM_MISSION_REV must be defined!
#elif (FM_MISSION_REV < 0)
- #error FM_MISSION_REV must be greater than or equal to zero!
-#endif
-
+#error FM_MISSION_REV must be greater than or equal to zero!
+#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
@@ -74,26 +70,23 @@
/* Default directory listing output filename */
#ifndef FM_DIR_LIST_FILE_DEFNAME
- #error FM_DIR_LIST_FILE_DEFNAME must be defined!
+#error FM_DIR_LIST_FILE_DEFNAME must be defined!
#endif
-
/* Max number of entries written to a directory listing file */
#ifndef FM_DIR_LIST_FILE_ENTRIES
- #error FM_DIR_LIST_FILE_ENTRIES must be defined!
+#error FM_DIR_LIST_FILE_ENTRIES must be defined!
#elif FM_DIR_LIST_FILE_ENTRIES < 100
- #error FM_DIR_LIST_FILE_ENTRIES cannot be less than 100
+#error FM_DIR_LIST_FILE_ENTRIES cannot be less than 100
#elif FM_DIR_LIST_FILE_ENTRIES > 10000
- #error FM_DIR_LIST_FILE_ENTRIES cannot be greater than 10000 files
+#error FM_DIR_LIST_FILE_ENTRIES cannot be greater than 10000 files
#endif
-
/* cFE file header sub-type for directory list files */
#ifndef FM_DIR_LIST_FILE_SUBTYPE
- #error FM_DIR_LIST_FILE_SUBTYPE must be defined!
+#error FM_DIR_LIST_FILE_SUBTYPE must be defined!
#endif
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM platform configuration parameters - TLM packet definitions */
@@ -102,14 +95,13 @@
/* Number of entries in get dir list telemetry packet */
#ifndef FM_DIR_LIST_PKT_ENTRIES
- #error FM_DIR_LIST_PKT_ENTRIES must be defined!
+#error FM_DIR_LIST_PKT_ENTRIES must be defined!
#elif FM_DIR_LIST_PKT_ENTRIES < 10
- #error FM_DIR_LIST_PKT_ENTRIES cannot be less than 10
+#error FM_DIR_LIST_PKT_ENTRIES cannot be less than 10
#elif FM_DIR_LIST_PKT_ENTRIES > 100
- #error FM_DIR_LIST_PKT_ENTRIES cannot be greater than 100
+#error FM_DIR_LIST_PKT_ENTRIES cannot be greater than 100
#endif
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM platform configuration parameters - child task definitions */
@@ -118,73 +110,66 @@
/* Size of each child task file data read or write */
#ifndef FM_CHILD_FILE_BLOCK_SIZE
- #error FM_CHILD_FILE_BLOCK_SIZE must be defined!
+#error FM_CHILD_FILE_BLOCK_SIZE must be defined!
#elif FM_CHILD_FILE_BLOCK_SIZE < 256
- #error FM_CHILD_FILE_BLOCK_SIZE cannot be less than 256
+#error FM_CHILD_FILE_BLOCK_SIZE cannot be less than 256
#elif FM_CHILD_FILE_BLOCK_SIZE > 32768
- #error FM_CHILD_FILE_BLOCK_SIZE cannot be greater than 32K
+#error FM_CHILD_FILE_BLOCK_SIZE cannot be greater than 32K
#endif
/* Number of file blocks between task delays */
#ifndef FM_CHILD_FILE_LOOP_COUNT
- #error FM_CHILD_FILE_LOOP_COUNT must be defined!
+#error FM_CHILD_FILE_LOOP_COUNT must be defined!
#elif FM_CHILD_FILE_LOOP_COUNT < 1
- #error FM_CHILD_FILE_LOOP_COUNT cannot be less than 1
+#error FM_CHILD_FILE_LOOP_COUNT cannot be less than 1
#endif
-
/* Length of time for each task delay */
#ifndef FM_CHILD_FILE_SLEEP_MS
- #error FM_CHILD_FILE_SLEEP_MS must be defined!
+#error FM_CHILD_FILE_SLEEP_MS must be defined!
#elif FM_CHILD_FILE_SLEEP_MS < 0
- #error FM_CHILD_FILE_SLEEP_MS cannot be less than zero
+#error FM_CHILD_FILE_SLEEP_MS cannot be less than zero
#elif FM_CHILD_FILE_SLEEP_MS > 100
- #error FM_CHILD_FILE_SLEEP_MS cannot be greater than 100
+#error FM_CHILD_FILE_SLEEP_MS cannot be greater than 100
#endif
-
/* Number of entries in the child task command queue */
#ifndef FM_CHILD_QUEUE_DEPTH
- #error FM_CHILD_QUEUE_DEPTH must be defined!
+#error FM_CHILD_QUEUE_DEPTH must be defined!
#elif FM_CHILD_QUEUE_DEPTH < 1
- #error FM_CHILD_QUEUE_DEPTH cannot be less than 1
+#error FM_CHILD_QUEUE_DEPTH cannot be less than 1
#elif FM_CHILD_QUEUE_DEPTH > 10
- #error FM_CHILD_QUEUE_DEPTH cannot be greater than 10
+#error FM_CHILD_QUEUE_DEPTH cannot be greater than 10
#endif
-
/* Child task name */
#ifndef FM_CHILD_TASK_NAME
- #error FM_CHILD_TASK_NAME must be defined!
+#error FM_CHILD_TASK_NAME must be defined!
#endif
-
/* Child task stack size */
#ifndef FM_CHILD_TASK_STACK_SIZE
- #error FM_CHILD_TASK_STACK_SIZE must be defined!
+#error FM_CHILD_TASK_STACK_SIZE must be defined!
#elif FM_CHILD_TASK_STACK_SIZE < 2048
- #error FM_CHILD_TASK_STACK_SIZE cannot be less than 2048
+#error FM_CHILD_TASK_STACK_SIZE cannot be less than 2048
#elif FM_CHILD_TASK_STACK_SIZE > 20480
- #error FM_CHILD_TASK_STACK_SIZE cannot be greater than 20480
+#error FM_CHILD_TASK_STACK_SIZE cannot be greater than 20480
#endif
-
/* Child task priority */
#ifndef FM_CHILD_TASK_PRIORITY
- #error FM_CHILD_TASK_PRIORITY must be defined!
+#error FM_CHILD_TASK_PRIORITY must be defined!
#elif FM_CHILD_TASK_PRIORITY < 1
- #error FM_CHILD_TASK_PRIORITY must be greater than 0
+#error FM_CHILD_TASK_PRIORITY must be greater than 0
#elif FM_CHILD_TASK_PRIORITY > 255
- #error FM_CHILD_TASK_PRIORITY cannot be greater than 255
+#error FM_CHILD_TASK_PRIORITY cannot be greater than 255
#endif
-
/* Child task semaphore name */
#ifndef FM_CHILD_SEM_NAME
- #error FM_CHILD_SEM_NAME must be defined!
+#error FM_CHILD_SEM_NAME must be defined!
#endif
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM platform configuration parameters - table definitions */
@@ -193,44 +178,38 @@
/* cFE object name for free space table - not filename */
#ifndef FM_TABLE_CFE_NAME
- #error FM_TABLE_CFE_NAME must be defined!
+#error FM_TABLE_CFE_NAME must be defined!
#endif
-
/* Free space table filename - with path */
#ifndef FM_TABLE_DEF_NAME
- #error FM_TABLE_DEF_NAME must be defined!
+#error FM_TABLE_DEF_NAME must be defined!
#endif
-
/* Free space table filename - without path */
#ifndef FM_TABLE_FILENAME
- #error FM_TABLE_FILENAME must be defined!
+#error FM_TABLE_FILENAME must be defined!
#endif
-
/* Default description text for free space table */
#ifndef FM_TABLE_DEF_DESC
- #error FM_TABLE_DEF_DESC must be defined!
+#error FM_TABLE_DEF_DESC must be defined!
#endif
-
/* Number of free space table entries */
#ifndef FM_TABLE_ENTRY_COUNT
- #error FM_TABLE_ENTRY_COUNT must be defined!
+#error FM_TABLE_ENTRY_COUNT must be defined!
#elif FM_TABLE_ENTRY_COUNT < 1
- #error FM_TABLE_ENTRY_COUNT cannot be less than 1
+#error FM_TABLE_ENTRY_COUNT cannot be less than 1
#elif FM_TABLE_ENTRY_COUNT > 32
- #error FM_TABLE_ENTRY_COUNT cannot be greater than 32
+#error FM_TABLE_ENTRY_COUNT cannot be greater than 32
#endif
-
/* Table validation error code */
#ifndef FM_TABLE_VALIDATION_ERR
- #error FM_TABLE_VALIDATION_ERR must be defined!
+#error FM_TABLE_VALIDATION_ERR must be defined!
#endif
-
#endif /* _fm_verify_h_ */
/************************/
diff --git a/fsw/src/fm_version.h b/fsw/src/fm_version.h
index d3772f3..9db0cff 100644
--- a/fsw/src/fm_version.h
+++ b/fsw/src/fm_version.h
@@ -5,19 +5,19 @@
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: File Manager (FM) Version Information Header File
**
@@ -61,13 +61,12 @@
** use Mission_Rev zero (0).
**
*/
-#define FM_MAJOR_VERSION 2
-#define FM_MINOR_VERSION 5
-#define FM_REVISION 3
+#define FM_MAJOR_VERSION 2
+#define FM_MINOR_VERSION 6
+#define FM_REVISION 0
#endif /* _fm_version_h_ */
/************************/
/* End of File Comment */
/************************/
-
diff --git a/fsw/tables/fm_freespace.c b/fsw/tables/fm_freespace.c
index d990ede..00c6a50 100644
--- a/fsw/tables/fm_freespace.c
+++ b/fsw/tables/fm_freespace.c
@@ -1,23 +1,23 @@
/*
-** Filename: fm_freespace.c
+** Filename: fm_freespace.c
**
** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
** File Manager Application Version 2.5.3
**
** Copyright © 2020 United States Government as represented by the Administrator of
-** the National Aeronautics and Space Administration. All Rights Reserved.
+** the National Aeronautics and Space Administration. All Rights Reserved.
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-**
-** You may obtain a copy of the License at
-** http://www.apache.org/licenses/LICENSE-2.0
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
*
** Title: File Manager (FM) File System Free Space Table Data
**
@@ -41,11 +41,9 @@
/*
** FM file system free space table header
*/
-static CFE_TBL_FileDef_t CFE_TBL_FileDef __attribute__((__used__)) =
-{
- "FM_FreeSpaceTable", FM_APP_NAME "." FM_TABLE_CFE_NAME,
- FM_TABLE_DEF_DESC, FM_TABLE_FILENAME, sizeof(FM_FreeSpaceTable_t)
-};
+static CFE_TBL_FileDef_t CFE_TBL_FileDef
+ __attribute__((__used__)) = {"FM_FreeSpaceTable", FM_APP_NAME "." FM_TABLE_CFE_NAME, FM_TABLE_DEF_DESC,
+ FM_TABLE_FILENAME, sizeof(FM_FreeSpaceTable_t)};
/*
** FM file system free space table data
@@ -60,42 +58,49 @@ static CFE_TBL_FileDef_t CFE_TBL_FileDef __attribute__((__used__)) =
**
** -- the file system name for unused entries is ignored
*/
-FM_FreeSpaceTable_t FM_FreeSpaceTable =
-{
- {
- { /* - 0 - */
- FM_TABLE_ENTRY_ENABLED, /* Entry state (enabled, disabled, unused) */
- "/ram", /* File system name (logical mount point) */
- },
- { /* - 1 - */
- FM_TABLE_ENTRY_DISABLED, /* Entry state (enabled, disabled, unused) */
- "/boot", /* File system name (logical mount point) */
- },
- { /* - 2 - */
- FM_TABLE_ENTRY_DISABLED, /* Entry state (enabled, disabled, unused) */
- "/alt", /* File system name (logical mount point) */
- },
- { /* - 3 - */
- FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
- "", /* File system name (logical mount point) */
- },
- { /* - 4 - */
- FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
- "", /* File system name (logical mount point) */
- },
- { /* - 5 - */
- FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
- "", /* File system name (logical mount point) */
- },
- { /* - 6 - */
- FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
- "", /* File system name (logical mount point) */
- },
- { /* - 7 - */
- FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
- "", /* File system name (logical mount point) */
+FM_FreeSpaceTable_t FM_FreeSpaceTable = {
+ {
+ {
+ /* - 0 - */
+ FM_TABLE_ENTRY_ENABLED, /* Entry state (enabled, disabled, unused) */
+ "/ram", /* File system name (logical mount point) */
+ },
+ {
+ /* - 1 - */
+ FM_TABLE_ENTRY_DISABLED, /* Entry state (enabled, disabled, unused) */
+ "/boot", /* File system name (logical mount point) */
+ },
+ {
+ /* - 2 - */
+ FM_TABLE_ENTRY_DISABLED, /* Entry state (enabled, disabled, unused) */
+ "/alt", /* File system name (logical mount point) */
+ },
+ {
+ /* - 3 - */
+ FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
+ "", /* File system name (logical mount point) */
+ },
+ {
+ /* - 4 - */
+ FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
+ "", /* File system name (logical mount point) */
+ },
+ {
+ /* - 5 - */
+ FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
+ "", /* File system name (logical mount point) */
+ },
+ {
+ /* - 6 - */
+ FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
+ "", /* File system name (logical mount point) */
+ },
+ {
+ /* - 7 - */
+ FM_TABLE_ENTRY_UNUSED, /* Entry state (enabled, disabled, unused) */
+ "", /* File system name (logical mount point) */
+ },
},
- },
};
/************************/
diff --git a/fsw/unit_test/fm_app.c.gcov b/fsw/unit_test/fm_app.c.gcov
deleted file mode 100644
index 55b3504..0000000
--- a/fsw/unit_test/fm_app.c.gcov
+++ /dev/null
@@ -1,449 +0,0 @@
- -: 0:Source:../src/fm_app.c
- -: 0:Programs:5
- -: 1:/*
- -: 2:** $Id: fm_app.c.gcov 1.3.1.1 2017/01/25 00:20:23EST mdeschu Exp $
- -: 3:**
- -: 4:** Copyright (c) 2007-2014 United States Government as represented by the
- -: 5:** Administrator of the National Aeronautics and Space Administration.
- -: 6:** All Other Rights Reserved.
- -: 7:**
- -: 8:** This software was created at NASA's Goddard Space Flight Center.
- -: 9:** This software is governed by the NASA Open Source Agreement and may be
- -: 10:** used, distributed and modified only pursuant to the terms of that
- -: 11:** agreement.
- -: 12:**
- -: 13:** Title: Core Flight System (CFS) File Manager (FM) Application
- -: 14:**
- -: 15:** Purpose: The File Manager (FM) Application provides onboard file system
- -: 16:** management services by processing commands for copying and moving
- -: 17:** files, decompressing files, concatenating files, creating directories,
- -: 18:** deleting files and directories, and providing file and directory status.
- -: 19:** When the File Manager application receives a housekeeping request
- -: 20:** (scheduled within the scheduler application), FM reports it's housekeeping
- -: 21:** status values via telemetry messaging.
- -: 22:**
- -: 23:** Author: Susanne L. Strege, Code 582 NASA GSFC
- -: 24:**
- -: 25:** Notes:
- -: 26:**
- -: 27:*/
- -: 28:
- -: 29:#include "cfe.h"
- -: 30:#include "fm_msg.h"
- -: 31:#include "fm_msgdefs.h"
- -: 32:#include "fm_msgids.h"
- -: 33:#include "fm_app.h"
- -: 34:#include "fm_tbl.h"
- -: 35:#include "fm_child.h"
- -: 36:#include "fm_cmds.h"
- -: 37:#include "fm_cmd_utils.h"
- -: 38:#include "fm_events.h"
- -: 39:#include "fm_perfids.h"
- -: 40:#include "fm_platform_cfg.h"
- -: 41:#include "fm_version.h"
- -: 42:#include "fm_verify.h"
- -: 43:
- -: 44:#include
- -: 45:
- -: 46:
- -: 47:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 48:/* */
- -: 49:/* FM application global data */
- -: 50:/* */
- -: 51:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 52:
- -: 53:FM_GlobalData_t FM_GlobalData;
- -: 54:
- -: 55:
- -: 56:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 57:/* */
- -: 58:/* FM application -- entry point and main loop processor */
- -: 59:/* */
- -: 60:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 61:
- 4: 62:void FM_AppMain(void)
- -: 63:{
- 4: 64: uint32 RunStatus = CFE_ES_APP_RUN;
- -: 65: CFE_SB_MsgPtr_t MsgPtr;
- -: 66: int32 Result;
- -: 67:
- -: 68: /* Register application */
- 4: 69: Result = CFE_ES_RegisterApp();
- -: 70:
- -: 71: /* Performance Log (start time counter) */
- 4: 72: CFE_ES_PerfLogEntry(FM_APPMAIN_PERF_ID);
- -: 73:
- -: 74: /*
- -: 75: ** Perform application specific initialization...
- -: 76: */
- 4: 77: if (Result == CFE_SUCCESS)
- -: 78: {
- 3: 79: Result = FM_AppInit();
- -: 80: }
- -: 81:
- -: 82: /*
- -: 83: ** Check for start-up error...
- -: 84: */
- 4: 85: if (Result != CFE_SUCCESS)
- -: 86: {
- -: 87: /*
- -: 88: ** Set request to terminate main loop...
- -: 89: */
- 2: 90: RunStatus = CFE_ES_APP_ERROR;
- -: 91: }
- -: 92:
- -: 93: /*
- -: 94: ** Main process loop...
- -: 95: */
- 10: 96: while (CFE_ES_RunLoop(&RunStatus) == TRUE)
- -: 97: {
- -: 98: /* Performance Log (stop time counter) */
- 2: 99: CFE_ES_PerfLogExit(FM_APPMAIN_PERF_ID);
- -: 100:
- -: 101: /* Wait for the next Software Bus message */
- 2: 102: Result = CFE_SB_RcvMsg(&MsgPtr, FM_GlobalData.CmdPipe, CFE_SB_PEND_FOREVER);
- -: 103:
- -: 104: /* Performance Log (start time counter) */
- 2: 105: CFE_ES_PerfLogEntry(FM_APPMAIN_PERF_ID);
- -: 106:
- 2: 107: if (Result == CFE_SUCCESS)
- -: 108: {
- -: 109: /* Process Software Bus message */
- 1: 110: FM_ProcessPkt(MsgPtr);
- -: 111: }
- -: 112: else
- -: 113: {
- -: 114: /* Process Software Bus error */
- 1: 115: CFE_EVS_SendEvent(FM_SB_RECEIVE_ERR_EID, CFE_EVS_ERROR,
- -: 116: "Main loop error: SB receive: result = 0x%08X", (unsigned int)Result);
- -: 117:
- -: 118: /* Set request to terminate main loop */
- 1: 119: RunStatus = CFE_ES_APP_ERROR;
- -: 120: }
- -: 121: }
- -: 122:
- -: 123: /*
- -: 124: ** Send an event describing the reason for the termination...
- -: 125: */
- 4: 126: CFE_EVS_SendEvent(FM_EXIT_ERR_EID, CFE_EVS_ERROR,
- -: 127: "Application terminating: result = 0x%08X", (unsigned int)Result);
- -: 128:
- -: 129: /*
- -: 130: ** In case cFE Event Services is not working...
- -: 131: */
- 4: 132: CFE_ES_WriteToSysLog("FM application terminating: result = 0x%08X\n", (unsigned int)Result);
- -: 133:
- -: 134: /*
- -: 135: ** Performance Log (stop time counter)...
- -: 136: */
- 4: 137: CFE_ES_PerfLogExit(FM_APPMAIN_PERF_ID);
- -: 138:
- -: 139: /*
- -: 140: ** Let cFE kill the task (and any child tasks)...
- -: 141: */
- 4: 142: CFE_ES_ExitApp(RunStatus);
- -: 143:
- 4: 144:} /* End FM_AppMain */
- -: 145:
- -: 146:
- -: 147:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 148:/* */
- -: 149:/* FM application -- startup initialization processor */
- -: 150:/* */
- -: 151:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 152:
- 9: 153:int32 FM_AppInit(void)
- -: 154:{
- 9: 155: char *ErrText = "Initialization error:";
- -: 156: int32 Result;
- -: 157:
- -: 158: /* Initialize global data */
- 9: 159: CFE_PSP_MemSet(&FM_GlobalData, 0, sizeof(FM_GlobalData_t));
- -: 160:
- -: 161: /* Initialize child task semaphores */
- 9: 162: FM_GlobalData.ChildSemaphore = FM_CHILD_SEM_INVALID;
- 9: 163: FM_GlobalData.ChildQueueCountSem = FM_CHILD_SEM_INVALID;
- -: 164:
- -: 165: /* Register for event services */
- 9: 166: Result = CFE_EVS_Register(NULL, 0, CFE_EVS_BINARY_FILTER);
- -: 167:
- 9: 168: if (Result != CFE_SUCCESS)
- -: 169: {
- 2: 170: CFE_EVS_SendEvent(FM_STARTUP_EVENTS_ERR_EID, CFE_EVS_ERROR,
- -: 171: "%s register for event services: result = 0x%08X", ErrText, (unsigned int)Result);
- -: 172: }
- -: 173: else
- -: 174: {
- -: 175: /* Create Software Bus message pipe */
- 7: 176: Result = CFE_SB_CreatePipe(&FM_GlobalData.CmdPipe,
- -: 177: FM_APP_PIPE_DEPTH, FM_APP_PIPE_NAME);
- 7: 178: if (Result != CFE_SUCCESS)
- -: 179: {
- 1: 180: CFE_EVS_SendEvent(FM_STARTUP_CREAT_PIPE_ERR_EID, CFE_EVS_ERROR,
- -: 181: "%s create SB input pipe: result = 0x%08X", ErrText, (unsigned int)Result);
- -: 182: }
- -: 183: else
- -: 184: {
- -: 185: /* Subscribe to Housekeeping request commands */
- 6: 186: Result = CFE_SB_Subscribe(FM_SEND_HK_MID, FM_GlobalData.CmdPipe);
- -: 187:
- 6: 188: if (Result != CFE_SUCCESS)
- -: 189: {
- 1: 190: CFE_EVS_SendEvent(FM_STARTUP_SUBSCRIB_HK_ERR_EID, CFE_EVS_ERROR,
- -: 191: "%s subscribe to HK request: result = 0x%08X", ErrText, (unsigned int)Result);
- -: 192: }
- -: 193: }
- -: 194: }
- -: 195:
- -: 196: /* Keep indentation from getting too deep */
- 9: 197: if (Result == CFE_SUCCESS)
- -: 198: {
- -: 199: /* Subscribe to FM ground command packets */
- 5: 200: Result = CFE_SB_Subscribe(FM_CMD_MID, FM_GlobalData.CmdPipe);
- -: 201:
- 5: 202: if (Result != CFE_SUCCESS)
- -: 203: {
- 1: 204: CFE_EVS_SendEvent(FM_STARTUP_SUBSCRIB_GCMD_ERR_EID, CFE_EVS_ERROR,
- -: 205: "%s subscribe to FM commands: result = 0x%08X", ErrText, (unsigned int)Result);
- -: 206: }
- -: 207: else
- -: 208: {
- -: 209: /* Initialize FM tables */
- 4: 210: Result = FM_TableInit();
- -: 211:
- 4: 212: if (Result != CFE_SUCCESS)
- -: 213: {
- 1: 214: CFE_EVS_SendEvent(FM_STARTUP_TABLE_INIT_ERR_EID, CFE_EVS_ERROR,
- -: 215: "%s register free space table: result = 0x%08X", ErrText, (unsigned int)Result);
- -: 216: }
- -: 217: else
- -: 218: {
- -: 219: /* Create low priority child task */
- 3: 220: FM_ChildInit();
- -: 221:
- -: 222: /* Application startup event message */
- 3: 223: CFE_EVS_SendEvent(FM_STARTUP_EID, CFE_EVS_INFORMATION,
- -: 224: "Initialization complete: version %d.%d.%d.%d",
- -: 225: FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV);
- -: 226: }
- -: 227: }
- -: 228: }
- -: 229:
- 9: 230: return(Result);
- -: 231:
- -: 232:} /* End of FM_AppInit() */
- -: 233:
- -: 234:
- -: 235:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 236:/* */
- -: 237:/* FM application -- input packet processor */
- -: 238:/* */
- -: 239:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 240:
- 4: 241:void FM_ProcessPkt(CFE_SB_MsgPtr_t MessagePtr)
- -: 242:{
- -: 243: CFE_SB_MsgId_t MessageID;
- -: 244:
- 4: 245: MessageID = CFE_SB_GetMsgId(MessagePtr);
- -: 246:
- 4: 247: switch(MessageID)
- -: 248: {
- -: 249: /* Housekeeping request */
- -: 250: case FM_SEND_HK_MID:
- 2: 251: FM_ReportHK(MessagePtr);
- 2: 252: break;
- -: 253:
- -: 254: /* FM ground commands */
- -: 255: case FM_CMD_MID:
- 1: 256: FM_ProcessCmd(MessagePtr);
- 1: 257: break;
- -: 258:
- -: 259: default:
- 1: 260: CFE_EVS_SendEvent(FM_MID_ERR_EID, CFE_EVS_ERROR,
- -: 261: "Main loop error: invalid message ID: mid = 0x%04X", MessageID);
- -: 262: break;
- -: 263:
- -: 264: }
- -: 265:
- 4: 266: return;
- -: 267:
- -: 268:} /* End of FM_ProcessPkt */
- -: 269:
- -: 270:
- -: 271:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 272:/* */
- -: 273:/* FM application -- command packet processor */
- -: 274:/* */
- -: 275:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 276:
- 21: 277:void FM_ProcessCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 278:{
- 21: 279: boolean Result = TRUE;
- 21: 280: uint16 CommandCode = CFE_SB_GetCmdCode(MessagePtr);
- -: 281:
- -: 282: /* Invoke specific command handler */
- 21: 283: switch (CommandCode)
- -: 284: {
- -: 285: case FM_NOOP_CC:
- 2: 286: Result = FM_NoopCmd(MessagePtr);
- 2: 287: break;
- -: 288:
- -: 289: case FM_RESET_CC:
- 1: 290: Result = FM_ResetCountersCmd(MessagePtr);
- 1: 291: break;
- -: 292:
- -: 293: case FM_COPY_CC:
- 1: 294: Result = FM_CopyFileCmd(MessagePtr);
- 1: 295: break;
- -: 296:
- -: 297: case FM_MOVE_CC:
- 1: 298: Result = FM_MoveFileCmd(MessagePtr);
- 1: 299: break;
- -: 300:
- -: 301: case FM_RENAME_CC:
- 1: 302: Result = FM_RenameFileCmd(MessagePtr);
- 1: 303: break;
- -: 304:
- -: 305: case FM_DELETE_CC:
- 1: 306: Result = FM_DeleteFileCmd(MessagePtr);
- 1: 307: break;
- -: 308:
- -: 309: case FM_DELETE_ALL_CC:
- 1: 310: Result = FM_DeleteAllFilesCmd(MessagePtr);
- 1: 311: break;
- -: 312:
- -: 313: case FM_DECOMPRESS_CC:
- 1: 314: Result = FM_DecompressFileCmd(MessagePtr);
- 1: 315: break;
- -: 316:
- -: 317: case FM_CONCAT_CC:
- 1: 318: Result = FM_ConcatFilesCmd(MessagePtr);
- 1: 319: break;
- -: 320:
- -: 321: case FM_GET_FILE_INFO_CC:
- 1: 322: Result = FM_GetFileInfoCmd(MessagePtr);
- 1: 323: break;
- -: 324:
- -: 325: case FM_GET_OPEN_FILES_CC:
- 1: 326: Result = FM_GetOpenFilesCmd(MessagePtr);
- 1: 327: break;
- -: 328:
- -: 329: case FM_CREATE_DIR_CC:
- 1: 330: Result = FM_CreateDirectoryCmd(MessagePtr);
- 1: 331: break;
- -: 332:
- -: 333: case FM_DELETE_DIR_CC:
- 1: 334: Result = FM_DeleteDirectoryCmd(MessagePtr);
- 1: 335: break;
- -: 336:
- -: 337: case FM_GET_DIR_FILE_CC:
- 1: 338: Result = FM_GetDirListFileCmd(MessagePtr);
- 1: 339: break;
- -: 340:
- -: 341: case FM_GET_DIR_PKT_CC:
- 1: 342: Result = FM_GetDirListPktCmd(MessagePtr);
- 1: 343: break;
- -: 344:
- -: 345: case FM_GET_FREE_SPACE_CC:
- 1: 346: Result = FM_GetFreeSpaceCmd(MessagePtr);
- 1: 347: break;
- -: 348:
- -: 349: case FM_SET_TABLE_STATE_CC:
- 1: 350: Result = FM_SetTableStateCmd(MessagePtr);
- 1: 351: break;
- -: 352:
- -: 353: case FM_DELETE_INT_CC:
- 1: 354: Result = FM_DeleteFileCmd(MessagePtr);
- 1: 355: break;
- -: 356:
- -: 357: case FM_SET_FILE_PERM_CC:
- 1: 358: Result = FM_SetPermissionsCmd(MessagePtr);
- 1: 359: break;
- -: 360:
- -: 361: default:
- 1: 362: Result = FALSE;
- 1: 363: CFE_EVS_SendEvent(FM_CC_ERR_EID, CFE_EVS_ERROR,
- -: 364: "Main loop error: invalid command code: cc = %d", CommandCode);
- -: 365: break;
- -: 366: }
- -: 367:
- 21: 368: if (Result == TRUE)
- -: 369: {
- -: 370: /* Increment command success counter */
- 5: 371: if ((CommandCode != FM_RESET_CC) && (CommandCode != FM_DELETE_INT_CC))
- -: 372: {
- 3: 373: FM_GlobalData.CommandCounter++;
- -: 374: }
- -: 375: }
- -: 376: else
- -: 377: {
- -: 378: /* Increment command error counter */
- 16: 379: FM_GlobalData.CommandErrCounter++;
- -: 380: }
- -: 381:
- 21: 382: return;
- -: 383:
- -: 384:} /* End of FM_ProcessCmd */
- -: 385:
- -: 386:
- -: 387:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 388:/* */
- -: 389:/* FM application -- housekeeping request packet processor */
- -: 390:/* */
- -: 391:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 392:
- 2: 393:void FM_ReportHK(CFE_SB_MsgPtr_t MessagePtr)
- -: 394:{
- 2: 395: char *CmdText = "HK Request";
- -: 396: boolean Result;
- -: 397:
- -: 398: /* Verify command packet length */
- 2: 399: Result = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_HousekeepingCmd_t),
- -: 400: FM_HK_REQ_ERR_EID, CmdText);
- -: 401:
- -: 402: /* Report FM housekeeping telemetry data */
- 2: 403: if (Result == TRUE)
- -: 404: {
- -: 405: /* Release table pointers */
- 2: 406: FM_ReleaseTablePointers();
- -: 407:
- -: 408: /* Allow cFE chance to dump, update, etc. */
- 2: 409: FM_AcquireTablePointers();
- -: 410:
- -: 411: /* Initialize housekeeping telemetry message */
- 2: 412: CFE_SB_InitMsg(&FM_GlobalData.HousekeepingPkt, FM_HK_TLM_MID,
- -: 413: sizeof(FM_HousekeepingPkt_t), TRUE);
- -: 414:
- -: 415: /* Report application command counters */
- 2: 416: FM_GlobalData.HousekeepingPkt.CommandCounter = FM_GlobalData.CommandCounter;
- 2: 417: FM_GlobalData.HousekeepingPkt.CommandErrCounter = FM_GlobalData.CommandErrCounter;
- -: 418:
- -: 419: /* Report current number of open files */
- 2: 420: FM_GlobalData.HousekeepingPkt.NumOpenFiles = FM_GetOpenFilesData(NULL);
- -: 421:
- -: 422: /* Report child task command counters */
- 2: 423: FM_GlobalData.HousekeepingPkt.ChildCmdCounter = FM_GlobalData.ChildCmdCounter;
- 2: 424: FM_GlobalData.HousekeepingPkt.ChildCmdErrCounter = FM_GlobalData.ChildCmdErrCounter;
- 2: 425: FM_GlobalData.HousekeepingPkt.ChildCmdWarnCounter = FM_GlobalData.ChildCmdWarnCounter;
- -: 426:
- -: 427: /* Report number of commands in child task queue */
- 2: 428: FM_GlobalData.HousekeepingPkt.ChildQueueCount = FM_GlobalData.ChildQueueCount;
- -: 429:
- -: 430: /* Report current and previous commands executed by the child task */
- 2: 431: FM_GlobalData.HousekeepingPkt.ChildCurrentCC = FM_GlobalData.ChildCurrentCC;
- 2: 432: FM_GlobalData.HousekeepingPkt.ChildPreviousCC = FM_GlobalData.ChildPreviousCC;
- -: 433:
- -: 434: /* Timestamp and send housekeeping telemetry packet */
- 2: 435: CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.HousekeepingPkt);
- 2: 436: CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.HousekeepingPkt);
- -: 437: }
- -: 438:
- 2: 439: return;
- -: 440:
- -: 441:} /* End of FM_ReportHK */
- -: 442:
- -: 443:
- -: 444:/************************/
- -: 445:/* End of File Comment */
- -: 446:/************************/
- -: 447:
diff --git a/fsw/unit_test/fm_app_test.c b/fsw/unit_test/fm_app_test.c
index bac4613..6098bec 100644
--- a/fsw/unit_test/fm_app_test.c
+++ b/fsw/unit_test/fm_app_test.c
@@ -1,33 +1,33 @@
- /*************************************************************************
- ** File: fm_app_test.c
- **
- ** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
- ** File Manager Application Version 2.5.3
- **
- ** Copyright © 2020 United States Government as represented by the Administrator of
- ** the National Aeronautics and Space Administration. All Rights Reserved.
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- **
- ** You may obtain a copy of the License at
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- **
- ** Purpose:
- ** This file contains unit test cases for the functions contained in the file fm_app.c
- **
- ** References:
- ** Flight Software Branch C Coding Standard Version 1.2
- ** CFS Development Standards Document
- ** Notes:
- **
- *************************************************************************/
+/*************************************************************************
+** File: fm_app_test.c
+**
+** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
+** File Manager Application Version 2.5.3
+**
+** Copyright © 2020 United States Government as represented by the Administrator of
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+**
+** Purpose:
+** This file contains unit test cases for the functions contained in the file fm_app.c
+**
+** References:
+** Flight Software Branch C Coding Standard Version 1.2
+** CFS Development Standards Document
+** Notes:
+**
+*************************************************************************/
/*
* Includes
@@ -57,7 +57,7 @@
#include
#include
-int32 UT_FM_APP_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t *filestats)
+int32 UT_FM_APP_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t *filestats)
{
#ifdef OS_FILESTAT_MODE
filestats->FileModeBits = OS_FILESTAT_MODE_READ;
@@ -68,8 +68,6 @@ int32 UT_FM_APP_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t
return CFE_SUCCESS;
} /* end UT_FM_APP_TEST_CFE_OSFILEAPI_StatHookIsFile */
-
-
/*
* Function Definitions
*/
@@ -90,20 +88,18 @@ void FM_AppMain_Test_Nominal(void)
/* Execute the function being tested */
FM_AppMain();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_EXIT_ERR_EID, CFE_EVS_ERROR, "Application terminating: result = 0x00000000"),
- "Application terminating: result = 0x00000000");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_EXIT_ERR_EID, CFE_EVS_ERROR, "Application terminating: result = 0x00000000"),
+ "Application terminating: result = 0x00000000");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True
- (Ut_CFE_ES_SysLogWritten("FM application terminating: result = 0x00000000\n"),
- "FM application terminating: result = 0x00000000\n");
+ UtAssert_True(Ut_CFE_ES_SysLogWritten("FM application terminating: result = 0x00000000\n"),
+ "FM application terminating: result = 0x00000000\n");
- UtAssert_True (Ut_CFE_ES_GetSysLogQueueDepth() == 1, "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_ES_GetSysLogQueueDepth() == 1, "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
} /* end FM_AppMain_Test_Nominal */
@@ -114,19 +110,17 @@ void FM_AppMain_Test_RegisterAppError(void)
/* Execute the function being tested */
FM_AppMain();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_EXIT_ERR_EID, CFE_EVS_ERROR, "Application terminating: result = 0xFFFFFFFF"),
- "Application terminating: result = 0xFFFFFFFF");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_EXIT_ERR_EID, CFE_EVS_ERROR, "Application terminating: result = 0xFFFFFFFF"),
+ "Application terminating: result = 0xFFFFFFFF");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
- UtAssert_True
- (Ut_CFE_ES_SysLogWritten("FM application terminating: result = 0xFFFFFFFF\n"),
- "FM application terminating: result = 0xFFFFFFFF\n");
+ UtAssert_True(Ut_CFE_ES_SysLogWritten("FM application terminating: result = 0xFFFFFFFF\n"),
+ "FM application terminating: result = 0xFFFFFFFF\n");
- UtAssert_True (Ut_CFE_ES_GetSysLogQueueDepth() == 1, "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_ES_GetSysLogQueueDepth() == 1, "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
} /* end FM_AppMain_Test_RegisterAppError */
@@ -137,20 +131,18 @@ void FM_AppMain_Test_AppInitError(void)
/* Execute the function being tested */
FM_AppMain();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_EXIT_ERR_EID, CFE_EVS_ERROR, "Application terminating: result = 0xFFFFFFFF"),
- "Application terminating: result = 0xFFFFFFFF");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_EXIT_ERR_EID, CFE_EVS_ERROR, "Application terminating: result = 0xFFFFFFFF"),
+ "Application terminating: result = 0xFFFFFFFF");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True
- (Ut_CFE_ES_SysLogWritten("FM application terminating: result = 0xFFFFFFFF\n"),
- "FM application terminating: result = 0xFFFFFFFF\n");
+ UtAssert_True(Ut_CFE_ES_SysLogWritten("FM application terminating: result = 0xFFFFFFFF\n"),
+ "FM application terminating: result = 0xFFFFFFFF\n");
- UtAssert_True (Ut_CFE_ES_GetSysLogQueueDepth() == 1, "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_ES_GetSysLogQueueDepth() == 1, "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
} /* end FM_AppMain_Test_AppInitError */
@@ -170,68 +162,68 @@ void FM_AppMain_Test_SBError(void)
/* Execute the function being tested */
FM_AppMain();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_SB_RECEIVE_ERR_EID, CFE_EVS_ERROR, "Main loop error: SB receive: result = 0xFFFFFFFF"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_SB_RECEIVE_ERR_EID, CFE_EVS_ERROR, "Main loop error: SB receive: result = 0xFFFFFFFF"),
"Main loop error: SB receive: result = 0xFFFFFFFF");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_EXIT_ERR_EID, CFE_EVS_ERROR, "Application terminating: result = 0xFFFFFFFF"),
- "Application terminating: result = 0xFFFFFFFF");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_EXIT_ERR_EID, CFE_EVS_ERROR, "Application terminating: result = 0xFFFFFFFF"),
+ "Application terminating: result = 0xFFFFFFFF");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 3, "Ut_CFE_EVS_GetEventQueueDepth() == 3");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 3, "Ut_CFE_EVS_GetEventQueueDepth() == 3");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True
- (Ut_CFE_ES_SysLogWritten("FM application terminating: result = 0xFFFFFFFF\n"),
- "FM application terminating: result = 0xFFFFFFFF\n");
+ UtAssert_True(Ut_CFE_ES_SysLogWritten("FM application terminating: result = 0xFFFFFFFF\n"),
+ "FM application terminating: result = 0xFFFFFFFF\n");
- UtAssert_True (Ut_CFE_ES_GetSysLogQueueDepth() == 1, "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_ES_GetSysLogQueueDepth() == 1, "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
} /* end FM_AppMain_Test_SBError */
void FM_AppInit_Test_Nominal(void)
{
- int32 Result;
- char Message[125];
+ int32 Result;
+ char Message[125];
CFE_PSP_MemSet(&FM_GlobalData, 1, sizeof(FM_GlobalData_t));
/* Execute the function being tested */
Result = FM_AppInit();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
+ /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
modified by a subfunction, which we're not testing here */
- UtAssert_True (FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
- UtAssert_True (FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
-
- UtAssert_True (FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
- UtAssert_True (FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
- UtAssert_True (FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
- UtAssert_True (FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
- UtAssert_True (FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
- UtAssert_True (FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
- UtAssert_True (FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
- UtAssert_True (FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
- UtAssert_True (FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
+ UtAssert_True(FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
+ UtAssert_True(FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
+
+ UtAssert_True(FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
+ UtAssert_True(FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
+ UtAssert_True(FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
+ UtAssert_True(FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
+ UtAssert_True(FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
FM_DirListFileStats_t DirListFileStats;
- FM_DirListPkt_t DirListPkt;
- FM_FreeSpacePkt_t FreeSpacePkt;
- FM_FileInfoPkt_t FileInfoPkt;
- FM_OpenFilesPkt_t OpenFilesPkt;
- FM_HousekeepingPkt_t HousekeepingPkt;
+ FM_DirListPkt_t DirListPkt;
+ FM_FreeSpacePkt_t FreeSpacePkt;
+ FM_FileInfoPkt_t FileInfoPkt;
+ FM_OpenFilesPkt_t OpenFilesPkt;
+ FM_HousekeepingPkt_t HousekeepingPkt;
memset(&DirListFileStats, 0, sizeof(FM_DirListFileStats_t));
memset(&DirListPkt, 0, sizeof(FM_DirListPkt_t));
@@ -240,24 +232,35 @@ void FM_AppInit_Test_Nominal(void)
memset(&OpenFilesPkt, 0, sizeof(FM_OpenFilesPkt_t));
memset(&HousekeepingPkt, 0, sizeof(FM_HousekeepingPkt_t));
- UtAssert_True (memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0, "FM_GlobalData.DirListFileStats == 0");
- UtAssert_True (memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0, "FM_GlobalData.DirListPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0, "FM_GlobalData.FreeSpacePkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0, "FM_GlobalData.FileInfoPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0, "FM_GlobalData.OpenFilesPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0, "FM_GlobalData.HousekeepingPkt == 0");
- /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
- /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
-
- sprintf(Message, "Initialization complete: version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV);
- UtAssert_True (Ut_CFE_EVS_EventSent(FM_STARTUP_EID, CFE_EVS_INFORMATION, Message), Message);
-
- UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
-
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0,
+ "FM_GlobalData.DirListFileStats == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0,
+ "FM_GlobalData.DirListPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0,
+ "FM_GlobalData.FreeSpacePkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0,
+ "FM_GlobalData.FileInfoPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0,
+ "FM_GlobalData.OpenFilesPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0,
+ "FM_GlobalData.HousekeepingPkt == 0");
+ /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+ /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+
+ sprintf(Message, "Initialization complete: version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION,
+ FM_MISSION_REV);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_STARTUP_EID, CFE_EVS_INFORMATION, Message), Message);
+
+ UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
+
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_AppInit_Test_Nominal */
@@ -272,41 +275,45 @@ void FM_AppInit_Test_EVSRegisterError(void)
/* Execute the function being tested */
Result = FM_AppInit();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
+ /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
modified by a subfunction, which we're not testing here */
- UtAssert_True (FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
- UtAssert_True (FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
-
- UtAssert_True (FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
- UtAssert_True (FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
- UtAssert_True (FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
- UtAssert_True (FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
- UtAssert_True (FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
- UtAssert_True (FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
- UtAssert_True (FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
- UtAssert_True (FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
- UtAssert_True (FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
+ UtAssert_True(FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
+ UtAssert_True(FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
+
+ UtAssert_True(FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
+ UtAssert_True(FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
+ UtAssert_True(FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
+ UtAssert_True(FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
+ UtAssert_True(FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
FM_DirListFileStats_t DirListFileStats;
- FM_DirListPkt_t DirListPkt;
- FM_FreeSpacePkt_t FreeSpacePkt;
- FM_FileInfoPkt_t FileInfoPkt;
- FM_OpenFilesPkt_t OpenFilesPkt;
- FM_HousekeepingPkt_t HousekeepingPkt;
+ FM_DirListPkt_t DirListPkt;
+ FM_FreeSpacePkt_t FreeSpacePkt;
+ FM_FileInfoPkt_t FileInfoPkt;
+ FM_OpenFilesPkt_t OpenFilesPkt;
+ FM_HousekeepingPkt_t HousekeepingPkt;
memset(&DirListFileStats, 0, sizeof(FM_DirListFileStats_t));
memset(&DirListPkt, 0, sizeof(FM_DirListPkt_t));
@@ -315,22 +322,30 @@ void FM_AppInit_Test_EVSRegisterError(void)
memset(&OpenFilesPkt, 0, sizeof(FM_OpenFilesPkt_t));
memset(&HousekeepingPkt, 0, sizeof(FM_HousekeepingPkt_t));
- UtAssert_True (memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0, "FM_GlobalData.DirListFileStats == 0");
- UtAssert_True (memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0, "FM_GlobalData.DirListPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0, "FM_GlobalData.FreeSpacePkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0, "FM_GlobalData.FileInfoPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0, "FM_GlobalData.OpenFilesPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0, "FM_GlobalData.HousekeepingPkt == 0");
- /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
- /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
-
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_STARTUP_EVENTS_ERR_EID, CFE_EVS_ERROR, "Initialization error: register for event services: result = 0xFFFFFFFF"),
- "Initialization error: register for event services: result = 0xFFFFFFFF");
-
- UtAssert_True (Result == -1, "Result == -1");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0,
+ "FM_GlobalData.DirListFileStats == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0,
+ "FM_GlobalData.DirListPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0,
+ "FM_GlobalData.FreeSpacePkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0,
+ "FM_GlobalData.FileInfoPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0,
+ "FM_GlobalData.OpenFilesPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0,
+ "FM_GlobalData.HousekeepingPkt == 0");
+ /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+ /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_STARTUP_EVENTS_ERR_EID, CFE_EVS_ERROR,
+ "Initialization error: register for event services: result = 0xFFFFFFFF"),
+ "Initialization error: register for event services: result = 0xFFFFFFFF");
+
+ UtAssert_True(Result == -1, "Result == -1");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_AppInit_Test_EVSRegisterError */
@@ -345,41 +360,45 @@ void FM_AppInit_Test_SBCreatePipeError(void)
/* Execute the function being tested */
Result = FM_AppInit();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
+ /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
modified by a subfunction, which we're not testing here */
- UtAssert_True (FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
- UtAssert_True (FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
-
- UtAssert_True (FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
- UtAssert_True (FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
- UtAssert_True (FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
- UtAssert_True (FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
- UtAssert_True (FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
- UtAssert_True (FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
- UtAssert_True (FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
- UtAssert_True (FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
- UtAssert_True (FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
+ UtAssert_True(FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
+ UtAssert_True(FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
+
+ UtAssert_True(FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
+ UtAssert_True(FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
+ UtAssert_True(FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
+ UtAssert_True(FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
+ UtAssert_True(FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
FM_DirListFileStats_t DirListFileStats;
- FM_DirListPkt_t DirListPkt;
- FM_FreeSpacePkt_t FreeSpacePkt;
- FM_FileInfoPkt_t FileInfoPkt;
- FM_OpenFilesPkt_t OpenFilesPkt;
- FM_HousekeepingPkt_t HousekeepingPkt;
+ FM_DirListPkt_t DirListPkt;
+ FM_FreeSpacePkt_t FreeSpacePkt;
+ FM_FileInfoPkt_t FileInfoPkt;
+ FM_OpenFilesPkt_t OpenFilesPkt;
+ FM_HousekeepingPkt_t HousekeepingPkt;
memset(&DirListFileStats, 0, sizeof(FM_DirListFileStats_t));
memset(&DirListPkt, 0, sizeof(FM_DirListPkt_t));
@@ -388,22 +407,30 @@ void FM_AppInit_Test_SBCreatePipeError(void)
memset(&OpenFilesPkt, 0, sizeof(FM_OpenFilesPkt_t));
memset(&HousekeepingPkt, 0, sizeof(FM_HousekeepingPkt_t));
- UtAssert_True (memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0, "FM_GlobalData.DirListFileStats == 0");
- UtAssert_True (memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0, "FM_GlobalData.DirListPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0, "FM_GlobalData.FreeSpacePkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0, "FM_GlobalData.FileInfoPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0, "FM_GlobalData.OpenFilesPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0, "FM_GlobalData.HousekeepingPkt == 0");
- /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
- /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
-
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_STARTUP_CREAT_PIPE_ERR_EID, CFE_EVS_ERROR, "Initialization error: create SB input pipe: result = 0xFFFFFFFF"),
- "Initialization error: create SB input pipe: result = 0xFFFFFFFF");
-
- UtAssert_True (Result == -1, "Result == -1");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0,
+ "FM_GlobalData.DirListFileStats == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0,
+ "FM_GlobalData.DirListPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0,
+ "FM_GlobalData.FreeSpacePkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0,
+ "FM_GlobalData.FileInfoPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0,
+ "FM_GlobalData.OpenFilesPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0,
+ "FM_GlobalData.HousekeepingPkt == 0");
+ /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+ /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_STARTUP_CREAT_PIPE_ERR_EID, CFE_EVS_ERROR,
+ "Initialization error: create SB input pipe: result = 0xFFFFFFFF"),
+ "Initialization error: create SB input pipe: result = 0xFFFFFFFF");
+
+ UtAssert_True(Result == -1, "Result == -1");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_AppInit_Test_SBCreatePipeError */
@@ -418,41 +445,45 @@ void FM_AppInit_Test_SBSubscribeHKError(void)
/* Execute the function being tested */
Result = FM_AppInit();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
+ /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
modified by a subfunction, which we're not testing here */
- UtAssert_True (FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
- UtAssert_True (FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
-
- UtAssert_True (FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
- UtAssert_True (FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
- UtAssert_True (FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
- UtAssert_True (FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
- UtAssert_True (FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
- UtAssert_True (FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
- UtAssert_True (FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
- UtAssert_True (FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
- UtAssert_True (FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
+ UtAssert_True(FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
+ UtAssert_True(FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
+
+ UtAssert_True(FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
+ UtAssert_True(FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
+ UtAssert_True(FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
+ UtAssert_True(FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
+ UtAssert_True(FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
FM_DirListFileStats_t DirListFileStats;
- FM_DirListPkt_t DirListPkt;
- FM_FreeSpacePkt_t FreeSpacePkt;
- FM_FileInfoPkt_t FileInfoPkt;
- FM_OpenFilesPkt_t OpenFilesPkt;
- FM_HousekeepingPkt_t HousekeepingPkt;
+ FM_DirListPkt_t DirListPkt;
+ FM_FreeSpacePkt_t FreeSpacePkt;
+ FM_FileInfoPkt_t FileInfoPkt;
+ FM_OpenFilesPkt_t OpenFilesPkt;
+ FM_HousekeepingPkt_t HousekeepingPkt;
memset(&DirListFileStats, 0, sizeof(FM_DirListFileStats_t));
memset(&DirListPkt, 0, sizeof(FM_DirListPkt_t));
@@ -461,22 +492,30 @@ void FM_AppInit_Test_SBSubscribeHKError(void)
memset(&OpenFilesPkt, 0, sizeof(FM_OpenFilesPkt_t));
memset(&HousekeepingPkt, 0, sizeof(FM_HousekeepingPkt_t));
- UtAssert_True (memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0, "FM_GlobalData.DirListFileStats == 0");
- UtAssert_True (memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0, "FM_GlobalData.DirListPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0, "FM_GlobalData.FreeSpacePkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0, "FM_GlobalData.FileInfoPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0, "FM_GlobalData.OpenFilesPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0, "FM_GlobalData.HousekeepingPkt == 0");
- /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
- /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
-
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_STARTUP_SUBSCRIB_HK_ERR_EID, CFE_EVS_ERROR, "Initialization error: subscribe to HK request: result = 0xFFFFFFFF"),
- "Initialization error: subscribe to HK request: result = 0xFFFFFFFF");
-
- UtAssert_True (Result == -1, "Result == -1");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0,
+ "FM_GlobalData.DirListFileStats == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0,
+ "FM_GlobalData.DirListPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0,
+ "FM_GlobalData.FreeSpacePkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0,
+ "FM_GlobalData.FileInfoPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0,
+ "FM_GlobalData.OpenFilesPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0,
+ "FM_GlobalData.HousekeepingPkt == 0");
+ /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+ /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_STARTUP_SUBSCRIB_HK_ERR_EID, CFE_EVS_ERROR,
+ "Initialization error: subscribe to HK request: result = 0xFFFFFFFF"),
+ "Initialization error: subscribe to HK request: result = 0xFFFFFFFF");
+
+ UtAssert_True(Result == -1, "Result == -1");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_AppInit_Test_SBSubscribeHKError */
@@ -491,41 +530,45 @@ void FM_AppInit_Test_SBSubscribeFMError(void)
/* Execute the function being tested */
Result = FM_AppInit();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
+ /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
modified by a subfunction, which we're not testing here */
- UtAssert_True (FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
- UtAssert_True (FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
-
- UtAssert_True (FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
- UtAssert_True (FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
- UtAssert_True (FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
- UtAssert_True (FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
- UtAssert_True (FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
- UtAssert_True (FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
- UtAssert_True (FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
- UtAssert_True (FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
- UtAssert_True (FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
+ UtAssert_True(FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
+ UtAssert_True(FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
+
+ UtAssert_True(FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
+ UtAssert_True(FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
+ UtAssert_True(FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
+ UtAssert_True(FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
+ UtAssert_True(FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
FM_DirListFileStats_t DirListFileStats;
- FM_DirListPkt_t DirListPkt;
- FM_FreeSpacePkt_t FreeSpacePkt;
- FM_FileInfoPkt_t FileInfoPkt;
- FM_OpenFilesPkt_t OpenFilesPkt;
- FM_HousekeepingPkt_t HousekeepingPkt;
+ FM_DirListPkt_t DirListPkt;
+ FM_FreeSpacePkt_t FreeSpacePkt;
+ FM_FileInfoPkt_t FileInfoPkt;
+ FM_OpenFilesPkt_t OpenFilesPkt;
+ FM_HousekeepingPkt_t HousekeepingPkt;
memset(&DirListFileStats, 0, sizeof(FM_DirListFileStats_t));
memset(&DirListPkt, 0, sizeof(FM_DirListPkt_t));
@@ -534,22 +577,30 @@ void FM_AppInit_Test_SBSubscribeFMError(void)
memset(&OpenFilesPkt, 0, sizeof(FM_OpenFilesPkt_t));
memset(&HousekeepingPkt, 0, sizeof(FM_HousekeepingPkt_t));
- UtAssert_True (memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0, "FM_GlobalData.DirListFileStats == 0");
- UtAssert_True (memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0, "FM_GlobalData.DirListPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0, "FM_GlobalData.FreeSpacePkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0, "FM_GlobalData.FileInfoPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0, "FM_GlobalData.OpenFilesPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0, "FM_GlobalData.HousekeepingPkt == 0");
- /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
- /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
-
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_STARTUP_SUBSCRIB_GCMD_ERR_EID, CFE_EVS_ERROR, "Initialization error: subscribe to FM commands: result = 0xFFFFFFFF"),
- "Initialization error: subscribe to FM commands: result = 0xFFFFFFFF");
-
- UtAssert_True (Result == -1, "Result == -1");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0,
+ "FM_GlobalData.DirListFileStats == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0,
+ "FM_GlobalData.DirListPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0,
+ "FM_GlobalData.FreeSpacePkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0,
+ "FM_GlobalData.FileInfoPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0,
+ "FM_GlobalData.OpenFilesPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0,
+ "FM_GlobalData.HousekeepingPkt == 0");
+ /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+ /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_STARTUP_SUBSCRIB_GCMD_ERR_EID, CFE_EVS_ERROR,
+ "Initialization error: subscribe to FM commands: result = 0xFFFFFFFF"),
+ "Initialization error: subscribe to FM commands: result = 0xFFFFFFFF");
+
+ UtAssert_True(Result == -1, "Result == -1");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_AppInit_Test_SBSubscribeFMError */
@@ -564,41 +615,45 @@ void FM_AppInit_Test_TableInitError(void)
/* Execute the function being tested */
Result = FM_AppInit();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
- UtAssert_True (FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID, "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID");
+ UtAssert_True(FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID,
+ "FM_GlobalData.ChildQueueCountSem == FM_CHILD_SEM_INVALID");
- /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
+ /* Not verifying that FM_GlobalData.FreeSpaceTablePtr is set to 0 when FM_GlobalData is set to 0, because it's
modified by a subfunction, which we're not testing here */
- UtAssert_True (FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
- UtAssert_True (FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
-
- UtAssert_True (FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
- UtAssert_True (FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
- UtAssert_True (FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
- UtAssert_True (FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
- UtAssert_True (FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
- UtAssert_True (FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
- UtAssert_True (FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
- UtAssert_True (FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
- UtAssert_True (FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
+ UtAssert_True(FM_GlobalData.FreeSpaceTableHandle == 0, "FM_GlobalData.FreeSpaceTableHandle == 0");
+ UtAssert_True(FM_GlobalData.CmdPipe == 0, "FM_GlobalData.CmdPipe == 0");
+
+ UtAssert_True(FM_GlobalData.ChildTaskID == 0, "FM_GlobalData.ChildTaskID == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
+ UtAssert_True(FM_GlobalData.Spare8a == 0, "FM_GlobalData.Spare8a == 0");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 0, "FM_GlobalData.ChildPreviousCC == 0");
+ UtAssert_True(FM_GlobalData.Spare8b == 0, "FM_GlobalData.Spare8b == 0");
+ UtAssert_True(FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
+ UtAssert_True(FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
FM_DirListFileStats_t DirListFileStats;
- FM_DirListPkt_t DirListPkt;
- FM_FreeSpacePkt_t FreeSpacePkt;
- FM_FileInfoPkt_t FileInfoPkt;
- FM_OpenFilesPkt_t OpenFilesPkt;
- FM_HousekeepingPkt_t HousekeepingPkt;
+ FM_DirListPkt_t DirListPkt;
+ FM_FreeSpacePkt_t FreeSpacePkt;
+ FM_FileInfoPkt_t FileInfoPkt;
+ FM_OpenFilesPkt_t OpenFilesPkt;
+ FM_HousekeepingPkt_t HousekeepingPkt;
memset(&DirListFileStats, 0, sizeof(FM_DirListFileStats_t));
memset(&DirListPkt, 0, sizeof(FM_DirListPkt_t));
@@ -607,442 +662,470 @@ void FM_AppInit_Test_TableInitError(void)
memset(&OpenFilesPkt, 0, sizeof(FM_OpenFilesPkt_t));
memset(&HousekeepingPkt, 0, sizeof(FM_HousekeepingPkt_t));
- UtAssert_True (memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0, "FM_GlobalData.DirListFileStats == 0");
- UtAssert_True (memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0, "FM_GlobalData.DirListPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0, "FM_GlobalData.FreeSpacePkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0, "FM_GlobalData.FileInfoPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0, "FM_GlobalData.OpenFilesPkt == 0");
- UtAssert_True (memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0, "FM_GlobalData.HousekeepingPkt == 0");
- /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
- /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by a subfunction, which we're not testing here */
-
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_STARTUP_TABLE_INIT_ERR_EID, CFE_EVS_ERROR, "Initialization error: register free space table: result = 0xFFFFFFFF"),
- "Initialization error: register free space table: result = 0xFFFFFFFF");
-
- UtAssert_True (Result == -1, "Result == -1");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListFileStats, &DirListFileStats, sizeof(FM_DirListFileStats_t)) == 0,
+ "FM_GlobalData.DirListFileStats == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.DirListPkt, &DirListPkt, sizeof(FM_DirListPkt_t)) == 0,
+ "FM_GlobalData.DirListPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FreeSpacePkt, &FreeSpacePkt, sizeof(FM_FreeSpacePkt_t)) == 0,
+ "FM_GlobalData.FreeSpacePkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.FileInfoPkt, &FileInfoPkt, sizeof(FM_FileInfoPkt_t)) == 0,
+ "FM_GlobalData.FileInfoPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.OpenFilesPkt, &OpenFilesPkt, sizeof(FM_OpenFilesPkt_t)) == 0,
+ "FM_GlobalData.OpenFilesPkt == 0");
+ UtAssert_True(memcmp(&FM_GlobalData.HousekeepingPkt, &HousekeepingPkt, sizeof(FM_HousekeepingPkt_t)) == 0,
+ "FM_GlobalData.HousekeepingPkt == 0");
+ /* Not verifying that FM_GlobalData.ChildBuffer is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+ /* Not verifying that FM_GlobalData.ChildQueue is set to 0 when FM_GlobalData is set to 0, because it's modified by
+ * a subfunction, which we're not testing here */
+
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_STARTUP_TABLE_INIT_ERR_EID, CFE_EVS_ERROR,
+ "Initialization error: register free space table: result = 0xFFFFFFFF"),
+ "Initialization error: register free space table: result = 0xFFFFFFFF");
+
+ UtAssert_True(Result == -1, "Result == -1");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_AppInit_Test_TableInitError */
void FM_ProcessPkt_Test_HK(void)
{
- FM_HousekeepingCmd_t CmdPacket;
+ FM_HousekeepingCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_SEND_HK_MID, sizeof(FM_HousekeepingCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_SEND_HK_MID, sizeof(FM_HousekeepingCmd_t), TRUE);
/* Execute the function being tested */
FM_ProcessPkt((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Nothing to verify */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_ProcessPkt_Test_HK */
void FM_ProcessPkt_Test_Cmd(void)
{
- FM_NoopCmd_t CmdPacket;
- char Message[125];
+ FM_NoopCmd_t CmdPacket;
+ char Message[125];
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_NoopCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_NoopCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_NOOP_CC);
/* Execute the function being tested */
FM_ProcessPkt((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- sprintf(Message, "No-op command: FM version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV);
- UtAssert_True (Ut_CFE_EVS_EventSent(FM_NOOP_CMD_EID, CFE_EVS_INFORMATION, Message), Message);
- /* Note: The above event message occurs in subfunction FM_ProcessCmd (in its subfunction FM_NoopCmd). We check for it here to verify that FM_ProcessCmd was reached. */
+ sprintf(Message, "No-op command: FM version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION,
+ FM_MISSION_REV);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_NOOP_CMD_EID, CFE_EVS_INFORMATION, Message), Message);
+ /* Note: The above event message occurs in subfunction FM_ProcessCmd (in its subfunction FM_NoopCmd). We check for
+ * it here to verify that FM_ProcessCmd was reached. */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessPkt_Test_Cmd */
void FM_ProcessPkt_Test_Error(void)
{
- FM_NoopCmd_t CmdPacket;
+ FM_NoopCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, 99, sizeof(FM_NoopCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, 99, sizeof(FM_NoopCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_NOOP_CC);
/* Execute the function being tested */
FM_ProcessPkt((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_MID_ERR_EID, CFE_EVS_ERROR, "Main loop error: invalid message ID: mid = 0x0063"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_MID_ERR_EID, CFE_EVS_ERROR, "Main loop error: invalid message ID: mid = 0x0063"),
"Main loop error: invalid message ID: mid = 0x0063");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessPkt_Test_Error */
void FM_ProcessCmd_Test_Noop(void)
{
- FM_NoopCmd_t CmdPacket;
- char Message[125];
+ FM_NoopCmd_t CmdPacket;
+ char Message[125];
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_NoopCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_NoopCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_NOOP_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- sprintf(Message, "No-op command: FM version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV);
- UtAssert_True (Ut_CFE_EVS_EventSent(FM_NOOP_CMD_EID, CFE_EVS_INFORMATION, Message), Message);
- /* Note: The above event message occurs in subfunction FM_NoopCmd. We check for it here to verify that FM_NoopCmd was reached. */
+ sprintf(Message, "No-op command: FM version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION,
+ FM_MISSION_REV);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_NOOP_CMD_EID, CFE_EVS_INFORMATION, Message), Message);
+ /* Note: The above event message occurs in subfunction FM_NoopCmd. We check for it here to verify that FM_NoopCmd
+ * was reached. */
- UtAssert_True (FM_GlobalData.CommandCounter == 1, "FM_GlobalData.CommandCounter == 1");
+ UtAssert_True(FM_GlobalData.CommandCounter == 1, "FM_GlobalData.CommandCounter == 1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_Noop */
void FM_ProcessCmd_Test_Reset(void)
{
- FM_ResetCmd_t CmdPacket;
+ FM_ResetCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_ResetCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_ResetCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_RESET_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_RESET_CMD_EID, CFE_EVS_DEBUG, "Reset Counters command"),
- "Reset Counters command");
- /* Note: The above event message occurs in subfunction FM_ResetCountersCmd. We check for it here to verify that FM_ResetCountersCmd was reached. */
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_RESET_CMD_EID, CFE_EVS_DEBUG, "Reset Counters command"),
+ "Reset Counters command");
+ /* Note: The above event message occurs in subfunction FM_ResetCountersCmd. We check for it here to verify that
+ * FM_ResetCountersCmd was reached. */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_Reset */
void FM_ProcessCmd_Test_Copy(void)
{
- FM_CopyFileCmd_t CmdPacket;
+ FM_CopyFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_CopyFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_CopyFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_COPY_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_CopyFileCmd. We check it here to verify that FM_CopyFileCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_CopyFileCmd. We check it here to verify that
+ * FM_CopyFileCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_Copy */
void FM_ProcessCmd_Test_Move(void)
{
- FM_MoveFileCmd_t CmdPacket;
+ FM_MoveFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_MoveFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_MoveFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_MOVE_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_MoveFileCmd. We check it here to verify that FM_MoveFileCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_MoveFileCmd. We check it here to verify that
+ * FM_MoveFileCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_Move */
void FM_ProcessCmd_Test_Rename(void)
{
- FM_RenameFileCmd_t CmdPacket;
+ FM_RenameFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_RenameFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_RenameFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_RENAME_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_RenameFileCmd. We check it here to verify that FM_RenameFileCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_RenameFileCmd. We check it here to verify that
+ * FM_RenameFileCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_Rename */
void FM_ProcessCmd_Test_Delete(void)
{
- FM_DeleteFileCmd_t CmdPacket;
+ FM_DeleteFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_DELETE_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_DeleteFileCmd. We check it here to verify that FM_DeleteFileCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_DeleteFileCmd. We check it here to verify that
+ * FM_DeleteFileCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_Delete */
void FM_ProcessCmd_Test_DeleteAll(void)
{
- FM_DeleteAllCmd_t CmdPacket;
+ FM_DeleteAllCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteAllCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteAllCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_DELETE_ALL_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_DeleteAllFilesCmd. We check it here to verify that FM_DeleteAllFilesCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_DeleteAllFilesCmd. We check it here to verify that
+ * FM_DeleteAllFilesCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_DeleteAll */
+#ifdef FM_INCLUDE_DECOMPRESS
void FM_ProcessCmd_Test_Decompress(void)
{
- FM_DecompressCmd_t CmdPacket;
+ FM_DecompressCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DecompressCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DecompressCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_DECOMPRESS_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_DecompressFileCmd. We check it here to verify that FM_DecompressFileCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_DecompressFileCmd. We check it here to verify that
+ * FM_DecompressFileCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_Decompress */
+#endif
void FM_ProcessCmd_Test_Concat(void)
{
- FM_ConcatCmd_t CmdPacket;
+ FM_ConcatCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_ConcatCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_ConcatCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_CONCAT_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_ConcatFilesCmd. We check it here to verify that FM_ConcatFilesCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_ConcatFilesCmd. We check it here to verify that
+ * FM_ConcatFilesCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_Concat */
void FM_ProcessCmd_Test_GetFileInfo(void)
{
- FM_GetFileInfoCmd_t CmdPacket;
+ FM_GetFileInfoCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetFileInfoCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetFileInfoCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_FILE_INFO_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_GetFileInfoCmd. We check it here to verify that FM_GetFileInfoCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_GetFileInfoCmd. We check it here to verify that
+ * FM_GetFileInfoCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_GetFileInfo */
void FM_ProcessCmd_Test_GetOpenFiles(void)
{
- FM_GetOpenFilesCmd_t CmdPacket;
+ FM_GetOpenFilesCmd_t CmdPacket;
- /* FM_GetOpenFiles calls OS_FDGetInfo, so need to set the return code so that FM_GetOpenFiles isn't
+ /* FM_GetOpenFiles calls OS_FDGetInfo, so need to set the return code so that FM_GetOpenFiles isn't
* misled by a successful return from OS_FDGetInfo */
- Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_FDGETINFO_INDEX, OS_FS_ERR_INVALID_FD, 0);
+ Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_FDGETINFO_INDEX, OS_ERR_INVALID_ID, 0);
Ut_OSFILEAPI_ContinueReturnCodeAfterCountZero(UT_OSFILEAPI_FDGETINFO_INDEX);
-
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetOpenFilesCmd_t), TRUE);
+
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetOpenFilesCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_OPEN_FILES_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_OPEN_FILES_CMD_EID, CFE_EVS_DEBUG, "Get Open Files command"),
- "Get Open Files command");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_OPEN_FILES_CMD_EID, CFE_EVS_DEBUG, "Get Open Files command"),
+ "Get Open Files command");
- UtAssert_True (FM_GlobalData.CommandCounter == 1, "FM_GlobalData.CommandCounter == 1");
- /* Note: The above variable is modified in subfunction FM_GetOpenFilesCmd. We check it here to verify that FM_GetOpenFilesCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandCounter == 1, "FM_GlobalData.CommandCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_GetOpenFilesCmd. We check it here to verify that
+ * FM_GetOpenFilesCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_GetOpenFiles */
void FM_ProcessCmd_Test_CreateDir(void)
{
- FM_CreateDirCmd_t CmdPacket;
+ FM_CreateDirCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_CreateDirCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_CreateDirCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_CREATE_DIR_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_CreateDirectoryCmd. We check it here to verify that FM_CreateDirectoryCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_CreateDirectoryCmd. We check it here to verify that
+ * FM_CreateDirectoryCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_CreateDir */
void FM_ProcessCmd_Test_DeleteDir(void)
{
- FM_DeleteDirCmd_t CmdPacket;
+ FM_DeleteDirCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteDirCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteDirCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_DELETE_DIR_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_DeleteDirectoryCmd. We check it here to verify that FM_DeleteDirectoryCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_DeleteDirectoryCmd. We check it here to verify that
+ * FM_DeleteDirectoryCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_DeleteDir */
void FM_ProcessCmd_Test_GetDirFile(void)
{
- FM_GetDirFileCmd_t CmdPacket;
+ FM_GetDirFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_DIR_FILE_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_GetDirListFileCmd. We check it here to verify that FM_GetDirListFileCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_GetDirListFileCmd. We check it here to verify that
+ * FM_GetDirListFileCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_GetDirFile */
void FM_ProcessCmd_Test_GetDirPkt(void)
{
- FM_GetDirPktCmd_t CmdPacket;
+ FM_GetDirPktCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirPktCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirPktCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_DIR_PKT_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_GetDirListPktCmd. We check it here to verify that FM_GetDirListPktCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_GetDirListPktCmd. We check it here to verify that
+ * FM_GetDirListPktCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_GetDirPkt */
void FM_ProcessCmd_Test_GetFreeSpace(void)
{
- FM_GetFreeSpaceCmd_t CmdPacket;
+ FM_GetFreeSpaceCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetFreeSpaceCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetFreeSpaceCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_FREE_SPACE_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_GetFreeSpaceCmd. We check it here to verify that FM_GetFreeSpaceCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_GetFreeSpaceCmd. We check it here to verify that
+ * FM_GetFreeSpaceCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_GetFreeSpace */
void FM_ProcessCmd_Test_SetTableState(void)
{
- FM_SetTableStateCmd_t CmdPacket;
+ FM_SetTableStateCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_SET_TABLE_STATE_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_SetTableStateCmd. We check it here to verify that FM_SetTableStateCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_SetTableStateCmd. We check it here to verify that
+ * FM_SetTableStateCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_SetTableState */
-
void FM_ProcessCmd_Test_SetPermissions(void)
{
- FM_SetPermCmd_t CmdPacket;
+ FM_SetPermCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_SetPermCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_SetPermCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_SET_FILE_PERM_CC);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
- /* Note: The above variable is modified in subfunction FM_SetPermissionsCmd. We check it here to verify that FM_SetTableStateCmd was reached. */
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 1, "FM_GlobalData.CommandErrCounter == 1");
+ /* Note: The above variable is modified in subfunction FM_SetPermissionsCmd. We check it here to verify that
+ * FM_SetTableStateCmd was reached. */
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_SetTableState */
void FM_ProcessCmd_Test_DeleteInt(void)
{
- FM_DeleteFileCmd_t CmdPacket;
+ FM_DeleteFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_DELETE_INT_CC);
- strncpy (CmdPacket.Filename, "filename.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Filename, "filename.txt", OS_MAX_PATH_LEN);
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_APP_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -1050,26 +1133,25 @@ void FM_ProcessCmd_Test_DeleteInt(void)
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
/* Nothing to verify */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_ProcessCmd_Test_DeleteInt */
void FM_ProcessCmd_Test_InvalidCommandCode(void)
{
- FM_DeleteFileCmd_t CmdPacket;
+ FM_DeleteFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, 99);
/* Execute the function being tested */
FM_ProcessCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CC_ERR_EID, CFE_EVS_ERROR, "Main loop error: invalid command code: cc = 99"),
- "Main loop error: invalid command code: cc = 99");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CC_ERR_EID, CFE_EVS_ERROR, "Main loop error: invalid command code: cc = 99"),
+ "Main loop error: invalid command code: cc = 99");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ProcessCmd_Test_InvalidCommandCode */
@@ -1084,8 +1166,10 @@ void FM_App_Test_AddTestCases(void)
UtTest_Add(FM_AppInit_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_AppInit_Test_Nominal");
UtTest_Add(FM_AppInit_Test_EVSRegisterError, FM_Test_Setup, FM_Test_TearDown, "FM_AppInit_Test_EVSRegisterError");
UtTest_Add(FM_AppInit_Test_SBCreatePipeError, FM_Test_Setup, FM_Test_TearDown, "FM_AppInit_Test_SBCreatePipeError");
- UtTest_Add(FM_AppInit_Test_SBSubscribeHKError, FM_Test_Setup, FM_Test_TearDown, "FM_AppInit_Test_SBSubscribeHKError");
- UtTest_Add(FM_AppInit_Test_SBSubscribeFMError, FM_Test_Setup, FM_Test_TearDown, "FM_AppInit_Test_SBSubscribeFMError");
+ UtTest_Add(FM_AppInit_Test_SBSubscribeHKError, FM_Test_Setup, FM_Test_TearDown,
+ "FM_AppInit_Test_SBSubscribeHKError");
+ UtTest_Add(FM_AppInit_Test_SBSubscribeFMError, FM_Test_Setup, FM_Test_TearDown,
+ "FM_AppInit_Test_SBSubscribeFMError");
UtTest_Add(FM_AppInit_Test_TableInitError, FM_Test_Setup, FM_Test_TearDown, "FM_AppInit_Test_TableInitError");
UtTest_Add(FM_ProcessPkt_Test_HK, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessPkt_Test_HK");
UtTest_Add(FM_ProcessPkt_Test_Cmd, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessPkt_Test_Cmd");
@@ -1097,7 +1181,9 @@ void FM_App_Test_AddTestCases(void)
UtTest_Add(FM_ProcessCmd_Test_Rename, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_Rename");
UtTest_Add(FM_ProcessCmd_Test_Delete, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_Delete");
UtTest_Add(FM_ProcessCmd_Test_DeleteAll, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_DeleteAll");
+#ifdef FM_INCLUDE_DECOMPRESS
UtTest_Add(FM_ProcessCmd_Test_Decompress, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_Decompress");
+#endif
UtTest_Add(FM_ProcessCmd_Test_Concat, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_Concat");
UtTest_Add(FM_ProcessCmd_Test_GetFileInfo, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_GetFileInfo");
UtTest_Add(FM_ProcessCmd_Test_GetOpenFiles, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_GetOpenFiles");
@@ -1109,7 +1195,8 @@ void FM_App_Test_AddTestCases(void)
UtTest_Add(FM_ProcessCmd_Test_SetTableState, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_SetTableState");
UtTest_Add(FM_ProcessCmd_Test_SetPermissions, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_SetPermissions");
UtTest_Add(FM_ProcessCmd_Test_DeleteInt, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_DeleteInt");
- UtTest_Add(FM_ProcessCmd_Test_InvalidCommandCode, FM_Test_Setup, FM_Test_TearDown, "FM_ProcessCmd_Test_InvalidCommandCode");
+ UtTest_Add(FM_ProcessCmd_Test_InvalidCommandCode, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ProcessCmd_Test_InvalidCommandCode");
} /* end FM_App_Test_AddTestCases */
/************************/
diff --git a/fsw/unit_test/fm_app_test.h b/fsw/unit_test/fm_app_test.h
index 84c3ea2..407089a 100644
--- a/fsw/unit_test/fm_app_test.h
+++ b/fsw/unit_test/fm_app_test.h
@@ -1,27 +1,27 @@
/*
* Filename: fm_app_test.h
- *
+ *
* NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
* File Manager Application Version 2.5.3
*
* Copyright © 2020 United States Government as represented by the Administrator of
- * the National Aeronautics and Space Administration. All Rights Reserved.
+ * the National Aeronautics and Space Administration. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
* Purpose: This file contains the function prototypes for the unit test cases for fm_app.c
- *
+ *
*/
/*
diff --git a/fsw/unit_test/fm_child.c.gcov b/fsw/unit_test/fm_child.c.gcov
deleted file mode 100644
index b5769b2..0000000
--- a/fsw/unit_test/fm_child.c.gcov
+++ /dev/null
@@ -1,1673 +0,0 @@
- -: 0:Source:../src/fm_child.c
- -: 0:Programs:5
- -: 1:/*
- -: 2:** $Id: fm_child.c.gcov 1.3.1.2 2017/01/25 00:20:22EST mdeschu Exp $
- -: 3:**
- -: 4:** Copyright (c) 2007-2014 United States Government as represented by the
- -: 5:** Administrator of the National Aeronautics and Space Administration.
- -: 6:** All Other Rights Reserved.
- -: 7:**
- -: 8:** This software was created at NASA's Goddard Space Flight Center.
- -: 9:** This software is governed by the NASA Open Source Agreement and may be
- -: 10:** used, distributed and modified only pursuant to the terms of that
- -: 11:** agreement.
- -: 12:**
- -: 13:** Purpose: File Manager (FM) Child task (low priority command handler)
- -: 14:**
- -: 15:** Author: Scott Walling (Microtel)
- -: 16:**
- -: 17:** Notes:
- -: 18:**
- -: 19:*/
- -: 20:
- -: 21:#include "cfe.h"
- -: 22:#include "fm_msg.h"
- -: 23:#include "fm_msgdefs.h"
- -: 24:#include "fm_msgids.h"
- -: 25:#include "fm_events.h"
- -: 26:#include "fm_app.h"
- -: 27:#include "fm_child.h"
- -: 28:#include "fm_cmds.h"
- -: 29:#include "fm_cmd_utils.h"
- -: 30:#include "fm_perfids.h"
- -: 31:#include "fm_platform_cfg.h"
- -: 32:#include "fm_verify.h"
- -: 33:
- -: 34:#include
- -: 35:
- -: 36:/************************************************************************
- -: 37:** OSAL Compatibility for directory name access
- -: 38:** New OSAL version have an access macro to get the string. If that
- -: 39:** macro is defined, use it, otherwise assume "d_name" structure member.
- -: 40:*************************************************************************/
- -: 41:#ifndef OS_DIRENTRY_NAME
- -: 42:#define OS_DIRENTRY_NAME(x) ((x).d_name)
- -: 43:#endif
- -: 44:
- -: 45:
- -: 46:#define FM_QUEUE_SEM_NAME "FM_QUEUE_SEM"
- -: 47:
- -: 48:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 49:/* */
- -: 50:/* FM child task -- startup initialization */
- -: 51:/* */
- -: 52:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 53:
- 6: 54:int32 FM_ChildInit(void)
- -: 55:{
- 6: 56: int32 TaskTextLen = 64;
- 6: 57: char TaskText[TaskTextLen];
- -: 58: int32 Result;
- -: 59:
- -: 60:
- -: 61: /* Create counting semaphore (given by parent to wake-up child) */
- 6: 62: Result = OS_CountSemCreate(&FM_GlobalData.ChildSemaphore, FM_CHILD_SEM_NAME, 0, 0);
- 6: 63: if (Result != CFE_SUCCESS)
- -: 64: {
- 1: 65: strncpy(TaskText, "create semaphore failed", TaskTextLen);
- -: 66: }
- -: 67: else
- -: 68: {
- -: 69: /* Create mutex semaphore (protect access to ChildQueueCount) */
- 5: 70: Result = OS_MutSemCreate(&FM_GlobalData.ChildQueueCountSem, FM_QUEUE_SEM_NAME, 0);
- -: 71:
- 5: 72: if (Result != CFE_SUCCESS)
- -: 73: {
- 1: 74: strncpy(TaskText, "create queue count semaphore failed", TaskTextLen);
- -: 75: }
- -: 76: else
- -: 77: {
- -: 78: /* Create child task (low priority command handler) */
- 4: 79: Result = CFE_ES_CreateChildTask(&FM_GlobalData.ChildTaskID,
- -: 80: FM_CHILD_TASK_NAME,
- -: 81: FM_ChildTask, 0,
- -: 82: FM_CHILD_TASK_STACK_SIZE,
- -: 83: FM_CHILD_TASK_PRIORITY, 0);
- 4: 84: if (Result != CFE_SUCCESS)
- -: 85: {
- 1: 86: strncpy(TaskText, "create task failed", TaskTextLen);
- -: 87: }
- -: 88: }
- -: 89: }
- -: 90:
- 6: 91: if (Result != CFE_SUCCESS)
- -: 92: {
- 3: 93: CFE_EVS_SendEvent(FM_CHILD_INIT_ERR_EID, CFE_EVS_ERROR,
- -: 94: "Child Task initialization error: %s: result = %d",
- -: 95: TaskText, (int)Result);
- -: 96: }
- -: 97:
- 6: 98: return(Result);
- -: 99:
- -: 100:} /* End of FM_ChildInit() */
- -: 101:
- -: 102:
- -: 103:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 104:/* */
- -: 105:/* FM child task -- task entry point */
- -: 106:/* */
- -: 107:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 108:
- 2: 109:void FM_ChildTask(void)
- -: 110:{
- 2: 111: char *TaskText = "Child Task";
- -: 112: int32 Result;
- -: 113:
- -: 114: /*
- -: 115: ** The child task runs until the parent dies (normal end) or
- -: 116: ** until it encounters a fatal error (semaphore error, etc.)...
- -: 117: */
- 2: 118: Result = CFE_ES_RegisterChildTask();
- -: 119:
- 2: 120: if (Result != CFE_SUCCESS)
- -: 121: {
- 1: 122: CFE_EVS_SendEvent(FM_CHILD_INIT_ERR_EID, CFE_EVS_ERROR,
- -: 123: "%s initialization error: register child failed: result = %d",
- -: 124: TaskText, (int)Result);
- -: 125: }
- -: 126: else
- -: 127: {
- 1: 128: CFE_EVS_SendEvent(FM_CHILD_INIT_EID, CFE_EVS_INFORMATION,
- -: 129: "%s initialization complete", TaskText);
- -: 130:
- -: 131: /* Child task process loop */
- 1: 132: FM_ChildLoop();
- -: 133: }
- -: 134:
- -: 135: /* Stop the parent from invoking the child task */
- 2: 136: FM_GlobalData.ChildSemaphore = FM_CHILD_SEM_INVALID;
- -: 137:
- -: 138: /* This call allows cFE to clean-up system resources */
- 2: 139: CFE_ES_ExitChildTask();
- -: 140:
- 2: 141: return;
- -: 142:
- -: 143:} /* End of FM_ChildTask() */
- -: 144:
- -: 145:
- -: 146:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 147:/* */
- -: 148:/* FM child task -- main process loop */
- -: 149:/* */
- -: 150:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 151:
- 5: 152:void FM_ChildLoop(void)
- -: 153:{
- 5: 154: char *TaskText = "Child Task termination error: ";
- 5: 155: int32 Result = CFE_SUCCESS;
- -: 156:
- 16: 157: while (Result == CFE_SUCCESS)
- -: 158: {
- -: 159: /* Pend on the "handshake" semaphore */
- 6: 160: Result = OS_CountSemTake(FM_GlobalData.ChildSemaphore);
- -: 161:
- -: 162: /* Mark the period when this task is active */
- 6: 163: CFE_ES_PerfLogEntry(FM_CHILD_TASK_PERF_ID);
- -: 164:
- 6: 165: if (Result == CFE_SUCCESS)
- -: 166: {
- -: 167: /* Make sure the parent/child handshake is not broken */
- 5: 168: if (FM_GlobalData.ChildQueueCount == 0)
- -: 169: {
- 3: 170: FM_GlobalData.ChildCmdErrCounter++;
- 3: 171: CFE_EVS_SendEvent(FM_CHILD_TERM_ERR_EID, CFE_EVS_ERROR,
- -: 172: "%s empty queue", TaskText);
- -: 173:
- -: 174: /* Set result that will terminate child task run loop */
- 3: 175: Result = CFE_OS_ERROR;
- -: 176: }
- 2: 177: else if (FM_GlobalData.ChildReadIndex >= FM_CHILD_QUEUE_DEPTH)
- -: 178: {
- 1: 179: FM_GlobalData.ChildCmdErrCounter++;
- 1: 180: CFE_EVS_SendEvent(FM_CHILD_TERM_ERR_EID, CFE_EVS_ERROR,
- -: 181: "%s invalid queue index: index = %d",
- -: 182: TaskText, (int)FM_GlobalData.ChildReadIndex);
- -: 183:
- -: 184: /* Set result that will terminate child task run loop */
- 1: 185: Result = CFE_OS_ERROR;
- -: 186: }
- -: 187: else
- -: 188: {
- -: 189: /* Invoke the child task command handler */
- 1: 190: FM_ChildProcess();
- -: 191: }
- -: 192: }
- -: 193: else
- -: 194: {
- 1: 195: CFE_EVS_SendEvent(FM_CHILD_TERM_ERR_EID, CFE_EVS_ERROR,
- -: 196: "%s semaphore take failed: result = %d",
- -: 197: TaskText, (int)Result);
- -: 198: }
- -: 199:
- 6: 200: CFE_ES_PerfLogExit(FM_CHILD_TASK_PERF_ID);
- -: 201: }
- -: 202:
- 5: 203: return;
- -: 204:
- -: 205:} /* End of FM_ChildLoop() */
- -: 206:
- -: 207:
- -: 208:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 209:/* */
- -: 210:/* FM child task -- interface handshake processor */
- -: 211:/* */
- -: 212:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 213:
- 16: 214:void FM_ChildProcess(void)
- -: 215:{
- 16: 216: char *TaskText = "Child Task";
- -: 217: FM_ChildQueueEntry_t *CmdArgs;
- -: 218:
- 16: 219: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex];
- -: 220:
- -: 221: /* Invoke the command specific handler */
- 16: 222: switch (CmdArgs->CommandCode)
- -: 223: {
- -: 224: case FM_COPY_CC:
- 1: 225: FM_ChildCopyCmd(CmdArgs);
- 1: 226: break;
- -: 227:
- -: 228: case FM_MOVE_CC:
- 1: 229: FM_ChildMoveCmd(CmdArgs);
- 1: 230: break;
- -: 231:
- -: 232: case FM_RENAME_CC:
- 1: 233: FM_ChildRenameCmd(CmdArgs);
- 1: 234: break;
- -: 235:
- -: 236: case FM_DELETE_CC:
- 1: 237: FM_ChildDeleteCmd(CmdArgs);
- 1: 238: break;
- -: 239:
- -: 240: case FM_DELETE_ALL_CC:
- 1: 241: FM_ChildDeleteAllCmd(CmdArgs);
- 1: 242: break;
- -: 243:
- -: 244: case FM_DECOMPRESS_CC:
- 1: 245: FM_ChildDecompressCmd(CmdArgs);
- 1: 246: break;
- -: 247:
- -: 248: case FM_CONCAT_CC:
- 1: 249: FM_ChildConcatCmd(CmdArgs);
- 1: 250: break;
- -: 251:
- -: 252: case FM_CREATE_DIR_CC:
- 1: 253: FM_ChildCreateDirCmd(CmdArgs);
- 1: 254: break;
- -: 255:
- -: 256: case FM_DELETE_DIR_CC:
- 1: 257: FM_ChildDeleteDirCmd(CmdArgs);
- 1: 258: break;
- -: 259:
- -: 260: case FM_GET_FILE_INFO_CC:
- 1: 261: FM_ChildFileInfoCmd(CmdArgs);
- 1: 262: break;
- -: 263:
- -: 264: case FM_GET_DIR_FILE_CC:
- 1: 265: FM_ChildDirListFileCmd(CmdArgs);
- 1: 266: break;
- -: 267:
- -: 268: case FM_GET_DIR_PKT_CC:
- 1: 269: FM_ChildDirListPktCmd(CmdArgs);
- 1: 270: break;
- -: 271:
- -: 272: case FM_DELETE_INT_CC:
- 1: 273: FM_ChildDeleteCmd(CmdArgs);
- 1: 274: break;
- -: 275:
- -: 276: case FM_SET_FILE_PERM_CC:
- 1: 277: FM_ChildSetPermissionsCmd(CmdArgs);
- 1: 278: break;
- -: 279:
- -: 280: default:
- 2: 281: FM_GlobalData.ChildCmdErrCounter++;
- 2: 282: CFE_EVS_SendEvent(FM_CHILD_EXE_ERR_EID, CFE_EVS_ERROR,
- -: 283: "%s execution error: invalid command code: cc = %d",
- -: 284: TaskText, (int)CmdArgs->CommandCode);
- -: 285: break;
- -: 286: }
- -: 287:
- -: 288: /* Update the handshake queue read index */
- 16: 289: FM_GlobalData.ChildReadIndex++;
- -: 290:
- 16: 291: if (FM_GlobalData.ChildReadIndex >= FM_CHILD_QUEUE_DEPTH)
- -: 292: {
- 1: 293: FM_GlobalData.ChildReadIndex = 0;
- -: 294: }
- -: 295:
- -: 296: /* Prevent parent/child updating queue counter at same time */
- 16: 297: OS_MutSemTake(FM_GlobalData.ChildQueueCountSem);
- 16: 298: FM_GlobalData.ChildQueueCount--;
- 16: 299: OS_MutSemGive(FM_GlobalData.ChildQueueCountSem);
- -: 300:
- 16: 301: return;
- -: 302:
- -: 303:} /* End of FM_ChildProcess() */
- -: 304:
- -: 305:
- -: 306:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 307:/* */
- -: 308:/* FM child task command handler -- Copy File */
- -: 309:/* */
- -: 310:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 311:
- 3: 312:void FM_ChildCopyCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 313:{
- 3: 314: char *CmdText = "Copy File";
- -: 315: int32 OS_Status;
- -: 316:
- -: 317: /* Report current child task activity */
- 3: 318: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 319:
- -: 320: /* Note the order of the arguments to OS_cp (src,tgt) */
- 3: 321: OS_Status = OS_cp(CmdArgs->Source1, CmdArgs->Target);
- -: 322:
- 3: 323: if (OS_Status != OS_SUCCESS)
- -: 324: {
- 1: 325: FM_GlobalData.ChildCmdErrCounter++;
- -: 326:
- -: 327: /* Send command failure event (error) */
- 1: 328: CFE_EVS_SendEvent(FM_COPY_OS_ERR_EID, CFE_EVS_ERROR,
- -: 329: "%s error: OS_cp failed: result = %d, src = %s, tgt = %s",
- -: 330: CmdText, (int)OS_Status, CmdArgs->Source1, CmdArgs->Target);
- -: 331: }
- -: 332: else
- -: 333: {
- 2: 334: FM_GlobalData.ChildCmdCounter++;
- -: 335:
- -: 336: /* Send command completion event (info) */
- 2: 337: CFE_EVS_SendEvent(FM_COPY_CMD_EID, CFE_EVS_DEBUG,
- -: 338: "%s command: src = %s, tgt = %s",
- -: 339: CmdText, CmdArgs->Source1, CmdArgs->Target);
- -: 340: }
- -: 341:
- -: 342: /* Report previous child task activity */
- 3: 343: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 3: 344: FM_GlobalData.ChildCurrentCC = 0;
- -: 345:
- 3: 346: return;
- -: 347:
- -: 348:} /* End of FM_ChildCopyCmd() */
- -: 349:
- -: 350:
- -: 351:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 352:/* */
- -: 353:/* FM child task command handler -- Move File */
- -: 354:/* */
- -: 355:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 356:
- 3: 357:void FM_ChildMoveCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 358:{
- 3: 359: char *CmdText = "Move File";
- -: 360: int32 OS_Status;
- -: 361:
- -: 362: /* Report current child task activity */
- 3: 363: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 364:
- 3: 365: OS_Status = OS_mv(CmdArgs->Source1, CmdArgs->Target);
- -: 366:
- 3: 367: if (OS_Status != OS_SUCCESS)
- -: 368: {
- 1: 369: FM_GlobalData.ChildCmdErrCounter++;
- -: 370:
- -: 371: /* Send command failure event (error) */
- 1: 372: CFE_EVS_SendEvent(FM_MOVE_OS_ERR_EID, CFE_EVS_ERROR,
- -: 373: "%s error: OS_mv failed: result = %d, src = %s, tgt = %s",
- -: 374: CmdText, (int)OS_Status, CmdArgs->Source1, CmdArgs->Target);
- -: 375: }
- -: 376: else
- -: 377: {
- 2: 378: FM_GlobalData.ChildCmdCounter++;
- -: 379:
- -: 380: /* Send command completion event (info) */
- 2: 381: CFE_EVS_SendEvent(FM_MOVE_CMD_EID, CFE_EVS_DEBUG,
- -: 382: "%s command: src = %s, tgt = %s",
- -: 383: CmdText, CmdArgs->Source1, CmdArgs->Target);
- -: 384: }
- -: 385:
- -: 386: /* Report previous child task activity */
- 3: 387: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 3: 388: FM_GlobalData.ChildCurrentCC = 0;
- -: 389:
- 3: 390: return;
- -: 391:
- -: 392:} /* End of FM_ChildMoveCmd() */
- -: 393:
- -: 394:
- -: 395:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 396:/* */
- -: 397:/* FM child task command handler -- Rename File */
- -: 398:/* */
- -: 399:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 400:
- 3: 401:void FM_ChildRenameCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 402:{
- 3: 403: char *CmdText = "Rename File";
- -: 404: int32 OS_Status;
- -: 405:
- -: 406: /* Report current child task activity */
- 3: 407: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 408:
- 3: 409: OS_Status = OS_rename(CmdArgs->Source1, CmdArgs->Target);
- -: 410:
- 3: 411: if (OS_Status != OS_SUCCESS)
- -: 412: {
- 1: 413: FM_GlobalData.ChildCmdErrCounter++;
- -: 414:
- -: 415: /* Send command failure event (error) */
- 1: 416: CFE_EVS_SendEvent(FM_RENAME_OS_ERR_EID, CFE_EVS_ERROR,
- -: 417: "%s error: OS_rename failed: result = %d, src = %s, tgt = %s",
- -: 418: CmdText, (int)OS_Status, CmdArgs->Source1, CmdArgs->Target);
- -: 419: }
- -: 420: else
- -: 421: {
- 2: 422: FM_GlobalData.ChildCmdCounter++;
- -: 423:
- -: 424: /* Send command completion event (info) */
- 2: 425: CFE_EVS_SendEvent(FM_RENAME_CMD_EID, CFE_EVS_DEBUG,
- -: 426: "%s command: src = %s, tgt = %s",
- -: 427: CmdText, CmdArgs->Source1, CmdArgs->Target);
- -: 428: }
- -: 429:
- -: 430: /* Report previous child task activity */
- 3: 431: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 3: 432: FM_GlobalData.ChildCurrentCC = 0;
- -: 433:
- 3: 434: return;
- -: 435:
- -: 436:} /* End of FM_ChildRenameCmd() */
- -: 437:
- -: 438:
- -: 439:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 440:/* */
- -: 441:/* FM child task command handler -- Delete File */
- -: 442:/* */
- -: 443:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 444:
- 4: 445:void FM_ChildDeleteCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 446:{
- 4: 447: char *CmdText = "Delete File";
- -: 448: int32 OS_Status;
- -: 449:
- -: 450: /* Report current child task activity */
- 4: 451: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 452:
- 4: 453: OS_Status = OS_remove(CmdArgs->Source1);
- -: 454:
- 4: 455: if (OS_Status != OS_SUCCESS)
- -: 456: {
- 1: 457: FM_GlobalData.ChildCmdErrCounter++;
- -: 458:
- -: 459: /* Send command failure event (error) */
- 1: 460: CFE_EVS_SendEvent(FM_DELETE_OS_ERR_EID, CFE_EVS_ERROR,
- -: 461: "%s error: OS_remove failed: result = %d, file = %s",
- -: 462: CmdText, (int)OS_Status, CmdArgs->Source1);
- -: 463: }
- -: 464: else
- -: 465: {
- 3: 466: FM_GlobalData.ChildCmdCounter++;
- -: 467:
- 3: 468: if (CmdArgs->CommandCode != FM_DELETE_INT_CC)
- -: 469: {
- -: 470: /* Send command completion event (info) */
- 2: 471: CFE_EVS_SendEvent(FM_DELETE_CMD_EID, CFE_EVS_DEBUG,
- -: 472: "%s command: file = %s", CmdText, CmdArgs->Source1);
- -: 473: }
- -: 474: }
- -: 475:
- -: 476: /* Report previous child task activity */
- 4: 477: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 4: 478: FM_GlobalData.ChildCurrentCC = 0;
- -: 479:
- 4: 480: return;
- -: 481:
- -: 482:} /* End of FM_ChildDeleteCmd() */
- -: 483:
- -: 484:
- -: 485:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 486:/* */
- -: 487:/* FM child task command handler -- Delete All Files */
- -: 488:/* */
- -: 489:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 490:
- 9: 491:void FM_ChildDeleteAllCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 492:{
- 9: 493: char *CmdText = "Delete All Files";
- -: 494: char *Directory;
- -: 495: char *DirWithSep;
- -: 496: os_dirp_t DirPtr;
- -: 497: os_dirent_t *DirEntry;
- -: 498: int32 OS_Status;
- -: 499: uint32 FilenameState;
- -: 500: uint32 NameLength;
- 9: 501: uint32 DeleteCount = 0;
- 9: 502: uint32 FilesNotDeletedCount = 0;
- 9: 503: uint32 DirectoriesSkippedCount = 0;
- -: 504: char Filename[OS_MAX_PATH_LEN];
- -: 505:
- -: 506: /* Report current child task activity */
- 9: 507: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 508:
- -: 509: /*
- -: 510: ** Command argument useage for this command:
- -: 511: **
- -: 512: ** CmdArgs->CommandCode = FM_DELETE_ALL_CC
- -: 513: ** CmdArgs->Source1 = directory name
- -: 514: ** CmdArgs->Source2 = directory name plus separator
- -: 515: */
- 9: 516: Directory = CmdArgs->Source1;
- 9: 517: DirWithSep = CmdArgs->Source2;
- -: 518:
- -: 519: /* Open directory so that we can read from it */
- 9: 520: DirPtr = OS_opendir(Directory);
- -: 521:
- 9: 522: if (DirPtr == NULL)
- -: 523: {
- 2: 524: FM_GlobalData.ChildCmdErrCounter++;
- -: 525:
- -: 526: /* Send command failure event (error) */
- 2: 527: CFE_EVS_SendEvent(FM_DELETE_ALL_OS_ERR_EID, CFE_EVS_ERROR,
- -: 528: "%s error: OS_opendir failed: dir = %s",
- -: 529: CmdText, Directory);
- -: 530: }
- -: 531: else
- -: 532: {
- -: 533: /* Read each directory entry and delete the files */
- 21: 534: while ((DirEntry = OS_readdir(DirPtr)) != NULL )
- -: 535: {
- -: 536: /*
- -: 537: ** Ignore the "." and ".." directory entries
- -: 538: */
- 14: 539: if ((strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_THIS_DIRECTORY) != 0) &&
- 7: 540: (strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_PARENT_DIRECTORY) != 0))
- -: 541: {
- -: 542: /* Construct full path filename */
- 7: 543: NameLength = strlen(DirWithSep) + strlen(OS_DIRENTRY_NAME(*DirEntry));
- -: 544:
- 7: 545: if (NameLength >= OS_MAX_PATH_LEN)
- -: 546: {
- 1: 547: FilesNotDeletedCount++;
- -: 548: }
- -: 549: else
- -: 550: {
- -: 551: /* Note: Directory name already has trailing "/" appended */
- 6: 552: strcpy(Filename, DirWithSep);
- 6: 553: strcat(Filename, OS_DIRENTRY_NAME(*DirEntry));
- -: 554:
- -: 555: /* What kind of directory entry is this? */
- 6: 556: FilenameState = FM_GetFilenameState(Filename, OS_MAX_PATH_LEN, FALSE);
- -: 557:
- 6: 558: if (FilenameState == FM_NAME_IS_INVALID)
- -: 559: {
- 1: 560: FilesNotDeletedCount++;
- -: 561: }
- 5: 562: else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
- -: 563: {
- -: 564: /* This result is very unlikely - the */
- -: 565: /* name existed a moment ago when */
- -: 566: /* the directory entry was read but */
- -: 567: /* now the call to OS_stat() failed */
- -: 568: /* implying that the entry is gone */
- 1: 569: FilesNotDeletedCount++;
- -: 570: }
- 4: 571: else if (FilenameState == FM_NAME_IS_DIRECTORY)
- -: 572: {
- 1: 573: DirectoriesSkippedCount++;
- -: 574: }
- 3: 575: else if (FilenameState == FM_NAME_IS_FILE_OPEN)
- -: 576: {
- 1: 577: FilesNotDeletedCount++;
- -: 578: }
- 2: 579: else if (FilenameState == FM_NAME_IS_FILE_CLOSED)
- -: 580: {
- 2: 581: if ((OS_Status = OS_remove(Filename)) == OS_SUCCESS)
- -: 582: {
- -: 583: /*
- -: 584: ** After deleting the file, rewind the directory
- -: 585: ** to keep the file system from getting confused
- -: 586: */
- 1: 587: OS_rewinddir(DirPtr);
- -: 588:
- -: 589: /* Increment delete count */
- 1: 590: DeleteCount++;
- -: 591: }
- -: 592: else
- -: 593: {
- 1: 594: FilesNotDeletedCount++;
- -: 595: }
- -: 596: }
- -: 597: }
- -: 598: } /* end if "." or ".." directory entries */
- -: 599: } /* End while OS_readdir */
- -: 600:
- 7: 601: OS_closedir(DirPtr);
- -: 602:
- -: 603: /* Send command completion event (info) */
- 7: 604: CFE_EVS_SendEvent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG,
- -: 605: "%s command: deleted %d files: dir = %s",
- -: 606: CmdText, (int)DeleteCount, Directory);
- 7: 607: FM_GlobalData.ChildCmdCounter++;
- -: 608:
- 7: 609: if ( FilesNotDeletedCount > 0 )
- -: 610: {
- -: 611: /* If errors occured, report generic event(s) */
- 5: 612: CFE_EVS_SendEvent(FM_DELETE_ALL_WARNING_EID, CFE_EVS_INFORMATION,
- -: 613: "%s command: one or more files could not be deleted. Files may be open : dir = %s",
- -: 614: CmdText, Directory);
- 5: 615: FM_GlobalData.ChildCmdWarnCounter++;
- -: 616: }
- -: 617:
- 7: 618: if ( DirectoriesSkippedCount > 0 )
- -: 619: {
- -: 620: /* If errors occured, report generic event(s) */
- 1: 621: CFE_EVS_SendEvent(FM_DELETE_ALL_WARNING_EID, CFE_EVS_INFORMATION,
- -: 622: "%s command: one or more directories skipped : dir = %s",
- -: 623: CmdText, Directory);
- 1: 624: FM_GlobalData.ChildCmdWarnCounter++;
- -: 625: }
- -: 626:
- -: 627: } /* end if DirPtr == NULL */
- -: 628:
- -: 629: /* Report previous child task activity */
- 9: 630: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 9: 631: FM_GlobalData.ChildCurrentCC = 0;
- -: 632:
- 9: 633: return;
- -: 634:
- -: 635:} /* End of FM_ChildDeleteAllCmd() */
- -: 636:
- -: 637:
- -: 638:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 639:/* */
- -: 640:/* FM child task command handler -- Decompress File */
- -: 641:/* */
- -: 642:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 643:
- 3: 644:void FM_ChildDecompressCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 645:{
- 3: 646: char *CmdText = "Decompress File";
- -: 647: int32 CFE_Status;
- -: 648:
- -: 649: /* Report current child task activity */
- 3: 650: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 651:
- -: 652: /* Decompress source file into target file */
- 3: 653: CFE_Status = CFE_FS_Decompress(CmdArgs->Source1, CmdArgs->Target);
- -: 654:
- 3: 655: if (CFE_Status != CFE_SUCCESS)
- -: 656: {
- 1: 657: FM_GlobalData.ChildCmdErrCounter++;
- -: 658:
- -: 659: /* Send command failure event (error) */
- 1: 660: CFE_EVS_SendEvent(FM_DECOM_CFE_ERR_EID, CFE_EVS_ERROR,
- -: 661: "%s error: CFE_FS_Decompress failed: result = %d, src = %s, tgt = %s",
- -: 662: CmdText, (int)CFE_Status, CmdArgs->Source1, CmdArgs->Target);
- -: 663: }
- -: 664: else
- -: 665: {
- 2: 666: FM_GlobalData.ChildCmdCounter++;
- -: 667:
- -: 668: /* Send command completion event (info) */
- 2: 669: CFE_EVS_SendEvent(FM_DECOM_CMD_EID, CFE_EVS_DEBUG,
- -: 670: "%s command: src = %s, tgt = %s",
- -: 671: CmdText, CmdArgs->Source1, CmdArgs->Target);
- -: 672: }
- -: 673:
- -: 674: /* Report previous child task activity */
- 3: 675: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 3: 676: FM_GlobalData.ChildCurrentCC = 0;
- -: 677:
- 3: 678: return;
- -: 679:
- -: 680:} /* End of FM_ChildDecompressCmd() */
- -: 681:
- -: 682:
- -: 683:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 684:/* */
- -: 685:/* FM child task command handler -- Concatenate Files */
- -: 686:/* */
- -: 687:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 688:
- 8: 689:void FM_ChildConcatCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 690:{
- 8: 691: char *CmdText = "Concat Files";
- 8: 692: boolean ConcatResult = FALSE;
- 8: 693: boolean CopyInProgress = FALSE;
- 8: 694: boolean CreatedTgtFile = FALSE;
- 8: 695: boolean OpenedSource2 = FALSE;
- 8: 696: boolean OpenedTgtFile = FALSE;
- -: 697: int32 LoopCount;
- -: 698: int32 OS_Status;
- -: 699: int32 FileHandleSrc;
- -: 700: int32 FileHandleTgt;
- -: 701: int32 BytesRead;
- -: 702: int32 BytesWritten;
- -: 703:
- -: 704: /* Report current child task activity */
- 8: 705: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 706:
- -: 707: /* Copy source file #1 to the target file */
- 8: 708: OS_Status = OS_cp(CmdArgs->Source1, CmdArgs->Target);
- -: 709:
- 8: 710: if (OS_Status != OS_SUCCESS)
- -: 711: {
- 1: 712: FM_GlobalData.ChildCmdErrCounter++;
- -: 713:
- -: 714: /* Send command failure event (error) */
- 1: 715: CFE_EVS_SendEvent(FM_CONCAT_OS_ERR_EID, CFE_EVS_ERROR,
- -: 716: "%s error: OS_cp failed: result = %d, src = %s, tgt = %s",
- -: 717: CmdText, (int)OS_Status, CmdArgs->Source1, CmdArgs->Target);
- -: 718: }
- -: 719: else
- -: 720: {
- 7: 721: CreatedTgtFile = TRUE;
- -: 722: }
- -: 723:
- -: 724: /* Open source file #2 */
- 8: 725: if (CreatedTgtFile)
- -: 726: {
- 7: 727: FileHandleSrc = OS_open(CmdArgs->Source2, OS_READ_ONLY, 0);
- -: 728:
- 7: 729: if (FileHandleSrc < 0)
- -: 730: {
- 1: 731: FM_GlobalData.ChildCmdErrCounter++;
- -: 732:
- -: 733: /* Send command failure event (error) */
- 1: 734: CFE_EVS_SendEvent(FM_CONCAT_OS_ERR_EID, CFE_EVS_ERROR,
- -: 735: "%s error: OS_open failed: result = %d, src2 = %s",
- -: 736: CmdText, (int)FileHandleSrc, CmdArgs->Source2);
- -: 737: }
- -: 738: else
- -: 739: {
- 6: 740: OpenedSource2 = TRUE;
- -: 741: }
- -: 742: }
- -: 743:
- -: 744: /* Open target file */
- 8: 745: if (OpenedSource2)
- -: 746: {
- 6: 747: FileHandleTgt = OS_open(CmdArgs->Target, OS_READ_WRITE, 0);
- -: 748:
- 6: 749: if (FileHandleTgt < 0)
- -: 750: {
- 1: 751: FM_GlobalData.ChildCmdErrCounter++;
- -: 752:
- -: 753: /* Send command failure event (error) */
- 1: 754: CFE_EVS_SendEvent(FM_CONCAT_OS_ERR_EID, CFE_EVS_ERROR,
- -: 755: "%s error: OS_open failed: result = %d, tgt = %s",
- -: 756: CmdText, (int)FileHandleTgt, CmdArgs->Target);
- -: 757: }
- -: 758: else
- -: 759: {
- 5: 760: OpenedTgtFile = TRUE;
- -: 761: }
- -: 762: }
- -: 763:
- -: 764: /* Append source file #2 to target file */
- 8: 765: if (OpenedTgtFile)
- -: 766: {
- -: 767: /* Seek to end of target file */
- 5: 768: OS_lseek(FileHandleTgt, 0, OS_SEEK_END);
- 5: 769: CopyInProgress = TRUE;
- 5: 770: LoopCount = 0;
- -: 771:
- 31: 772: while (CopyInProgress)
- -: 773: {
- 21: 774: BytesRead = OS_read(FileHandleSrc, FM_GlobalData.ChildBuffer,
- -: 775: FM_CHILD_FILE_BLOCK_SIZE);
- -: 776:
- 21: 777: if (BytesRead == 0)
- -: 778: {
- -: 779: /* Success - finished reading source file #2 */
- 3: 780: CopyInProgress = FALSE;
- 3: 781: ConcatResult = TRUE;
- -: 782: }
- 18: 783: else if (BytesRead < 0)
- -: 784: {
- 1: 785: CopyInProgress = FALSE;
- 1: 786: FM_GlobalData.ChildCmdErrCounter++;
- -: 787:
- -: 788: /* Send command failure event (error) */
- 1: 789: CFE_EVS_SendEvent(FM_CONCAT_OS_ERR_EID, CFE_EVS_ERROR,
- -: 790: "%s error: OS_read failed: result = %d, file = %s",
- -: 791: CmdText, (int)BytesRead, CmdArgs->Source2);
- -: 792: }
- -: 793: else
- -: 794: {
- -: 795: /* Write source file #2 to target file */
- 17: 796: BytesWritten = OS_write(FileHandleTgt, FM_GlobalData.ChildBuffer, BytesRead);
- -: 797:
- 17: 798: if (BytesWritten != BytesRead)
- -: 799: {
- 1: 800: CopyInProgress = FALSE;
- 1: 801: FM_GlobalData.ChildCmdErrCounter++;
- -: 802:
- -: 803: /* Send command failure event (error) */
- 1: 804: CFE_EVS_SendEvent(FM_CONCAT_OS_ERR_EID, CFE_EVS_ERROR,
- -: 805: "%s error: OS_write failed: result = %d, expected = %d",
- -: 806: CmdText, (int)BytesWritten, (int)BytesRead);
- -: 807: }
- -: 808: }
- -: 809:
- -: 810: /* Avoid CPU hogging */
- 21: 811: if (CopyInProgress)
- -: 812: {
- 16: 813: LoopCount++;
- 16: 814: if (LoopCount == FM_CHILD_FILE_LOOP_COUNT)
- -: 815: {
- -: 816: /* Give up the CPU */
- 1: 817: CFE_ES_PerfLogExit(FM_CHILD_TASK_PERF_ID);
- 1: 818: OS_TaskDelay(FM_CHILD_FILE_SLEEP_MS);
- 1: 819: CFE_ES_PerfLogEntry(FM_CHILD_TASK_PERF_ID);
- 1: 820: LoopCount = 0;
- -: 821: }
- -: 822: }
- -: 823: }
- -: 824: }
- -: 825:
- 8: 826: if (OpenedTgtFile)
- -: 827: {
- -: 828: /* Close target file */
- 5: 829: OS_close(FileHandleTgt);
- -: 830: }
- -: 831:
- 8: 832: if (OpenedSource2)
- -: 833: {
- -: 834: /* Close source file #2 */
- 6: 835: OS_close(FileHandleSrc);
- -: 836: }
- -: 837:
- 8: 838: if ((CreatedTgtFile == TRUE) && (ConcatResult == FALSE))
- -: 839: {
- -: 840: /* Remove partial target file after concat error */
- 4: 841: OS_remove(CmdArgs->Target);
- -: 842: }
- -: 843:
- 8: 844: if (ConcatResult == TRUE)
- -: 845: {
- 3: 846: FM_GlobalData.ChildCmdCounter++;
- -: 847:
- -: 848: /* Send command completion event (info) */
- 3: 849: CFE_EVS_SendEvent(FM_CONCAT_CMD_EID, CFE_EVS_DEBUG,
- -: 850: "%s command: src1 = %s, src2 = %s, tgt = %s",
- -: 851: CmdText, CmdArgs->Source1, CmdArgs->Source2, CmdArgs->Target);
- -: 852: }
- -: 853:
- -: 854: /* Report previous child task activity */
- 8: 855: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 8: 856: FM_GlobalData.ChildCurrentCC = 0;
- -: 857:
- 8: 858: return;
- -: 859:
- -: 860:} /* End of FM_ChildConcatCmd() */
- -: 861:
- -: 862:
- -: 863:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 864:/* */
- -: 865:/* FM child task command handler -- Get File Info */
- -: 866:/* */
- -: 867:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 868:
- 8: 869:void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 870:{
- 8: 871: char *CmdText = "Get File Info";
- 8: 872: boolean GettingCRC = FALSE;
- 8: 873: uint32 CurrentCRC = 0;
- 8: 874: int32 LoopCount = 0;
- -: 875: int32 BytesRead;
- -: 876: int32 FileHandle;
- -: 877:
- -: 878: /* Report current child task activity */
- 8: 879: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 880:
- -: 881: /*
- -: 882: ** Command argument useage for this command:
- -: 883: **
- -: 884: ** CmdArgs->CommandCode = FM_GET_DIR_FILE_CC
- -: 885: ** CmdArgs->Source1 = name of directory or file
- -: 886: ** CmdArgs->FileInfoState = state of directory or file
- -: 887: ** CmdArgs->FileInfoSize = file size, else zero
- -: 888: ** CmdArgs->FileInfoTime = last modify time
- -: 889: */
- -: 890:
- -: 891: /* Initialize file info packet (set all data to zero) */
- 8: 892: CFE_SB_InitMsg(&FM_GlobalData.FileInfoPkt, FM_FILE_INFO_TLM_MID,
- -: 893: sizeof(FM_FileInfoPkt_t), TRUE);
- -: 894:
- -: 895: /* Report directory or filename state, name, size and time */
- 8: 896: FM_GlobalData.FileInfoPkt.FileStatus = (uint8) CmdArgs->FileInfoState;
- 8: 897: strcpy(FM_GlobalData.FileInfoPkt.Filename, CmdArgs->Source1);
- -: 898:
- 8: 899: FM_GlobalData.FileInfoPkt.FileSize = CmdArgs->FileInfoSize;
- 8: 900: FM_GlobalData.FileInfoPkt.LastModifiedTime = CmdArgs->FileInfoTime;
- -: 901:
- -: 902: /* Validate CRC algorithm */
- 8: 903: if (CmdArgs->FileInfoCRC != FM_IGNORE_CRC)
- -: 904: {
- 7: 905: if (CmdArgs->FileInfoState != FM_NAME_IS_FILE_CLOSED)
- -: 906: {
- -: 907: /* Can only calculate CRC for closed files */
- 1: 908: FM_GlobalData.ChildCmdWarnCounter++;
- -: 909:
- 1: 910: CFE_EVS_SendEvent(FM_GET_FILE_INFO_WARNING_EID, CFE_EVS_INFORMATION,
- -: 911: "%s warning: unable to compute CRC: invalid file state = %d, file = %s",
- -: 912: CmdText, (int)CmdArgs->FileInfoState, CmdArgs->Source1);
- -: 913:
- 1: 914: CmdArgs->FileInfoCRC = FM_IGNORE_CRC;
- -: 915: }
- 8: 916: else if ((CmdArgs->FileInfoCRC != CFE_ES_CRC_8) &&
- 1: 917: (CmdArgs->FileInfoCRC != CFE_ES_CRC_16) &&
- 1: 918: (CmdArgs->FileInfoCRC != CFE_ES_CRC_32))
- -: 919: {
- -: 920: /* Can only calculate CRC using known algorithms */
- 1: 921: FM_GlobalData.ChildCmdWarnCounter++;
- -: 922:
- 1: 923: CFE_EVS_SendEvent(FM_GET_FILE_INFO_WARNING_EID, CFE_EVS_INFORMATION,
- -: 924: "%s warning: unable to compute CRC: invalid CRC type = %d, file = %s",
- -: 925: CmdText, (int)CmdArgs->FileInfoCRC, CmdArgs->Source1);
- -: 926:
- 1: 927: CmdArgs->FileInfoCRC = FM_IGNORE_CRC;
- -: 928: }
- -: 929: }
- -: 930:
- -: 931: /* Compute CRC */
- 8: 932: if (CmdArgs->FileInfoCRC != FM_IGNORE_CRC)
- -: 933: {
- 5: 934: FileHandle = OS_open(CmdArgs->Source1, OS_READ_ONLY, 0);
- -: 935:
- 5: 936: if (FileHandle < 0)
- -: 937: {
- 1: 938: FM_GlobalData.ChildCmdWarnCounter++;
- -: 939:
- -: 940: /* Send CRC failure event (warning) */
- 1: 941: CFE_EVS_SendEvent(FM_GET_FILE_INFO_WARNING_EID, CFE_EVS_ERROR,
- -: 942: "%s warning: unable to compute CRC: OS_open result = %d, file = %s",
- -: 943: CmdText, (int)FileHandle, CmdArgs->Source1);
- -: 944:
- 1: 945: GettingCRC = FALSE;
- -: 946: }
- -: 947: else
- -: 948: {
- 4: 949: GettingCRC = TRUE;
- -: 950: }
- -: 951:
- 31: 952: while (GettingCRC)
- -: 953: {
- 21: 954: BytesRead = OS_read(FileHandle, FM_GlobalData.ChildBuffer,
- -: 955: FM_CHILD_FILE_BLOCK_SIZE);
- -: 956:
- 21: 957: if (BytesRead == 0)
- -: 958: {
- -: 959: /* Finished reading file */
- 3: 960: GettingCRC = FALSE;
- 3: 961: OS_close(FileHandle);
- -: 962:
- -: 963: /* Add CRC to telemetry packet */
- 3: 964: FM_GlobalData.FileInfoPkt.CRC_Computed = TRUE;
- 3: 965: FM_GlobalData.FileInfoPkt.CRC = CurrentCRC;
- -: 966: }
- 18: 967: else if (BytesRead < 0)
- -: 968: {
- -: 969: /* Error reading file */
- 1: 970: CurrentCRC = 0;
- 1: 971: GettingCRC = FALSE;
- 1: 972: OS_close(FileHandle);
- -: 973:
- -: 974: /* Send CRC failure event (warning) */
- 1: 975: FM_GlobalData.ChildCmdWarnCounter++;
- 1: 976: CFE_EVS_SendEvent(FM_GET_FILE_INFO_WARNING_EID, CFE_EVS_INFORMATION,
- -: 977: "%s warning: unable to compute CRC: OS_read result = %d, file = %s",
- -: 978: CmdText, (int)BytesRead, CmdArgs->Source1);
- -: 979: }
- -: 980: else
- -: 981: {
- -: 982: /* Continue CRC calculation */
- 17: 983: CurrentCRC = CFE_ES_CalculateCRC(FM_GlobalData.ChildBuffer, BytesRead,
- -: 984: CurrentCRC, CmdArgs->FileInfoCRC);
- -: 985: }
- -: 986:
- -: 987: /* Avoid CPU hogging */
- 21: 988: if (GettingCRC)
- -: 989: {
- 17: 990: LoopCount++;
- 17: 991: if (LoopCount == FM_CHILD_FILE_LOOP_COUNT)
- -: 992: {
- -: 993: /* Give up the CPU */
- 1: 994: CFE_ES_PerfLogExit(FM_CHILD_TASK_PERF_ID);
- 1: 995: OS_TaskDelay(FM_CHILD_FILE_SLEEP_MS);
- 1: 996: CFE_ES_PerfLogEntry(FM_CHILD_TASK_PERF_ID);
- 1: 997: LoopCount = 0;
- -: 998: }
- -: 999: }
- -: 1000: }
- -: 1001:
- 5: 1002: FM_GlobalData.FileInfoPkt.CRC = CurrentCRC;
- -: 1003: }
- -: 1004:
- -: 1005: /* Timestamp and send file info telemetry packet */
- 8: 1006: CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.FileInfoPkt);
- 8: 1007: CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.FileInfoPkt);
- -: 1008:
- 8: 1009: FM_GlobalData.ChildCmdCounter++;
- -: 1010:
- -: 1011: /* Send command completion event (debug) */
- 8: 1012: CFE_EVS_SendEvent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG,
- -: 1013: "%s command: file = %s", CmdText, CmdArgs->Source1);
- -: 1014:
- -: 1015: /* Report previous child task activity */
- 8: 1016: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 8: 1017: FM_GlobalData.ChildCurrentCC = 0;
- -: 1018:
- 8: 1019: return;
- -: 1020:
- -: 1021:} /* End of FM_ChildFileInfoCmd() */
- -: 1022:
- -: 1023:
- -: 1024:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1025:/* */
- -: 1026:/* FM child task command handler -- Create Directory */
- -: 1027:/* */
- -: 1028:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1029:
- 3: 1030:void FM_ChildCreateDirCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 1031:{
- 3: 1032: char *CmdText = "Create Directory";
- -: 1033: int32 OS_Status;
- -: 1034:
- -: 1035: /* Report current child task activity */
- 3: 1036: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 1037:
- 3: 1038: OS_Status = OS_mkdir(CmdArgs->Source1, 0);
- -: 1039:
- 3: 1040: if (OS_Status != OS_SUCCESS)
- -: 1041: {
- 1: 1042: FM_GlobalData.ChildCmdErrCounter++;
- -: 1043:
- -: 1044: /* Send command failure event (error) */
- 1: 1045: CFE_EVS_SendEvent(FM_CREATE_DIR_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1046: "%s error: OS_mkdir failed: result = %d, dir = %s",
- -: 1047: CmdText, (int)OS_Status, CmdArgs->Source1);
- -: 1048: }
- -: 1049: else
- -: 1050: {
- 2: 1051: FM_GlobalData.ChildCmdCounter++;
- -: 1052:
- -: 1053: /* Send command completion event (info) */
- 2: 1054: CFE_EVS_SendEvent(FM_CREATE_DIR_CMD_EID, CFE_EVS_DEBUG,
- -: 1055: "%s command: src = %s", CmdText, CmdArgs->Source1);
- -: 1056: }
- -: 1057:
- -: 1058: /* Report previous child task activity */
- 3: 1059: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 3: 1060: FM_GlobalData.ChildCurrentCC = 0;
- -: 1061:
- 3: 1062: return;
- -: 1063:
- -: 1064:} /* End of FM_ChildCreateDirCmd() */
- -: 1065:
- -: 1066:
- -: 1067:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1068:/* */
- -: 1069:/* FM child task command handler -- Delete Directory */
- -: 1070:/* */
- -: 1071:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1072:
- 5: 1073:void FM_ChildDeleteDirCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 1074:{
- 5: 1075: char *CmdText = "Delete Directory";
- 5: 1076: boolean RemoveTheDir = TRUE;
- -: 1077: os_dirp_t DirPtr;
- -: 1078: os_dirent_t *DirEntry;
- -: 1079: int32 OS_Status;
- -: 1080:
- -: 1081: /* Report current child task activity */
- 5: 1082: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 1083:
- -: 1084: /* Open the dir so we can see if it is empty */
- 5: 1085: DirPtr = OS_opendir(CmdArgs->Source1);
- -: 1086:
- 5: 1087: if (DirPtr == NULL)
- -: 1088: {
- 2: 1089: CFE_EVS_SendEvent(FM_DELETE_DIR_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1090: "%s error: OS_opendir failed: dir = %s",
- -: 1091: CmdText, CmdArgs->Source1);
- -: 1092:
- 2: 1093: RemoveTheDir = FALSE;
- 2: 1094: FM_GlobalData.ChildCmdErrCounter++;
- -: 1095: }
- -: 1096: else
- -: 1097: {
- -: 1098: /* Look for a directory entry that is not "." or ".." */
- 7: 1099: while (((DirEntry = OS_readdir(DirPtr)) != NULL) && (RemoveTheDir == TRUE))
- -: 1100: {
- 2: 1101: if ((strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_THIS_DIRECTORY) != 0) &&
- 1: 1102: (strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_PARENT_DIRECTORY) != 0))
- -: 1103: {
- 1: 1104: CFE_EVS_SendEvent(FM_DELETE_DIR_EMPTY_ERR_EID, CFE_EVS_ERROR,
- -: 1105: "%s error: directory is not empty: dir = %s",
- -: 1106: CmdText, CmdArgs->Source1);
- -: 1107:
- 1: 1108: RemoveTheDir = FALSE;
- 1: 1109: FM_GlobalData.ChildCmdErrCounter++;
- -: 1110: }
- -: 1111: }
- -: 1112:
- 3: 1113: OS_closedir(DirPtr);
- -: 1114: }
- -: 1115:
- 5: 1116: if (RemoveTheDir)
- -: 1117: {
- -: 1118: /* Remove the directory */
- 2: 1119: OS_Status = OS_rmdir(CmdArgs->Source1);
- -: 1120:
- 2: 1121: if (OS_Status != OS_SUCCESS)
- -: 1122: {
- -: 1123: /* Send command failure event (error) */
- 1: 1124: CFE_EVS_SendEvent(FM_DELETE_DIR_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1125: "%s error: OS_rmdir failed: result = %d, dir = %s",
- -: 1126: CmdText, (int)OS_Status, CmdArgs->Source1);
- -: 1127:
- 1: 1128: FM_GlobalData.ChildCmdErrCounter++;
- -: 1129: }
- -: 1130: else
- -: 1131: {
- -: 1132: /* Send command completion event (info) */
- 1: 1133: CFE_EVS_SendEvent(FM_DELETE_DIR_CMD_EID, CFE_EVS_DEBUG,
- -: 1134: "%s command: src = %s", CmdText, CmdArgs->Source1);
- -: 1135:
- 1: 1136: FM_GlobalData.ChildCmdCounter++;
- -: 1137: }
- -: 1138: }
- -: 1139:
- -: 1140: /* Report previous child task activity */
- 5: 1141: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 5: 1142: FM_GlobalData.ChildCurrentCC = 0;
- -: 1143:
- 5: 1144: return;
- -: 1145:
- -: 1146:
- -: 1147:} /* End of FM_ChildDeleteDirCmd() */
- -: 1148:
- -: 1149:
- -: 1150:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1151:/* */
- -: 1152:/* FM child task command handler -- Get Directory List (to file) */
- -: 1153:/* */
- -: 1154:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1155:
- 3: 1156:void FM_ChildDirListFileCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 1157:{
- 3: 1158: char *CmdText = "Directory List to File";
- -: 1159: boolean Result;
- -: 1160: int32 FileHandle;
- -: 1161: os_dirp_t DirPtr;
- -: 1162:
- -: 1163: /* Report current child task activity */
- 3: 1164: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 1165:
- -: 1166: /*
- -: 1167: ** Command argument useage for this command:
- -: 1168: **
- -: 1169: ** CmdArgs->CommandCode = FM_GET_DIR_FILE_CC
- -: 1170: ** CmdArgs->Source1 = directory name
- -: 1171: ** CmdArgs->Source2 = directory name plus separator
- -: 1172: ** CmdArgs->Target = output filename
- -: 1173: */
- -: 1174:
- -: 1175: /* Open directory for reading directory list */
- 3: 1176: DirPtr = OS_opendir(CmdArgs->Source1);
- -: 1177:
- 3: 1178: if (DirPtr == NULL)
- -: 1179: {
- 2: 1180: FM_GlobalData.ChildCmdErrCounter++;
- -: 1181:
- -: 1182: /* Send command failure event (error) */
- 2: 1183: CFE_EVS_SendEvent(FM_GET_DIR_FILE_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1184: "%s error: OS_opendir failed: dir = %s",
- -: 1185: CmdText, CmdArgs->Source1);
- -: 1186: }
- -: 1187: else
- -: 1188: {
- -: 1189: /* Create output file, write placeholder for statistics, etc. */
- 1: 1190: Result = FM_ChildDirListFileInit(&FileHandle, CmdArgs->Source1,
- -: 1191: CmdArgs->Target);
- 1: 1192: if (Result == TRUE)
- -: 1193: {
- -: 1194: /* Read directory listing and write contents to output file */
- 1: 1195: FM_ChildDirListFileLoop(DirPtr, FileHandle, CmdArgs->Source1,
- 1: 1196: CmdArgs->Source2, CmdArgs->Target, CmdArgs->GetSizeTimeMode);
- -: 1197:
- -: 1198: /* Close output file */
- 1: 1199: OS_close(FileHandle);
- -: 1200: }
- -: 1201:
- -: 1202: /* Close directory list access handle */
- 1: 1203: OS_closedir(DirPtr);
- -: 1204: }
- -: 1205:
- -: 1206: /* Report previous child task activity */
- 3: 1207: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 3: 1208: FM_GlobalData.ChildCurrentCC = 0;
- -: 1209:
- 3: 1210: return;
- -: 1211:
- -: 1212:} /* End of FM_ChildDirListFileCmd() */
- -: 1213:
- -: 1214:
- -: 1215:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1216:/* */
- -: 1217:/* FM child task command handler -- Get Directory List (to pkt) */
- -: 1218:/* */
- -: 1219:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1220:
- 4: 1221:void FM_ChildDirListPktCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 1222:{
- 4: 1223: char *CmdText = "Directory List to Packet";
- -: 1224: char LogicalName[OS_MAX_PATH_LEN];
- -: 1225: boolean StillProcessing;
- -: 1226: os_dirp_t DirPtr;
- -: 1227: os_dirent_t *DirEntry;
- -: 1228: int32 ListIndex;
- -: 1229: FM_DirListEntry_t *ListEntry;
- -: 1230: int32 PathLength;
- -: 1231: int32 EntryLength;
- 4: 1232: int32 FilesTillSleep = FM_CHILD_STAT_SLEEP_FILECOUNT;
- -: 1233:
- -: 1234: /* Report current child task activity */
- 4: 1235: FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;
- -: 1236:
- -: 1237: /*
- -: 1238: ** Command argument useage for this command:
- -: 1239: **
- -: 1240: ** CmdArgs->CommandCode = FM_GET_DIR_PKT_CC
- -: 1241: ** CmdArgs->Source1 = directory name
- -: 1242: ** CmdArgs->Source2 = directory name plus separator
- -: 1243: ** CmdArgs->DirListOffset = index of 1st reported dir entry
- -: 1244: */
- 4: 1245: PathLength = strlen(CmdArgs->Source2);
- -: 1246:
- -: 1247: /* Open source directory for reading directory list */
- 4: 1248: DirPtr = OS_opendir(CmdArgs->Source1);
- -: 1249:
- 4: 1250: if (DirPtr == NULL)
- -: 1251: {
- 2: 1252: FM_GlobalData.ChildCmdErrCounter++;
- -: 1253:
- -: 1254: /* Send command failure event (error) */
- 2: 1255: CFE_EVS_SendEvent(FM_GET_DIR_PKT_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1256: "%s error: OS_opendir failed: dir = %s",
- -: 1257: CmdText, CmdArgs->Source1);
- -: 1258: }
- -: 1259: else
- -: 1260: {
- -: 1261: /* Initialize the directory list telemetry packet */
- 2: 1262: CFE_SB_InitMsg(&FM_GlobalData.DirListPkt, FM_DIR_LIST_TLM_MID,
- -: 1263: sizeof(FM_DirListPkt_t), TRUE);
- -: 1264:
- 2: 1265: strncpy(FM_GlobalData.DirListPkt.DirName, CmdArgs->Source1, OS_MAX_PATH_LEN);
- 2: 1266: FM_GlobalData.DirListPkt.FirstFile = CmdArgs->DirListOffset;
- -: 1267:
- 2: 1268: StillProcessing = TRUE;
- 8: 1269: while (StillProcessing == TRUE)
- -: 1270: {
- -: 1271: /* Read next directory entry */
- 4: 1272: DirEntry = OS_readdir(DirPtr);
- -: 1273:
- 4: 1274: if (DirEntry == NULL)
- -: 1275: {
- -: 1276: /* Stop reading directory - no more entries */
- 2: 1277: StillProcessing = FALSE;
- -: 1278: }
- 4: 1279: else if ((strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_THIS_DIRECTORY) != 0) &&
- 2: 1280: (strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_PARENT_DIRECTORY) != 0))
- -: 1281: {
- -: 1282: /* Do not count the "." and ".." directory entries */
- 2: 1283: FM_GlobalData.DirListPkt.TotalFiles++;
- -: 1284:
- -: 1285: /* Start collecting directory entries at command specified offset */
- -: 1286: /* Stop collecting directory entries when telemetry packet is full */
- 4: 1287: if ((FM_GlobalData.DirListPkt.TotalFiles > FM_GlobalData.DirListPkt.FirstFile) &&
- 2: 1288: (FM_GlobalData.DirListPkt.PacketFiles < FM_DIR_LIST_PKT_ENTRIES))
- -: 1289: {
- -: 1290: /* Create a shorthand access to the packet list entry */
- 2: 1291: ListIndex = FM_GlobalData.DirListPkt.PacketFiles;
- 2: 1292: ListEntry = &FM_GlobalData.DirListPkt.FileList[ListIndex];
- -: 1293:
- 2: 1294: EntryLength = strlen(OS_DIRENTRY_NAME(*DirEntry));
- -: 1295:
- -: 1296: /* Verify combined directory plus filename length */
- 5: 1297: if ((EntryLength < sizeof(ListEntry->EntryName)) &&
- 2: 1298: ((PathLength + EntryLength) < OS_MAX_PATH_LEN))
- -: 1299: {
- -: 1300: /* Add filename to directory listing telemetry packet */
- 1: 1301: strcpy(ListEntry->EntryName, OS_DIRENTRY_NAME(*DirEntry));
- -: 1302:
- -: 1303: /* Build filename - Directory already has path separator */
- 1: 1304: strcpy(LogicalName, CmdArgs->Source2);
- 1: 1305: strcat(LogicalName, OS_DIRENTRY_NAME(*DirEntry));
- -: 1306:
- 1: 1307: FM_ChildSleepStat(LogicalName, ListEntry, &FilesTillSleep, CmdArgs->GetSizeTimeMode);
- -: 1308:
- -: 1309: /* Add another entry to the telemetry packet */
- 1: 1310: FM_GlobalData.DirListPkt.PacketFiles++;
- -: 1311: }
- -: 1312: else
- -: 1313: {
- 1: 1314: FM_GlobalData.ChildCmdWarnCounter++;
- -: 1315:
- -: 1316: /* Send command warning event (info) */
- 1: 1317: CFE_EVS_SendEvent(FM_GET_DIR_PKT_WARNING_EID, CFE_EVS_INFORMATION,
- -: 1318: "%s warning: dir + entry is too long: dir = %s, entry = %s",
- -: 1319: CmdText, CmdArgs->Source2, OS_DIRENTRY_NAME(*DirEntry));
- -: 1320: }
- -: 1321: }
- -: 1322: }
- -: 1323: }
- -: 1324:
- 2: 1325: OS_closedir(DirPtr);
- -: 1326:
- -: 1327: /* Timestamp and send directory listing telemetry packet */
- 2: 1328: CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.DirListPkt);
- 2: 1329: CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.DirListPkt);
- -: 1330:
- -: 1331: /* Send command completion event (info) */
- 2: 1332: CFE_EVS_SendEvent(FM_GET_DIR_PKT_CMD_EID, CFE_EVS_DEBUG,
- -: 1333: "%s command: offset = %d, dir = %s",
- -: 1334: CmdText, (int)CmdArgs->DirListOffset, CmdArgs->Source1);
- -: 1335:
- 2: 1336: FM_GlobalData.ChildCmdCounter++;
- -: 1337: }
- -: 1338:
- -: 1339: /* Report previous child task activity */
- 4: 1340: FM_GlobalData.ChildPreviousCC = CmdArgs->CommandCode;
- 4: 1341: FM_GlobalData.ChildCurrentCC = 0;
- -: 1342:
- 4: 1343: return;
- -: 1344:
- -: 1345:} /* End of FM_ChildDirListPktCmd() */
- -: 1346:
- -: 1347:
- -: 1348:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1349:/* */
- -: 1350:/* FM child task command handler -- Set File Permissions */
- -: 1351:/* */
- -: 1352:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- 3: 1353:void FM_ChildSetPermissionsCmd(FM_ChildQueueEntry_t *CmdArgs)
- -: 1354:{
- -: 1355: int32 OS_Status;
- 3: 1356: char *CmdText = "Set Permissions";
- -: 1357:
- 3: 1358: OS_Status = OS_chmod(CmdArgs->Source1, CmdArgs->Mode);
- -: 1359:
- 3: 1360: if (OS_Status == OS_SUCCESS)
- -: 1361: {
- 2: 1362: FM_GlobalData.ChildCmdCounter++;
- -: 1363:
- -: 1364: /* Send command completion event (info) */
- 2: 1365: CFE_EVS_SendEvent(FM_SET_PERM_CMD_EID, CFE_EVS_DEBUG,
- -: 1366: "%s command: file = %s, access = %d",
- -: 1367: CmdText, CmdArgs->Source1, (int)CmdArgs->Mode);
- -: 1368: }
- -: 1369: else
- -: 1370: {
- 1: 1371: FM_GlobalData.ChildCmdErrCounter++;
- -: 1372:
- -: 1373: /* Send OS error message */
- 1: 1374: CFE_EVS_SendEvent(FM_SET_PERM_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1375: "%s command: OS_chmod error, RC=0x%08X, file = %s, access = %d",
- -: 1376: CmdText, (unsigned int)OS_Status, CmdArgs->Source1, (int)CmdArgs->Mode);
- -: 1377: }
- -: 1378:
- 3: 1379: return;
- -: 1380:} /* End of FM_ChildSetPermissionsCmd() */
- -: 1381:
- -: 1382:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1383:/* */
- -: 1384:/* FM child task utility function -- create dir list output file */
- -: 1385:/* */
- -: 1386:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1387:
- 5: 1388:boolean FM_ChildDirListFileInit(int32 *FileHandlePtr, char *Directory, char *Filename)
- -: 1389:{
- 5: 1390: char *CmdText = "Directory List to File";
- 5: 1391: boolean CommandResult = TRUE;
- -: 1392: CFE_FS_Header_t FileHeader;
- -: 1393: int32 FileHandle;
- -: 1394: int32 BytesWritten;
- -: 1395:
- -: 1396: /* Initialize the standard cFE File Header for the Directory Listing File */
- 5: 1397: CFE_PSP_MemSet(&FileHeader, 0, sizeof(CFE_FS_Header_t));
- 5: 1398: FileHeader.SubType = FM_DIR_LIST_FILE_SUBTYPE;
- 5: 1399: strcpy(FileHeader.Description, CmdText);
- -: 1400:
- -: 1401: /* Create directory listing output file */
- 5: 1402: FileHandle = OS_creat(Filename, OS_READ_WRITE);
- 5: 1403: if (FileHandle >= OS_SUCCESS)
- -: 1404: {
- -: 1405: /* Write the standard CFE file header */
- 4: 1406: BytesWritten = CFE_FS_WriteHeader(FileHandle, &FileHeader);
- 4: 1407: if (BytesWritten == sizeof(CFE_FS_Header_t))
- -: 1408: {
- -: 1409: /* Initialize directory statistics structure */
- 3: 1410: CFE_PSP_MemSet(&FM_GlobalData.DirListFileStats, 0, sizeof(FM_DirListFileStats_t));
- 3: 1411: strcpy(FM_GlobalData.DirListFileStats.DirName, Directory);
- -: 1412:
- -: 1413: /* Write blank FM directory statistics structure as a place holder */
- 3: 1414: BytesWritten = OS_write(FileHandle, &FM_GlobalData.DirListFileStats, sizeof(FM_DirListFileStats_t));
- 3: 1415: if (BytesWritten == sizeof(FM_DirListFileStats_t))
- -: 1416: {
- -: 1417: /* Return output file handle */
- 2: 1418: *FileHandlePtr = FileHandle;
- -: 1419: }
- -: 1420: else
- -: 1421: {
- 1: 1422: CommandResult = FALSE;
- 1: 1423: FM_GlobalData.ChildCmdErrCounter++;
- -: 1424:
- -: 1425: /* Send command failure event (error) */
- 1: 1426: CFE_EVS_SendEvent(FM_GET_DIR_FILE_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1427: "%s error: OS_write blank stats failed: result = %d, expected = %d",
- -: 1428: CmdText, (int)BytesWritten, sizeof(FM_DirListFileStats_t));
- -: 1429: }
- -: 1430: }
- -: 1431: else
- -: 1432: {
- 1: 1433: CommandResult = FALSE;
- 1: 1434: FM_GlobalData.ChildCmdErrCounter++;
- -: 1435:
- -: 1436: /* Send command failure event (error) */
- 1: 1437: CFE_EVS_SendEvent(FM_GET_DIR_FILE_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1438: "%s error: CFE_FS_WriteHeader failed: result = %d, expected = %d",
- -: 1439: CmdText, (int)BytesWritten, sizeof(CFE_FS_Header_t));
- -: 1440: }
- -: 1441:
- -: 1442: /* Close output file after write error */
- 4: 1443: if (CommandResult == FALSE)
- -: 1444: {
- 2: 1445: OS_close(FileHandle);
- -: 1446: }
- -: 1447: }
- -: 1448: else
- -: 1449: {
- 1: 1450: CommandResult = FALSE;
- 1: 1451: FM_GlobalData.ChildCmdErrCounter++;
- -: 1452:
- -: 1453: /* Send command failure event (error) */
- 1: 1454: CFE_EVS_SendEvent(FM_GET_DIR_FILE_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1455: "%s error: OS_creat failed: result = %d, file = %s",
- -: 1456: CmdText, (int)FileHandle, Filename);
- -: 1457: }
- -: 1458:
- 5: 1459: return(CommandResult);
- -: 1460:
- -: 1461:} /* End FM_ChildDirListFileInit */
- -: 1462:
- -: 1463:
- -: 1464:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1465:/* */
- -: 1466:/* FM child task utility function -- write to dir list output file */
- -: 1467:/* */
- -: 1468:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1469:
- 5: 1470:void FM_ChildDirListFileLoop(os_dirp_t DirPtr, int32 FileHandle,
- -: 1471: char *Directory, char *DirWithSep, char *Filename, uint8 getSizeTimeMode)
- -: 1472:{
- 5: 1473: char *CmdText = "Directory List to File";
- 5: 1474: int32 WriteLength = sizeof(FM_DirListEntry_t);
- 5: 1475: boolean ReadingDirectory = TRUE;
- 5: 1476: boolean CommandResult = TRUE;
- 5: 1477: uint32 DirEntries = 0;
- 5: 1478: uint32 FileEntries = 0;
- -: 1479: int32 EntryLength;
- -: 1480: int32 PathLength;
- -: 1481: int32 BytesWritten;
- 5: 1482: int32 FilesTillSleep = FM_CHILD_STAT_SLEEP_FILECOUNT;
- -: 1483: char TempName[OS_MAX_PATH_LEN];
- -: 1484: os_dirent_t *DirEntry;
- -: 1485: FM_DirListEntry_t DirListData;
- -: 1486:
- -: 1487:
- 5: 1488: PathLength = strlen(DirWithSep);
- -: 1489:
- -: 1490: /* Until end of directory entries or output file write error */
- 18: 1491: while ((CommandResult == TRUE) && (ReadingDirectory == TRUE))
- -: 1492: {
- 8: 1493: DirEntry = OS_readdir(DirPtr);
- -: 1494:
- -: 1495: /* Normal loop end - no more directory entries */
- 8: 1496: if (DirEntry == NULL)
- -: 1497: {
- 4: 1498: ReadingDirectory = FALSE;
- -: 1499: }
- 8: 1500: else if ((strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_THIS_DIRECTORY) != 0) &&
- 4: 1501: (strcmp(OS_DIRENTRY_NAME(*DirEntry), FM_PARENT_DIRECTORY) != 0))
- -: 1502: {
- -: 1503: /* Do not count the "." and ".." files */
- 4: 1504: DirEntries++;
- -: 1505:
- -: 1506: /* Count all files - write limited number */
- 4: 1507: if (FileEntries < FM_DIR_LIST_FILE_ENTRIES)
- -: 1508: {
- 4: 1509: EntryLength = strlen(OS_DIRENTRY_NAME(*DirEntry));
- -: 1510:
- 11: 1511: if ((EntryLength < sizeof(DirListData.EntryName)) &&
- 4: 1512: ((PathLength + EntryLength) < OS_MAX_PATH_LEN))
- -: 1513: {
- -: 1514: /* Build qualified directory entry name */
- 3: 1515: strcpy(TempName, DirWithSep);
- 3: 1516: strcat(TempName, OS_DIRENTRY_NAME(*DirEntry));
- -: 1517:
- -: 1518: /* Populate directory list file entry */
- 3: 1519: strcpy(DirListData.EntryName, OS_DIRENTRY_NAME(*DirEntry));
- -: 1520:
- 3: 1521: FM_ChildSleepStat(TempName, (FM_DirListEntry_t *)&DirListData, &FilesTillSleep, getSizeTimeMode);
- -: 1522:
- -: 1523: /* Write directory list file entry to output file */
- 3: 1524: BytesWritten = OS_write(FileHandle, &DirListData, WriteLength);
- -: 1525:
- 3: 1526: if (BytesWritten == WriteLength)
- -: 1527: {
- 2: 1528: FileEntries++;
- -: 1529: }
- -: 1530: else
- -: 1531: {
- 1: 1532: CommandResult = FALSE;
- 1: 1533: FM_GlobalData.ChildCmdErrCounter++;
- -: 1534:
- -: 1535: /* Send command failure event (error) */
- 1: 1536: CFE_EVS_SendEvent(FM_GET_DIR_FILE_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1537: "%s error: OS_write entry failed: result = %d, expected = %d",
- -: 1538: CmdText, (int)BytesWritten, (int)WriteLength);
- -: 1539: }
- -: 1540: }
- -: 1541: else
- -: 1542: {
- 1: 1543: FM_GlobalData.ChildCmdWarnCounter++;
- -: 1544:
- -: 1545: /* Send command failure event (error) */
- 1: 1546: CFE_EVS_SendEvent(FM_GET_DIR_FILE_WARNING_EID, CFE_EVS_INFORMATION,
- -: 1547: "%s error: combined directory and entry name too long: dir = %s, entry = %s",
- -: 1548: CmdText, Directory, OS_DIRENTRY_NAME(*DirEntry));
- -: 1549: }
- -: 1550: }
- -: 1551: }
- -: 1552: }
- -: 1553:
- -: 1554: /* Update directory statistics in output file */
- 5: 1555: if ((CommandResult == TRUE) && (DirEntries != 0))
- -: 1556: {
- -: 1557: /* Update entries found in directory vs entries written to file */
- 3: 1558: FM_GlobalData.DirListFileStats.DirEntries = DirEntries;
- 3: 1559: FM_GlobalData.DirListFileStats.FileEntries = FileEntries;
- -: 1560:
- -: 1561: /* Back up to the start of the statisitics data */
- 3: 1562: OS_lseek(FileHandle, sizeof(CFE_FS_Header_t), OS_SEEK_SET);
- -: 1563:
- -: 1564: /* Write an updated version of the statistics data */
- 3: 1565: WriteLength = sizeof(FM_DirListFileStats_t);
- 3: 1566: BytesWritten = OS_write(FileHandle, &FM_GlobalData.DirListFileStats, WriteLength);
- -: 1567:
- 3: 1568: if (BytesWritten != WriteLength)
- -: 1569: {
- 1: 1570: CommandResult = FALSE;
- 1: 1571: FM_GlobalData.ChildCmdErrCounter++;
- -: 1572:
- -: 1573: /* Send command failure event (error) */
- 1: 1574: CFE_EVS_SendEvent(FM_GET_DIR_FILE_OS_ERR_EID, CFE_EVS_ERROR,
- -: 1575: "%s error: OS_write update stats failed: result = %d, expected = %d",
- -: 1576: CmdText, (int)BytesWritten, (int)WriteLength);
- -: 1577: }
- -: 1578: }
- -: 1579:
- -: 1580: /* Send command completion event (info) */
- 5: 1581: if (CommandResult == TRUE)
- -: 1582: {
- 3: 1583: FM_GlobalData.ChildCmdCounter++;
- -: 1584:
- 3: 1585: CFE_EVS_SendEvent(FM_GET_DIR_FILE_CMD_EID, CFE_EVS_DEBUG,
- -: 1586: "%s command: wrote %d of %d names: dir = %s, filename = %s",
- -: 1587: CmdText, (int)FileEntries, (int)DirEntries, Directory, Filename);
- -: 1588: }
- -: 1589:
- 5: 1590: return;
- -: 1591:
- -: 1592:} /* End of FM_ChildDirListFileLoop */
- -: 1593:
- -: 1594:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1595:/* */
- -: 1596:/* FM child task utility function -- get dir entry size and time */
- -: 1597:/* */
- -: 1598:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1599:
- 8: 1600:int32 FM_ChildSizeTimeMode(const char *Filename, uint32 *FileSize, uint32 *FileTime, uint32 *FileMode)
- -: 1601:{
- -: 1602: int32 Result;
- -: 1603: os_fstat_t FileStatus;
- -: 1604: uint32 FileStatTime;
- -: 1605:
- 8: 1606: CFE_PSP_MemSet(&FileStatus, 0, sizeof(os_fstat_t));
- -: 1607:
- 8: 1608: Result = OS_stat(Filename, &FileStatus);
- -: 1609:
- 8: 1610: if (Result != OS_SUCCESS)
- -: 1611: {
- 1: 1612: *FileSize = 0;
- 1: 1613: *FileTime = 0;
- -: 1614: }
- -: 1615: else
- -: 1616: {
- 7: 1617: FileStatTime = FileStatus.st_mtime;
- -: 1618:
- -: 1619: /* Convert the file system time to spacecraft time */
- 7: 1620: *FileTime = CFE_TIME_FS2CFESeconds(FileStatTime);
- -: 1621:
- 7: 1622: *FileSize = FileStatus.st_size;
- -: 1623:
- 7: 1624: *FileMode = FileStatus.st_mode;
- -: 1625:
- -: 1626: }
- -: 1627:
- 8: 1628: return(Result);
- -: 1629:
- -: 1630:} /* End of FM_ChildSizeTimeMode */
- -: 1631:
- -: 1632:
- -: 1633:
- -: 1634:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1635:/* */
- -: 1636:/* FM child task utility function -- sleep between OS_stat on files*/
- -: 1637:/* */
- -: 1638:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 1639:
- 7: 1640:void FM_ChildSleepStat(const char *Filename, FM_DirListEntry_t *DirListData, int32 *FilesTillSleep, boolean getSizeTimeMode)
- -: 1641:{
- -: 1642: /* Check if command requested size and time */
- 7: 1643: if (getSizeTimeMode == TRUE)
- -: 1644: {
- 6: 1645: if (*FilesTillSleep <= 0)
- -: 1646: {
- 5: 1647: CFE_ES_PerfLogExit(FM_CHILD_TASK_PERF_ID);
- 5: 1648: OS_TaskDelay(FM_CHILD_STAT_SLEEP_MS);
- 5: 1649: CFE_ES_PerfLogEntry(FM_CHILD_TASK_PERF_ID);
- 5: 1650: *FilesTillSleep = FM_CHILD_STAT_SLEEP_FILECOUNT;
- -: 1651: }
- -: 1652:
- -: 1653: /* Get file size, date, and mode */
- 6: 1654: FM_ChildSizeTimeMode(Filename, &(DirListData->EntrySize),
- -: 1655: &(DirListData->ModifyTime),
- -: 1656: &(DirListData ->Mode));
- -: 1657:
- 6: 1658: (*FilesTillSleep)--;
- -: 1659: }
- -: 1660: else
- -: 1661: {
- 1: 1662: DirListData->EntrySize = 0;
- 1: 1663: DirListData->ModifyTime = 0;
- 1: 1664: DirListData->Mode = 0;
- -: 1665: }
- 7: 1666:} /* FM_ChildSleepStat */
- -: 1667:
- -: 1668:/************************/
- -: 1669:/* End of File Comment */
- -: 1670:/************************/
- -: 1671:
diff --git a/fsw/unit_test/fm_child_test.c b/fsw/unit_test/fm_child_test.c
index 16eae18..9b95ac3 100644
--- a/fsw/unit_test/fm_child_test.c
+++ b/fsw/unit_test/fm_child_test.c
@@ -1,34 +1,34 @@
- /*************************************************************************
- ** Filename: fm_child_test.c
- **
- ** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
- ** File Manager Application Version 2.5.3
- **
- ** Copyright © 2020 United States Government as represented by the Administrator of
- ** the National Aeronautics and Space Administration. All Rights Reserved.
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- **
- ** You may obtain a copy of the License at
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- **
- ** Purpose:
- ** This file contains unit test cases for the functions contained in the file fm_child.c.
- **
- ** References:
- ** Flight Software Branch C Coding Standard Version 1.2
- ** CFS Development Standards Document
- **
- ** Notes:
- **
- *************************************************************************/
+/*************************************************************************
+** Filename: fm_child_test.c
+**
+** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
+** File Manager Application Version 2.5.3
+**
+** Copyright © 2020 United States Government as represented by the Administrator of
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+**
+** Purpose:
+** This file contains unit test cases for the functions contained in the file fm_child.c.
+**
+** References:
+** Flight Software Branch C Coding Standard Version 1.2
+** CFS Development Standards Document
+**
+** Notes:
+**
+*************************************************************************/
/*
* Includes
@@ -67,13 +67,13 @@ int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_FDGetInfoHook(int32 filedes, OS_FDTableEntr
{
fd_prop->IsValid = TRUE;
- strncpy (fd_prop->Path, "source/filename", OS_MAX_PATH_LEN);
+ strncpy(fd_prop->Path, "source/filename", OS_MAX_PATH_LEN);
return 0;
} /* end UT_FM_CHILD_TEST_CFE_OSFILEAPI_FDGetInfoHook */
int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHookRunCount;
-int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHook(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHook(const char *path, os_fstat_t *filestats)
{
UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHookRunCount += 1;
@@ -85,7 +85,7 @@ int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHook(const char *path, os_fstat_t *fi
return 0;
} /* end UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHook */
-int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHook2(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHook2(const char *path, os_fstat_t *filestats)
{
UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHookRunCount += 1;
@@ -96,7 +96,7 @@ int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHook2(const char *path, os_fstat_t *f
} /* end UT_FM_CHILD_TEST_CFE_OSFILEAPI_WriteHook2 */
uint8 UT_FM_CFE_OSFILEAPI_ReadHookCPUHoggingRunCount;
-int32 UT_FM_CFE_OSFILEAPI_ReadHookCPUHogging(int32 filedes, void *buffer, uint32 nbytes)
+int32 UT_FM_CFE_OSFILEAPI_ReadHookCPUHogging(int32 filedes, void *buffer, uint32 nbytes)
{
UT_FM_CFE_OSFILEAPI_ReadHookCPUHoggingRunCount += 1;
@@ -106,8 +106,7 @@ int32 UT_FM_CFE_OSFILEAPI_ReadHookCPUHogging(int32 filedes, void *buffer, uint3
return 99;
} /* end UT_FM_CFE_OSFILEAPI_ReadHookCPUHogging */
-
-int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookIsDirectory(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookIsDirectory(const char *path, os_fstat_t *filestats)
{
#ifdef OS_FILESTAT_MODE
filestats->FileModeBits = OS_FILESTAT_MODE_DIR;
@@ -117,7 +116,7 @@ int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookIsDirectory(const char *path, os_fs
return CFE_SUCCESS;
} /* end UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookIsDirectory */
-int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t *filestats)
{
#ifdef OS_FILESTAT_MODE
filestats->FileModeBits = OS_FILESTAT_MODE_READ;
@@ -127,7 +126,7 @@ int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t
return CFE_SUCCESS;
} /* end UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookIsFile */
-int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize(const char *path, os_fstat_t *filestats)
{
#ifdef OS_FILESTAT_SIZE
filestats->FileSize = 5;
@@ -142,14 +141,14 @@ int32 UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize(const char *path, os_fstat_
return CFE_SUCCESS;
} /* end UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize */
-os_dirent_t UT_FM_GLOBAL_DirEntry;
-uint8 UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount;
+os_dirent_t UT_FM_GLOBAL_DirEntry;
+uint8 UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount;
os_dirent_t *UT_FM_CFE_OSFILEAPI_ReadDirHook1(os_dirp_t directory)
{
UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount += 1;
if (UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount == 1)
- strncpy (UT_FM_GLOBAL_DirEntry.FileName, "filename", 256);
+ strncpy(UT_FM_GLOBAL_DirEntry.FileName, "filename", 256);
else
return NULL;
@@ -158,7 +157,7 @@ os_dirent_t *UT_FM_CFE_OSFILEAPI_ReadDirHook1(os_dirp_t directory)
os_dirent_t *UT_FM_CFE_OSFILEAPI_ReadDirHook2(os_dirp_t directory)
{
- uint32 i;
+ uint32 i;
UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount += 1;
@@ -182,7 +181,7 @@ os_dirent_t *UT_FM_CFE_OSFILEAPI_ReadDirHook3(os_dirp_t directory)
UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount += 1;
if (UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount == 1)
- strncpy (UT_FM_GLOBAL_DirEntry.FileName, "", 256);
+ strncpy(UT_FM_GLOBAL_DirEntry.FileName, "", 256);
else
return NULL;
@@ -198,15 +197,15 @@ void FM_ChildInit_Test_CreateChildSemaphoreFailed(void)
/* Execute the function being tested */
Result = FM_ChildInit();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CHILD_INIT_SEM_ERR_EID, CFE_EVS_ERROR, "Child Task initialization error: create semaphore failed: result = -1"),
- "Child Task initialization error: create semaphore failed: result = -1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CHILD_INIT_SEM_ERR_EID, CFE_EVS_ERROR,
+ "Child Task initialization error: create semaphore failed: result = -1"),
+ "Child Task initialization error: create semaphore failed: result = -1");
- UtAssert_True (Result == -1, "Result == -1");
+ UtAssert_True(Result == -1, "Result == -1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_AppMain_Test_CreateChildSemaphoreFailed */
@@ -219,15 +218,16 @@ void FM_ChildInit_Test_CreateQueueSemaphoreFailed(void)
/* Execute the function being tested */
Result = FM_ChildInit();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CHILD_INIT_QSEM_ERR_EID, CFE_EVS_ERROR, "Child Task initialization error: create queue count semaphore failed: result = -1"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_CHILD_INIT_QSEM_ERR_EID, CFE_EVS_ERROR,
+ "Child Task initialization error: create queue count semaphore failed: result = -1"),
"Child Task initialization error: create queue count semaphore failed: result = -1");
- UtAssert_True (Result == -1, "Result == -1");
+ UtAssert_True(Result == -1, "Result == -1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_AppMain_Test_CreateQueueSemaphoreFailed */
@@ -240,15 +240,15 @@ void FM_ChildInit_Test_CreateTaskFailed(void)
/* Execute the function being tested */
Result = FM_ChildInit();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CHILD_INIT_CREATE_ERR_EID, CFE_EVS_ERROR, "Child Task initialization error: create task failed: result = -1"),
- "Child Task initialization error: create task failed: result = -1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CHILD_INIT_CREATE_ERR_EID, CFE_EVS_ERROR,
+ "Child Task initialization error: create task failed: result = -1"),
+ "Child Task initialization error: create task failed: result = -1");
- UtAssert_True (Result == -1, "Result == -1");
+ UtAssert_True(Result == -1, "Result == -1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_AppMain_Test_CreateTaskFailed */
@@ -256,14 +256,13 @@ void FM_ChildTask_Test_Nominal(void)
{
/* Execute the function being tested */
FM_ChildTask();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CHILD_INIT_EID, CFE_EVS_INFORMATION, "Child Task initialization complete"),
- "Child Task initialization complete");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CHILD_INIT_EID, CFE_EVS_INFORMATION, "Child Task initialization complete"),
+ "Child Task initialization complete");
/* In this test we don't care about the 2nd message (error message) being generated by the call to FM_ChildLoop */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildTask_Test_Nominal */
@@ -274,30 +273,27 @@ void FM_ChildTask_Test_RegisterChildFailed(void)
/* Execute the function being tested */
FM_ChildTask();
-
- /* Verify results */
- UtAssert_True
- (Ut_CFE_ES_SysLogWritten("Child Task initialization error: register child failed: result = -1"),
- "Child Task initialization error: register child failed: result = -1");
- UtAssert_True (Ut_CFE_ES_GetSysLogQueueDepth() == 1,
- "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
+ /* Verify results */
+ UtAssert_True(Ut_CFE_ES_SysLogWritten("Child Task initialization error: register child failed: result = -1"),
+ "Child Task initialization error: register child failed: result = -1");
+ UtAssert_True(Ut_CFE_ES_GetSysLogQueueDepth() == 1, "Ut_CFE_ES_GetSysLogQueueDepth() == 1");
} /* end FM_ChildTask_Test_RegisterChildFailed */
void FM_ChildLoop_Test_Nominal(void)
{
FM_GlobalData.ChildQueueCount = 1;
- FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildReadIndex = 1;
/* Execute the function being tested */
FM_ChildLoop();
-
+
/* Verify results */
/* In this test we don't care about the error messages being generated by the second run of the while-loop */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildLoop_Test_Nominal */
@@ -308,15 +304,14 @@ void FM_ChildLoop_Test_SemaphoreTakeFailed(void)
/* Execute the function being tested */
FM_ChildLoop();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CHILD_TERM_SEM_ERR_EID, CFE_EVS_ERROR,
- "Child Task termination error: semaphore take failed: result = -1"),
- "Child Task termination error: semaphore take failed: result = -1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CHILD_TERM_SEM_ERR_EID, CFE_EVS_ERROR,
+ "Child Task termination error: semaphore take failed: result = -1"),
+ "Child Task termination error: semaphore take failed: result = -1");
/* In this test we don't care about the error messages being generated by the second run of the while-loop */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildLoop_Test_SemaphoreTakeFailed */
@@ -326,307 +321,306 @@ void FM_ChildLoop_Test_EmptyQueue(void)
/* Execute the function being tested */
FM_ChildLoop();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CHILD_TERM_EMPTYQ_ERR_EID, CFE_EVS_ERROR,
- "Child Task termination error: empty queue"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_CHILD_TERM_EMPTYQ_ERR_EID, CFE_EVS_ERROR, "Child Task termination error: empty queue"),
"Child Task termination error: empty queue");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
/* In this test we don't care about the error messages being generated by the second run of the while-loop */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildLoop_Test_EmptyQueue */
void FM_ChildLoop_Test_InvalidQueueIndex(void)
{
FM_GlobalData.ChildQueueCount = 1;
- FM_GlobalData.ChildReadIndex = FM_CHILD_QUEUE_DEPTH;
+ FM_GlobalData.ChildReadIndex = FM_CHILD_QUEUE_DEPTH;
/* Execute the function being tested */
FM_ChildLoop();
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CHILD_TERM_QIDX_ERR_EID, CFE_EVS_ERROR,
- "Child Task termination error: invalid queue index: index = 3"),
- "Child Task termination error: invalid queue index: index = 3");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CHILD_TERM_QIDX_ERR_EID, CFE_EVS_ERROR,
+ "Child Task termination error: invalid queue index: index = 3"),
+ "Child Task termination error: invalid queue index: index = 3");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
/* In this test we don't care about the error messages being generated by the second run of the while-loop */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildLoop_Test_InvalidQueueIndex */
void FM_ChildProcess_Test_CopyAndTooLargeReadIndex(void)
{
- FM_GlobalData.ChildReadIndex = FM_CHILD_QUEUE_DEPTH;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = FM_CHILD_QUEUE_DEPTH;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_COPY_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 0, "FM_GlobalData.ChildReadIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_CopyAndTooLargeReadIndex */
void FM_ChildProcess_Test_Move(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_MOVE_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_Move */
void FM_ChildProcess_Test_Rename(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_RENAME_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_Rename */
void FM_ChildProcess_Test_Delete(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_DELETE_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_Delete */
void FM_ChildProcess_Test_DeleteAll(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_DELETE_ALL_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_DeleteAll */
+#ifdef FM_INCLUDE_DECOMPRESS
void FM_ChildProcess_Test_Decompress(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_DECOMPRESS_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_Decompress */
+#endif
void FM_ChildProcess_Test_Concat(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_CONCAT_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_Concat */
void FM_ChildProcess_Test_CreateDir(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_CREATE_DIR_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_CreateDir */
void FM_ChildProcess_Test_DeleteDir(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_DELETE_DIR_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_DeleteDir */
void FM_ChildProcess_Test_GetFileInfo(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_GET_FILE_INFO_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_GetFileInfo */
void FM_ChildProcess_Test_GetDirFile(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_GET_DIR_FILE_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_GetDirFile */
void FM_ChildProcess_Test_GetDirPkt(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_GET_DIR_PKT_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_GetDirPkt */
void FM_ChildProcess_Test_DeleteInt(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_DELETE_INT_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
} /* end FM_ChildProcess_Test_DeleteInt */
-
void FM_ChildProcess_Test_SetPermissions(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = FM_SET_FILE_PERM_CC;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
} /* end FM_ChildProcess_Test_SetPermissions */
void FM_ChildProcess_Test_InvalidCommandCode(void)
{
- FM_GlobalData.ChildReadIndex = 1;
- FM_GlobalData.ChildQueueCount = 1;
+ FM_GlobalData.ChildReadIndex = 1;
+ FM_GlobalData.ChildQueueCount = 1;
FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex].CommandCode = 99;
/* Execute the function being tested */
FM_ChildProcess();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildReadIndex == 2, "FM_GlobalData.ChildReadIndex == 2");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 0, "FM_GlobalData.ChildQueueCount == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CHILD_EXE_ERR_EID, CFE_EVS_ERROR, "Child Task execution error: invalid command code: cc = 99"),
- "Child Task execution error: invalid command code: cc = 99");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CHILD_EXE_ERR_EID, CFE_EVS_ERROR,
+ "Child Task execution error: invalid command code: cc = 99"),
+ "Child Task execution error: invalid command code: cc = 99");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildProcess_Test_InvalidCommandCode */
@@ -642,17 +636,17 @@ void FM_ChildCopyCmd_Test_Nominal(void)
/* Execute the function being tested */
FM_ChildCopyCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == FM_COPY_CC, "FM_GlobalData.ChildPreviousCC == FM_COPY_CC");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == FM_COPY_CC, "FM_GlobalData.ChildPreviousCC == FM_COPY_CC");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_COPY_CMD_EID, CFE_EVS_DEBUG, "Copy File command: src = source1, tgt = target"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_COPY_CMD_EID, CFE_EVS_DEBUG, "Copy File command: src = source1, tgt = target"),
"Copy File command: src = source1, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildCopyCmd_Test_Nominal */
@@ -671,17 +665,17 @@ void FM_ChildCopyCmd_Test_CopyFailed(void)
/* Execute the function being tested */
FM_ChildCopyCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == FM_COPY_CC, "FM_GlobalData.ChildPreviousCC == FM_COPY_CC");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == FM_COPY_CC, "FM_GlobalData.ChildPreviousCC == FM_COPY_CC");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_COPY_OS_ERR_EID, CFE_EVS_ERROR, "Copy File error: OS_cp failed: result = -1, src = source1, tgt = target"),
- "Copy File error: OS_cp failed: result = -1, src = source1, tgt = target");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_COPY_OS_ERR_EID, CFE_EVS_ERROR,
+ "Copy File error: OS_cp failed: result = -1, src = source1, tgt = target"),
+ "Copy File error: OS_cp failed: result = -1, src = source1, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildCopyCmd_Test_CopyFailed */
@@ -697,17 +691,17 @@ void FM_ChildMoveCmd_Test_Nominal(void)
/* Execute the function being tested */
FM_ChildMoveCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_MOVE_CMD_EID, CFE_EVS_DEBUG, "Move File command: src = source1, tgt = target"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_MOVE_CMD_EID, CFE_EVS_DEBUG, "Move File command: src = source1, tgt = target"),
"Move File command: src = source1, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildMoveCmd_Test_Nominal */
@@ -726,17 +720,17 @@ void FM_ChildMoveCmd_Test_MoveFailed(void)
/* Execute the function being tested */
FM_ChildMoveCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_MOVE_OS_ERR_EID, CFE_EVS_ERROR, "Move File error: OS_mv failed: result = -1, src = source1, tgt = target"),
- "Move File error: OS_mv failed: result = -1, src = source1, tgt = target");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_MOVE_OS_ERR_EID, CFE_EVS_ERROR,
+ "Move File error: OS_mv failed: result = -1, src = source1, tgt = target"),
+ "Move File error: OS_mv failed: result = -1, src = source1, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildMoveCmd_Test_MoveFailed */
@@ -752,17 +746,17 @@ void FM_ChildRenameCmd_Test_Nominal(void)
/* Execute the function being tested */
FM_ChildRenameCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_RENAME_CMD_EID, CFE_EVS_DEBUG, "Rename File command: src = source1, tgt = target"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_RENAME_CMD_EID, CFE_EVS_DEBUG, "Rename File command: src = source1, tgt = target"),
"Rename File command: src = source1, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildRenameCmd_Test_Nominal */
@@ -781,17 +775,17 @@ void FM_ChildRenameCmd_Test_RenameFailed(void)
/* Execute the function being tested */
FM_ChildRenameCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_RENAME_OS_ERR_EID, CFE_EVS_ERROR, "Rename File error: OS_rename failed: result = -1, src = source1, tgt = target"),
- "Rename File error: OS_rename failed: result = -1, src = source1, tgt = target");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_RENAME_OS_ERR_EID, CFE_EVS_ERROR,
+ "Rename File error: OS_rename failed: result = -1, src = source1, tgt = target"),
+ "Rename File error: OS_rename failed: result = -1, src = source1, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildRenameCmd_Test_RenameFailed */
@@ -806,17 +800,16 @@ void FM_ChildDeleteCmd_Test_Nominal(void)
/* Execute the function being tested */
FM_ChildDeleteCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_CMD_EID, CFE_EVS_DEBUG, "Delete File command: file = source1"),
- "Delete File command: file = source1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_CMD_EID, CFE_EVS_DEBUG, "Delete File command: file = source1"),
+ "Delete File command: file = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDeleteCmd_Test_Nominal */
@@ -834,17 +827,17 @@ void FM_ChildDeleteCmd_Test_RemoveFailed(void)
/* Execute the function being tested */
FM_ChildDeleteCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_OS_ERR_EID, CFE_EVS_ERROR, "Delete File error: OS_remove failed: result = -1, file = source1"),
- "Delete File error: OS_remove failed: result = -1, file = source1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_OS_ERR_EID, CFE_EVS_ERROR,
+ "Delete File error: OS_remove failed: result = -1, file = source1"),
+ "Delete File error: OS_remove failed: result = -1, file = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDeleteCmd_Test_RemoveFailed */
@@ -868,17 +861,17 @@ void FM_ChildDeleteAllCmd_Test_Nominal(void)
/* Execute the function being tested */
FM_ChildDeleteAllCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG, "Delete All Files command: deleted 1 files: dir = source"),
- "Delete All Files command: deleted 1 files: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG,
+ "Delete All Files command: deleted 1 files: dir = source"),
+ "Delete All Files command: deleted 1 files: dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDeleteAllCmd_Test_Nominal */
@@ -897,24 +890,24 @@ void FM_ChildDeleteAllCmd_Test_opendirFailed(void)
/* Execute the function being tested */
FM_ChildDeleteAllCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_OS_ERR_EID, CFE_EVS_ERROR, "Delete All Files error: OS_opendir failed: dir = source"),
- "Delete All Files error: OS_opendir failed: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_ALL_OS_ERR_EID, CFE_EVS_ERROR,
+ "Delete All Files error: OS_opendir failed: dir = source"),
+ "Delete All Files error: OS_opendir failed: dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDeleteAllCmd_Test_opendirFailed */
void FM_ChildDeleteAllCmd_Test_FilesNotDeletedFilenameTooLarge(void)
{
FM_ChildQueueEntry_t *CmdArgs;
- uint32 i;
+ uint32 i;
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex];
@@ -937,22 +930,24 @@ void FM_ChildDeleteAllCmd_Test_FilesNotDeletedFilenameTooLarge(void)
/* Execute the function being tested */
FM_ChildDeleteAllCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG, "Delete All Files command: deleted 0 files: dir = source"),
- "Delete All Files command: deleted 0 files: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG,
+ "Delete All Files command: deleted 0 files: dir = source"),
+ "Delete All Files command: deleted 0 files: dir = source");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION, "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(
+ FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION,
+ "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
"Delete All Files command: one or more files could not be deleted. Files may be open : dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildDeleteAllCmd_Test_FilesNotDeletedFilenameTooLarge */
@@ -975,22 +970,24 @@ void FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsInvalid(void)
/* Execute the function being tested */
FM_ChildDeleteAllCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG, "Delete All Files command: deleted 0 files: dir = source"),
- "Delete All Files command: deleted 0 files: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG,
+ "Delete All Files command: deleted 0 files: dir = source"),
+ "Delete All Files command: deleted 0 files: dir = source");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION, "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(
+ FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION,
+ "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
"Delete All Files command: one or more files could not be deleted. Files may be open : dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsInvalid */
@@ -1011,27 +1008,30 @@ void FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsNotInUse(void)
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_READDIR_INDEX, &UT_FM_CFE_OSFILEAPI_ReadDirHook1);
UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount = 0;
- /* Set to make FM_GetFilenameState return FM_NAME_IS_NOT_IN_USE, to satisfy condition "FilenameState == FM_NAME_IS_NOT_IN_USE" */
+ /* Set to make FM_GetFilenameState return FM_NAME_IS_NOT_IN_USE, to satisfy condition "FilenameState ==
+ * FM_NAME_IS_NOT_IN_USE" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 1);
/* Execute the function being tested */
FM_ChildDeleteAllCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG, "Delete All Files command: deleted 0 files: dir = source"),
- "Delete All Files command: deleted 0 files: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG,
+ "Delete All Files command: deleted 0 files: dir = source"),
+ "Delete All Files command: deleted 0 files: dir = source");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION, "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(
+ FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION,
+ "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
"Delete All Files command: one or more files could not be deleted. Files may be open : dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsNotInUse */
@@ -1060,22 +1060,24 @@ void FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileOpen(void)
/* Execute the function being tested */
FM_ChildDeleteAllCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG, "Delete All Files command: deleted 0 files: dir = source"),
- "Delete All Files command: deleted 0 files: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG,
+ "Delete All Files command: deleted 0 files: dir = source"),
+ "Delete All Files command: deleted 0 files: dir = source");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION, "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(
+ FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION,
+ "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
"Delete All Files command: one or more files could not be deleted. Files may be open : dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileOpen */
@@ -1101,22 +1103,24 @@ void FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileClosed(void)
/* Execute the function being tested */
FM_ChildDeleteAllCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG, "Delete All Files command: deleted 0 files: dir = source"),
- "Delete All Files command: deleted 0 files: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG,
+ "Delete All Files command: deleted 0 files: dir = source"),
+ "Delete All Files command: deleted 0 files: dir = source");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION, "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(
+ FM_DELETE_ALL_FILES_ND_WARNING_EID, CFE_EVS_INFORMATION,
+ "Delete All Files command: one or more files could not be deleted. Files may be open : dir = source"),
"Delete All Files command: one or more files could not be deleted. Files may be open : dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileClosed */
@@ -1142,24 +1146,25 @@ void FM_ChildDeleteAllCmd_Test_DirectorySkipped(void)
/* Execute the function being tested */
FM_ChildDeleteAllCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG, "Delete All Files command: deleted 0 files: dir = source"),
- "Delete All Files command: deleted 0 files: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_ALL_CMD_EID, CFE_EVS_DEBUG,
+ "Delete All Files command: deleted 0 files: dir = source"),
+ "Delete All Files command: deleted 0 files: dir = source");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_ALL_SKIP_WARNING_EID, CFE_EVS_INFORMATION, "Delete All Files command: one or more directories skipped : dir = source"),
- "Delete All Files command: one or more directories skipped : dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_ALL_SKIP_WARNING_EID, CFE_EVS_INFORMATION,
+ "Delete All Files command: one or more directories skipped : dir = source"),
+ "Delete All Files command: one or more directories skipped : dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildDeleteAllCmd_Test_DirectorySkipped */
+#ifdef FM_INCLUDE_DECOMPRESS
void FM_ChildDecompressCmd_Test_Nominal(void)
{
FM_ChildQueueEntry_t *CmdArgs;
@@ -1172,17 +1177,17 @@ void FM_ChildDecompressCmd_Test_Nominal(void)
/* Execute the function being tested */
FM_ChildDecompressCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DECOM_CMD_EID, CFE_EVS_DEBUG, "Decompress File command: src = source, tgt = target"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_DECOM_CMD_EID, CFE_EVS_DEBUG, "Decompress File command: src = source, tgt = target"),
"Decompress File command: src = source, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDecompressCmd_Test_Nominal */
@@ -1201,20 +1206,23 @@ void FM_ChildDecompressCmd_Test_DecompressFailed(void)
/* Execute the function being tested */
FM_ChildDecompressCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DECOM_CFE_ERR_EID, CFE_EVS_ERROR, "Decompress File error: CFE_FS_Decompress failed: result = -1, src = source, tgt = target"),
- "Decompress File error: CFE_FS_Decompress failed: result = -1, src = source, tgt = target");
+ UtAssert_True(Ut_CFE_EVS_EventSent(
+ FM_DECOM_CFE_ERR_EID, CFE_EVS_ERROR,
+ "Decompress File error: CFE_FS_Decompress failed: result = -1, src = source, tgt = target"),
+ "Decompress File error: CFE_FS_Decompress failed: result = -1, src = source, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDecompressCmd_Test_DecompressFailed */
+#endif
+
void FM_ChildConcatCmd_Test_Nominal(void)
{
FM_ChildQueueEntry_t *CmdArgs;
@@ -1228,17 +1236,17 @@ void FM_ChildConcatCmd_Test_Nominal(void)
/* Execute the function being tested */
FM_ChildConcatCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CONCAT_CMD_EID, CFE_EVS_DEBUG, "Concat Files command: src1 = source1, src2 = source2, tgt = target"),
- "Concat Files command: src1 = source1, src2 = source2, tgt = target");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CONCAT_CMD_EID, CFE_EVS_DEBUG,
+ "Concat Files command: src1 = source1, src2 = source2, tgt = target"),
+ "Concat Files command: src1 = source1, src2 = source2, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildConcatCmd_Test_Nominal */
@@ -1258,17 +1266,17 @@ void FM_ChildConcatCmd_Test_CopyFailed(void)
/* Execute the function being tested */
FM_ChildConcatCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CONCAT_OSCPY_ERR_EID, CFE_EVS_ERROR, "Concat Files error: OS_cp failed: result = -1, src = source1, tgt = target"),
- "Concat Files error: OS_cp failed: result = -1, src = source1, tgt = target");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CONCAT_OSCPY_ERR_EID, CFE_EVS_ERROR,
+ "Concat Files error: OS_cp failed: result = -1, src = source1, tgt = target"),
+ "Concat Files error: OS_cp failed: result = -1, src = source1, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildConcatCmd_Test_CopyFailed */
@@ -1288,17 +1296,17 @@ void FM_ChildConcatCmd_Test_OpenFailed1(void)
/* Execute the function being tested */
FM_ChildConcatCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CONCAT_OPEN_SRC2_ERR_EID, CFE_EVS_ERROR, "Concat Files error: OS_open failed: result = -1, src2 = source2"),
- "Concat Files error: OS_open failed: result = -1, src2 = source2");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CONCAT_OPEN_SRC2_ERR_EID, CFE_EVS_ERROR,
+ "Concat Files error: OS_open failed: result = -1, src2 = source2"),
+ "Concat Files error: OS_open failed: result = -1, src2 = source2");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildConcatCmd_Test_OpenFailed1 */
@@ -1318,17 +1326,17 @@ void FM_ChildConcatCmd_Test_OpenFailed2(void)
/* Execute the function being tested */
FM_ChildConcatCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CONCAT_OPEN_TGT_ERR_EID, CFE_EVS_ERROR, "Concat Files error: OS_open failed: result = -1, tgt = target"),
- "Concat Files error: OS_open failed: result = -1, tgt = target");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CONCAT_OPEN_TGT_ERR_EID, CFE_EVS_ERROR,
+ "Concat Files error: OS_open failed: result = -1, tgt = target"),
+ "Concat Files error: OS_open failed: result = -1, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildConcatCmd_Test_OpenFailed2 */
@@ -1348,17 +1356,17 @@ void FM_ChildConcatCmd_Test_ReadFailed(void)
/* Execute the function being tested */
FM_ChildConcatCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CONCAT_OSRD_ERR_EID, CFE_EVS_ERROR, "Concat Files error: OS_read failed: result = -1, file = source2"),
- "Concat Files error: OS_read failed: result = -1, file = source2");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CONCAT_OSRD_ERR_EID, CFE_EVS_ERROR,
+ "Concat Files error: OS_read failed: result = -1, file = source2"),
+ "Concat Files error: OS_read failed: result = -1, file = source2");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildConcatCmd_Test_ReadFailed */
@@ -1381,17 +1389,17 @@ void FM_ChildConcatCmd_Test_WriteFailed(void)
/* Execute the function being tested */
FM_ChildConcatCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CONCAT_OSWR_ERR_EID, CFE_EVS_ERROR, "Concat Files error: OS_write failed: result = -1, expected = 1"),
- "Concat Files error: OS_write failed: result = -1, expected = 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CONCAT_OSWR_ERR_EID, CFE_EVS_ERROR,
+ "Concat Files error: OS_write failed: result = -1, expected = 1"),
+ "Concat Files error: OS_write failed: result = -1, expected = 1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildConcatCmd_Test_WriteFailed */
@@ -1409,25 +1417,26 @@ void FM_ChildConcatCmd_Test_CPUHogging(void)
/* Needed to reach CPU hogging prevention code (starts with comment "Avoid CPU hogging") */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_READ_INDEX, &UT_FM_CFE_OSFILEAPI_ReadHookCPUHogging);
UT_FM_CFE_OSFILEAPI_ReadHookCPUHoggingRunCount = 0;
-
+
/* Needed to reach CPU hogging prevention code (starts with comment "Avoid CPU hogging") */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_WRITE_INDEX, 99, 1);
Ut_OSFILEAPI_ContinueReturnCodeAfterCountZero(UT_OSFILEAPI_WRITE_INDEX);
/* Execute the function being tested */
FM_ChildConcatCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1"); /* Command succeeds on final loop */
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1,
+ "FM_GlobalData.ChildCmdCounter == 1"); /* Command succeeds on final loop */
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
/* Command succeeds on final loop */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CONCAT_CMD_EID, CFE_EVS_DEBUG, "Concat Files command: src1 = source1, src2 = source2, tgt = target"),
- "Concat Files command: src1 = source1, src2 = source2, tgt = target");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CONCAT_CMD_EID, CFE_EVS_DEBUG,
+ "Concat Files command: src1 = source1, src2 = source2, tgt = target"),
+ "Concat Files command: src1 = source1, src2 = source2, tgt = target");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildConcatCmd_Test_CPUHogging */
@@ -1439,27 +1448,27 @@ void FM_ChildFileInfoCmd_Test_FinishedReading(void)
CmdArgs->CommandCode = 1; /* Value doesn't really matter in this test */
strncpy(CmdArgs->Source1, "source1", OS_MAX_PATH_LEN);
- CmdArgs->FileInfoSize = 0;
- CmdArgs->FileInfoTime = 0;
- CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
+ CmdArgs->FileInfoSize = 0;
+ CmdArgs->FileInfoTime = 0;
+ CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
CmdArgs->FileInfoState = FM_NAME_IS_FILE_CLOSED;
/* Execute the function being tested */
FM_ChildFileInfoCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.FileInfoPkt.CRC_Computed == TRUE, "FM_GlobalData.FileInfoPkt.CRC_Computed == TRUE");
- UtAssert_True (FM_GlobalData.FileInfoPkt.CRC == 0, "FM_GlobalData.FileInfoPkt.CRC == 0");
+ UtAssert_True(FM_GlobalData.FileInfoPkt.CRC_Computed == TRUE, "FM_GlobalData.FileInfoPkt.CRC_Computed == TRUE");
+ UtAssert_True(FM_GlobalData.FileInfoPkt.CRC == 0, "FM_GlobalData.FileInfoPkt.CRC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG, "Get File Info command: file = source1"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG, "Get File Info command: file = source1"),
"Get File Info command: file = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildFileInfoCmd_Test_FinishedReading */
@@ -1471,9 +1480,9 @@ void FM_ChildFileInfoCmd_Test_ContinueCRC(void)
CmdArgs->CommandCode = 1; /* Value doesn't really matter in this test */
strncpy(CmdArgs->Source1, "source1", OS_MAX_PATH_LEN);
- CmdArgs->FileInfoSize = 0;
- CmdArgs->FileInfoTime = 0;
- CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
+ CmdArgs->FileInfoSize = 0;
+ CmdArgs->FileInfoTime = 0;
+ CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
CmdArgs->FileInfoState = FM_NAME_IS_FILE_CLOSED;
/* Set to fail conditions "BytesRead == 0" and "BytesRead < 0" */
@@ -1484,20 +1493,20 @@ void FM_ChildFileInfoCmd_Test_ContinueCRC(void)
/* Execute the function being tested */
FM_ChildFileInfoCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.FileInfoPkt.CRC_Computed == TRUE, "FM_GlobalData.FileInfoPkt.CRC_Computed == TRUE");
- UtAssert_True (FM_GlobalData.FileInfoPkt.CRC == 99, "FM_GlobalData.FileInfoPkt.CRC == 99");
+ UtAssert_True(FM_GlobalData.FileInfoPkt.CRC_Computed == TRUE, "FM_GlobalData.FileInfoPkt.CRC_Computed == TRUE");
+ UtAssert_True(FM_GlobalData.FileInfoPkt.CRC == 99, "FM_GlobalData.FileInfoPkt.CRC == 99");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG, "Get File Info command: file = source1"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG, "Get File Info command: file = source1"),
"Get File Info command: file = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildFileInfoCmd_Test_ContinueCRC */
@@ -1509,9 +1518,9 @@ void FM_ChildFileInfoCmd_Test_CPUHogging(void)
CmdArgs->CommandCode = 1; /* Value doesn't really matter in this test */
strncpy(CmdArgs->Source1, "source1", OS_MAX_PATH_LEN);
- CmdArgs->FileInfoSize = 0;
- CmdArgs->FileInfoTime = 0;
- CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
+ CmdArgs->FileInfoSize = 0;
+ CmdArgs->FileInfoTime = 0;
+ CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
CmdArgs->FileInfoState = FM_NAME_IS_FILE_CLOSED;
/* Needed to reach CPU hogging prevention code (starts with comment "Avoid CPU hogging") */
@@ -1520,14 +1529,14 @@ void FM_ChildFileInfoCmd_Test_CPUHogging(void)
/* Execute the function being tested */
FM_ChildFileInfoCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildFileInfoCmd_Test_CPUHogging */
@@ -1539,28 +1548,29 @@ void FM_ChildFileInfoCmd_Test_InvalidFileState(void)
CmdArgs->CommandCode = 1; /* Value doesn't really matter in this test */
strncpy(CmdArgs->Source1, "source1", OS_MAX_PATH_LEN);
- CmdArgs->FileInfoSize = 0;
- CmdArgs->FileInfoTime = 0;
- CmdArgs->FileInfoCRC = 99;
+ CmdArgs->FileInfoSize = 0;
+ CmdArgs->FileInfoTime = 0;
+ CmdArgs->FileInfoCRC = 99;
CmdArgs->FileInfoState = 99;
/* Execute the function being tested */
FM_ChildFileInfoCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True (CmdArgs->FileInfoCRC == FM_IGNORE_CRC, "CmdArgs->FileInfoCRC == FM_IGNORE_CRC");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(CmdArgs->FileInfoCRC == FM_IGNORE_CRC, "CmdArgs->FileInfoCRC == FM_IGNORE_CRC");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_STATE_WARNING_EID, CFE_EVS_INFORMATION, "Get File Info warning: unable to compute CRC: invalid file state = 99, file = source1"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_STATE_WARNING_EID, CFE_EVS_INFORMATION,
+ "Get File Info warning: unable to compute CRC: invalid file state = 99, file = source1"),
"Get File Info warning: unable to compute CRC: invalid file state = 99, file = source1");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildFileInfoCmd_Test_InvalidFileState */
@@ -1572,28 +1582,29 @@ void FM_ChildFileInfoCmd_Test_InvalidCRCType(void)
CmdArgs->CommandCode = 1; /* Value doesn't really matter in this test */
strncpy(CmdArgs->Source1, "source1", OS_MAX_PATH_LEN);
- CmdArgs->FileInfoSize = 0;
- CmdArgs->FileInfoTime = 0;
- CmdArgs->FileInfoCRC = 99;
+ CmdArgs->FileInfoSize = 0;
+ CmdArgs->FileInfoTime = 0;
+ CmdArgs->FileInfoCRC = 99;
CmdArgs->FileInfoState = FM_NAME_IS_FILE_CLOSED;
/* Execute the function being tested */
FM_ChildFileInfoCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True (CmdArgs->FileInfoCRC == FM_IGNORE_CRC, "CmdArgs->FileInfoCRC == FM_IGNORE_CRC");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(CmdArgs->FileInfoCRC == FM_IGNORE_CRC, "CmdArgs->FileInfoCRC == FM_IGNORE_CRC");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_TYPE_WARNING_EID, CFE_EVS_INFORMATION, "Get File Info warning: unable to compute CRC: invalid CRC type = 99, file = source1"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_TYPE_WARNING_EID, CFE_EVS_INFORMATION,
+ "Get File Info warning: unable to compute CRC: invalid CRC type = 99, file = source1"),
"Get File Info warning: unable to compute CRC: invalid CRC type = 99, file = source1");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildFileInfoCmd_Test_InvalidCRCType */
@@ -1605,9 +1616,9 @@ void FM_ChildFileInfoCmd_Test_OpenFailed(void)
CmdArgs->CommandCode = 1; /* Value doesn't really matter in this test */
strncpy(CmdArgs->Source1, "source1", OS_MAX_PATH_LEN);
- CmdArgs->FileInfoSize = 0;
- CmdArgs->FileInfoTime = 0;
- CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
+ CmdArgs->FileInfoSize = 0;
+ CmdArgs->FileInfoTime = 0;
+ CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
CmdArgs->FileInfoState = FM_NAME_IS_FILE_CLOSED;
/* Set to generate error message FM_GET_FILE_INFO_WARNING_EID for call to OS_open */
@@ -1615,23 +1626,24 @@ void FM_ChildFileInfoCmd_Test_OpenFailed(void)
/* Execute the function being tested */
FM_ChildFileInfoCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG, "Get File Info command: file = source1"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG, "Get File Info command: file = source1"),
"Get File Info command: file = source1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_OPEN_ERR_EID, CFE_EVS_ERROR, "Get File Info warning: unable to compute CRC: OS_open result = -1, file = source1"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_OPEN_ERR_EID, CFE_EVS_ERROR,
+ "Get File Info warning: unable to compute CRC: OS_open result = -1, file = source1"),
"Get File Info warning: unable to compute CRC: OS_open result = -1, file = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildFileInfoCmd_Test_OpenFailed */
@@ -1643,9 +1655,9 @@ void FM_ChildFileInfoCmd_Test_ReadFailed(void)
CmdArgs->CommandCode = 1; /* Value doesn't really matter in this test */
strncpy(CmdArgs->Source1, "source1", OS_MAX_PATH_LEN);
- CmdArgs->FileInfoSize = 0;
- CmdArgs->FileInfoTime = 0;
- CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
+ CmdArgs->FileInfoSize = 0;
+ CmdArgs->FileInfoTime = 0;
+ CmdArgs->FileInfoCRC = CFE_ES_CRC_8;
CmdArgs->FileInfoState = FM_NAME_IS_FILE_CLOSED;
/* Set to generate error message FM_GET_FILE_INFO_WARNING_EID for call to OS_read */
@@ -1653,24 +1665,25 @@ void FM_ChildFileInfoCmd_Test_ReadFailed(void)
/* Execute the function being tested */
FM_ChildFileInfoCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (FM_GlobalData.FileInfoPkt.CRC == 0, "FM_GlobalData.FileInfoPkt.CRC == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(FM_GlobalData.FileInfoPkt.CRC == 0, "FM_GlobalData.FileInfoPkt.CRC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG, "Get File Info command: file = source1"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_CMD_EID, CFE_EVS_DEBUG, "Get File Info command: file = source1"),
"Get File Info command: file = source1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_READ_WARNING_EID, CFE_EVS_INFORMATION, "Get File Info warning: unable to compute CRC: OS_read result = -1, file = source1"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_READ_WARNING_EID, CFE_EVS_INFORMATION,
+ "Get File Info warning: unable to compute CRC: OS_read result = -1, file = source1"),
"Get File Info warning: unable to compute CRC: OS_read result = -1, file = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildFileInfoCmd_Test_ReadFailed */
@@ -1684,18 +1697,17 @@ void FM_ChildCreateDirCmd_Test_Nominal(void)
strncpy(CmdArgs->Source1, "source", OS_MAX_PATH_LEN);
/* Execute the function being tested */
- FM_ChildCreateDirCmd(CmdArgs);
-
+ FM_ChildCreateDirCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CREATE_DIR_CMD_EID, CFE_EVS_DEBUG, "Create Directory command: src = source"),
- "Create Directory command: src = source1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CREATE_DIR_CMD_EID, CFE_EVS_DEBUG, "Create Directory command: src = source"),
+ "Create Directory command: src = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildCreateDirCmd_Test_Nominal */
@@ -1712,18 +1724,18 @@ void FM_ChildCreateDirCmd_Test_mkdirFailed(void)
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_MKDIR_INDEX, -1, 1);
/* Execute the function being tested */
- FM_ChildCreateDirCmd(CmdArgs);
-
+ FM_ChildCreateDirCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_CREATE_DIR_OS_ERR_EID, CFE_EVS_ERROR, "Create Directory error: OS_mkdir failed: result = -1, dir = source"),
- "Create Directory error: OS_mkdir failed: result = -1, dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_CREATE_DIR_OS_ERR_EID, CFE_EVS_ERROR,
+ "Create Directory error: OS_mkdir failed: result = -1, dir = source"),
+ "Create Directory error: OS_mkdir failed: result = -1, dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildCreateDirCmd_Test_mkdirFailed */
@@ -1740,18 +1752,17 @@ void FM_ChildDeleteDirCmd_Test_Nominal(void)
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_OPENDIR_INDEX, 1, 1);
/* Execute the function being tested */
- FM_ChildDeleteDirCmd(CmdArgs);
-
+ FM_ChildDeleteDirCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_DIR_CMD_EID, CFE_EVS_DEBUG, "Delete Directory command: src = source"),
- "Delete Directory command: src = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_DIR_CMD_EID, CFE_EVS_DEBUG, "Delete Directory command: src = source"),
+ "Delete Directory command: src = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDeleteDirCmd_Test_Nominal */
@@ -1768,18 +1779,18 @@ void FM_ChildDeleteDirCmd_Test_OpenDirFailed(void)
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_OPENDIR_INDEX, 0, 1);
/* Execute the function being tested */
- FM_ChildDeleteDirCmd(CmdArgs);
-
+ FM_ChildDeleteDirCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_OPENDIR_OS_ERR_EID, CFE_EVS_ERROR, "Delete Directory error: OS_opendir failed: dir = source"),
- "Delete Directory error: OS_opendir failed: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_OPENDIR_OS_ERR_EID, CFE_EVS_ERROR,
+ "Delete Directory error: OS_opendir failed: dir = source"),
+ "Delete Directory error: OS_opendir failed: dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDeleteDirCmd_Test_DirectoryNotEmpty */
@@ -1800,18 +1811,18 @@ void FM_ChildDeleteDirCmd_Test_DirectoryNotEmpty(void)
UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount = 0;
/* Execute the function being tested */
- FM_ChildDeleteDirCmd(CmdArgs);
-
+ FM_ChildDeleteDirCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_DIR_EMPTY_ERR_EID, CFE_EVS_ERROR, "Delete Directory error: directory is not empty: dir = source"),
- "Delete Directory error: directory is not empty: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_DIR_EMPTY_ERR_EID, CFE_EVS_ERROR,
+ "Delete Directory error: directory is not empty: dir = source"),
+ "Delete Directory error: directory is not empty: dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDeleteDirCmd_Test_DirectoryNotEmpty */
@@ -1831,18 +1842,18 @@ void FM_ChildDeleteDirCmd_Test_rmdirFailed(void)
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_RMDIR_INDEX, -1, 1);
/* Execute the function being tested */
- FM_ChildDeleteDirCmd(CmdArgs);
-
+ FM_ChildDeleteDirCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_DELETE_RMDIR_OS_ERR_EID, CFE_EVS_ERROR, "Delete Directory error: OS_rmdir failed: result = -1, dir = source"),
- "Delete Directory error: directory is not empty: dir = source");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_DELETE_RMDIR_OS_ERR_EID, CFE_EVS_ERROR,
+ "Delete Directory error: OS_rmdir failed: result = -1, dir = source"),
+ "Delete Directory error: directory is not empty: dir = source");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDeleteDirCmd_Test_rmdirFailed */
@@ -1870,14 +1881,14 @@ void FM_ChildDirListFileCmd_Test_Nominal(void)
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_WRITE_INDEX, sizeof(FM_DirListFileStats_t), 1);
/* Execute the function being tested */
- FM_ChildDirListFileCmd(CmdArgs);
-
+ FM_ChildDirListFileCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
/* Generates 1 event message we don't care about in this test */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListFileCmd_Test_Nominal */
@@ -1896,18 +1907,18 @@ void FM_ChildDirListFileCmd_Test_opendirFailed(void)
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_OPENDIR_INDEX, 0, 1);
/* Execute the function being tested */
- FM_ChildDirListFileCmd(CmdArgs);
-
+ FM_ChildDirListFileCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_OSOPENDIR_ERR_EID, CFE_EVS_ERROR, "Directory List to File error: OS_opendir failed: dir = source1"),
- "Directory List to File error: OS_opendir failed: dir = source1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_OSOPENDIR_ERR_EID, CFE_EVS_ERROR,
+ "Directory List to File error: OS_opendir failed: dir = source1"),
+ "Directory List to File error: OS_opendir failed: dir = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListFileCmd_Test_opendirFailed */
@@ -1920,7 +1931,7 @@ void FM_ChildDirListPktCmd_Test_Nominal(void)
CmdArgs->CommandCode = 1; /* Value doesn't really matter in this test */
strncpy(CmdArgs->Source1, "source1", OS_MAX_PATH_LEN);
strncpy(CmdArgs->Source2, "source2", OS_MAX_PATH_LEN);
- CmdArgs->DirListOffset = 0;
+ CmdArgs->DirListOffset = 0;
CmdArgs->GetSizeTimeMode = TRUE;
/* Set to fail condition "DirPtr == NULL" */
@@ -1933,28 +1944,29 @@ void FM_ChildDirListPktCmd_Test_Nominal(void)
UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount = 0;
/* Execute the function being tested */
- FM_ChildDirListPktCmd(CmdArgs);
-
+ FM_ChildDirListPktCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (strncmp(FM_GlobalData.DirListPkt.DirName, "source1", OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.DirListPkt.DirName, 'source1', OS_MAX_PATH_LEN) == 0");
- UtAssert_True (FM_GlobalData.DirListPkt.FirstFile == 0, "FM_GlobalData.DirListPkt.FirstFile == 0");
- UtAssert_True (FM_GlobalData.DirListPkt.TotalFiles == 1, "FM_GlobalData.DirListPkt.TotalFiles == 1");
- UtAssert_True
- (strncmp(FM_GlobalData.DirListPkt.FileList[0].EntryName,
- UT_FM_GLOBAL_DirEntry.FileName, OS_MAX_PATH_LEN) == 0,
- "strncmp(FM_GlobalData.DirListPkt.FileList[0].EntryName, UT_FM_GLOBAL_DirEntry.FileName, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.DirListPkt.DirName, "source1", OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.DirListPkt.DirName, 'source1', OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.DirListPkt.FirstFile == 0, "FM_GlobalData.DirListPkt.FirstFile == 0");
+ UtAssert_True(FM_GlobalData.DirListPkt.TotalFiles == 1, "FM_GlobalData.DirListPkt.TotalFiles == 1");
+ UtAssert_True(
+ strncmp(FM_GlobalData.DirListPkt.FileList[0].EntryName, UT_FM_GLOBAL_DirEntry.FileName, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.DirListPkt.FileList[0].EntryName, UT_FM_GLOBAL_DirEntry.FileName, OS_MAX_PATH_LEN) == "
+ "0");
- UtAssert_True (FM_GlobalData.DirListPkt.PacketFiles == 1, "FM_GlobalData.DirListPkt.PacketFiles == 1");
+ UtAssert_True(FM_GlobalData.DirListPkt.PacketFiles == 1, "FM_GlobalData.DirListPkt.PacketFiles == 1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_PKT_CMD_EID, CFE_EVS_DEBUG, "Directory List to Packet command: offset = 0, dir = source1"),
- "Directory List to Packet command: offset = 0, dir = source1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_PKT_CMD_EID, CFE_EVS_DEBUG,
+ "Directory List to Packet command: offset = 0, dir = source1"),
+ "Directory List to Packet command: offset = 0, dir = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListPktCmd_Test_Nominal */
@@ -1973,26 +1985,26 @@ void FM_ChildDirListPktCmd_Test_opendirFailed(void)
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_OPENDIR_INDEX, 0, 1);
/* Execute the function being tested */
- FM_ChildDirListPktCmd(CmdArgs);
-
+ FM_ChildDirListPktCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_PKT_OS_ERR_EID, CFE_EVS_ERROR, "Directory List to Packet error: OS_opendir failed: dir = source1"),
- "Directory List to Packet error: OS_opendir failed: dir = source1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_PKT_OS_ERR_EID, CFE_EVS_ERROR,
+ "Directory List to Packet error: OS_opendir failed: dir = source1"),
+ "Directory List to Packet error: OS_opendir failed: dir = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListPktCmd_Test_opendirFailed */
void FM_ChildDirListPktCmd_Test_DirPlusEntryTooLong(void)
{
FM_ChildQueueEntry_t *CmdArgs;
- uint32 i;
- char EventMessage1[CFE_EVS_MAX_MESSAGE_LENGTH];
+ uint32 i;
+ char EventMessage1[CFE_EVS_MAX_MESSAGE_LENGTH];
CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildReadIndex];
@@ -2017,36 +2029,36 @@ void FM_ChildDirListPktCmd_Test_DirPlusEntryTooLong(void)
UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount = 0;
/* Execute the function being tested */
- FM_ChildDirListPktCmd(CmdArgs);
-
+ FM_ChildDirListPktCmd(CmdArgs);
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
- UtAssert_True (FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
- UtAssert_True (FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildPreviousCC == 1, "FM_GlobalData.ChildPreviousCC == 1");
+ UtAssert_True(FM_GlobalData.ChildCurrentCC == 0, "FM_GlobalData.ChildCurrentCC == 0");
- UtAssert_True (strncmp(FM_GlobalData.DirListPkt.DirName, "source1", OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.DirListPkt.DirName, 'source1', OS_MAX_PATH_LEN) == 0");
- UtAssert_True (FM_GlobalData.DirListPkt.FirstFile == 0, "FM_GlobalData.DirListPkt.FirstFile == 0");
- UtAssert_True (FM_GlobalData.DirListPkt.TotalFiles == 1, "FM_GlobalData.DirListPkt.TotalFiles == 1");
+ UtAssert_True(strncmp(FM_GlobalData.DirListPkt.DirName, "source1", OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.DirListPkt.DirName, 'source1', OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.DirListPkt.FirstFile == 0, "FM_GlobalData.DirListPkt.FirstFile == 0");
+ UtAssert_True(FM_GlobalData.DirListPkt.TotalFiles == 1, "FM_GlobalData.DirListPkt.TotalFiles == 1");
- strncpy(EventMessage1, "Directory List to Packet warning: dir + entry is too long: dir = ", CFE_EVS_MAX_MESSAGE_LENGTH);
+ strncpy(EventMessage1,
+ "Directory List to Packet warning: dir + entry is too long: dir = ", CFE_EVS_MAX_MESSAGE_LENGTH);
strncat(EventMessage1, CmdArgs->Source2, CFE_EVS_MAX_MESSAGE_LENGTH - 66);
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_PKT_WARNING_EID, CFE_EVS_INFORMATION, EventMessage1),
- EventMessage1);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_PKT_WARNING_EID, CFE_EVS_INFORMATION, EventMessage1), EventMessage1);
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_PKT_CMD_EID, CFE_EVS_DEBUG, "Directory List to Packet command: offset = 0, dir = source1"),
- "Directory List to Packet command: offset = 0, dir = source1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_PKT_CMD_EID, CFE_EVS_DEBUG,
+ "Directory List to Packet command: offset = 0, dir = source1"),
+ "Directory List to Packet command: offset = 0, dir = source1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildDirListPktCmd_Test_DirPlusEntryTooLong */
void FM_ChildDirListFileInit_Test_Nominal(void)
{
boolean Result;
- int32 FileHandle = 0;
+ int32 FileHandle = 0;
/* Set to satisfy condition "FileHandle >= OS_SUCCESS" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_CREAT_INDEX, 1, 1);
@@ -2059,21 +2071,22 @@ void FM_ChildDirListFileInit_Test_Nominal(void)
/* Execute the function being tested */
Result = FM_ChildDirListFileInit(&FileHandle, "directory", "filename");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
- UtAssert_True (strncmp(FM_GlobalData.DirListFileStats.DirName, "directory", OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.DirListFileStats.DirName, 'directory', OS_MAX_PATH_LEN) == 0");
- UtAssert_True (FileHandle == 1, "FileHandle == 1");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+ UtAssert_True(strncmp(FM_GlobalData.DirListFileStats.DirName, "directory", OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.DirListFileStats.DirName, 'directory', OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FileHandle == 1, "FileHandle == 1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_ChildDirListFileInit_Test_Nominal */
void FM_ChildDirListFileInit_Test_WriteBlankStatsFailed(void)
{
boolean Result;
- int32 FileHandle = 0;
- char EventMessage[CFE_EVS_MAX_MESSAGE_LENGTH];
+ int32 FileHandle = 0;
+ char EventMessage[CFE_EVS_MAX_MESSAGE_LENGTH];
/* Set to satisfy condition "FileHandle >= OS_SUCCESS" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_CREAT_INDEX, 1, 1);
@@ -2086,75 +2099,76 @@ void FM_ChildDirListFileInit_Test_WriteBlankStatsFailed(void)
/* Execute the function being tested */
Result = FM_ChildDirListFileInit(&FileHandle, "directory", "filename");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
- UtAssert_True (strncmp(FM_GlobalData.DirListFileStats.DirName, "directory", OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.DirListFileStats.DirName, 'directory', OS_MAX_PATH_LEN) == 0");
- UtAssert_True (FileHandle == 0, "FileHandle == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+ UtAssert_True(strncmp(FM_GlobalData.DirListFileStats.DirName, "directory", OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.DirListFileStats.DirName, 'directory', OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FileHandle == 0, "FileHandle == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- sprintf(EventMessage, "Directory List to File error: OS_write blank stats failed: result = 0, expected = %d", sizeof(FM_DirListFileStats_t));
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_WRBLANK_ERR_EID, CFE_EVS_ERROR, EventMessage),
- EventMessage);
+ sprintf(EventMessage, "Directory List to File error: OS_write blank stats failed: result = 0, expected = %d",
+ sizeof(FM_DirListFileStats_t));
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_WRBLANK_ERR_EID, CFE_EVS_ERROR, EventMessage), EventMessage);
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListFileInit_Test_WriteBlankStatsFailed */
void FM_ChildDirListFileInit_Test_WriteHeaderFailed(void)
{
boolean Result;
- int32 FileHandle = 0;
+ int32 FileHandle = 0;
/* Set to satisfy condition "FileHandle >= OS_SUCCESS" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_CREAT_INDEX, 1, 1);
/* Execute the function being tested */
Result = FM_ChildDirListFileInit(&FileHandle, "directory", "filename");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
- UtAssert_True (FileHandle == 0, "FileHandle == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+ UtAssert_True(FileHandle == 0, "FileHandle == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_WRHDR_ERR_EID, CFE_EVS_ERROR, "Directory List to File error: CFE_FS_WriteHeader failed: result = 0, expected = 64"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_WRHDR_ERR_EID, CFE_EVS_ERROR,
+ "Directory List to File error: CFE_FS_WriteHeader failed: result = 0, expected = 64"),
"Directory List to File error: CFE_FS_WriteHeader failed: result = 0, expected = 64");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListFileInit_Test_WriteHeaderFailed */
void FM_ChildDirListFileInit_Test_creatFailed(void)
{
boolean Result;
- int32 FileHandle = 0;
+ int32 FileHandle = 0;
/* Set to generate error message FM_GET_DIR_FILE_OS_ERR_EID for call to OS_creat */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_CREAT_INDEX, -1, 1);
/* Execute the function being tested */
Result = FM_ChildDirListFileInit(&FileHandle, "directory", "filename");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
- UtAssert_True (FileHandle == 0, "FileHandle == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+ UtAssert_True(FileHandle == 0, "FileHandle == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_OSCREAT_ERR_EID, CFE_EVS_ERROR, "Directory List to File error: OS_creat failed: result = -1, file = filename"),
- "Directory List to File error: OS_creat failed: result = -1, file = filename");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_OSCREAT_ERR_EID, CFE_EVS_ERROR,
+ "Directory List to File error: OS_creat failed: result = -1, file = filename"),
+ "Directory List to File error: OS_creat failed: result = -1, file = filename");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListFileInit_Test_creatFailed */
void FM_ChildDirListFileLoop_Test_Nominal(void)
{
- int32 FileHandle = 0;
- os_dirp_t DirPtr = 0;
- uint8 getSizeTimeMode = TRUE;
+ int32 FileHandle = 0;
+ os_dirp_t DirPtr = 0;
+ uint8 getSizeTimeMode = TRUE;
/* Sets DirEntry->FileName to pass strcmp conditions that check its value */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_READDIR_INDEX, &UT_FM_CFE_OSFILEAPI_ReadDirHook1);
@@ -2166,26 +2180,26 @@ void FM_ChildDirListFileLoop_Test_Nominal(void)
/* Execute the function being tested */
FM_ChildDirListFileLoop(DirPtr, FileHandle, "directory", "directory/", "filename", getSizeTimeMode);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.DirListFileStats.DirEntries == 1, "FM_GlobalData.DirListFileStats.DirEntries == 1");
- UtAssert_True (FM_GlobalData.DirListFileStats.FileEntries == 1, "FM_GlobalData.DirListFileStats.FileEntries == 1");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.DirListFileStats.DirEntries == 1, "FM_GlobalData.DirListFileStats.DirEntries == 1");
+ UtAssert_True(FM_GlobalData.DirListFileStats.FileEntries == 1, "FM_GlobalData.DirListFileStats.FileEntries == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_CMD_EID, CFE_EVS_DEBUG, "Directory List to File command: wrote 1 of 1 names: dir = directory, filename = filename"),
- "Directory List to File command: wrote 1 of 1 names: dir = directory, filename = filename");
+ UtAssert_True(Ut_CFE_EVS_EventSent(
+ FM_GET_DIR_FILE_CMD_EID, CFE_EVS_DEBUG,
+ "Directory List to File command: wrote 1 of 1 names: dir = directory, filename = filename"),
+ "Directory List to File command: wrote 1 of 1 names: dir = directory, filename = filename");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListFileLoop_Test_Nominal */
-
void FM_ChildDirListFileLoop_Test_ExcludeFileTimeSizeMode(void)
{
- int32 FileHandle = 0;
- os_dirp_t DirPtr = 0;
- uint8 getSizeTimeMode = FALSE;
+ int32 FileHandle = 0;
+ os_dirp_t DirPtr = 0;
+ uint8 getSizeTimeMode = FALSE;
/* Sets DirEntry->FileName to pass strcmp conditions that check its value */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_READDIR_INDEX, &UT_FM_CFE_OSFILEAPI_ReadDirHook1);
@@ -2197,62 +2211,61 @@ void FM_ChildDirListFileLoop_Test_ExcludeFileTimeSizeMode(void)
/* Execute the function being tested */
FM_ChildDirListFileLoop(DirPtr, FileHandle, "directory", "directory/", "filename", getSizeTimeMode);
-
+
/* Verify results */
-
+
/* There is no way to assert this as the variable in which size time and mode are store is
local to the FM_ChildDirListFileLoop */
- UtAssert_True (FM_GlobalData.DirListFileStats.DirEntries == 1, "FM_GlobalData.DirListFileStats.DirEntries == 1");
- UtAssert_True (FM_GlobalData.DirListFileStats.FileEntries == 1, "FM_GlobalData.DirListFileStats.FileEntries == 1");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.DirListFileStats.DirEntries == 1, "FM_GlobalData.DirListFileStats.DirEntries == 1");
+ UtAssert_True(FM_GlobalData.DirListFileStats.FileEntries == 1, "FM_GlobalData.DirListFileStats.FileEntries == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_CMD_EID, CFE_EVS_DEBUG, "Directory List to File command: wrote 1 of 1 names: dir = directory, filename = filename"),
- "Directory List to File command: wrote 1 of 1 names: dir = directory, filename = filename");
+ UtAssert_True(Ut_CFE_EVS_EventSent(
+ FM_GET_DIR_FILE_CMD_EID, CFE_EVS_DEBUG,
+ "Directory List to File command: wrote 1 of 1 names: dir = directory, filename = filename"),
+ "Directory List to File command: wrote 1 of 1 names: dir = directory, filename = filename");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListFileLoop_Test_ExcludeFileTimeSizeMode */
void FM_ChildDirListFileLoop_Test_WriteEntryFailed(void)
{
- int32 FileHandle = 0;
- os_dirp_t DirPtr = 0;
- char EventMessage[CFE_EVS_MAX_MESSAGE_LENGTH];
- uint8 getSizeTimeMode = TRUE;
+ int32 FileHandle = 0;
+ os_dirp_t DirPtr = 0;
+ char EventMessage[CFE_EVS_MAX_MESSAGE_LENGTH];
+ uint8 getSizeTimeMode = TRUE;
/* Sets DirEntry->FileName to pass strcmp conditions that check its value */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_READDIR_INDEX, &UT_FM_CFE_OSFILEAPI_ReadDirHook1);
UT_FM_CFE_OSFILEAPI_ReadDirHookRunCount = 0;
-
/* Set to generate 1st instance of error message FM_GET_DIR_FILE_OS_ERR_EID ("OS_write entry failed") */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_WRITE_INDEX, 0, 1);
/* Execute the function being tested */
FM_ChildDirListFileLoop(DirPtr, FileHandle, "directory", "directory/", "filename", getSizeTimeMode);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- sprintf(EventMessage, "Directory List to File error: OS_write entry failed: result = 0, expected = %d", sizeof(FM_DirListEntry_t));
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_WRENTRY_ERR_EID, CFE_EVS_ERROR, EventMessage),
- EventMessage);
+ sprintf(EventMessage, "Directory List to File error: OS_write entry failed: result = 0, expected = %d",
+ sizeof(FM_DirListEntry_t));
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_WRENTRY_ERR_EID, CFE_EVS_ERROR, EventMessage), EventMessage);
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListFileLoop_Test_WriteEntryFailed */
void FM_ChildDirListFileLoop_Test_DirectoryAndNameTooLong(void)
{
- int32 FileHandle = 0;
- os_dirp_t DirPtr = 0;
- uint8 getSizeTimeMode = TRUE;
+ int32 FileHandle = 0;
+ os_dirp_t DirPtr = 0;
+ uint8 getSizeTimeMode = TRUE;
- uint32 i;
- char EntryText[CFE_EVS_MAX_MESSAGE_LENGTH];
- char EventMessage1[CFE_EVS_MAX_MESSAGE_LENGTH];
+ uint32 i;
+ char EntryText[CFE_EVS_MAX_MESSAGE_LENGTH];
+ char EventMessage1[CFE_EVS_MAX_MESSAGE_LENGTH];
/* Causes event message FM_GET_DIR_FILE_WARNING_EID to be generated */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_READDIR_INDEX, &UT_FM_CFE_OSFILEAPI_ReadDirHook2);
@@ -2260,9 +2273,9 @@ void FM_ChildDirListFileLoop_Test_DirectoryAndNameTooLong(void)
/* Execute the function being tested */
FM_ChildDirListFileLoop(DirPtr, FileHandle, "directory", "directory/", "filename", getSizeTimeMode);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 1, "FM_GlobalData.ChildCmdWarnCounter == 1");
for (i = 0; i < OS_MAX_PATH_LEN - 1; i++)
{
@@ -2271,31 +2284,32 @@ void FM_ChildDirListFileLoop_Test_DirectoryAndNameTooLong(void)
EntryText[OS_MAX_PATH_LEN - 1] = '\0';
- strncpy(EventMessage1, "Directory List to File error: combined directory and entry name too long: dir = directory, entry = ", CFE_EVS_MAX_MESSAGE_LENGTH);
+ strncpy(EventMessage1,
+ "Directory List to File error: combined directory and entry name too long: dir = directory, entry = ",
+ CFE_EVS_MAX_MESSAGE_LENGTH);
strncat(EventMessage1, EntryText, CFE_EVS_MAX_MESSAGE_LENGTH - 100);
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_WARNING_EID, CFE_EVS_INFORMATION, EventMessage1),
- EventMessage1);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_WARNING_EID, CFE_EVS_INFORMATION, EventMessage1), EventMessage1);
- UtAssert_True (FM_GlobalData.DirListFileStats.DirEntries == 1, "FM_GlobalData.DirListFileStats.DirEntries == 1");
- UtAssert_True (FM_GlobalData.DirListFileStats.FileEntries == 0, "FM_GlobalData.DirListFileStats.FileEntries == 0");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.DirListFileStats.DirEntries == 1, "FM_GlobalData.DirListFileStats.DirEntries == 1");
+ UtAssert_True(FM_GlobalData.DirListFileStats.FileEntries == 0, "FM_GlobalData.DirListFileStats.FileEntries == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_CMD_EID, CFE_EVS_DEBUG, "Directory List to File command: wrote 0 of 1 names: dir = directory, filename = filename"),
- "Directory List to File command: wrote 0 of 1 names: dir = directory, filename = filename");
+ UtAssert_True(Ut_CFE_EVS_EventSent(
+ FM_GET_DIR_FILE_CMD_EID, CFE_EVS_DEBUG,
+ "Directory List to File command: wrote 0 of 1 names: dir = directory, filename = filename"),
+ "Directory List to File command: wrote 0 of 1 names: dir = directory, filename = filename");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ChildDirListFileLoop_Test_DirectoryAndNameTooLong */
void FM_ChildDirListFileLoop_Test_WriteUpdateStatsFailed(void)
{
- int32 FileHandle = 0;
- os_dirp_t DirPtr = 0;
- uint8 getSizeTimeMode = TRUE;
- char EventMessage[CFE_EVS_MAX_MESSAGE_LENGTH];
+ int32 FileHandle = 0;
+ os_dirp_t DirPtr = 0;
+ uint8 getSizeTimeMode = TRUE;
+ char EventMessage[CFE_EVS_MAX_MESSAGE_LENGTH];
/* Sets DirEntry->FileName to pass strcmp conditions that check its value */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_READDIR_INDEX, &UT_FM_CFE_OSFILEAPI_ReadDirHook1);
@@ -2307,18 +2321,17 @@ void FM_ChildDirListFileLoop_Test_WriteUpdateStatsFailed(void)
/* Execute the function being tested */
FM_ChildDirListFileLoop(DirPtr, FileHandle, "directory", "directory/", "filename", getSizeTimeMode);
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.DirListFileStats.DirEntries == 1, "FM_GlobalData.DirListFileStats.DirEntries == 1");
- UtAssert_True (FM_GlobalData.DirListFileStats.FileEntries == 1, "FM_GlobalData.DirListFileStats.FileEntries == 1");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(FM_GlobalData.DirListFileStats.DirEntries == 1, "FM_GlobalData.DirListFileStats.DirEntries == 1");
+ UtAssert_True(FM_GlobalData.DirListFileStats.FileEntries == 1, "FM_GlobalData.DirListFileStats.FileEntries == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- sprintf(EventMessage, "Directory List to File error: OS_write update stats failed: result = 0, expected = %d", sizeof(FM_DirListFileStats_t));
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_UPSTATS_ERR_EID, CFE_EVS_ERROR, EventMessage),
- EventMessage);
+ sprintf(EventMessage, "Directory List to File error: OS_write update stats failed: result = 0, expected = %d",
+ sizeof(FM_DirListFileStats_t));
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_DIR_FILE_UPSTATS_ERR_EID, CFE_EVS_ERROR, EventMessage), EventMessage);
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildDirListFileLoop_Test_WriteUpdateStatsFailed */
@@ -2329,27 +2342,25 @@ void FM_ChildSizeAndTime_Test_Nominal(void)
uint32 FileTime = 1;
uint32 FileMode = 0555;
- /* Sets FileStatus->st_size = 5, which FileSize is then set to. FileSize is verified in a UtAssert statement below. */
+ /* Sets FileStatus->st_size = 5, which FileSize is then set to. FileSize is verified in a UtAssert statement below.
+ */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize);
- /* Set to return a specific value, which is checked in a UtAssert statement below */
- Ut_CFE_TIME_SetReturnCode(UT_CFE_TIME_FS2CFESECONDS_INDEX, 10, 1);
-
/* Execute the function being tested */
Result = FM_ChildSizeTimeMode("filename", &FileSize, &FileTime, &FileMode);
-
+
/* Verify results */
- UtAssert_True (FileTime == 10, "FileTime == 10");
- UtAssert_True (FileSize == 5, "FileSize == 5");
+ UtAssert_True(FileTime == 10, "FileTime == 10");
+ UtAssert_True(FileSize == 5, "FileSize == 5");
#ifdef OS_FILESTAT_MODE
- UtAssert_True (FileMode == (OS_FILESTAT_MODE_WRITE | OS_FILESTAT_MODE_READ),
- "FileMode == (OS_FILESTAT_MODE_WRITE | OS_FILESTAT_MODE_READ)");
+ UtAssert_True(FileMode == (OS_FILESTAT_MODE_WRITE | OS_FILESTAT_MODE_READ),
+ "FileMode == (OS_FILESTAT_MODE_WRITE | OS_FILESTAT_MODE_READ)");
#else
- UtAssert_True (FileMode == 0777, "FileMode == 0777");
+ UtAssert_True(FileMode == 0777, "FileMode == 0777");
#endif
- UtAssert_True (Result == OS_SUCCESS, "Result == OS_SUCCESS");
+ UtAssert_True(Result == OS_SUCCESS, "Result == OS_SUCCESS");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_ChildSizeAndTime_Test_Nominal */
@@ -2365,18 +2376,17 @@ void FM_ChildSizeAndTime_Test_statError(void)
/* Execute the function being tested */
Result = FM_ChildSizeTimeMode("filename", &FileSize, &FileTime, &FileMode);
-
+
/* Verify results */
- UtAssert_True (FileTime == 0, "FileTime == 0");
- UtAssert_True (FileSize == 0, "FileSize == 0");
- UtAssert_True (FileMode == 0, "FileMode == 0");
- UtAssert_True (Result == -1, "Result == -1");
+ UtAssert_True(FileTime == 0, "FileTime == 0");
+ UtAssert_True(FileSize == 0, "FileSize == 0");
+ UtAssert_True(FileMode == 0, "FileMode == 0");
+ UtAssert_True(Result == -1, "Result == -1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_ChildSizeAndTime_Test_statError */
-
void FM_ChildSetPermissionsCmd_Test_Nominal(void)
{
FM_ChildQueueEntry_t *CmdArgs;
@@ -2391,16 +2401,16 @@ void FM_ChildSetPermissionsCmd_Test_Nominal(void)
/* Execute the function being tested */
FM_ChildSetPermissionsCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_SET_PERM_CMD_EID, CFE_EVS_DEBUG, "Set Permissions command: file = /source1, access = 511"),
- "Set Permissions command: file = /source1, access = 511");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_SET_PERM_CMD_EID, CFE_EVS_DEBUG,
+ "Set Permissions command: file = /source1, access = 511"),
+ "Set Permissions command: file = /source1, access = 511");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 1, "FM_GlobalData.ChildCmdCounter == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildSetPermissionsCmd_Test_Nominal */
@@ -2412,132 +2422,123 @@ void FM_ChildSetPermissionsCmd_Test_OS_Error(void)
CmdArgs->CommandCode = FM_SET_FILE_PERM_CC; /* Value doesn't really matter in this test */
strncpy(CmdArgs->Source1, "/source1", OS_MAX_PATH_LEN);
- CmdArgs->Mode = 511; /* (0777) */
+ CmdArgs->Mode = 511; /* (0777) */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_CHMOD_INDEX, -1, 1);
/* Execute the function being tested */
FM_ChildSetPermissionsCmd(CmdArgs);
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_SET_PERM_OS_ERR_EID, CFE_EVS_ERROR, "Set Permissions command: OS_chmod error, RC=0xFFFFFFFF, file = /source1, access = 511"),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_SET_PERM_OS_ERR_EID, CFE_EVS_ERROR,
+ "Set Permissions command: OS_chmod error, RC=0xFFFFFFFF, file = /source1, access = 511"),
"Set Permissions command: OS_chmod error, RC=0xFFFFFFFF, file = /source1, access = 511");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 1, "FM_GlobalData.ChildCmdErrCounter == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ChildSetPermissionsCmd_Test_OS_Error */
-
void FM_ChildSleepStat_Test_GetStatsAndDoNotSleep(void)
{
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
FM_DirListEntry_t DirListData;
- int32 FilesTillSleep = 10;
- boolean getSizeTimeMode = TRUE;
+ int32 FilesTillSleep = 10;
+ boolean getSizeTimeMode = TRUE;
strncpy(Filename, "/source1", OS_MAX_PATH_LEN);
-
- /* Sets FileStatus->st_size = 5, which FileSize is then set to. FileSize is verified in a UtAssert statement below. */
- Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize);
-
- /* Set to return a specific value, which is checked in a UtAssert statement below */
- Ut_CFE_TIME_SetReturnCode(UT_CFE_TIME_FS2CFESECONDS_INDEX, 10, 1);
+ /* Sets FileStatus->st_size = 5, which FileSize is then set to. FileSize is verified in a UtAssert statement below.
+ */
+ Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize);
/* Execute the function being tested */
FM_ChildSleepStat(Filename, (FM_DirListEntry_t *)&DirListData, &FilesTillSleep, getSizeTimeMode);
-
+
/* Verify results */
- UtAssert_True (FilesTillSleep == 9, "FilesTillSleep == 9");
-
- UtAssert_True (DirListData.EntrySize == 5, "DirListData.EntrySize == 5");
- UtAssert_True (DirListData.ModifyTime == 10, "DirListData.ModifyTime == 10");
+ UtAssert_True(FilesTillSleep == 9, "FilesTillSleep == 9");
+
+ UtAssert_True(DirListData.EntrySize == 5, "DirListData.EntrySize == 5");
+ UtAssert_True(DirListData.ModifyTime == 10, "DirListData.ModifyTime == 10");
#ifdef OS_FILESTAT_MODE
UtAssert_True(DirListData.Mode == (OS_FILESTAT_MODE_WRITE | OS_FILESTAT_MODE_READ),
"DirListData.Mode == (OS_FILESTAT_MODE_WRITE | OS_FILESTAT_MODE_READ)");
#else
- UtAssert_True (DirListData.Mode == 511, "DirListData.Mode == 511"); /* 0777 mode */
+ UtAssert_True(DirListData.Mode == 511, "DirListData.Mode == 511"); /* 0777 mode */
#endif
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_ChildSleepStat_Test_GetStats */
-
void FM_ChildSleepStat_Test_GetStatsAndSleep(void)
{
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
FM_DirListEntry_t DirListData;
- int32 FilesTillSleep = 0;
- boolean getSizeTimeMode = TRUE;
+ int32 FilesTillSleep = 0;
+ boolean getSizeTimeMode = TRUE;
strncpy(Filename, "/source1", OS_MAX_PATH_LEN);
-
- /* Sets FileStatus->st_size = 5, which FileSize is then set to. FileSize is verified in a UtAssert statement below. */
- Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize);
-
- /* Set to return a specific value, which is checked in a UtAssert statement below */
- Ut_CFE_TIME_SetReturnCode(UT_CFE_TIME_FS2CFESECONDS_INDEX, 10, 1);
+ /* Sets FileStatus->st_size = 5, which FileSize is then set to. FileSize is verified in a UtAssert statement below.
+ */
+ Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize);
/* Execute the function being tested */
FM_ChildSleepStat(Filename, (FM_DirListEntry_t *)&DirListData, &FilesTillSleep, getSizeTimeMode);
-
+
/* Verify results */
- UtAssert_True (FilesTillSleep == FM_CHILD_STAT_SLEEP_FILECOUNT - 1, "FilesTillSleep == FM_CHILD_STAT_SLEEP_FILECOUNT - 1");
-
- UtAssert_True (DirListData.EntrySize == 5, "DirListData.EntrySize == 5");
- UtAssert_True (DirListData.ModifyTime == 10, "DirListData.ModifyTime == 10");
+ UtAssert_True(FilesTillSleep == FM_CHILD_STAT_SLEEP_FILECOUNT - 1,
+ "FilesTillSleep == FM_CHILD_STAT_SLEEP_FILECOUNT - 1");
+
+ UtAssert_True(DirListData.EntrySize == 5, "DirListData.EntrySize == 5");
+ UtAssert_True(DirListData.ModifyTime == 10, "DirListData.ModifyTime == 10");
#ifdef OS_FILESTAT_MODE
UtAssert_True(DirListData.Mode == (OS_FILESTAT_MODE_WRITE | OS_FILESTAT_MODE_READ),
"DirListData.Mode == (OS_FILESTAT_MODE_WRITE | OS_FILESTAT_MODE_READ)");
#else
- UtAssert_True (DirListData.Mode == 511, "DirListData.Mode == 511"); /* 0777 mode */
+ UtAssert_True(DirListData.Mode == 511, "DirListData.Mode == 511"); /* 0777 mode */
#endif
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_ChildSleepStat_Test_GetStatsAndSleep */
void FM_ChildSleepStat_Test_DoNotGetStats(void)
{
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
FM_DirListEntry_t DirListData;
- int32 FilesTillSleep = 1;
- boolean getSizeTimeMode = FALSE;
+ int32 FilesTillSleep = 1;
+ boolean getSizeTimeMode = FALSE;
- DirListData.EntrySize = 1;
+ DirListData.EntrySize = 1;
DirListData.ModifyTime = 1;
- DirListData.Mode = 1;
-
- strncpy(Filename, "/source1", OS_MAX_PATH_LEN);
-
- /* Sets FileStatus->st_size = 5, which FileSize is then set to. FileSize is verified in a UtAssert statement below. */
- Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize);
+ DirListData.Mode = 1;
- /* Set to return a specific value, which is checked in a UtAssert statement below */
- Ut_CFE_TIME_SetReturnCode(UT_CFE_TIME_FS2CFESECONDS_INDEX, 10, 1);
+ strncpy(Filename, "/source1", OS_MAX_PATH_LEN);
+ /* Sets FileStatus->st_size = 5, which FileSize is then set to. FileSize is verified in a UtAssert statement below.
+ */
+ Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CHILD_TEST_CFE_OSFILEAPI_StatHookSetSize);
/* Execute the function being tested */
FM_ChildSleepStat(Filename, (FM_DirListEntry_t *)&DirListData, &FilesTillSleep, getSizeTimeMode);
-
+
/* Verify results */
- UtAssert_True (FilesTillSleep == 1, "FilesTillSleep == 1");
-
- UtAssert_True (DirListData.EntrySize == 0, "DirListData.EntrySize == 0");
- UtAssert_True (DirListData.ModifyTime == 0, "DirListData.ModifyTime == 0");
- UtAssert_True (DirListData.Mode == 0, "DirListData.Mode == 0");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(FilesTillSleep == 1, "FilesTillSleep == 1");
+
+ UtAssert_True(DirListData.EntrySize == 0, "DirListData.EntrySize == 0");
+ UtAssert_True(DirListData.ModifyTime == 0, "DirListData.ModifyTime == 0");
+ UtAssert_True(DirListData.Mode == 0, "DirListData.Mode == 0");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_ChildSleepStat_Test_DoNotGetStats */
@@ -2545,21 +2546,30 @@ void FM_ChildSleepStat_Test_DoNotGetStats(void)
void FM_Child_Test_AddTestCases(void)
{
- UtTest_Add(FM_ChildInit_Test_CreateChildSemaphoreFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildInit_Test_CreateChildSemaphoreFailed");
- UtTest_Add(FM_ChildInit_Test_CreateQueueSemaphoreFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildInit_Test_CreateQueueSemaphoreFailed");
- UtTest_Add(FM_ChildInit_Test_CreateTaskFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildInit_Test_CreateTaskFailed");
+ UtTest_Add(FM_ChildInit_Test_CreateChildSemaphoreFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildInit_Test_CreateChildSemaphoreFailed");
+ UtTest_Add(FM_ChildInit_Test_CreateQueueSemaphoreFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildInit_Test_CreateQueueSemaphoreFailed");
+ UtTest_Add(FM_ChildInit_Test_CreateTaskFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildInit_Test_CreateTaskFailed");
UtTest_Add(FM_ChildTask_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildTask_Test_Nominal");
- UtTest_Add(FM_ChildTask_Test_RegisterChildFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildTask_Test_RegisterChildFailed");
+ UtTest_Add(FM_ChildTask_Test_RegisterChildFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildTask_Test_RegisterChildFailed");
UtTest_Add(FM_ChildLoop_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildLoop_Test_Nominal");
- UtTest_Add(FM_ChildLoop_Test_SemaphoreTakeFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildLoop_Test_SemaphoreTakeFailed");
+ UtTest_Add(FM_ChildLoop_Test_SemaphoreTakeFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildLoop_Test_SemaphoreTakeFailed");
UtTest_Add(FM_ChildLoop_Test_EmptyQueue, FM_Test_Setup, FM_Test_TearDown, "FM_ChildLoop_Test_EmptyQueue");
- UtTest_Add(FM_ChildLoop_Test_InvalidQueueIndex, FM_Test_Setup, FM_Test_TearDown, "FM_ChildLoop_Test_InvalidQueueIndex");
- UtTest_Add(FM_ChildProcess_Test_CopyAndTooLargeReadIndex, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_CopyAndTooLargeReadIndex");
+ UtTest_Add(FM_ChildLoop_Test_InvalidQueueIndex, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildLoop_Test_InvalidQueueIndex");
+ UtTest_Add(FM_ChildProcess_Test_CopyAndTooLargeReadIndex, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildProcess_Test_CopyAndTooLargeReadIndex");
UtTest_Add(FM_ChildProcess_Test_Move, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_Move");
UtTest_Add(FM_ChildProcess_Test_Rename, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_Rename");
UtTest_Add(FM_ChildProcess_Test_Delete, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_Delete");
UtTest_Add(FM_ChildProcess_Test_DeleteAll, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_DeleteAll");
+#ifdef FM_INCLUDE_DECOMPRESS
UtTest_Add(FM_ChildProcess_Test_Decompress, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_Decompress");
+#endif
UtTest_Add(FM_ChildProcess_Test_Concat, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_Concat");
UtTest_Add(FM_ChildProcess_Test_CreateDir, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_CreateDir");
UtTest_Add(FM_ChildProcess_Test_DeleteDir, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_DeleteDir");
@@ -2567,69 +2577,116 @@ void FM_Child_Test_AddTestCases(void)
UtTest_Add(FM_ChildProcess_Test_GetDirFile, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_GetDirFile");
UtTest_Add(FM_ChildProcess_Test_GetDirPkt, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_GetDirPkt");
UtTest_Add(FM_ChildProcess_Test_DeleteInt, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_DeleteInt");
- UtTest_Add(FM_ChildProcess_Test_SetPermissions, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_SetPermissions");
- UtTest_Add(FM_ChildProcess_Test_InvalidCommandCode, FM_Test_Setup, FM_Test_TearDown, "FM_ChildProcess_Test_InvalidCommandCode");
+ UtTest_Add(FM_ChildProcess_Test_SetPermissions, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildProcess_Test_SetPermissions");
+ UtTest_Add(FM_ChildProcess_Test_InvalidCommandCode, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildProcess_Test_InvalidCommandCode");
UtTest_Add(FM_ChildCopyCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildCopyCmd_Test_Nominal");
UtTest_Add(FM_ChildCopyCmd_Test_CopyFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildCopyCmd_Test_CopyFailed");
UtTest_Add(FM_ChildMoveCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildMoveCmd_Test_Nominal");
UtTest_Add(FM_ChildMoveCmd_Test_MoveFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildMoveCmd_Test_MoveFailed");
UtTest_Add(FM_ChildRenameCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildRenameCmd_Test_Nominal");
- UtTest_Add(FM_ChildRenameCmd_Test_RenameFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildRenameCmd_Test_RenameFailed");
+ UtTest_Add(FM_ChildRenameCmd_Test_RenameFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildRenameCmd_Test_RenameFailed");
UtTest_Add(FM_ChildDeleteCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteCmd_Test_Nominal");
- UtTest_Add(FM_ChildDeleteCmd_Test_RemoveFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteCmd_Test_RemoveFailed");
+ UtTest_Add(FM_ChildDeleteCmd_Test_RemoveFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteCmd_Test_RemoveFailed");
UtTest_Add(FM_ChildDeleteAllCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteAllCmd_Test_Nominal");
- UtTest_Add(FM_ChildDeleteAllCmd_Test_opendirFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteAllCmd_Test_opendirFailed");
- UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedFilenameTooLarge, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteAllCmd_Test_FilesNotDeletedFilenameTooLarge");
- UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsInvalid, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsInvalid");
- UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsNotInUse, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsNotInUse");
- UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileOpen, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileOpen");
- UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileClosed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileClosed");
- UtTest_Add(FM_ChildDeleteAllCmd_Test_DirectorySkipped, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteAllCmd_Test_DirectorySkipped");
- UtTest_Add(FM_ChildDecompressCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDecompressCmd_Test_Nominal");
- UtTest_Add(FM_ChildDecompressCmd_Test_DecompressFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDecompressCmd_Test_DecompressFailed");
+ UtTest_Add(FM_ChildDeleteAllCmd_Test_opendirFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteAllCmd_Test_opendirFailed");
+ UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedFilenameTooLarge, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteAllCmd_Test_FilesNotDeletedFilenameTooLarge");
+ UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsInvalid, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsInvalid");
+ UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsNotInUse, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteAllCmd_Test_FilesNotDeletedNameIsNotInUse");
+ UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileOpen, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileOpen");
+ UtTest_Add(FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileClosed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteAllCmd_Test_FilesNotDeletedFileClosed");
+ UtTest_Add(FM_ChildDeleteAllCmd_Test_DirectorySkipped, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteAllCmd_Test_DirectorySkipped");
+#ifdef FM_INCLUDE_DECOMPRESS
+ UtTest_Add(FM_ChildDecompressCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDecompressCmd_Test_Nominal");
+ UtTest_Add(FM_ChildDecompressCmd_Test_DecompressFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDecompressCmd_Test_DecompressFailed");
+#endif
UtTest_Add(FM_ChildConcatCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildConcatCmd_Test_Nominal");
UtTest_Add(FM_ChildConcatCmd_Test_CopyFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildConcatCmd_Test_CopyFailed");
- UtTest_Add(FM_ChildConcatCmd_Test_OpenFailed1, FM_Test_Setup, FM_Test_TearDown, "FM_ChildConcatCmd_Test_OpenFailed1");
- UtTest_Add(FM_ChildConcatCmd_Test_OpenFailed2, FM_Test_Setup, FM_Test_TearDown, "FM_ChildConcatCmd_Test_OpenFailed2");
+ UtTest_Add(FM_ChildConcatCmd_Test_OpenFailed1, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildConcatCmd_Test_OpenFailed1");
+ UtTest_Add(FM_ChildConcatCmd_Test_OpenFailed2, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildConcatCmd_Test_OpenFailed2");
UtTest_Add(FM_ChildConcatCmd_Test_ReadFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildConcatCmd_Test_ReadFailed");
- UtTest_Add(FM_ChildConcatCmd_Test_WriteFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildConcatCmd_Test_WriteFailed");
+ UtTest_Add(FM_ChildConcatCmd_Test_WriteFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildConcatCmd_Test_WriteFailed");
UtTest_Add(FM_ChildConcatCmd_Test_CPUHogging, FM_Test_Setup, FM_Test_TearDown, "FM_ChildConcatCmd_Test_CPUHogging");
- UtTest_Add(FM_ChildFileInfoCmd_Test_FinishedReading, FM_Test_Setup, FM_Test_TearDown, "FM_ChildFileInfoCmd_Test_FinishedReading");
- UtTest_Add(FM_ChildFileInfoCmd_Test_ContinueCRC, FM_Test_Setup, FM_Test_TearDown, "FM_ChildFileInfoCmd_Test_ContinueCRC");
- UtTest_Add(FM_ChildFileInfoCmd_Test_CPUHogging, FM_Test_Setup, FM_Test_TearDown, "FM_ChildFileInfoCmd_Test_CPUHogging");
- UtTest_Add(FM_ChildFileInfoCmd_Test_InvalidFileState, FM_Test_Setup, FM_Test_TearDown, "FM_ChildFileInfoCmd_Test_InvalidFileState");
- UtTest_Add(FM_ChildFileInfoCmd_Test_InvalidCRCType, FM_Test_Setup, FM_Test_TearDown, "FM_ChildFileInfoCmd_Test_InvalidCRCType");
- UtTest_Add(FM_ChildFileInfoCmd_Test_OpenFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildFileInfoCmd_Test_OpenFailed");
- UtTest_Add(FM_ChildFileInfoCmd_Test_ReadFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildFileInfoCmd_Test_ReadFailed");
+ UtTest_Add(FM_ChildFileInfoCmd_Test_FinishedReading, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildFileInfoCmd_Test_FinishedReading");
+ UtTest_Add(FM_ChildFileInfoCmd_Test_ContinueCRC, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildFileInfoCmd_Test_ContinueCRC");
+ UtTest_Add(FM_ChildFileInfoCmd_Test_CPUHogging, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildFileInfoCmd_Test_CPUHogging");
+ UtTest_Add(FM_ChildFileInfoCmd_Test_InvalidFileState, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildFileInfoCmd_Test_InvalidFileState");
+ UtTest_Add(FM_ChildFileInfoCmd_Test_InvalidCRCType, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildFileInfoCmd_Test_InvalidCRCType");
+ UtTest_Add(FM_ChildFileInfoCmd_Test_OpenFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildFileInfoCmd_Test_OpenFailed");
+ UtTest_Add(FM_ChildFileInfoCmd_Test_ReadFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildFileInfoCmd_Test_ReadFailed");
UtTest_Add(FM_ChildCreateDirCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildCreateDirCmd_Test_Nominal");
- UtTest_Add(FM_ChildCreateDirCmd_Test_mkdirFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildCreateDirCmd_Test_mkdirFailed");
+ UtTest_Add(FM_ChildCreateDirCmd_Test_mkdirFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildCreateDirCmd_Test_mkdirFailed");
UtTest_Add(FM_ChildDeleteDirCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteDirCmd_Test_Nominal");
- UtTest_Add(FM_ChildDeleteDirCmd_Test_OpenDirFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteDirCmd_Test_OpenDirFailed");
- UtTest_Add(FM_ChildDeleteDirCmd_Test_DirectoryNotEmpty, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteDirCmd_Test_DirectoryNotEmpty");
- UtTest_Add(FM_ChildDeleteDirCmd_Test_rmdirFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDeleteDirCmd_Test_rmdirFailed");
- UtTest_Add(FM_ChildDirListFileCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileCmd_Test_Nominal");
- UtTest_Add(FM_ChildDirListFileCmd_Test_opendirFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileCmd_Test_opendirFailed");
- UtTest_Add(FM_ChildDirListPktCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListPktCmd_Test_Nominal");
- UtTest_Add(FM_ChildDirListPktCmd_Test_opendirFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListPktCmd_Test_opendirFailed");
- UtTest_Add(FM_ChildDirListPktCmd_Test_DirPlusEntryTooLong, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListPktCmd_Test_DirPlusEntryTooLong");
- UtTest_Add(FM_ChildDirListFileInit_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileInit_Test_Nominal");
- UtTest_Add(FM_ChildDirListFileInit_Test_WriteBlankStatsFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileInit_Test_WriteBlankStatsFailed");
- UtTest_Add(FM_ChildDirListFileInit_Test_WriteHeaderFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileInit_Test_WriteHeaderFailed");
- UtTest_Add(FM_ChildDirListFileInit_Test_creatFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileInit_Test_creatFailed");
- UtTest_Add(FM_ChildDirListFileLoop_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileLoop_Test_Nominal");
- UtTest_Add(FM_ChildDirListFileLoop_Test_WriteEntryFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileLoop_Test_WriteEntryFailed");
- UtTest_Add(FM_ChildDirListFileLoop_Test_DirectoryAndNameTooLong, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileLoop_Test_DirectoryAndNameTooLong");
- UtTest_Add(FM_ChildDirListFileLoop_Test_WriteUpdateStatsFailed, FM_Test_Setup, FM_Test_TearDown, "FM_ChildDirListFileLoop_Test_WriteUpdateStatsFailed");
+ UtTest_Add(FM_ChildDeleteDirCmd_Test_OpenDirFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteDirCmd_Test_OpenDirFailed");
+ UtTest_Add(FM_ChildDeleteDirCmd_Test_DirectoryNotEmpty, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteDirCmd_Test_DirectoryNotEmpty");
+ UtTest_Add(FM_ChildDeleteDirCmd_Test_rmdirFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDeleteDirCmd_Test_rmdirFailed");
+ UtTest_Add(FM_ChildDirListFileCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileCmd_Test_Nominal");
+ UtTest_Add(FM_ChildDirListFileCmd_Test_opendirFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileCmd_Test_opendirFailed");
+ UtTest_Add(FM_ChildDirListPktCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListPktCmd_Test_Nominal");
+ UtTest_Add(FM_ChildDirListPktCmd_Test_opendirFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListPktCmd_Test_opendirFailed");
+ UtTest_Add(FM_ChildDirListPktCmd_Test_DirPlusEntryTooLong, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListPktCmd_Test_DirPlusEntryTooLong");
+ UtTest_Add(FM_ChildDirListFileInit_Test_Nominal, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileInit_Test_Nominal");
+ UtTest_Add(FM_ChildDirListFileInit_Test_WriteBlankStatsFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileInit_Test_WriteBlankStatsFailed");
+ UtTest_Add(FM_ChildDirListFileInit_Test_WriteHeaderFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileInit_Test_WriteHeaderFailed");
+ UtTest_Add(FM_ChildDirListFileInit_Test_creatFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileInit_Test_creatFailed");
+ UtTest_Add(FM_ChildDirListFileLoop_Test_Nominal, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileLoop_Test_Nominal");
+ UtTest_Add(FM_ChildDirListFileLoop_Test_WriteEntryFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileLoop_Test_WriteEntryFailed");
+ UtTest_Add(FM_ChildDirListFileLoop_Test_DirectoryAndNameTooLong, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileLoop_Test_DirectoryAndNameTooLong");
+ UtTest_Add(FM_ChildDirListFileLoop_Test_WriteUpdateStatsFailed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildDirListFileLoop_Test_WriteUpdateStatsFailed");
UtTest_Add(FM_ChildSizeAndTime_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildSizeAndTime_Test_Nominal");
- UtTest_Add(FM_ChildSizeAndTime_Test_statError, FM_Test_Setup, FM_Test_TearDown, "FM_ChildSizeAndTime_Test_statError");
-
-
- UtTest_Add(FM_ChildSetPermissionsCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_ChildSetPermissionsCmd_Test_Nominal");
- UtTest_Add(FM_ChildSetPermissionsCmd_Test_OS_Error, FM_Test_Setup, FM_Test_TearDown, "FM_ChildSetPermissionsCmd_Test_OS_Error");
-
- UtTest_Add(FM_ChildSleepStat_Test_GetStatsAndDoNotSleep, FM_Test_Setup, FM_Test_TearDown, "FM_ChildSleepStat_Test_GetStatsAndDoNotSleep");
- UtTest_Add(FM_ChildSleepStat_Test_GetStatsAndSleep, FM_Test_Setup, FM_Test_TearDown, "FM_ChildSleepStat_Test_GetStatsAndSleep");
- UtTest_Add(FM_ChildSleepStat_Test_DoNotGetStats, FM_Test_Setup, FM_Test_TearDown, "FM_ChildSleepStat_Test_DoNotGetStats");
+ UtTest_Add(FM_ChildSizeAndTime_Test_statError, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildSizeAndTime_Test_statError");
+
+ UtTest_Add(FM_ChildSetPermissionsCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildSetPermissionsCmd_Test_Nominal");
+ UtTest_Add(FM_ChildSetPermissionsCmd_Test_OS_Error, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildSetPermissionsCmd_Test_OS_Error");
+
+ UtTest_Add(FM_ChildSleepStat_Test_GetStatsAndDoNotSleep, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildSleepStat_Test_GetStatsAndDoNotSleep");
+ UtTest_Add(FM_ChildSleepStat_Test_GetStatsAndSleep, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildSleepStat_Test_GetStatsAndSleep");
+ UtTest_Add(FM_ChildSleepStat_Test_DoNotGetStats, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ChildSleepStat_Test_DoNotGetStats");
} /* end FM_Child_Test_AddTestCases */
/************************/
diff --git a/fsw/unit_test/fm_child_test.h b/fsw/unit_test/fm_child_test.h
index 9e3efc0..9e4fab8 100644
--- a/fsw/unit_test/fm_child_test.h
+++ b/fsw/unit_test/fm_child_test.h
@@ -6,22 +6,22 @@
* File Manager Application Version 2.5.3
*
* Copyright © 2020 United States Government as represented by the Administrator of
- * the National Aeronautics and Space Administration. All Rights Reserved.
+ * the National Aeronautics and Space Administration. All Rights Reserved.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
* Purpose: This file contains the function prototypes for the unit test cases for fm_child.c
- *
+ *
*/
/*
diff --git a/fsw/unit_test/fm_cmd_utils.c.gcov b/fsw/unit_test/fm_cmd_utils.c.gcov
deleted file mode 100644
index be18bbb..0000000
--- a/fsw/unit_test/fm_cmd_utils.c.gcov
+++ /dev/null
@@ -1,642 +0,0 @@
- -: 0:Source:../src/fm_cmd_utils.c
- -: 0:Programs:5
- -: 1:/*
- -: 2:** $Id: fm_cmd_utils.c.gcov 1.3.1.1 2017/01/25 00:20:23EST mdeschu Exp $
- -: 3:**
- -: 4:** Copyright (c) 2007-2014 United States Government as represented by the
- -: 5:** Administrator of the National Aeronautics and Space Administration.
- -: 6:** All Other Rights Reserved.
- -: 7:**
- -: 8:** This software was created at NASA's Goddard Space Flight Center.
- -: 9:** This software is governed by the NASA Open Source Agreement and may be
- -: 10:** used, distributed and modified only pursuant to the terms of that
- -: 11:** agreement.
- -: 12:**
- -: 13:** Title: File Manager (FM) Command Utility Functions
- -: 14:**
- -: 15:** Purpose: Provides file manager utility function definitions for
- -: 16:** processing file manager commands
- -: 17:**
- -: 18:** Author: Susanne L. Strege, Code 582 NASA GSFC
- -: 19:**
- -: 20:** Notes:
- -: 21:**
- -: 22:*/
- -: 23:
- -: 24:#include "cfe.h"
- -: 25:#include "fm_msg.h"
- -: 26:#include "fm_cmd_utils.h"
- -: 27:#include "fm_child.h"
- -: 28:#include "fm_perfids.h"
- -: 29:#include "fm_events.h"
- -: 30:#include "cfs_utils.h"
- -: 31:
- -: 32:#include
- -: 33:#include
- -: 34:
- -: 35:
- -: 36:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 37:/* */
- -: 38:/* FM utility function -- verify command packet length */
- -: 39:/* */
- -: 40:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 41:
- 51: 42:boolean FM_IsValidCmdPktLength(CFE_SB_MsgPtr_t CmdPacket, uint16 ExpectedLength,
- -: 43: uint32 EventID, char *CmdText)
- -: 44:{
- 51: 45: boolean FunctionResult = TRUE;
- 51: 46: uint16 ActualLength = CFE_SB_GetTotalMsgLength(CmdPacket);
- -: 47:
- -: 48: /* Verify command packet length */
- 51: 49: if (ActualLength != ExpectedLength)
- -: 50: {
- 1: 51: FunctionResult = FALSE;
- -: 52:
- 1: 53: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 54: "%s error: invalid command packet length: expected = %d, actual = %d",
- -: 55: CmdText, ExpectedLength, ActualLength);
- -: 56: }
- -: 57:
- 51: 58: return(FunctionResult);
- -: 59:
- -: 60:} /* FM_IsValidCmdPktLength */
- -: 61:
- -: 62:
- -: 63:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 64:/* */
- -: 65:/* FM utility function -- verify state is not invalid */
- -: 66:/* */
- -: 67:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 68:
- 7: 69:boolean FM_VerifyOverwrite(uint16 Overwrite, uint32 EventID, char *CmdText)
- -: 70:{
- 7: 71: boolean FunctionResult = TRUE;
- -: 72:
- -: 73: /* Acceptable values are TRUE (one) and FALSE (zero) */
- 7: 74: if ((Overwrite != TRUE) && (Overwrite != FALSE))
- -: 75: {
- 1: 76: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 77: "%s error: invalid overwrite = %d", CmdText, Overwrite);
- -: 78:
- 1: 79: FunctionResult = FALSE;
- -: 80: }
- -: 81:
- 7: 82: return(FunctionResult);
- -: 83:
- -: 84:} /* End FM_VerifyOverwrite */
- -: 85:
- -: 86:
- -: 87:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 88:/* */
- -: 89:/* FM utility function -- get open files data */
- -: 90:/* */
- -: 91:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 92:
- 5: 93:uint32 FM_GetOpenFilesData(FM_OpenFilesEntry_t *OpenFilesData)
- -: 94:{
- 5: 95: uint32 OpenFilesCount = 0;
- -: 96: int32 FDTableIndex;
- -: 97: OS_FDTableEntry FDTableEntry;
- -: 98: CFE_ES_TaskInfo_t TaskInfo;
- -: 99:
- -: 100: /* Get system info for each file descriptor table entry */
- 255: 101: for (FDTableIndex = 0; FDTableIndex < OS_MAX_NUM_OPEN_FILES; FDTableIndex++)
- -: 102: {
- -: 103: /* If FD table entry is valid - then file is open */
- 250: 104: if (OS_FDGetInfo(FDTableIndex, &FDTableEntry) == OS_FS_SUCCESS)
- -: 105: {
- -: 106: /* Getting the list of filenames is optional */
- 250: 107: if (OpenFilesData != (FM_OpenFilesEntry_t *) NULL)
- -: 108: {
- -: 109: /* FDTableEntry.Path has logical filename saved when file was opened */
- 150: 110: strcpy(OpenFilesData[OpenFilesCount].LogicalName, FDTableEntry.Path);
- -: 111:
- -: 112: /* Get the name of the application that opened the file */
- 150: 113: CFE_PSP_MemSet(&TaskInfo, 0, sizeof(CFE_ES_TaskInfo_t));
- 150: 114: if (CFE_ES_GetTaskInfo(&TaskInfo, FDTableEntry.User) == CFE_SUCCESS)
- -: 115: {
- 150: 116: strcpy(OpenFilesData[OpenFilesCount].AppName, (char *) TaskInfo.AppName);
- -: 117: }
- -: 118: }
- -: 119:
- -: 120: /* File count is not optional */
- 250: 121: OpenFilesCount++;
- -: 122: }
- -: 123: }
- -: 124:
- 5: 125: return(OpenFilesCount);
- -: 126:
- -: 127:} /* End FM_GetOpenFilesData */
- -: 128:
- -: 129:
- -: 130:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 131:/* */
- -: 132:/* FM utility function -- query filename state */
- -: 133:/* */
- -: 134:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 135:
- 81: 136:uint32 FM_GetFilenameState(char *Filename, uint32 BufferSize, boolean FileInfoCmd)
- -: 137:{
- -: 138: OS_FDTableEntry FDTableEntry;
- -: 139: os_fstat_t FileStatus;
- 81: 140: uint32 FilenameState = FM_NAME_IS_INVALID;
- 81: 141: boolean FilenameIsValid = FALSE;
- 81: 142: int32 StringLength = 0;
- -: 143: uint32 i;
- -: 144:
- -: 145:
- -: 146: /* Search Filename for a string terminator */
- 747: 147: for (StringLength = 0; StringLength < BufferSize; StringLength++)
- -: 148: {
- 747: 149: if (Filename[StringLength] == '\0')
- -: 150: {
- 81: 151: break;
- -: 152: }
- -: 153: }
- -: 154:
- -: 155: /* Verify that Filename is not empty and has a terminator */
- 81: 156: if ((StringLength > 0) && (StringLength < BufferSize))
- -: 157: {
- -: 158: /* Verify that the string characters are OK for a filename */
- 65: 159: FilenameIsValid = CFS_IsValidFilename(Filename, StringLength);
- -: 160: }
- -: 161:
- -: 162: /* If Filename is valid, then determine its state */
- 81: 163: if (FilenameIsValid)
- -: 164: {
- -: 165: /* Check to see if Filename is in use */
- 58: 166: if (OS_stat(Filename, &FileStatus) == OS_SUCCESS)
- -: 167: {
- -: 168: /* Filename is in use, is it also a directory? */
- -: 169:#ifdef OS_FILESTAT_ISDIR
- -: 170: if (OS_FILESTAT_ISDIR(FileStatus))
- -: 171:#else
- 44: 172: if (S_ISDIR(FileStatus.st_mode))
- -: 173:#endif
- -: 174: {
- -: 175: /* Filename is a directory */
- 13: 176: FilenameState = FM_NAME_IS_DIRECTORY;
- -: 177: }
- -: 178: else
- -: 179: {
- -: 180: /* Filename is a file, but is it open? */
- 31: 181: FilenameState = FM_NAME_IS_FILE_CLOSED;
- -: 182:
- -: 183: /* Search for Filename in current list of open files */
- 1231: 184: for (i = 0; i < OS_MAX_NUM_OPEN_FILES; i++)
- -: 185: {
- -: 186: /* Get system info for each file descriptor table entry */
- -: 187: /* If the FD table entry is valid - then the file is open */
- 1207: 188: if (OS_FDGetInfo(i, &FDTableEntry) == OS_FS_SUCCESS)
- -: 189: {
- 1207: 190: if (strcmp(FDTableEntry.Path, Filename) == 0)
- -: 191: {
- 7: 192: FilenameState = FM_NAME_IS_FILE_OPEN;
- 7: 193: break;
- -: 194: }
- -: 195: }
- -: 196: }
- -: 197: }
- -: 198:
- -: 199: /* Save the last modify time and file size for File Info commands */
- 44: 200: if (FileInfoCmd)
- -: 201: {
- -: 202:#ifdef OS_FILESTAT_TIME
- -: 203: FM_GlobalData.FileStatTime = OS_FILESTAT_TIME(FileStatus);
- -: 204:#else
- 3: 205: FM_GlobalData.FileStatTime = FileStatus.st_mtime;
- -: 206:#endif
- -: 207:#ifdef OS_FILESTAT_SIZE
- -: 208: FM_GlobalData.FileStatSize = OS_FILESTAT_SIZE(FileStatus);
- -: 209:#else
- 3: 210: FM_GlobalData.FileStatSize = FileStatus.st_size;
- -: 211:#endif
- -: 212: }
- -: 213: }
- -: 214: else
- -: 215: {
- -: 216: /* Cannot get file stat - therefore does not exist */
- 14: 217: FilenameState = FM_NAME_IS_NOT_IN_USE;
- -: 218:
- -: 219: /* Save the last modify time and file size for File Info commands */
- 14: 220: if (FileInfoCmd)
- -: 221: {
- 1: 222: FM_GlobalData.FileStatSize = 0;
- 1: 223: FM_GlobalData.FileStatTime = 0;
- -: 224: }
- -: 225: }
- -: 226: }
- -: 227:
- 81: 228: return(FilenameState);
- -: 229:
- -: 230:} /* End FM_GetFilenameState */
- -: 231:
- -: 232:
- -: 233:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 234:/* */
- -: 235:/* FM utility function -- verify state is not invalid */
- -: 236:/* */
- -: 237:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 238:
- 7: 239:uint32 FM_VerifyNameValid(char *Name, uint32 BufferSize, uint32 EventID, char *CmdText)
- -: 240:{
- -: 241: uint32 FilenameState;
- -: 242:
- -: 243: /* Looking for filename state != FM_NAME_IS_INVALID */
- 7: 244: FilenameState = FM_GetFilenameState(Name, BufferSize, TRUE);
- -: 245:
- 7: 246: if (FilenameState == FM_NAME_IS_INVALID)
- -: 247: {
- -: 248: /* Insert a terminator in case the invalid string did not have one */
- 5: 249: Name[BufferSize - 1] = '\0';
- 5: 250: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 251: "%s error: invalid name: name = %s", CmdText, Name);
- -: 252: }
- -: 253:
- 7: 254: return(FilenameState);
- -: 255:
- -: 256:} /* End FM_VerifyNameValid */
- -: 257:
- -: 258:
- -: 259:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 260:/* */
- -: 261:/* FM utility function -- verify state is closed file */
- -: 262:/* */
- -: 263:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 264:
- 13: 265:boolean FM_VerifyFileClosed(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText)
- -: 266:{
- 13: 267: boolean Result = FALSE;
- -: 268: uint32 FilenameState;
- -: 269:
- -: 270: /* Looking for filename state = file (closed) */
- 13: 271: FilenameState = FM_GetFilenameState(Filename, BufferSize, FALSE);
- -: 272:
- 13: 273: if (FilenameState == FM_NAME_IS_INVALID)
- -: 274: {
- -: 275: /* Insert a terminator in case the invalid string did not have one */
- 4: 276: Filename[BufferSize - 1] = '\0';
- 4: 277: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 278: "%s error: filename is invalid: name = %s", CmdText, Filename);
- -: 279: }
- 9: 280: else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
- -: 281: {
- 1: 282: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 283: "%s error: file does not exist: name = %s", CmdText, Filename);
- -: 284: }
- 8: 285: else if (FilenameState == FM_NAME_IS_FILE_OPEN)
- -: 286: {
- 1: 287: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 288: "%s error: file is already open: name = %s", CmdText, Filename);
- -: 289: }
- 7: 290: else if (FilenameState == FM_NAME_IS_FILE_CLOSED)
- -: 291: {
- 6: 292: Result = TRUE;
- -: 293: }
- 1: 294: else if (FilenameState == FM_NAME_IS_DIRECTORY)
- -: 295: {
- 1: 296: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 297: "%s error: filename is a directory: name = %s", CmdText, Filename);
- -: 298: }
- -: 299:
- 13: 300: return(Result);
- -: 301:
- -: 302:} /* End FM_VerifyFileClosed */
- -: 303:
- -: 304:
- -: 305:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 306:/* */
- -: 307:/* FM utility function -- verify state is open or closed file */
- -: 308:/* */
- -: 309:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 310:
- 13: 311:boolean FM_VerifyFileExists(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText)
- -: 312:{
- 13: 313: boolean Result = FALSE;
- -: 314: uint32 FilenameState;
- -: 315:
- -: 316: /* Looking for filename state = file (open or closed) */
- 13: 317: FilenameState = FM_GetFilenameState(Filename, BufferSize, FALSE);
- -: 318:
- 13: 319: if (FilenameState == FM_NAME_IS_INVALID)
- -: 320: {
- -: 321: /* Insert a terminator in case the invalid string did not have one */
- 4: 322: Filename[BufferSize - 1] = '\0';
- 4: 323: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 324: "%s error: filename is invalid: name = %s", CmdText, Filename);
- -: 325: }
- 9: 326: else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
- -: 327: {
- 1: 328: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 329: "%s error: file does not exist: name = %s", CmdText, Filename);
- -: 330: }
- 15: 331: else if ((FilenameState == FM_NAME_IS_FILE_OPEN) ||
- -: 332: (FilenameState == FM_NAME_IS_FILE_CLOSED))
- -: 333: {
- 7: 334: Result = TRUE;
- -: 335: }
- 1: 336: else if (FilenameState == FM_NAME_IS_DIRECTORY)
- -: 337: {
- 1: 338: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 339: "%s error: filename is a directory: name = %s", CmdText, Filename);
- -: 340: }
- -: 341:
- 13: 342: return(Result);
- -: 343:
- -: 344:} /* End FM_VerifyFileExists */
- -: 345:
- -: 346:
- -: 347:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 348:/* */
- -: 349:/* FM utility function -- verify state is unused */
- -: 350:/* */
- -: 351:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 352:
- 10: 353:boolean FM_VerifyFileNoExist(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText)
- -: 354:{
- 10: 355: boolean Result = FALSE;
- -: 356: uint32 FilenameState;
- -: 357:
- -: 358: /* Looking for filename state = not in use */
- 10: 359: FilenameState = FM_GetFilenameState(Filename, BufferSize, FALSE);
- -: 360:
- 10: 361: if (FilenameState == FM_NAME_IS_INVALID)
- -: 362: {
- -: 363: /* Insert a terminator in case the invalid string did not have one */
- 1: 364: Filename[BufferSize - 1] = '\0';
- 1: 365: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 366: "%s error: filename is invalid: name = %s", CmdText, Filename);
- -: 367: }
- 9: 368: else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
- -: 369: {
- 6: 370: Result = TRUE;
- -: 371: }
- 5: 372: else if ((FilenameState == FM_NAME_IS_FILE_OPEN) ||
- -: 373: (FilenameState == FM_NAME_IS_FILE_CLOSED))
- -: 374: {
- 2: 375: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 376: "%s error: file already exists: name = %s", CmdText, Filename);
- -: 377: }
- 1: 378: else if (FilenameState == FM_NAME_IS_DIRECTORY)
- -: 379: {
- 1: 380: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 381: "%s error: filename is a directory: name = %s", CmdText, Filename);
- -: 382: }
- -: 383:
- 10: 384: return(Result);
- -: 385:
- -: 386:} /* End FM_VerifyFileNoExist */
- -: 387:
- -: 388:
- -: 389:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 390:/* */
- -: 391:/* FM utility function -- verify state is unused or closed file */
- -: 392:/* */
- -: 393:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 394:
- 9: 395:boolean FM_VerifyFileNotOpen(char *Filename, uint32 BufferSize, uint32 EventID, char *CmdText)
- -: 396:{
- 9: 397: boolean Result = FALSE;
- -: 398: uint32 FilenameState;
- -: 399:
- -: 400: /* Looking for filename state = file (closed) or name not in use */
- 9: 401: FilenameState = FM_GetFilenameState(Filename, BufferSize, FALSE);
- -: 402:
- 9: 403: if (FilenameState == FM_NAME_IS_INVALID)
- -: 404: {
- -: 405: /* Insert a terminator in case the invalid string did not have one */
- 1: 406: Filename[BufferSize - 1] = '\0';
- 1: 407: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 408: "%s error: filename is invalid: name = %s", CmdText, Filename);
- -: 409: }
- 8: 410: else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
- -: 411: {
- 1: 412: Result = TRUE;
- -: 413: }
- 7: 414: else if (FilenameState == FM_NAME_IS_FILE_OPEN)
- -: 415: {
- 1: 416: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 417: "%s error: file exists as an open file: name = %s", CmdText, Filename);
- -: 418: }
- 6: 419: else if (FilenameState == FM_NAME_IS_FILE_CLOSED)
- -: 420: {
- 5: 421: Result = TRUE;
- -: 422: }
- 1: 423: else if (FilenameState == FM_NAME_IS_DIRECTORY)
- -: 424: {
- 1: 425: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 426: "%s error: filename is a directory: name = %s", CmdText, Filename);
- -: 427: }
- -: 428:
- 9: 429: return(Result);
- -: 430:
- -: 431:} /* End FM_VerifyFileNotOpen */
- -: 432:
- -: 433:
- -: 434:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 435:/* */
- -: 436:/* FM utility function -- verify state is directory */
- -: 437:/* */
- -: 438:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 439:
- 14: 440:boolean FM_VerifyDirExists(char *Directory, uint32 BufferSize, uint32 EventID, char *CmdText)
- -: 441:{
- 14: 442: boolean Result = FALSE;
- -: 443: uint32 FilenameState;
- -: 444:
- -: 445: /* Looking for filename state = directory */
- 14: 446: FilenameState = FM_GetFilenameState(Directory, BufferSize, FALSE);
- -: 447:
- 14: 448: if (FilenameState == FM_NAME_IS_INVALID)
- -: 449: {
- -: 450: /* Insert a terminator in case the invalid string did not have one */
- 5: 451: Directory[BufferSize - 1] = '\0';
- 5: 452: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 453: "%s error: directory name is invalid: name = %s", CmdText, Directory);
- -: 454: }
- 9: 455: else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
- -: 456: {
- 1: 457: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 458: "%s error: directory does not exist: name = %s", CmdText, Directory);
- -: 459: }
- 10: 460: else if ((FilenameState == FM_NAME_IS_FILE_OPEN) ||
- -: 461: (FilenameState == FM_NAME_IS_FILE_CLOSED))
- -: 462: {
- 2: 463: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 464: "%s error: directory name exists as a file: name %s", CmdText, Directory);
- -: 465: }
- 6: 466: else if (FilenameState == FM_NAME_IS_DIRECTORY)
- -: 467: {
- 6: 468: Result = TRUE;
- -: 469: }
- -: 470:
- 14: 471: return(Result);
- -: 472:
- -: 473:} /* End FM_VerifyDirExists */
- -: 474:
- -: 475:
- -: 476:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 477:/* */
- -: 478:/* FM utility function -- verify state is unused */
- -: 479:/* */
- -: 480:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 481:
- 7: 482:boolean FM_VerifyDirNoExist(char *Name, uint32 BufferSize, uint32 EventID, char *CmdText)
- -: 483:{
- 7: 484: boolean Result = FALSE;
- -: 485: uint32 FilenameState;
- -: 486:
- -: 487: /* Looking for filename state = unused */
- 7: 488: FilenameState = FM_GetFilenameState(Name, BufferSize, FALSE);
- -: 489:
- 7: 490: if (FilenameState == FM_NAME_IS_INVALID)
- -: 491: {
- -: 492: /* Insert a terminator in case the invalid string did not have one */
- 2: 493: Name[BufferSize - 1] = '\0';
- 2: 494: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 495: "%s error: directory name is invalid: name = %s", CmdText, Name);
- -: 496: }
- 5: 497: else if (FilenameState == FM_NAME_IS_NOT_IN_USE)
- -: 498: {
- 2: 499: Result = TRUE;
- -: 500: }
- 5: 501: else if ((FilenameState == FM_NAME_IS_FILE_OPEN) ||
- -: 502: (FilenameState == FM_NAME_IS_FILE_CLOSED))
- -: 503: {
- 2: 504: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 505: "%s error: directory name exists as a file: name = %s", CmdText, Name);
- -: 506: }
- 1: 507: else if (FilenameState == FM_NAME_IS_DIRECTORY)
- -: 508: {
- 1: 509: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 510: "%s error: directory already exists: name = %s", CmdText, Name);
- -: 511: }
- -: 512:
- 7: 513: return(Result);
- -: 514:
- -: 515:} /* End FM_VerifyDirNoExist */
- -: 516:
- -: 517:
- -: 518:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 519:/* */
- -: 520:/* FM utility function -- verify child task interface is alive */
- -: 521:/* */
- -: 522:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 523:
- 22: 524:boolean FM_VerifyChildTask(uint32 EventID, char *CmdText)
- -: 525:{
- 22: 526: boolean Result = FALSE;
- -: 527:
- -: 528: /* Copy of child queue count that child task cannot change */
- 22: 529: uint8 LocalQueueCount = FM_GlobalData.ChildQueueCount;
- -: 530:
- -: 531: /* Verify child task is active and queue interface is healthy */
- 22: 532: if (FM_GlobalData.ChildSemaphore == FM_CHILD_SEM_INVALID)
- -: 533: {
- 1: 534: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 535: "%s error: child task is disabled", CmdText);
- -: 536:
- -: 537: /* Child task disabled - cannot add another command */
- 1: 538: Result = FALSE;
- -: 539: }
- 21: 540: else if (LocalQueueCount == FM_CHILD_QUEUE_DEPTH)
- -: 541: {
- 1: 542: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 543: "%s error: child task queue is full", CmdText);
- -: 544:
- -: 545: /* Queue full - cannot add another command */
- 1: 546: Result = FALSE;
- -: 547: }
- 41: 548: else if ((LocalQueueCount > FM_CHILD_QUEUE_DEPTH) ||
- 19: 549: (FM_GlobalData.ChildWriteIndex >= FM_CHILD_QUEUE_DEPTH))
- -: 550: {
- 2: 551: CFE_EVS_SendEvent(EventID, CFE_EVS_ERROR,
- -: 552: "%s error: child task interface is broken: count = %d, index = %d",
- 2: 553: CmdText, LocalQueueCount, FM_GlobalData.ChildWriteIndex);
- -: 554:
- -: 555: /* Queue broken - cannot add another command */
- 2: 556: Result = FALSE;
- -: 557: }
- -: 558: else
- -: 559: {
- 18: 560: CFE_PSP_MemSet(&FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex],
- -: 561: 0, sizeof(FM_ChildQueueEntry_t));
- -: 562:
- -: 563: /* OK to add another command to the queue */
- 18: 564: Result = TRUE;
- -: 565: }
- -: 566:
- 22: 567: return(Result);
- -: 568:
- -: 569:} /* End FM_VerifyChildTask */
- -: 570:
- -: 571:
- -: 572:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 573:/* */
- -: 574:/* FM utility function -- invoke child task command processor */
- -: 575:/* */
- -: 576:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 577:
- 19: 578:void FM_InvokeChildTask(void)
- -: 579:{
- -: 580:
- -: 581: /* Update callers queue index */
- 19: 582: FM_GlobalData.ChildWriteIndex++;
- -: 583:
- 19: 584: if (FM_GlobalData.ChildWriteIndex >= FM_CHILD_QUEUE_DEPTH)
- -: 585: {
- 1: 586: FM_GlobalData.ChildWriteIndex = 0;
- -: 587: }
- -: 588:
- -: 589: /* Prevent parent/child updating queue counter at same time */
- 19: 590: OS_MutSemTake(FM_GlobalData.ChildQueueCountSem);
- 19: 591: FM_GlobalData.ChildQueueCount++;
- 19: 592: OS_MutSemGive(FM_GlobalData.ChildQueueCountSem);
- -: 593:
- -: 594: /* Does the child task still have a semaphore? */
- 19: 595: if (FM_GlobalData.ChildSemaphore != FM_CHILD_SEM_INVALID)
- -: 596: {
- -: 597: /* Signal child task to call command handler */
- 19: 598: OS_CountSemGive(FM_GlobalData.ChildSemaphore);
- -: 599: }
- -: 600:
- 19: 601: return;
- -: 602:
- -: 603:} /* End of FM_InvokeChildTask */
- -: 604:
- -: 605:
- -: 606:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 607:/* */
- -: 608:/* FM utility function -- add path separator to directory name */
- -: 609:/* */
- -: 610:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 611:
- 5: 612:void FM_AppendPathSep(char *Directory, uint32 BufferSize)
- -: 613:{
- -: 614: uint32 StringLength;
- -: 615:
- -: 616: /*
- -: 617: ** Previous verification tests ensure that the length of
- -: 618: ** the string is both non-zero and less than the size
- -: 619: ** of the string buffer.
- -: 620: */
- 5: 621: StringLength = strlen(Directory);
- -: 622:
- -: 623: /* Do nothing if string already ends with a path separator */
- 5: 624: if (Directory[StringLength - 1] != '/')
- -: 625: {
- -: 626: /* Verify that string buffer has room for a path separator */
- 1: 627: if (StringLength < (BufferSize - 1))
- -: 628: {
- 1: 629: strcat(Directory, "/");
- -: 630: }
- -: 631: }
- -: 632:
- 5: 633: return;
- -: 634:
- -: 635:} /* End of FM_AppendPathSep */
- -: 636:
- -: 637:
- -: 638:/************************/
- -: 639:/* End of File Comment */
- -: 640:/************************/
diff --git a/fsw/unit_test/fm_cmd_utils_test.c b/fsw/unit_test/fm_cmd_utils_test.c
index 6d6539e..aa69f98 100644
--- a/fsw/unit_test/fm_cmd_utils_test.c
+++ b/fsw/unit_test/fm_cmd_utils_test.c
@@ -1,33 +1,33 @@
- /*************************************************************************
- ** Filename: fm_cmd_utils_test.c
- **
- ** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
- ** File Manager Application Version 2.5.3
- **
- ** Copyright © 2020 United States Government as represented by the Administrator of
- ** the National Aeronautics and Space Administration. All Rights Reserved.
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- **
- ** You may obtain a copy of the License at
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- **
- ** Purpose:
- ** This file contains unit test cases for the functions contained in the file fm_cmd_utils.c.
- **
- ** References:
- ** Flight Software Branch C Coding Standard Version 1.2
- ** CFS Development Standards Document
- ** Notes:
- **
- *************************************************************************/
+/*************************************************************************
+** Filename: fm_cmd_utils_test.c
+**
+** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
+** File Manager Application Version 2.5.3
+**
+** Copyright © 2020 United States Government as represented by the Administrator of
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+**
+** Purpose:
+** This file contains unit test cases for the functions contained in the file fm_cmd_utils.c.
+**
+** References:
+** Flight Software Branch C Coding Standard Version 1.2
+** CFS Development Standards Document
+** Notes:
+**
+*************************************************************************/
/*
* Includes
@@ -59,29 +59,29 @@
#include
/* Global structure to set */
-OS_FDTableEntry fm_cmd_test_fd_prop;
+OS_FDTableEntry fm_cmd_test_fd_prop;
/*
* Function Definitions
*/
-int32 UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t *filestats)
{
#ifdef OS_FILESTAT_MODE
filestats->FileModeBits = OS_FILESTAT_MODE_READ;
#else
- filestats->st_mode = S_IFREG;
+ filestats->st_mode = S_IFREG;
#endif
return CFE_SUCCESS;
} /* end UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile */
-int32 UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory(const char *path, os_fstat_t *filestats)
{
#ifdef OS_FILESTAT_MODE
filestats->FileModeBits = OS_FILESTAT_MODE_DIR;
#else
- filestats->st_mode = S_IFDIR;
+ filestats->st_mode = S_IFDIR;
#endif
#ifdef OS_FILESTAT_TIME
@@ -93,7 +93,7 @@ int32 UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory(const char *path, o
#ifdef OS_FILESTAT_SIZE
filestats->FileSize = 2;
#else
- filestats->st_size = 2;
+ filestats->st_size = 2;
#endif
return CFE_SUCCESS;
} /* end UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory */
@@ -103,96 +103,93 @@ int32 UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_FDGetInfoHook(int32 filedes, OS_FDTable
fd_prop->IsValid = fm_cmd_test_fd_prop.IsValid;
fd_prop->User = fm_cmd_test_fd_prop.User;
- strncpy (fd_prop->Path, fm_cmd_test_fd_prop.Path, OS_MAX_PATH_LEN);
+ strncpy(fd_prop->Path, fm_cmd_test_fd_prop.Path, OS_MAX_PATH_LEN);
return 0;
} /* end UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_FDGetInfoHook */
int32 UT_FM_CMD_UTILS_TEST_CFE_ES_GetTaskInfoHook(CFE_ES_TaskInfo_t *TaskInfo, uint32 TaskId)
{
- strncpy ((char *)TaskInfo->AppName, "appname", OS_MAX_API_NAME);
+ strncpy((char *)TaskInfo->AppName, "appname", OS_MAX_API_NAME);
return 0;
} /* end UT_FM_CMD_UTILS_TEST_CFE_ES_GetTaskInfoHook */
void FM_IsValidCmdPktLength_Test_InvalidPacketLength(void)
{
- boolean Result;
+ boolean Result;
CFE_SB_MsgPtr_t CmdPacket;
- uint16 ExpectedLength = 1;
- uint32 EventID = 1;
+ uint16 ExpectedLength = 1;
+ uint32 EventID = 1;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, 0, TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, 0, TRUE);
/* Set to generate error message "invalid command packet length" */
Ut_CFE_SB_SetReturnCode(UT_CFE_SB_GETTOTALMSGLENGTH_INDEX, 0, 1);
/* Execute the function being tested */
Result = FM_IsValidCmdPktLength(CmdPacket, ExpectedLength, EventID, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(EventID, CFE_EVS_ERROR, "Command error: invalid command packet length: expected = 1, actual = 0"),
- "Command error: invalid command packet length: expected = 1, actual = 0");
+ UtAssert_True(Ut_CFE_EVS_EventSent(EventID, CFE_EVS_ERROR,
+ "Command error: invalid command packet length: expected = 1, actual = 0"),
+ "Command error: invalid command packet length: expected = 1, actual = 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_IsValidCmdPktLength_Test_InvalidPacketLength */
void FM_VerifyOverwrite_Test(void)
{
boolean Result;
- uint16 Overwrite = 99;
- uint32 EventID = 1;
+ uint16 Overwrite = 99;
+ uint32 EventID = 1;
/* Execute the function being tested */
Result = FM_VerifyOverwrite(Overwrite, EventID, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(EventID, CFE_EVS_ERROR, "Command error: invalid overwrite = 99"),
- "Command error: invalid overwrite = 99");
+ UtAssert_True(Ut_CFE_EVS_EventSent(EventID, CFE_EVS_ERROR, "Command error: invalid overwrite = 99"),
+ "Command error: invalid overwrite = 99");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyOverwrite_Test */
void FM_GetOpenFilesData_Test(void)
{
- uint32 Result;
+ uint32 Result;
FM_OpenFilesEntry_t OpenFilesData[OS_MAX_NUM_OPEN_FILES];
/* Initialize File Descriptor properties for the FDGetInfo hook */
fm_cmd_test_fd_prop.IsValid = TRUE;
- strncpy (fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
+ strncpy(fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
/* Satisfies condition "FDTableEntry.IsValid == TRUE", and causes LogicalName to be set to "name" */
- Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_FDGETINFO_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_FDGetInfoHook);
+ Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_FDGETINFO_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_FDGetInfoHook);
/* Sets AppName to "appname" */
Ut_CFE_ES_SetFunctionHook(UT_CFE_ES_GETTASKINFO_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_ES_GetTaskInfoHook);
/* Execute the function being tested */
Result = FM_GetOpenFilesData(OpenFilesData);
-
+
/* Verify results */
- UtAssert_True (Result == OS_MAX_NUM_OPEN_FILES, "Result == OS_MAX_NUM_OPEN_FILES");
+ UtAssert_True(Result == OS_MAX_NUM_OPEN_FILES, "Result == OS_MAX_NUM_OPEN_FILES");
- UtAssert_True
- (strncmp(OpenFilesData[0].LogicalName, "name", OS_MAX_PATH_LEN) == 0,
- "strncmp(OpenFilesData[0].LogicalName, 'name', OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(OpenFilesData[0].LogicalName, "name", OS_MAX_PATH_LEN) == 0,
+ "strncmp(OpenFilesData[0].LogicalName, 'name', OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(OpenFilesData[0].AppName, "appname", OS_MAX_API_NAME) == 0,
- "strncmp(OpenFilesData[0].AppName, 'appname', OS_MAX_API_NAME) == 0");
+ UtAssert_True(strncmp(OpenFilesData[0].AppName, "appname", OS_MAX_API_NAME) == 0,
+ "strncmp(OpenFilesData[0].AppName, 'appname', OS_MAX_API_NAME) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_GetOpenFilesData_Test */
@@ -205,14 +202,14 @@ void FM_GetFilenameState_Test_IsDirectory(void)
/* Execute the function being tested */
Result = FM_GetFilenameState("filename", OS_MAX_PATH_LEN, TRUE);
-
+
/* Verify results */
- UtAssert_True (Result == FM_NAME_IS_DIRECTORY, "Result == FM_NAME_IS_DIRECTORY");
+ UtAssert_True(Result == FM_NAME_IS_DIRECTORY, "Result == FM_NAME_IS_DIRECTORY");
+
+ UtAssert_True(FM_GlobalData.FileStatTime == 1, "FM_GlobalData.FileStatTime == 1");
+ UtAssert_True(FM_GlobalData.FileStatSize == 2, "FM_GlobalData.FileStatSize == 2");
- UtAssert_True (FM_GlobalData.FileStatTime == 1, "FM_GlobalData.FileStatTime == 1");
- UtAssert_True (FM_GlobalData.FileStatSize == 2, "FM_GlobalData.FileStatSize == 2");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_GetFilenameState_Test_IsDirectory */
@@ -225,95 +222,91 @@ void FM_GetFilenameState_Test_NotInUse(void)
/* Execute the function being tested */
Result = FM_GetFilenameState("filename", OS_MAX_PATH_LEN, TRUE);
-
+
/* Verify results */
- UtAssert_True (Result == FM_NAME_IS_NOT_IN_USE, "Result == FM_NAME_IS_NOT_IN_USE");
+ UtAssert_True(Result == FM_NAME_IS_NOT_IN_USE, "Result == FM_NAME_IS_NOT_IN_USE");
- UtAssert_True (FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
- UtAssert_True (FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(FM_GlobalData.FileStatTime == 0, "FM_GlobalData.FileStatTime == 0");
+ UtAssert_True(FM_GlobalData.FileStatSize == 0, "FM_GlobalData.FileStatSize == 0");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_GetFilenameState_Test_NotInUse */
void FM_VerifyNameValid_Test_InvalidName(void)
{
uint32 Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "***filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "***filename", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_VerifyNameValid(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FM_NAME_IS_INVALID, "Result == FM_NAME_IS_INVALID");
+ UtAssert_True(Result == FM_NAME_IS_INVALID, "Result == FM_NAME_IS_INVALID");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(1, CFE_EVS_ERROR, "Command error: invalid name: name = ***filename"),
- "Command error: invalid name: name = ***filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(1, CFE_EVS_ERROR, "Command error: invalid name: name = ***filename"),
+ "Command error: invalid name: name = ***filename");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyNameValid_Test_InvalidName */
void FM_VerifyFileClosed_Test_InvalidFilename(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "***filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "***filename", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_VerifyFileClosed(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent(1, CFE_EVS_ERROR, "Command error: filename is invalid: name = ***filename"),
+ "Command error: filename is invalid: name = ***filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(1, CFE_EVS_ERROR, "Command error: filename is invalid: name = ***filename"),
- "Command error: filename is invalid: name = ***filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileClosed_Test_InvalidFilename */
void FM_VerifyFileClosed_Test_FileDoesNotExist(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_NOT_IN_USE" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 1);
/* Execute the function being tested */
Result = FM_VerifyFileClosed(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: file does not exist: name = filename"),
+ "Command error: file does not exist: name = filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET),
- CFE_EVS_ERROR,
- "Command error: file does not exist: name = filename"),
- "Command error: file does not exist: name = filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileClosed_Test_FileDoesNotExist */
void FM_VerifyFileClosed_Test_FileAlreadyOpen(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Initialize File Descriptor properties for the FDGetInfo hook */
fm_cmd_test_fd_prop.IsValid = TRUE;
- strncpy (fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
+ strncpy(fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
/* Needed to satisfy condition "FilenameState == FM_NAME_IS_FILE_OPEN" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -323,30 +316,28 @@ void FM_VerifyFileClosed_Test_FileAlreadyOpen(void)
/* Execute the function being tested */
Result = FM_VerifyFileClosed(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: file is already open: name = name"),
+ "Command error: file is already open: name = name");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISOPEN_EID_OFFSET),
- CFE_EVS_ERROR,
- "Command error: file is already open: name = name"),
- "Command error: file is already open: name = name");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileClosed_Test_FileAlreadyOpen */
void FM_VerifyFileClosed_Test_FileClosed(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Initialize File Descriptor properties for the FDGetInfo hook */
fm_cmd_test_fd_prop.IsValid = FALSE;
- strncpy (fm_cmd_test_fd_prop.Path, "", OS_MAX_PATH_LEN);
+ strncpy(fm_cmd_test_fd_prop.Path, "", OS_MAX_PATH_LEN);
/* Needed to satisfy condition "FilenameState == FM_NAME_IS_FILE_CLOSED" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -356,97 +347,93 @@ void FM_VerifyFileClosed_Test_FileClosed(void)
/* Execute the function being tested */
Result = FM_VerifyFileClosed(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_VerifyFileClosed_Test_FileClosed */
void FM_VerifyFileClosed_Test_IsDirectory(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Needed to satisfy condition "FilenameState == FM_NAME_IS_DIRECTORY" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory);
/* Execute the function being tested */
Result = FM_VerifyFileClosed(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET),
- CFE_EVS_ERROR,
- "Command error: filename is a directory: name = name"),
- "Command error: filename is a directory: name = name");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: filename is a directory: name = name"),
+ "Command error: filename is a directory: name = name");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileClosed_Test_IsDirectory */
void FM_VerifyFileExists_Test_InvalidFilename(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "***filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "***filename", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_VerifyFileExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: filename is invalid: name = ***filename"),
+ "Command error: filename is invalid: name = ***filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR, "Command error: filename is invalid: name = ***filename"),
- "Command error: filename is invalid: name = ***filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileExists_Test_InvalidFilename */
void FM_VerifyFileExists_Test_FileDoesNotExist(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_NOT_IN_USE" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 1);
/* Execute the function being tested */
Result = FM_VerifyFileExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: file does not exist: name = filename"),
+ "Command error: file does not exist: name = filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET),
- CFE_EVS_ERROR,
- "Command error: file does not exist: name = filename"),
- "Command error: file does not exist: name = filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileExists_Test_FileDoesNotExist */
void FM_VerifyFileExists_Test_FileOpen(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Initialize File Descriptor properties for the FDGetInfo hook */
fm_cmd_test_fd_prop.IsValid = TRUE;
- strncpy (fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
+ strncpy(fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_FILE_OPEN" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -456,109 +443,108 @@ void FM_VerifyFileExists_Test_FileOpen(void)
/* Execute the function being tested */
Result = FM_VerifyFileExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_VerifyFileExists_Test_FileOpen */
void FM_VerifyFileExists_Test_FileClosed(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_FILE_CLOSED" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_VerifyFileExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_VerifyFileExists_Test_FileClosed */
void FM_VerifyFileExists_Test_IsDirectory(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_DIRECTORY" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory);
/* Execute the function being tested */
Result = FM_VerifyFileExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: filename is a directory: name = name"),
+ "Command error: filename is a directory: name = name");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR, "Command error: filename is a directory: name = name"),
- "Command error: filename is a directory: name = name");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileExists_Test_IsDirectory */
void FM_VerifyFileNoExist_Test_InvalidFilename(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "***filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "***filename", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_VerifyFileNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent(1, CFE_EVS_ERROR, "Command error: filename is invalid: name = ***filename"),
+ "Command error: filename is invalid: name = ***filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(1, CFE_EVS_ERROR, "Command error: filename is invalid: name = ***filename"),
- "Command error: filename is invalid: name = ***filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileNoExist_Test_InvalidFilename */
void FM_VerifyFileNoExist_Test_NotInUse(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_NOT_IN_USE" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 1);
/* Execute the function being tested */
Result = FM_VerifyFileNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_VerifyFileNoExist_Test_NotInUse */
void FM_VerifyFileNoExist_Test_FileOpen(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Initialize File Descriptor properties for the FDGetInfo hook */
fm_cmd_test_fd_prop.IsValid = TRUE;
- strncpy (fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
+ strncpy(fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_FILE_OPEN" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -570,22 +556,22 @@ void FM_VerifyFileNoExist_Test_FileOpen(void)
Result = FM_VerifyFileNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: file already exists: name = filename"),
+ "Command error: file already exists: name = filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_ERROR, "Command error: file already exists: name = filename"),
- "Command error: file already exists: name = filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileNoExist_Test_FileOpen */
void FM_VerifyFileNoExist_Test_FileClosed(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_FILE_CLOSED" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -594,22 +580,22 @@ void FM_VerifyFileNoExist_Test_FileClosed(void)
Result = FM_VerifyFileNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_ERROR, "Command error: file already exists: name = filename"),
- "Command error: file already exists: name = filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: file already exists: name = filename"),
+ "Command error: file already exists: name = filename");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileNoExist_Test_FileClosed */
void FM_VerifyFileNoExist_Test_IsDirectory(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_DIRECTORY" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory);
@@ -618,67 +604,66 @@ void FM_VerifyFileNoExist_Test_IsDirectory(void)
Result = FM_VerifyFileNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: filename is a directory: name = filename"),
+ "Command error: filename is a directory: name = filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR, "Command error: filename is a directory: name = filename"),
- "Command error: filename is a directory: name = filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileNoExist_Test_IsDirectory */
void FM_VerifyFileNotOpen_Test_InvalidFilename(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "***filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "***filename", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_VerifyFileNotOpen(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(1, CFE_EVS_ERROR, "Command error: filename is invalid: name = ***filename"),
- "Command error: filename is invalid: name = ***filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(1, CFE_EVS_ERROR, "Command error: filename is invalid: name = ***filename"),
+ "Command error: filename is invalid: name = ***filename");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileNotOpen_Test_InvalidFilename */
void FM_VerifyFileNotOpen_Test_NotInUse(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_NOT_IN_USE" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 1);
/* Execute the function being tested */
Result = FM_VerifyFileNotOpen(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_VerifyFileNotOpen_Test_NotInUse */
void FM_VerifyFileNotOpen_Test_FileOpen(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Initialize File Descriptor properties for the FDGetInfo hook */
fm_cmd_test_fd_prop.IsValid = TRUE;
- strncpy (fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
+ strncpy(fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_FILE_OPEN" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -688,28 +673,28 @@ void FM_VerifyFileNotOpen_Test_FileOpen(void)
/* Execute the function being tested */
Result = FM_VerifyFileNotOpen(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: file exists as an open file: name = name"),
+ "Command error: file exists as an open file: name = name");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISOPEN_EID_OFFSET), CFE_EVS_ERROR, "Command error: file exists as an open file: name = name"),
- "Command error: file exists as an open file: name = name");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileNotOpen_Test_FileOpen */
void FM_VerifyFileNotOpen_Test_FileClosed(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Initialize File Descriptor properties for the FDGetInfo hook */
fm_cmd_test_fd_prop.IsValid = FALSE;
- strncpy (fm_cmd_test_fd_prop.Path, "", OS_MAX_PATH_LEN);
+ strncpy(fm_cmd_test_fd_prop.Path, "", OS_MAX_PATH_LEN);
/* Needed to satisfy condition "FilenameState == FM_NAME_IS_FILE_CLOSED" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_FDGETINFO_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_FDGetInfoHook);
@@ -719,92 +704,92 @@ void FM_VerifyFileNotOpen_Test_FileClosed(void)
/* Execute the function being tested */
Result = FM_VerifyFileNotOpen(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_VerifyFileNotOpen_Test_FileClosed */
void FM_VerifyFileNotOpen_Test_IsDirectory(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_DIRECTORY" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory);
/* Execute the function being tested */
Result = FM_VerifyFileNotOpen(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
- UtAssert_True (Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR, "Command error: filename is a directory: name = filename"),
- "Command error: filename is a directory: name = filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: filename is a directory: name = filename"),
+ "Command error: filename is a directory: name = filename");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyFileNotOpen_Test_IsDirectory */
void FM_VerifyDirExists_Test_InvalidName(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "***filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "***filename", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_VerifyDirExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: directory name is invalid: name = ***filename"),
+ "Command error: directory name is invalid: name = ***filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR, "Command error: directory name is invalid: name = ***filename"),
- "Command error: directory name is invalid: name = ***filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyDirExists_Test_InvalidName */
void FM_VerifyDirExists_Test_NotInUse(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_NOT_IN_USE" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 1);
/* Execute the function being tested */
Result = FM_VerifyDirExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: directory does not exist: name = filename"),
+ "Command error: directory does not exist: name = filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR, "Command error: directory does not exist: name = filename"),
- "Command error: directory does not exist: name = filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyDirExists_Test_NotInUse */
void FM_VerifyDirExists_Test_FileOpen(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Initialize File Descriptor properties for the FDGetInfo hook */
fm_cmd_test_fd_prop.IsValid = TRUE;
- strncpy (fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
+ strncpy(fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_FILE_OPEN" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -814,113 +799,113 @@ void FM_VerifyDirExists_Test_FileOpen(void)
/* Execute the function being tested */
Result = FM_VerifyDirExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISFILE_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: directory name exists as a file: name name"),
+ "Command error: directory name exists as a file: name name");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISFILE_EID_OFFSET), CFE_EVS_ERROR, "Command error: directory name exists as a file: name name"),
- "Command error: directory name exists as a file: name name");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyDirExists_Test_FileOpen */
void FM_VerifyDirExists_Test_FileClosed(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_FILE_CLOSED" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_VerifyDirExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISFILE_EID_OFFSET), CFE_EVS_ERROR, "Command error: directory name exists as a file: name name"),
- "Command error: directory name exists as a file: name name");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISFILE_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: directory name exists as a file: name name"),
+ "Command error: directory name exists as a file: name name");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyDirExists_Test_FileClosed */
void FM_VerifyDirExists_Test_IsDirectory(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_DIRECTORY" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory);
/* Execute the function being tested */
Result = FM_VerifyDirExists(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_VerifyDirExists_Test_IsDirectory */
void FM_VerifyDirNoExist_Test_InvalidName(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "***filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "***filename", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_VerifyDirNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: directory name is invalid: name = ***filename"),
+ "Command error: directory name is invalid: name = ***filename");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_INVALID_EID_OFFSET), CFE_EVS_ERROR, "Command error: directory name is invalid: name = ***filename"),
- "Command error: directory name is invalid: name = ***filename");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyDirNoExist_Test_InvalidName */
void FM_VerifyDirNoExist_Test_NotInUse(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "filename", OS_MAX_PATH_LEN);
+ strncpy(Filename, "filename", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_NOT_IN_USE" */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 1);
/* Execute the function being tested */
Result = FM_VerifyDirNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_VerifyDirNoExist_Test_NotInUse */
void FM_VerifyDirNoExist_Test_FileOpen(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Initialize File Descriptor properties for the FDGetInfo hook */
fm_cmd_test_fd_prop.IsValid = TRUE;
- strncpy (fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
+ strncpy(fm_cmd_test_fd_prop.Path, "name", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_FILE_OPEN" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -930,63 +915,63 @@ void FM_VerifyDirNoExist_Test_FileOpen(void)
/* Execute the function being tested */
Result = FM_VerifyDirNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: directory name exists as a file: name = name"),
+ "Command error: directory name exists as a file: name = name");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR, "Command error: directory name exists as a file: name = name"),
- "Command error: directory name exists as a file: name = name");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyDirNoExist_Test_FileOpen */
void FM_VerifyDirNoExist_Test_FileClosed(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Set to satisfy condition "FilenameState == FM_NAME_IS_FILE_CLOSED" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_VerifyDirNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR, "Command error: directory name exists as a file: name = name"),
- "Command error: directory name exists as a file: name = name");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_DNE_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: directory name exists as a file: name = name"),
+ "Command error: directory name exists as a file: name = name");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyDirNoExist_Test_FileClosed */
void FM_VerifyDirNoExist_Test_DirectoryExists(void)
{
boolean Result;
- char Filename[OS_MAX_PATH_LEN];
+ char Filename[OS_MAX_PATH_LEN];
- strncpy (Filename, "name", OS_MAX_PATH_LEN);
+ strncpy(Filename, "name", OS_MAX_PATH_LEN);
/* Satisfies condition "FilenameState == FM_NAME_IS_DIRECTORY" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMD_UTILS_TEST_CFE_OSFILEAPI_StatHookIsDirectory);
/* Execute the function being tested */
Result = FM_VerifyDirNoExist(Filename, OS_MAX_PATH_LEN, 1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: directory already exists: name = name"),
+ "Command error: directory already exists: name = name");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_FNAME_ISDIR_EID_OFFSET), CFE_EVS_ERROR, "Command error: directory already exists: name = name"),
- "Command error: directory already exists: name = name");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyDirNoExist_Test_DirectoryExists */
@@ -998,15 +983,15 @@ void FM_VerifyChildTask_Test_ChildDisabled(void)
/* Execute the function being tested */
Result = FM_VerifyChildTask(1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_CHILD_DISABLED_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: child task is disabled"),
+ "Command error: child task is disabled");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_CHILD_DISABLED_EID_OFFSET), CFE_EVS_ERROR, "Command error: child task is disabled"),
- "Command error: child task is disabled");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyChildTask_Test_ChildDisabled */
@@ -1018,15 +1003,15 @@ void FM_VerifyChildTask_Test_ChildQueueFull(void)
/* Execute the function being tested */
Result = FM_VerifyChildTask(1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_CHILD_Q_FULL_EID_OFFSET), CFE_EVS_ERROR, "Command error: child task queue is full"),
- "Command error: child task queue is full");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_CHILD_Q_FULL_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: child task queue is full"),
+ "Command error: child task queue is full");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyChildTask_Test_ChildQueueFull */
@@ -1039,15 +1024,15 @@ void FM_VerifyChildTask_Test_ChildInterfaceBrokenLocalQueueCount(void)
/* Execute the function being tested */
Result = FM_VerifyChildTask(1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_CHILD_BROKEN_EID_OFFSET), CFE_EVS_ERROR, "Command error: child task interface is broken: count = 4, index = 1"),
- "Command error: child task interface is broken: count = 4, index = 1");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_CHILD_BROKEN_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: child task interface is broken: count = 4, index = 1"),
+ "Command error: child task interface is broken: count = 4, index = 1");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyChildTask_Test_ChildInterfaceBrokenLocalQueueCount */
@@ -1060,15 +1045,15 @@ void FM_VerifyChildTask_Test_ChildInterfaceBrokenChildWriteIndex(void)
/* Execute the function being tested */
Result = FM_VerifyChildTask(1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
+
+ UtAssert_True(Ut_CFE_EVS_EventSent((1 + FM_CHILD_BROKEN_EID_OFFSET), CFE_EVS_ERROR,
+ "Command error: child task interface is broken: count = 1, index = 3"),
+ "Command error: child task interface is broken: count = 1, index = 3");
- UtAssert_True
- (Ut_CFE_EVS_EventSent((1 + FM_CHILD_BROKEN_EID_OFFSET), CFE_EVS_ERROR, "Command error: child task interface is broken: count = 1, index = 3"),
- "Command error: child task interface is broken: count = 1, index = 3");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_VerifyChildTask_Test_ChildInterfaceBrokenChildWriteIndex */
@@ -1081,11 +1066,11 @@ void FM_VerifyChildTask_Test_Nominal(void)
/* Execute the function being tested */
Result = FM_VerifyChildTask(1, "Command");
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_VerifyChildTask_Test_Nominal */
@@ -1093,12 +1078,12 @@ void FM_InvokeChildTask_Test_Nominal(void)
{
/* Execute the function being tested */
FM_InvokeChildTask();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildWriteIndex == 1, "FM_GlobalData.ChildWriteIndex == 1");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 1, "FM_GlobalData.ChildQueueCount == 1");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(FM_GlobalData.ChildWriteIndex == 1, "FM_GlobalData.ChildWriteIndex == 1");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 1, "FM_GlobalData.ChildQueueCount == 1");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_InvokeChildTask_Test_Nominal */
@@ -1108,79 +1093,111 @@ void FM_InvokeChildTask_Test_WriteIndexEqualsQueueDepth(void)
/* Execute the function being tested */
FM_InvokeChildTask();
-
+
/* Verify results */
- UtAssert_True (FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
- UtAssert_True (FM_GlobalData.ChildQueueCount == 1, "FM_GlobalData.ChildQueueCount == 1");
-
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(FM_GlobalData.ChildWriteIndex == 0, "FM_GlobalData.ChildWriteIndex == 0");
+ UtAssert_True(FM_GlobalData.ChildQueueCount == 1, "FM_GlobalData.ChildQueueCount == 1");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_InvokeChildTask_Test_WriteIndexEqualsQueueDepth */
void FM_AppendPathSep_Test(void)
{
- char Directory[OS_MAX_PATH_LEN];
+ char Directory[OS_MAX_PATH_LEN];
uint32 BufferSize = 11;
- strncpy (Directory, "directory", OS_MAX_PATH_LEN);
+ strncpy(Directory, "directory", OS_MAX_PATH_LEN);
/* Execute the function being tested */
FM_AppendPathSep(Directory, BufferSize);
-
+
/* Verify results */
- UtAssert_True
- (strncmp(Directory, "directory/", OS_MAX_PATH_LEN) == 0,
- "strncmp(Directory, 'directory/', OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(Directory, "directory/", OS_MAX_PATH_LEN) == 0,
+ "strncmp(Directory, 'directory/', OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_AppendPathSep_Test */
void FM_Cmd_Utils_Test_AddTestCases(void)
{
- UtTest_Add(FM_IsValidCmdPktLength_Test_InvalidPacketLength, FM_Test_Setup, FM_Test_TearDown, "FM_IsValidCmdPktLength_Test_InvalidPacketLength");
+ UtTest_Add(FM_IsValidCmdPktLength_Test_InvalidPacketLength, FM_Test_Setup, FM_Test_TearDown,
+ "FM_IsValidCmdPktLength_Test_InvalidPacketLength");
UtTest_Add(FM_VerifyOverwrite_Test, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyOverwrite_Test");
UtTest_Add(FM_GetOpenFilesData_Test, FM_Test_Setup, FM_Test_TearDown, "FM_GetOpenFilesData_Test");
- UtTest_Add(FM_GetFilenameState_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown, "FM_GetFilenameState_Test_IsDirectory");
+ UtTest_Add(FM_GetFilenameState_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown,
+ "FM_GetFilenameState_Test_IsDirectory");
UtTest_Add(FM_GetFilenameState_Test_NotInUse, FM_Test_Setup, FM_Test_TearDown, "FM_GetFilenameState_Test_NotInUse");
- UtTest_Add(FM_VerifyNameValid_Test_InvalidName, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyNameValid_Test_InvalidName");
- UtTest_Add(FM_VerifyFileClosed_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileClosed_Test_InvalidFilename");
- UtTest_Add(FM_VerifyFileClosed_Test_FileDoesNotExist, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileClosed_Test_FileDoesNotExist");
- UtTest_Add(FM_VerifyFileClosed_Test_FileAlreadyOpen, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileClosed_Test_FileAlreadyOpen");
- UtTest_Add(FM_VerifyFileClosed_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileClosed_Test_FileClosed");
- UtTest_Add(FM_VerifyFileClosed_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileClosed_Test_IsDirectory");
- UtTest_Add(FM_VerifyFileExists_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileExists_Test_InvalidFilename");
- UtTest_Add(FM_VerifyFileExists_Test_FileDoesNotExist, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileExists_Test_FileDoesNotExist");
+ UtTest_Add(FM_VerifyNameValid_Test_InvalidName, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyNameValid_Test_InvalidName");
+ UtTest_Add(FM_VerifyFileClosed_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileClosed_Test_InvalidFilename");
+ UtTest_Add(FM_VerifyFileClosed_Test_FileDoesNotExist, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileClosed_Test_FileDoesNotExist");
+ UtTest_Add(FM_VerifyFileClosed_Test_FileAlreadyOpen, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileClosed_Test_FileAlreadyOpen");
+ UtTest_Add(FM_VerifyFileClosed_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileClosed_Test_FileClosed");
+ UtTest_Add(FM_VerifyFileClosed_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileClosed_Test_IsDirectory");
+ UtTest_Add(FM_VerifyFileExists_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileExists_Test_InvalidFilename");
+ UtTest_Add(FM_VerifyFileExists_Test_FileDoesNotExist, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileExists_Test_FileDoesNotExist");
UtTest_Add(FM_VerifyFileExists_Test_FileOpen, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileExists_Test_FileOpen");
- UtTest_Add(FM_VerifyFileExists_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileExists_Test_FileClosed");
- UtTest_Add(FM_VerifyFileExists_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileExists_Test_IsDirectory");
- UtTest_Add(FM_VerifyFileNoExist_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNoExist_Test_InvalidFilename");
- UtTest_Add(FM_VerifyFileNoExist_Test_NotInUse, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNoExist_Test_NotInUse");
- UtTest_Add(FM_VerifyFileNoExist_Test_FileOpen, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNoExist_Test_FileOpen");
- UtTest_Add(FM_VerifyFileNoExist_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNoExist_Test_FileClosed");
- UtTest_Add(FM_VerifyFileNoExist_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNoExist_Test_IsDirectory");
- UtTest_Add(FM_VerifyFileNotOpen_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNotOpen_Test_InvalidFilename");
- UtTest_Add(FM_VerifyFileNotOpen_Test_NotInUse, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNotOpen_Test_NotInUse");
- UtTest_Add(FM_VerifyFileNotOpen_Test_FileOpen, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNotOpen_Test_FileOpen");
- UtTest_Add(FM_VerifyFileNotOpen_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNotOpen_Test_FileClosed");
- UtTest_Add(FM_VerifyFileNotOpen_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyFileNotOpen_Test_IsDirectory");
- UtTest_Add(FM_VerifyDirExists_Test_InvalidName, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirExists_Test_InvalidName");
+ UtTest_Add(FM_VerifyFileExists_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileExists_Test_FileClosed");
+ UtTest_Add(FM_VerifyFileExists_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileExists_Test_IsDirectory");
+ UtTest_Add(FM_VerifyFileNoExist_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNoExist_Test_InvalidFilename");
+ UtTest_Add(FM_VerifyFileNoExist_Test_NotInUse, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNoExist_Test_NotInUse");
+ UtTest_Add(FM_VerifyFileNoExist_Test_FileOpen, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNoExist_Test_FileOpen");
+ UtTest_Add(FM_VerifyFileNoExist_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNoExist_Test_FileClosed");
+ UtTest_Add(FM_VerifyFileNoExist_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNoExist_Test_IsDirectory");
+ UtTest_Add(FM_VerifyFileNotOpen_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNotOpen_Test_InvalidFilename");
+ UtTest_Add(FM_VerifyFileNotOpen_Test_NotInUse, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNotOpen_Test_NotInUse");
+ UtTest_Add(FM_VerifyFileNotOpen_Test_FileOpen, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNotOpen_Test_FileOpen");
+ UtTest_Add(FM_VerifyFileNotOpen_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNotOpen_Test_FileClosed");
+ UtTest_Add(FM_VerifyFileNotOpen_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyFileNotOpen_Test_IsDirectory");
+ UtTest_Add(FM_VerifyDirExists_Test_InvalidName, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyDirExists_Test_InvalidName");
UtTest_Add(FM_VerifyDirExists_Test_NotInUse, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirExists_Test_NotInUse");
UtTest_Add(FM_VerifyDirExists_Test_FileOpen, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirExists_Test_FileOpen");
- UtTest_Add(FM_VerifyDirExists_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirExists_Test_FileClosed");
- UtTest_Add(FM_VerifyDirExists_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirExists_Test_IsDirectory");
- UtTest_Add(FM_VerifyDirNoExist_Test_InvalidName, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirNoExist_Test_InvalidName");
+ UtTest_Add(FM_VerifyDirExists_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyDirExists_Test_FileClosed");
+ UtTest_Add(FM_VerifyDirExists_Test_IsDirectory, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyDirExists_Test_IsDirectory");
+ UtTest_Add(FM_VerifyDirNoExist_Test_InvalidName, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyDirNoExist_Test_InvalidName");
UtTest_Add(FM_VerifyDirNoExist_Test_NotInUse, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirNoExist_Test_NotInUse");
UtTest_Add(FM_VerifyDirNoExist_Test_FileOpen, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirNoExist_Test_FileOpen");
- UtTest_Add(FM_VerifyDirNoExist_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirNoExist_Test_FileClosed");
- UtTest_Add(FM_VerifyDirNoExist_Test_DirectoryExists, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyDirNoExist_Test_DirectoryExists");
- UtTest_Add(FM_VerifyChildTask_Test_ChildDisabled, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyChildTask_Test_ChildDisabled");
- UtTest_Add(FM_VerifyChildTask_Test_ChildQueueFull, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyChildTask_Test_ChildQueueFull");
- UtTest_Add(FM_VerifyChildTask_Test_ChildInterfaceBrokenLocalQueueCount, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyChildTask_Test_ChildInterfaceBrokenLocalQueueCount");
- UtTest_Add(FM_VerifyChildTask_Test_ChildInterfaceBrokenChildWriteIndex, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyChildTask_Test_ChildInterfaceBrokenChildWriteIndex");
+ UtTest_Add(FM_VerifyDirNoExist_Test_FileClosed, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyDirNoExist_Test_FileClosed");
+ UtTest_Add(FM_VerifyDirNoExist_Test_DirectoryExists, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyDirNoExist_Test_DirectoryExists");
+ UtTest_Add(FM_VerifyChildTask_Test_ChildDisabled, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyChildTask_Test_ChildDisabled");
+ UtTest_Add(FM_VerifyChildTask_Test_ChildQueueFull, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyChildTask_Test_ChildQueueFull");
+ UtTest_Add(FM_VerifyChildTask_Test_ChildInterfaceBrokenLocalQueueCount, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyChildTask_Test_ChildInterfaceBrokenLocalQueueCount");
+ UtTest_Add(FM_VerifyChildTask_Test_ChildInterfaceBrokenChildWriteIndex, FM_Test_Setup, FM_Test_TearDown,
+ "FM_VerifyChildTask_Test_ChildInterfaceBrokenChildWriteIndex");
UtTest_Add(FM_VerifyChildTask_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_VerifyChildTask_Test_Nominal");
UtTest_Add(FM_InvokeChildTask_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_InvokeChildTask_Test_Nominal");
- UtTest_Add(FM_InvokeChildTask_Test_WriteIndexEqualsQueueDepth, FM_Test_Setup, FM_Test_TearDown, "FM_InvokeChildTask_Test_WriteIndexEqualsQueueDepth");
+ UtTest_Add(FM_InvokeChildTask_Test_WriteIndexEqualsQueueDepth, FM_Test_Setup, FM_Test_TearDown,
+ "FM_InvokeChildTask_Test_WriteIndexEqualsQueueDepth");
UtTest_Add(FM_AppendPathSep_Test, FM_Test_Setup, FM_Test_TearDown, "FM_AppendPathSep_Test");
} /* end FM_Cmd_Utils_Test_AddTestCases */
diff --git a/fsw/unit_test/fm_cmd_utils_test.h b/fsw/unit_test/fm_cmd_utils_test.h
index 8c8be1a..9ff0e89 100644
--- a/fsw/unit_test/fm_cmd_utils_test.h
+++ b/fsw/unit_test/fm_cmd_utils_test.h
@@ -6,22 +6,22 @@
* File Manager Application Version 2.5.3
*
* Copyright © 2020 United States Government as represented by the Administrator of
- * the National Aeronautics and Space Administration. All Rights Reserved.
+ * the National Aeronautics and Space Administration. All Rights Reserved.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
* Purpose: This file contains the function prototypes for the unit test cases for fm_cmd_utils.c
- *
+ *
*/
/*
diff --git a/fsw/unit_test/fm_cmds.c.gcov b/fsw/unit_test/fm_cmds.c.gcov
deleted file mode 100644
index d5a2d6a..0000000
--- a/fsw/unit_test/fm_cmds.c.gcov
+++ /dev/null
@@ -1,1041 +0,0 @@
- -: 0:Source:../src/fm_cmds.c
- -: 0:Programs:5
- -: 1:/*
- -: 2:** $Id: fm_cmds.c.gcov 1.2.1.1 2017/01/25 00:20:21EST mdeschu Exp $
- -: 3:**
- -: 4:** Copyright (c) 2007-2014 United States Government as represented by the
- -: 5:** Administrator of the National Aeronautics and Space Administration.
- -: 6:** All Other Rights Reserved.
- -: 7:**
- -: 8:** This software was created at NASA's Goddard Space Flight Center.
- -: 9:** This software is governed by the NASA Open Source Agreement and may be
- -: 10:** used, distributed and modified only pursuant to the terms of that
- -: 11:** agreement.
- -: 12:**
- -: 13:** Title: File Manager (FM) Application Ground Commands
- -: 14:**
- -: 15:** Purpose: Provides functions for the execution of the FM ground commands
- -: 16:**
- -: 17:** Author: Susanne L. Strege, Code 582 NASA GSFC
- -: 18:**
- -: 19:** Notes:
- -: 20:**
- -: 21:*/
- -: 22:
- -: 23:#include "cfe.h"
- -: 24:#include "fm_msg.h"
- -: 25:#include "fm_msgdefs.h"
- -: 26:#include "fm_msgids.h"
- -: 27:#include "fm_events.h"
- -: 28:#include "fm_app.h"
- -: 29:#include "fm_cmds.h"
- -: 30:#include "fm_cmd_utils.h"
- -: 31:#include "fm_perfids.h"
- -: 32:#include "fm_platform_cfg.h"
- -: 33:#include "fm_version.h"
- -: 34:#include "fm_verify.h"
- -: 35:
- -: 36:#include
- -: 37:
- -: 38:
- -: 39:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 40:/* */
- -: 41:/* FM command handler -- NOOP */
- -: 42:/* */
- -: 43:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 44:
- 3: 45:boolean FM_NoopCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 46:{
- 3: 47: char *CmdText = "No-op";
- -: 48: boolean CommandResult;
- -: 49:
- -: 50: /* Verify message length */
- 3: 51: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_NoopCmd_t),
- -: 52: FM_NOOP_PKT_ERR_EID, CmdText);
- -: 53:
- -: 54: /* Send command completion event (info) */
- 3: 55: if (CommandResult == TRUE)
- -: 56: {
- 3: 57: CFE_EVS_SendEvent(FM_NOOP_CMD_EID, CFE_EVS_INFORMATION,
- -: 58: "%s command: FM version %d.%d.%d.%d", CmdText,
- -: 59: FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV);
- -: 60: }
- -: 61:
- 3: 62: return(CommandResult);
- -: 63:
- -: 64:} /* End of FM_NoopCmd() */
- -: 65:
- -: 66:
- -: 67:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 68:/* */
- -: 69:/* FM command handler -- Reset Counters */
- -: 70:/* */
- -: 71:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 72:
- 2: 73:boolean FM_ResetCountersCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 74:{
- 2: 75: char *CmdText = "Reset Counters";
- -: 76: boolean CommandResult;
- -: 77:
- -: 78: /* Verify message length */
- 2: 79: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_ResetCmd_t),
- -: 80: FM_RESET_PKT_ERR_EID, CmdText);
- -: 81:
- -: 82: /* Reset command counters */
- 2: 83: if (CommandResult == TRUE)
- -: 84: {
- 2: 85: FM_GlobalData.CommandCounter = 0;
- 2: 86: FM_GlobalData.CommandErrCounter = 0;
- -: 87:
- 2: 88: FM_GlobalData.ChildCmdCounter = 0;
- 2: 89: FM_GlobalData.ChildCmdErrCounter = 0;
- 2: 90: FM_GlobalData.ChildCmdWarnCounter = 0;
- -: 91:
- -: 92: /* Send command completion event (debug) */
- 2: 93: CFE_EVS_SendEvent(FM_RESET_CMD_EID, CFE_EVS_DEBUG, "%s command", CmdText);
- -: 94: }
- -: 95:
- 2: 96: return(CommandResult);
- -: 97:
- -: 98:} /* End of FM_ResetCountersCmd() */
- -: 99:
- -: 100:
- -: 101:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 102:/* */
- -: 103:/* FM command handler -- Copy File */
- -: 104:/* */
- -: 105:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 106:
- 3: 107:boolean FM_CopyFileCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 108:{
- 3: 109: FM_CopyFileCmd_t *CmdPtr = (FM_CopyFileCmd_t *) MessagePtr;
- -: 110: FM_ChildQueueEntry_t *CmdArgs;
- 3: 111: char *CmdText = "Copy File";
- -: 112: boolean CommandResult;
- -: 113:
- -: 114: /* Verify command packet length */
- 3: 115: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_CopyFileCmd_t),
- -: 116: FM_COPY_PKT_ERR_EID, CmdText);
- -: 117:
- -: 118: /* Verify that overwrite argument is valid */
- 3: 119: if (CommandResult == TRUE)
- -: 120: {
- 3: 121: CommandResult = FM_VerifyOverwrite(CmdPtr->Overwrite,
- -: 122: FM_COPY_OVR_ERR_EID, CmdText);
- -: 123: }
- -: 124:
- -: 125: /* Verify that source file exists and is not a directory */
- 3: 126: if (CommandResult == TRUE)
- -: 127: {
- 3: 128: CommandResult = FM_VerifyFileExists(CmdPtr->Source, sizeof(CmdPtr->Source),
- -: 129: FM_COPY_SRC_ERR_EID, CmdText);
- -: 130: }
- -: 131:
- -: 132: /* Verify target filename per the overwrite argument */
- 3: 133: if (CommandResult == TRUE)
- -: 134: {
- 2: 135: if (CmdPtr->Overwrite == 0)
- -: 136: {
- 1: 137: CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- -: 138: FM_COPY_TGT_ERR_EID, CmdText);
- -: 139: }
- -: 140: else
- -: 141: {
- 1: 142: CommandResult = FM_VerifyFileNotOpen(CmdPtr->Target, sizeof(CmdPtr->Target),
- -: 143: FM_COPY_TGT_ERR_EID, CmdText);
- -: 144: }
- -: 145: }
- -: 146:
- -: 147: /* Check for lower priority child task availability */
- 3: 148: if (CommandResult == TRUE)
- -: 149: {
- 2: 150: CommandResult = FM_VerifyChildTask(FM_COPY_CHILD_ERR_EID, CmdText);
- -: 151: }
- -: 152:
- -: 153: /* Prepare command for child task execution */
- 3: 154: if (CommandResult == TRUE)
- -: 155: {
- 2: 156: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 157:
- -: 158: /* Set handshake queue command args */
- 2: 159: CmdArgs->CommandCode = FM_COPY_CC;
- 2: 160: strcpy(CmdArgs->Source1, CmdPtr->Source);
- 2: 161: strcpy(CmdArgs->Target, CmdPtr->Target);
- -: 162:
- -: 163: /* Invoke lower priority child task */
- 2: 164: FM_InvokeChildTask();
- -: 165: }
- -: 166:
- 3: 167: return(CommandResult);
- -: 168:
- -: 169:} /* End of FM_CopyFileCmd() */
- -: 170:
- -: 171:
- -: 172:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 173:/* */
- -: 174:/* FM command handler -- Move File */
- -: 175:/* */
- -: 176:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 177:
- 3: 178:boolean FM_MoveFileCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 179:{
- 3: 180: FM_MoveFileCmd_t *CmdPtr = (FM_MoveFileCmd_t *) MessagePtr;
- -: 181: FM_ChildQueueEntry_t *CmdArgs;
- 3: 182: char *CmdText = "Move File";
- -: 183: boolean CommandResult;
- -: 184:
- -: 185: /* Verify command packet length */
- 3: 186: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_MoveFileCmd_t),
- -: 187: FM_MOVE_PKT_ERR_EID, CmdText);
- -: 188:
- -: 189: /* Verify that overwrite argument is valid */
- 3: 190: if (CommandResult == TRUE)
- -: 191: {
- 3: 192: CommandResult = FM_VerifyOverwrite(CmdPtr->Overwrite,
- -: 193: FM_MOVE_OVR_ERR_EID, CmdText);
- -: 194: }
- -: 195:
- -: 196: /* Verify that source file exists and not a directory */
- 3: 197: if (CommandResult == TRUE)
- -: 198: {
- 3: 199: CommandResult = FM_VerifyFileExists(CmdPtr->Source, sizeof(CmdPtr->Source),
- -: 200: FM_MOVE_SRC_ERR_EID, CmdText);
- -: 201: }
- -: 202:
- -: 203: /* Verify target filename per the overwrite argument */
- 3: 204: if (CommandResult == TRUE)
- -: 205: {
- 2: 206: if (CmdPtr->Overwrite == 0)
- -: 207: {
- 1: 208: CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- -: 209: FM_MOVE_TGT_ERR_EID, CmdText);
- -: 210: }
- -: 211: else
- -: 212: {
- 1: 213: CommandResult = FM_VerifyFileNotOpen(CmdPtr->Target, sizeof(CmdPtr->Target),
- -: 214: FM_MOVE_TGT_ERR_EID, CmdText);
- -: 215: }
- -: 216: }
- -: 217:
- -: 218: /* Check for lower priority child task availability */
- 3: 219: if (CommandResult == TRUE)
- -: 220: {
- 2: 221: CommandResult = FM_VerifyChildTask(FM_MOVE_CHILD_ERR_EID, CmdText);
- -: 222: }
- -: 223:
- -: 224: /* Prepare command for child task execution */
- 3: 225: if (CommandResult == TRUE)
- -: 226: {
- 2: 227: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 228:
- -: 229: /* Set handshake queue command args */
- 2: 230: CmdArgs->CommandCode = FM_MOVE_CC;
- 2: 231: strcpy(CmdArgs->Source1, CmdPtr->Source);
- 2: 232: strcpy(CmdArgs->Target, CmdPtr->Target);
- -: 233:
- -: 234: /* Invoke lower priority child task */
- 2: 235: FM_InvokeChildTask();
- -: 236: }
- -: 237:
- 3: 238: return(CommandResult);
- -: 239:
- -: 240:} /* End of FM_MoveFileCmd() */
- -: 241:
- -: 242:
- -: 243:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 244:/* */
- -: 245:/* FM command handler -- Rename File */
- -: 246:/* */
- -: 247:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 248:
- 2: 249:boolean FM_RenameFileCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 250:{
- 2: 251: FM_RenameFileCmd_t *CmdPtr = (FM_RenameFileCmd_t *) MessagePtr;
- -: 252: FM_ChildQueueEntry_t *CmdArgs;
- 2: 253: char *CmdText = "Rename File";
- -: 254: boolean CommandResult;
- -: 255:
- -: 256: /* Verify command packet length */
- 2: 257: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_RenameFileCmd_t),
- -: 258: FM_RENAME_PKT_ERR_EID, CmdText);
- -: 259:
- -: 260: /* Verify that source file exists and is not a directory */
- 2: 261: if (CommandResult == TRUE)
- -: 262: {
- 2: 263: CommandResult = FM_VerifyFileExists(CmdPtr->Source, sizeof(CmdPtr->Source),
- -: 264: FM_RENAME_SRC_ERR_EID, CmdText);
- -: 265: }
- -: 266:
- -: 267: /* Verify that target file does not exist */
- 2: 268: if (CommandResult == TRUE)
- -: 269: {
- 1: 270: CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- -: 271: FM_RENAME_TGT_ERR_EID, CmdText);
- -: 272: }
- -: 273:
- -: 274: /* Check for lower priority child task availability */
- 2: 275: if (CommandResult == TRUE)
- -: 276: {
- 1: 277: CommandResult = FM_VerifyChildTask(FM_RENAME_CHILD_ERR_EID, CmdText);
- -: 278: }
- -: 279:
- -: 280: /* Prepare command for child task execution */
- 2: 281: if (CommandResult == TRUE)
- -: 282: {
- 1: 283: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 284:
- -: 285: /* Set handshake queue command args */
- 1: 286: CmdArgs->CommandCode = FM_RENAME_CC;
- 1: 287: strcpy(CmdArgs->Source1, CmdPtr->Source);
- 1: 288: strcpy(CmdArgs->Target, CmdPtr->Target);
- -: 289:
- -: 290: /* Invoke lower priority child task */
- 1: 291: FM_InvokeChildTask();
- -: 292: }
- -: 293:
- 2: 294: return(CommandResult);
- -: 295:
- -: 296:} /* End of FM_RenameFileCmd() */
- -: 297:
- -: 298:
- -: 299:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 300:/* */
- -: 301:/* FM command handler -- Delete File */
- -: 302:/* */
- -: 303:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 304:
- 3: 305:boolean FM_DeleteFileCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 306:{
- 3: 307: FM_DeleteFileCmd_t *CmdPtr = (FM_DeleteFileCmd_t *) MessagePtr;
- -: 308: FM_ChildQueueEntry_t *CmdArgs;
- 3: 309: char *CmdText = "Delete File";
- -: 310: boolean CommandResult;
- -: 311:
- -: 312: /* Verify command packet length */
- 3: 313: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_DeleteFileCmd_t),
- -: 314: FM_DELETE_PKT_ERR_EID, CmdText);
- -: 315:
- -: 316: /* Verify that file exists, is not a directory and is not open */
- 3: 317: if (CommandResult == TRUE)
- -: 318: {
- 3: 319: CommandResult = FM_VerifyFileClosed(CmdPtr->Filename, sizeof(CmdPtr->Filename),
- -: 320: FM_DELETE_SRC_ERR_EID, CmdText);
- -: 321: }
- -: 322:
- -: 323: /* Check for lower priority child task availability */
- 3: 324: if (CommandResult == TRUE)
- -: 325: {
- 2: 326: CommandResult = FM_VerifyChildTask(FM_DELETE_CHILD_ERR_EID, CmdText);
- -: 327: }
- -: 328:
- -: 329: /* Prepare command for child task execution */
- 3: 330: if (CommandResult == TRUE)
- -: 331: {
- 2: 332: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 333:
- -: 334: /* Set handshake queue command args - might be global or internal CC */
- 2: 335: CmdArgs->CommandCode = CFE_SB_GetCmdCode(MessagePtr);
- 2: 336: strcpy(CmdArgs->Source1, CmdPtr->Filename);
- -: 337:
- -: 338: /* Invoke lower priority child task */
- 2: 339: FM_InvokeChildTask();
- -: 340: }
- -: 341:
- 3: 342: return(CommandResult);
- -: 343:
- -: 344:} /* End of FM_DeleteFileCmd() */
- -: 345:
- -: 346:
- -: 347:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 348:/* */
- -: 349:/* FM command handler -- Delete All Files */
- -: 350:/* */
- -: 351:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 352:
- 2: 353:boolean FM_DeleteAllFilesCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 354:{
- 2: 355: FM_DeleteAllCmd_t *CmdPtr = (FM_DeleteAllCmd_t *) MessagePtr;
- 2: 356: char *CmdText = "Delete All Files";
- -: 357: char DirWithSep[OS_MAX_PATH_LEN];
- -: 358: FM_ChildQueueEntry_t *CmdArgs;
- -: 359: boolean CommandResult;
- -: 360:
- -: 361: /* Verify message length */
- 2: 362: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_DeleteAllCmd_t),
- -: 363: FM_DELETE_ALL_PKT_ERR_EID, CmdText);
- -: 364:
- -: 365: /* Verify that the directory exists */
- 2: 366: if (CommandResult == TRUE)
- -: 367: {
- 2: 368: CommandResult = FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- -: 369: FM_DELETE_ALL_SRC_ERR_EID, CmdText);
- -: 370: }
- -: 371:
- 2: 372: if (CommandResult == TRUE)
- -: 373: {
- -: 374: /* Append a path separator to the end of the directory name */
- 1: 375: strcpy(DirWithSep, CmdPtr->Directory);
- 1: 376: FM_AppendPathSep(DirWithSep, OS_MAX_PATH_LEN);
- -: 377:
- -: 378: /* Check for lower priority child task availability */
- 1: 379: CommandResult = FM_VerifyChildTask(FM_DELETE_ALL_CHILD_ERR_EID, CmdText);
- -: 380: }
- -: 381:
- -: 382: /* Prepare command for child task execution */
- 2: 383: if (CommandResult == TRUE)
- -: 384: {
- 1: 385: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 386:
- -: 387: /* Set handshake queue command args */
- 1: 388: CmdArgs->CommandCode = FM_DELETE_ALL_CC;
- 1: 389: strcpy(CmdArgs->Source1, CmdPtr->Directory);
- 1: 390: strcpy(CmdArgs->Source2, DirWithSep);
- -: 391:
- -: 392: /* Invoke lower priority child task */
- 1: 393: FM_InvokeChildTask();
- -: 394: }
- -: 395:
- 2: 396: return(CommandResult);
- -: 397:
- -: 398:} /* End of FM_DeleteAllFilesCmd() */
- -: 399:
- -: 400:
- -: 401:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 402:/* */
- -: 403:/* FM command handler -- Decompress File */
- -: 404:/* */
- -: 405:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 406:
- 2: 407:boolean FM_DecompressFileCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 408:{
- 2: 409: FM_DecompressCmd_t *CmdPtr = (FM_DecompressCmd_t *) MessagePtr;
- 2: 410: char *CmdText = "Decompress File";
- -: 411: FM_ChildQueueEntry_t *CmdArgs;
- -: 412: boolean CommandResult;
- -: 413:
- -: 414: /* Verify command packet length */
- 2: 415: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_DecompressCmd_t),
- -: 416: FM_DECOM_PKT_ERR_EID, CmdText);
- -: 417:
- -: 418: /* Verify that source file exists, is not a directory and is not open */
- 2: 419: if (CommandResult == TRUE)
- -: 420: {
- 2: 421: CommandResult = FM_VerifyFileClosed(CmdPtr->Source, sizeof(CmdPtr->Source),
- -: 422: FM_DECOM_SRC_ERR_EID, CmdText);
- -: 423: }
- -: 424:
- -: 425: /* Verify that target file does not exist */
- 2: 426: if (CommandResult == TRUE)
- -: 427: {
- 1: 428: CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- -: 429: FM_DECOM_TGT_ERR_EID, CmdText);
- -: 430: }
- -: 431:
- -: 432: /* Check for lower priority child task availability */
- 2: 433: if (CommandResult == TRUE)
- -: 434: {
- 1: 435: CommandResult = FM_VerifyChildTask(FM_DECOM_CHILD_ERR_EID, CmdText);
- -: 436: }
- -: 437:
- -: 438: /* Prepare command for child task execution */
- 2: 439: if (CommandResult == TRUE)
- -: 440: {
- 1: 441: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 442:
- -: 443: /* Set handshake queue command args */
- 1: 444: CmdArgs->CommandCode = FM_DECOMPRESS_CC;
- 1: 445: strcpy(CmdArgs->Source1, CmdPtr->Source);
- 1: 446: strcpy(CmdArgs->Target, CmdPtr->Target);
- -: 447:
- -: 448: /* Invoke lower priority child task */
- 1: 449: FM_InvokeChildTask();
- -: 450: }
- -: 451:
- 2: 452: return(CommandResult);
- -: 453:
- -: 454:} /* End of FM_DecompressFileCmd() */
- -: 455:
- -: 456:
- -: 457:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 458:/* */
- -: 459:/* FM command handler -- Concatenate Files */
- -: 460:/* */
- -: 461:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 462:
- 2: 463:boolean FM_ConcatFilesCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 464:{
- 2: 465: FM_ConcatCmd_t *CmdPtr = (FM_ConcatCmd_t *) MessagePtr;
- 2: 466: char *CmdText = "Concat Files";
- -: 467: FM_ChildQueueEntry_t *CmdArgs;
- -: 468: boolean CommandResult;
- -: 469:
- -: 470: /* Verify command packet length */
- 2: 471: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_ConcatCmd_t),
- -: 472: FM_CONCAT_PKT_ERR_EID, CmdText);
- -: 473:
- -: 474: /* Verify that source file #1 exists, is not a directory and is not open */
- 2: 475: if (CommandResult == TRUE)
- -: 476: {
- 2: 477: CommandResult = FM_VerifyFileClosed(CmdPtr->Source1, sizeof(CmdPtr->Source1),
- -: 478: FM_CONCAT_SRC1_ERR_EID, CmdText);
- -: 479: }
- -: 480:
- -: 481: /* Verify that source file #2 exists, is not a directory and is not open */
- 2: 482: if (CommandResult == TRUE)
- -: 483: {
- 1: 484: CommandResult = FM_VerifyFileClosed(CmdPtr->Source2, sizeof(CmdPtr->Source2),
- -: 485: FM_CONCAT_SRC2_ERR_EID, CmdText);
- -: 486: }
- -: 487:
- -: 488: /* Verify that target file does not exist */
- 2: 489: if (CommandResult == TRUE)
- -: 490: {
- 1: 491: CommandResult = FM_VerifyFileNoExist(CmdPtr->Target, sizeof(CmdPtr->Target),
- -: 492: FM_CONCAT_TGT_ERR_EID, CmdText);
- -: 493: }
- -: 494:
- -: 495: /* Check for lower priority child task availability */
- 2: 496: if (CommandResult == TRUE)
- -: 497: {
- 1: 498: CommandResult = FM_VerifyChildTask(FM_CONCAT_CHILD_ERR_EID, CmdText);
- -: 499: }
- -: 500:
- -: 501: /* Prepare command for child task execution */
- 2: 502: if (CommandResult == TRUE)
- -: 503: {
- 1: 504: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 505:
- -: 506: /* Set handshake queue command args */
- 1: 507: CmdArgs->CommandCode = FM_CONCAT_CC;
- 1: 508: strcpy(CmdArgs->Source1, CmdPtr->Source1);
- 1: 509: strcpy(CmdArgs->Source2, CmdPtr->Source2);
- 1: 510: strcpy(CmdArgs->Target, CmdPtr->Target);
- -: 511:
- -: 512: /* Invoke lower priority child task */
- 1: 513: FM_InvokeChildTask();
- -: 514: }
- -: 515:
- 2: 516: return(CommandResult);
- -: 517:
- -: 518:} /* End of FM_ConcatFilesCmd() */
- -: 519:
- -: 520:
- -: 521:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 522:/* */
- -: 523:/* FM command handler -- Get File Info */
- -: 524:/* */
- -: 525:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 526:
- 3: 527:boolean FM_GetFileInfoCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 528:{
- 3: 529: FM_GetFileInfoCmd_t *CmdPtr = (FM_GetFileInfoCmd_t *) MessagePtr;
- 3: 530: char *CmdText = "Get File Info";
- -: 531: FM_ChildQueueEntry_t *CmdArgs;
- -: 532: boolean CommandResult;
- -: 533: uint32 FilenameState;
- -: 534:
- -: 535: /* Verify command packet length */
- 3: 536: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetFileInfoCmd_t),
- -: 537: FM_GET_FILE_INFO_PKT_ERR_EID, CmdText);
- -: 538:
- -: 539: /* Verify that the source name is valid for a file or directory */
- 3: 540: if (CommandResult == TRUE)
- -: 541: {
- 3: 542: FilenameState = FM_VerifyNameValid(CmdPtr->Filename, sizeof(CmdPtr->Filename),
- -: 543: FM_GET_FILE_INFO_SRC_ERR_EID, CmdText);
- -: 544:
- 3: 545: if (FilenameState == FM_NAME_IS_INVALID)
- -: 546: {
- 2: 547: CommandResult = FALSE;
- -: 548: }
- -: 549: }
- -: 550:
- -: 551: /* Check for lower priority child task availability */
- 3: 552: if (CommandResult == TRUE)
- -: 553: {
- 1: 554: CommandResult = FM_VerifyChildTask(FM_GET_FILE_INFO_CHILD_ERR_EID, CmdText);
- -: 555: }
- -: 556:
- -: 557: /* Prepare command for child task execution */
- 3: 558: if (CommandResult == TRUE)
- -: 559: {
- 1: 560: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 561:
- -: 562: /* Set handshake queue command args */
- 1: 563: CmdArgs->CommandCode = FM_GET_FILE_INFO_CC;
- 1: 564: strcpy(CmdArgs->Source1, CmdPtr->Filename);
- 1: 565: CmdArgs->FileInfoState = FilenameState;
- 1: 566: CmdArgs->FileInfoCRC = CmdPtr->FileInfoCRC;
- -: 567:
- -: 568: /* Global data set during call to FM_VerifyNameValid */
- 1: 569: CmdArgs->FileInfoSize = FM_GlobalData.FileStatSize;
- 1: 570: CmdArgs->FileInfoTime = CFE_TIME_FS2CFESeconds(FM_GlobalData.FileStatTime);
- -: 571:
- -: 572: /* Invoke lower priority child task */
- 1: 573: FM_InvokeChildTask();
- -: 574: }
- -: 575:
- 3: 576: return(CommandResult);
- -: 577:
- -: 578:} /* End of FM_GetFileInfoCmd() */
- -: 579:
- -: 580:
- -: 581:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 582:/* */
- -: 583:/* FM command handler -- Get List of Open Files */
- -: 584:/* */
- -: 585:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 586:
- 2: 587:boolean FM_GetOpenFilesCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 588:{
- 2: 589: char *CmdText = "Get Open Files";
- -: 590: boolean CommandResult;
- -: 591: uint32 NumOpenFiles;
- -: 592:
- -: 593: /* Verify command packet length */
- 2: 594: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetOpenFilesCmd_t),
- -: 595: FM_GET_OPEN_FILES_PKT_ERR_EID, CmdText);
- 2: 596: if (CommandResult == TRUE)
- -: 597: {
- -: 598: /* Initialize open files telemetry packet */
- 2: 599: CFE_SB_InitMsg(&FM_GlobalData.OpenFilesPkt, FM_OPEN_FILES_TLM_MID,
- -: 600: sizeof(FM_OpenFilesPkt_t), TRUE);
- -: 601:
- -: 602: /* Get list of open files and count */
- 2: 603: NumOpenFiles = FM_GetOpenFilesData(FM_GlobalData.OpenFilesPkt.OpenFilesList);
- 2: 604: FM_GlobalData.OpenFilesPkt.NumOpenFiles = NumOpenFiles;
- -: 605:
- -: 606: /* Timestamp and send open files telemetry packet */
- 2: 607: CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.OpenFilesPkt);
- 2: 608: CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.OpenFilesPkt);
- -: 609:
- -: 610: /* Send command completion event (debug) */
- 2: 611: CFE_EVS_SendEvent(FM_GET_OPEN_FILES_CMD_EID, CFE_EVS_DEBUG,
- -: 612: "%s command", CmdText);
- -: 613: }
- -: 614:
- 2: 615: return(CommandResult);
- -: 616:
- -: 617:} /* End of FM_GetOpenFilesCmd() */
- -: 618:
- -: 619:
- -: 620:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 621:/* */
- -: 622:/* FM command handler -- Create Directory */
- -: 623:/* */
- -: 624:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 625:
- 2: 626:boolean FM_CreateDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 627:{
- 2: 628: FM_CreateDirCmd_t *CmdPtr = (FM_CreateDirCmd_t *) MessagePtr;
- -: 629: FM_ChildQueueEntry_t *CmdArgs;
- 2: 630: char *CmdText = "Create Directory";
- -: 631: boolean CommandResult;
- -: 632:
- -: 633: /* Verify command packet length */
- 2: 634: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_CreateDirCmd_t),
- -: 635: FM_CREATE_DIR_PKT_ERR_EID, CmdText);
- -: 636:
- -: 637: /* Verify that the directory name is not already in use */
- 2: 638: if (CommandResult == TRUE)
- -: 639: {
- 2: 640: CommandResult = FM_VerifyDirNoExist(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- -: 641: FM_CREATE_DIR_SRC_ERR_EID, CmdText);
- -: 642: }
- -: 643:
- -: 644: /* Check for lower priority child task availability */
- 2: 645: if (CommandResult == TRUE)
- -: 646: {
- 1: 647: CommandResult = FM_VerifyChildTask(FM_CREATE_DIR_CHILD_ERR_EID, CmdText);
- -: 648: }
- -: 649:
- -: 650: /* Prepare command for child task execution */
- 2: 651: if (CommandResult == TRUE)
- -: 652: {
- 1: 653: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 654:
- -: 655: /* Set handshake queue command args */
- 1: 656: CmdArgs->CommandCode = FM_CREATE_DIR_CC;
- 1: 657: strcpy(CmdArgs->Source1, CmdPtr->Directory);
- -: 658:
- -: 659: /* Invoke lower priority child task */
- 1: 660: FM_InvokeChildTask();
- -: 661: }
- -: 662:
- 2: 663: return(CommandResult);
- -: 664:
- -: 665:} /* End of FM_CreateDirectoryCmd() */
- -: 666:
- -: 667:
- -: 668:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 669:/* */
- -: 670:/* FM command handler -- Delete Directory */
- -: 671:/* */
- -: 672:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 673:
- 2: 674:boolean FM_DeleteDirectoryCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 675:{
- 2: 676: FM_DeleteDirCmd_t *CmdPtr = (FM_DeleteDirCmd_t *) MessagePtr;
- -: 677: FM_ChildQueueEntry_t *CmdArgs;
- 2: 678: char *CmdText = "Delete Directory";
- -: 679: boolean CommandResult;
- -: 680:
- -: 681: /* Verify command packet length */
- 2: 682: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_DeleteDirCmd_t),
- -: 683: FM_DELETE_DIR_PKT_ERR_EID, CmdText);
- -: 684:
- -: 685: /* Verify that the directory exists */
- 2: 686: if (CommandResult == TRUE)
- -: 687: {
- 2: 688: CommandResult = FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- -: 689: FM_DELETE_DIR_SRC_ERR_EID, CmdText);
- -: 690: }
- -: 691:
- -: 692: /* Check for lower priority child task availability */
- 2: 693: if (CommandResult == TRUE)
- -: 694: {
- 1: 695: CommandResult = FM_VerifyChildTask(FM_DELETE_DIR_CHILD_ERR_EID, CmdText);
- -: 696: }
- -: 697:
- -: 698: /* Prepare command for child task execution */
- 2: 699: if (CommandResult == TRUE)
- -: 700: {
- 1: 701: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 702:
- -: 703: /* Set handshake queue command args */
- 1: 704: CmdArgs->CommandCode = FM_DELETE_DIR_CC;
- 1: 705: strcpy(CmdArgs->Source1, CmdPtr->Directory);
- -: 706:
- -: 707: /* Invoke lower priority child task */
- 1: 708: FM_InvokeChildTask();
- -: 709: }
- -: 710:
- 2: 711: return(CommandResult);
- -: 712:
- -: 713:} /* End of FM_DeleteDirectoryCmd() */
- -: 714:
- -: 715:
- -: 716:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 717:/* */
- -: 718:/* FM command handler -- Get List of Directory Entries (to file) */
- -: 719:/* */
- -: 720:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 721:
- 3: 722:boolean FM_GetDirListFileCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 723:{
- 3: 724: FM_GetDirFileCmd_t *CmdPtr = (FM_GetDirFileCmd_t *) MessagePtr;
- 3: 725: char *CmdText = "Directory List to File";
- -: 726: char DirWithSep[OS_MAX_PATH_LEN];
- -: 727: char Filename[OS_MAX_PATH_LEN];
- -: 728: FM_ChildQueueEntry_t *CmdArgs;
- -: 729: boolean CommandResult;
- -: 730:
- -: 731: /* Verify command packet length */
- 3: 732: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetDirFileCmd_t),
- -: 733: FM_GET_DIR_FILE_PKT_ERR_EID, CmdText);
- -: 734:
- -: 735: /* Verify that source directory exists */
- 3: 736: if (CommandResult == TRUE)
- -: 737: {
- 3: 738: CommandResult = FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- -: 739: FM_GET_DIR_FILE_SRC_ERR_EID, CmdText);
- -: 740: }
- -: 741:
- -: 742: /* Verify that target file is not already open */
- 3: 743: if (CommandResult == TRUE)
- -: 744: {
- -: 745: /* Use default filename if not specified in the command */
- 2: 746: if (CmdPtr->Filename[0] == '\0')
- -: 747: {
- 1: 748: strcpy(Filename, FM_DIR_LIST_FILE_DEFNAME);
- -: 749: }
- -: 750: else
- -: 751: {
- 1: 752: CFE_PSP_MemCpy(Filename, CmdPtr->Filename, OS_MAX_PATH_LEN);
- -: 753: }
- -: 754:
- -: 755: /* Note: it is OK for this file to overwrite a previous version of the file */
- 2: 756: CommandResult = FM_VerifyFileNotOpen(Filename, sizeof(Filename),
- -: 757: FM_GET_DIR_FILE_TGT_ERR_EID, CmdText);
- -: 758: }
- -: 759:
- -: 760: /* Check for lower priority child task availability */
- 3: 761: if (CommandResult == TRUE)
- -: 762: {
- 2: 763: CommandResult = FM_VerifyChildTask(FM_GET_DIR_FILE_CHILD_ERR_EID, CmdText);
- -: 764: }
- -: 765:
- -: 766: /* Prepare command for child task execution */
- 3: 767: if (CommandResult == TRUE)
- -: 768: {
- 2: 769: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 770:
- -: 771: /* Append a path separator to the end of the directory name */
- 2: 772: strcpy(DirWithSep, CmdPtr->Directory);
- 2: 773: FM_AppendPathSep(DirWithSep, OS_MAX_PATH_LEN);
- -: 774:
- -: 775: /* Set handshake queue command args */
- 2: 776: CmdArgs->CommandCode = FM_GET_DIR_FILE_CC;
- 2: 777: CmdArgs->GetSizeTimeMode = CmdPtr->GetSizeTimeMode;
- 2: 778: strcpy(CmdArgs->Source1, CmdPtr->Directory);
- 2: 779: strcpy(CmdArgs->Source2, DirWithSep);
- 2: 780: strcpy(CmdArgs->Target, Filename);
- -: 781:
- -: 782: /* Invoke lower priority child task */
- 2: 783: FM_InvokeChildTask();
- -: 784: }
- -: 785:
- 3: 786: return(CommandResult);
- -: 787:
- -: 788:} /* End of FM_GetDirListFileCmd() */
- -: 789:
- -: 790:
- -: 791:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 792:/* */
- -: 793:/* FM command handler -- Get List of Directory Entries (to pkt) */
- -: 794:/* */
- -: 795:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 796:
- 2: 797:boolean FM_GetDirListPktCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 798:{
- 2: 799: FM_GetDirPktCmd_t *CmdPtr = (FM_GetDirPktCmd_t *) MessagePtr;
- 2: 800: char *CmdText = "Directory List to Packet";
- -: 801: char DirWithSep[OS_MAX_PATH_LEN];
- -: 802: FM_ChildQueueEntry_t *CmdArgs;
- -: 803: boolean CommandResult;
- -: 804:
- -: 805: /* Verify command packet length */
- 2: 806: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetDirPktCmd_t),
- -: 807: FM_GET_DIR_PKT_PKT_ERR_EID, CmdText);
- -: 808:
- -: 809: /* Verify that source directory exists */
- 2: 810: if (CommandResult == TRUE)
- -: 811: {
- 2: 812: CommandResult = FM_VerifyDirExists(CmdPtr->Directory, sizeof(CmdPtr->Directory),
- -: 813: FM_GET_DIR_PKT_SRC_ERR_EID, CmdText);
- -: 814: }
- -: 815:
- -: 816: /* Check for lower priority child task availability */
- 2: 817: if (CommandResult == TRUE)
- -: 818: {
- 1: 819: CommandResult = FM_VerifyChildTask(FM_GET_DIR_PKT_CHILD_ERR_EID, CmdText);
- -: 820: }
- -: 821:
- -: 822: /* Prepare command for child task execution */
- 2: 823: if (CommandResult == TRUE)
- -: 824: {
- 1: 825: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 826:
- -: 827: /* Append a path separator to the end of the directory name */
- 1: 828: strcpy(DirWithSep, CmdPtr->Directory);
- 1: 829: FM_AppendPathSep(DirWithSep, OS_MAX_PATH_LEN);
- -: 830:
- -: 831: /* Set handshake queue command args */
- 1: 832: CmdArgs->CommandCode = FM_GET_DIR_PKT_CC;
- 1: 833: CmdArgs->GetSizeTimeMode = CmdPtr->GetSizeTimeMode;
- 1: 834: strcpy(CmdArgs->Source1, CmdPtr->Directory);
- 1: 835: strcpy(CmdArgs->Source2, DirWithSep);
- 1: 836: CmdArgs->DirListOffset = CmdPtr->DirListOffset;
- -: 837:
- -: 838: /* Invoke lower priority child task */
- 1: 839: FM_InvokeChildTask();
- -: 840: }
- -: 841:
- 2: 842: return(CommandResult);
- -: 843:
- -: 844:} /* End of FM_GetDirListPktCmd() */
- -: 845:
- -: 846:
- -: 847:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 848:/* */
- -: 849:/* FM command handler -- Get File System Free Space */
- -: 850:/* */
- -: 851:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 852:
- 3: 853:boolean FM_GetFreeSpaceCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 854:{
- 3: 855: char *CmdText = "Get Free Space";
- -: 856: boolean CommandResult;
- -: 857: uint32 i;
- -: 858: uint64 FreeSpace64;
- -: 859:
- -: 860:
- -: 861: /* Verify command packet length */
- 3: 862: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_GetFreeSpaceCmd_t),
- -: 863: FM_GET_FREE_SPACE_PKT_ERR_EID, CmdText);
- 3: 864: if (CommandResult == TRUE)
- -: 865: {
- -: 866: /* Verify that we have a pointer to the file system table data */
- 3: 867: if (FM_GlobalData.FreeSpaceTablePtr == (FM_FreeSpaceTable_t *) NULL)
- -: 868: {
- 2: 869: CommandResult = FALSE;
- -: 870:
- 2: 871: CFE_EVS_SendEvent(FM_GET_FREE_SPACE_TBL_ERR_EID, CFE_EVS_ERROR,
- -: 872: "%s error: file system free space table is not loaded", CmdText);
- -: 873: }
- -: 874: else
- -: 875: {
- -: 876: /* Initialize the file system free space telemetry packet */
- 1: 877: CFE_SB_InitMsg(&FM_GlobalData.FreeSpacePkt, FM_FREE_SPACE_TLM_MID,
- -: 878: sizeof(FM_FreeSpacePkt_t), TRUE);
- -: 879:
- -: 880: /* Process enabled file system table entries */
- 9: 881: for (i = 0; i < FM_TABLE_ENTRY_COUNT; i++)
- -: 882: {
- 8: 883: if (FM_GlobalData.FreeSpaceTablePtr->FileSys[i].State == FM_TABLE_ENTRY_ENABLED)
- -: 884: {
- -: 885: /* Get file system name */
- 1: 886: strcpy(FM_GlobalData.FreeSpacePkt.FileSys[i].Name,
- 1: 887: FM_GlobalData.FreeSpaceTablePtr->FileSys[i].Name);
- -: 888:
- -: 889: /* Get file system free space */
- 1: 890: FreeSpace64 = 0;
- 1: 891: OS_fsBytesFree(FM_GlobalData.FreeSpacePkt.FileSys[i].Name, &FreeSpace64);
- -: 892:
- -: 893: /* Store as bytes to avoid boundary, endian and strict-aliasing issues */
- 1: 894: CFE_PSP_MemCpy(&FM_GlobalData.FreeSpacePkt.FileSys[i].FreeSpace_A,
- -: 895: &FreeSpace64, sizeof(uint64));
- -: 896: }
- -: 897: }
- -: 898:
- -: 899: /* Timestamp and send file system free space telemetry packet */
- 1: 900: CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &FM_GlobalData.FreeSpacePkt);
- 1: 901: CFE_SB_SendMsg((CFE_SB_Msg_t *) &FM_GlobalData.FreeSpacePkt);
- -: 902:
- -: 903: /* Send command completion event (debug) */
- 1: 904: CFE_EVS_SendEvent(FM_GET_FREE_SPACE_CMD_EID, CFE_EVS_DEBUG,
- -: 905: "%s command", CmdText);
- -: 906: }
- -: 907: }
- -: 908:
- 3: 909: return(CommandResult);
- -: 910:
- -: 911:} /* End of FM_GetFreeSpaceCmd() */
- -: 912:
- -: 913:
- -: 914:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 915:/* */
- -: 916:/* FM command handler -- Set Table Entry Enable/Disable State */
- -: 917:/* */
- -: 918:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 919:
- 6: 920:boolean FM_SetTableStateCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 921:{
- 6: 922: FM_SetTableStateCmd_t *CmdPtr = (FM_SetTableStateCmd_t *) MessagePtr;
- 6: 923: char *CmdText = "Set Table State";
- -: 924: boolean CommandResult;
- -: 925:
- -: 926: /* Verify command packet length */
- 6: 927: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_SetTableStateCmd_t),
- -: 928: FM_SET_TABLE_STATE_PKT_ERR_EID, CmdText);
- 6: 929: if (CommandResult == TRUE)
- -: 930: {
- 6: 931: if (FM_GlobalData.FreeSpaceTablePtr == (FM_FreeSpaceTable_t *) NULL)
- -: 932: {
- -: 933: /* File system table has not been loaded */
- 2: 934: CommandResult = FALSE;
- -: 935:
- 2: 936: CFE_EVS_SendEvent(FM_SET_TABLE_STATE_TBL_ERR_EID, CFE_EVS_ERROR,
- -: 937: "%s error: file system free space table is not loaded", CmdText);
- -: 938: }
- 4: 939: else if (CmdPtr->TableEntryIndex >= FM_TABLE_ENTRY_COUNT)
- -: 940: {
- -: 941: /* Table index argument is out of range */
- 1: 942: CommandResult = FALSE;
- -: 943:
- 1: 944: CFE_EVS_SendEvent(FM_SET_TABLE_STATE_ARG_ERR_EID, CFE_EVS_ERROR,
- -: 945: "%s error: invalid command argument: index = %d", CmdText, (int)CmdPtr->TableEntryIndex);
- -: 946: }
- 5: 947: else if ((CmdPtr->TableEntryState != FM_TABLE_ENTRY_ENABLED) &&
- 1: 948: (CmdPtr->TableEntryState != FM_TABLE_ENTRY_DISABLED))
- -: 949: {
- -: 950: /* State argument must be either enabled or disabled */
- 1: 951: CommandResult = FALSE;
- -: 952:
- 1: 953: CFE_EVS_SendEvent(FM_SET_TABLE_STATE_ARG_ERR_EID, CFE_EVS_ERROR,
- -: 954: "%s error: invalid command argument: state = %d", CmdText, (int)CmdPtr->TableEntryState);
- -: 955: }
- 2: 956: else if (FM_GlobalData.FreeSpaceTablePtr->FileSys[CmdPtr->TableEntryIndex].State == FM_TABLE_ENTRY_UNUSED)
- -: 957: {
- -: 958: /* Current table entry state must not be unused */
- 1: 959: CommandResult = FALSE;
- -: 960:
- 1: 961: CFE_EVS_SendEvent(FM_SET_TABLE_STATE_UNUSED_ERR_EID, CFE_EVS_ERROR,
- -: 962: "%s error: cannot modify unused table entry: index = %d", CmdText, (int)CmdPtr->TableEntryIndex);
- -: 963: }
- -: 964: else
- -: 965: {
- -: 966: /* Update the table entry state as commanded */
- 1: 967: FM_GlobalData.FreeSpaceTablePtr->FileSys[CmdPtr->TableEntryIndex].State = CmdPtr->TableEntryState;
- -: 968:
- -: 969: /* Notify cFE that we have modified the table data */
- 1: 970: CFE_TBL_Modified(FM_GlobalData.FreeSpaceTableHandle);
- -: 971:
- -: 972: /* Send command completion event (info) */
- 1: 973: CFE_EVS_SendEvent(FM_SET_TABLE_STATE_CMD_EID, CFE_EVS_INFORMATION,
- -: 974: "%s command: index = %d, state = %d", CmdText, (int)CmdPtr->TableEntryIndex, (int)CmdPtr->TableEntryState);
- -: 975: }
- -: 976: }
- -: 977:
- 6: 978: return(CommandResult);
- -: 979:
- -: 980:} /* End of FM_SetTableStateCmd() */
- -: 981:
- -: 982:
- -: 983:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 984:/* */
- -: 985:/* FM command handler -- Set Permissions for a file */
- -: 986:/* */
- -: 987:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 988:
- 3: 989:boolean FM_SetPermissionsCmd(CFE_SB_MsgPtr_t MessagePtr)
- -: 990:{
- 3: 991: FM_SetPermCmd_t *CmdPtr = (FM_SetPermCmd_t *) MessagePtr;
- -: 992: FM_ChildQueueEntry_t *CmdArgs;
- 3: 993: char *CmdText = "Set Permissions";
- -: 994: boolean CommandResult;
- -: 995: boolean FilenameState;
- -: 996:
- -: 997: /* Verify command packet length */
- 3: 998: CommandResult = FM_IsValidCmdPktLength(MessagePtr, sizeof(FM_SetPermCmd_t),
- -: 999: FM_SET_PERM_ERR_EID, CmdText);
- -: 1000:
- -: 1001:
- 3: 1002: if(CommandResult == TRUE)
- -: 1003: {
- 3: 1004: FilenameState = FM_VerifyNameValid(CmdPtr->FileName, sizeof(CmdPtr->FileName),
- -: 1005: 0, CmdText);
- -: 1006:
- 3: 1007: if (FilenameState == FM_NAME_IS_INVALID)
- -: 1008: {
- 2: 1009: CommandResult = FALSE;
- -: 1010: }
- -: 1011: }
- -: 1012:
- -: 1013: /* Check for lower priority child task availability */
- 3: 1014: if (CommandResult == TRUE)
- -: 1015: {
- 1: 1016: CommandResult = FM_VerifyChildTask(FM_SET_PERM_ERR_EID, CmdText);
- -: 1017: }
- -: 1018:
- -: 1019: /* Prepare command for child task execution */
- 3: 1020: if (CommandResult == TRUE)
- -: 1021: {
- 1: 1022: CmdArgs = &FM_GlobalData.ChildQueue[FM_GlobalData.ChildWriteIndex];
- -: 1023: /* Set handshake queue command args */
- 1: 1024: CmdArgs->CommandCode = FM_SET_FILE_PERM_CC;
- 1: 1025: strcpy(CmdArgs->Source1, CmdPtr->FileName);
- 1: 1026: CmdArgs->Mode = CmdPtr->Mode;
- -: 1027:
- -: 1028: /* Invoke lower priority child task */
- 1: 1029: FM_InvokeChildTask();
- -: 1030: }
- -: 1031:
- 3: 1032: return(CommandResult);
- -: 1033:
- -: 1034:} /* End of FM_SetPermissionsCmd() */
- -: 1035:
- -: 1036:/************************/
- -: 1037:/* End of File Comment */
- -: 1038:/************************/
- -: 1039:
diff --git a/fsw/unit_test/fm_cmds_test.c b/fsw/unit_test/fm_cmds_test.c
index c241c4b..0191c24 100644
--- a/fsw/unit_test/fm_cmds_test.c
+++ b/fsw/unit_test/fm_cmds_test.c
@@ -1,33 +1,33 @@
- /*************************************************************************
- ** Filename: fm_cmds_test.c
- **
- ** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
- ** File Manager Application Version 2.5.3
- **
- ** Copyright © 2020 United States Government as represented by the Administrator of
- ** the National Aeronautics and Space Administration. All Rights Reserved.
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- **
- ** You may obtain a copy of the License at
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- **
- ** Purpose:
- ** This file contains unit test cases for the functions contained in the file fm_cmds.c.
- **
- ** References:
- ** Flight Software Branch C Coding Standard Version 1.2
- ** CFS Development Standards Document
- ** Notes:
- **
- *************************************************************************/
+/*************************************************************************
+** Filename: fm_cmds_test.c
+**
+** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
+** File Manager Application Version 2.5.3
+**
+** Copyright © 2020 United States Government as represented by the Administrator of
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+**
+** Purpose:
+** This file contains unit test cases for the functions contained in the file fm_cmds.c.
+**
+** References:
+** Flight Software Branch C Coding Standard Version 1.2
+** CFS Development Standards Document
+** Notes:
+**
+*************************************************************************/
/*
* Includes
@@ -62,7 +62,7 @@
* Function Definitions
*/
-int32 UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsDirectory(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsDirectory(const char *path, os_fstat_t *filestats)
{
#ifdef OS_FILESTAT_MODE
filestats->FileModeBits = OS_FILESTAT_MODE_DIR;
@@ -73,7 +73,7 @@ int32 UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsDirectory(const char *path, os_fst
return CFE_SUCCESS;
} /* end UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsDirectory */
-int32 UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t *filestats)
{
#ifdef OS_FILESTAT_MODE
filestats->FileModeBits = OS_FILESTAT_MODE_READ;
@@ -87,35 +87,34 @@ int32 UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile(const char *path, os_fstat_t
filestats->st_size = 0;
#endif
-
return CFE_SUCCESS;
} /* end UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile */
uint8 UT_FM_CFE_OSFILEAPI_StatStatHook3RunCount;
-int32 UT_FM_CFE_OSFILEAPI_StatHook3(const char *path, os_fstat_t *filestats)
+int32 UT_FM_CFE_OSFILEAPI_StatHook3(const char *path, os_fstat_t *filestats)
{
UT_FM_CFE_OSFILEAPI_StatStatHook3RunCount++;
if (UT_FM_CFE_OSFILEAPI_StatStatHook3RunCount == 1)
{
#ifdef OS_FILESTAT_MODE
- filestats->FileModeBits = OS_FILESTAT_MODE_DIR;
+ filestats->FileModeBits = OS_FILESTAT_MODE_DIR;
#else
- filestats->st_mode = S_IFDIR;
+ filestats->st_mode = S_IFDIR;
#endif
}
else
{
#ifdef OS_FILESTAT_MODE
- filestats->FileModeBits = OS_FILESTAT_MODE_READ;
+ filestats->FileModeBits = OS_FILESTAT_MODE_READ;
#else
- filestats->st_mode = S_IFREG;
+ filestats->st_mode = S_IFREG;
#endif
}
return CFE_SUCCESS;
} /* end UT_FM_CFE_OSFILEAPI_StatHook3 */
-int32 UT_FM_CFE_OSFILEAPI_FDGetInfoHook (int32 filedes, OS_FDTableEntry *fd_prop)
+int32 UT_FM_CFE_OSFILEAPI_FDGetInfoHook(int32 filedes, OS_FDTableEntry *fd_prop)
{
CFE_PSP_MemSet(fd_prop, 0, sizeof(OS_FDTableEntry));
@@ -124,64 +123,64 @@ int32 UT_FM_CFE_OSFILEAPI_FDGetInfoHook (int32 filedes, OS_FDTableEntry *fd_prop
void FM_NoopCmd_Test(void)
{
- boolean Result;
- FM_NoopCmd_t CmdPacket;
- char Message[125];
+ boolean Result;
+ FM_NoopCmd_t CmdPacket;
+ char Message[125];
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_NoopCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_NoopCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_NOOP_CC);
/* Execute the function being tested */
Result = FM_NoopCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- sprintf(Message, "No-op command: FM version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV);
- UtAssert_True (Ut_CFE_EVS_EventSent(FM_NOOP_CMD_EID, CFE_EVS_INFORMATION, Message), Message);
+ sprintf(Message, "No-op command: FM version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION,
+ FM_MISSION_REV);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_NOOP_CMD_EID, CFE_EVS_INFORMATION, Message), Message);
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_NoopCmd_Test */
void FM_ResetCountersCmd_Test(void)
{
- boolean Result;
- FM_ResetCmd_t CmdPacket;
+ boolean Result;
+ FM_ResetCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_ResetCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_ResetCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_RESET_CC);
/* Execute the function being tested */
Result = FM_ResetCountersCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_RESET_CMD_EID, CFE_EVS_DEBUG, "Reset Counters command"),
- "Reset Counters command");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_RESET_CMD_EID, CFE_EVS_DEBUG, "Reset Counters command"),
+ "Reset Counters command");
- UtAssert_True (FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
- UtAssert_True (FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
- UtAssert_True (FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
+ UtAssert_True(FM_GlobalData.CommandCounter == 0, "FM_GlobalData.CommandCounter == 0");
+ UtAssert_True(FM_GlobalData.CommandErrCounter == 0, "FM_GlobalData.CommandErrCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdCounter == 0, "FM_GlobalData.ChildCmdCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdErrCounter == 0, "FM_GlobalData.ChildCmdErrCounter == 0");
+ UtAssert_True(FM_GlobalData.ChildCmdWarnCounter == 0, "FM_GlobalData.ChildCmdWarnCounter == 0");
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ResetCountersCmd_Test */
void FM_CopyFileCmd_Test_OverwriteZero(void)
{
- boolean Result;
- FM_CopyFileCmd_t CmdPacket;
+ boolean Result;
+ FM_CopyFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_CopyFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_CopyFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_COPY_CC);
- strncpy (CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
CmdPacket.Overwrite = 0;
@@ -192,61 +191,63 @@ void FM_CopyFileCmd_Test_OverwriteZero(void)
/* Execute the function being tested */
Result = FM_CopyFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_COPY_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_COPY_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_COPY_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_COPY_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_CopyFileCmd_Test_OverwriteZero */
void FM_CopyFileCmd_Test_OverwriteNonzero(void)
{
- boolean Result;
- FM_CopyFileCmd_t CmdPacket;
+ boolean Result;
+ FM_CopyFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_CopyFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_CopyFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_COPY_CC);
- strncpy (CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
CmdPacket.Overwrite = 1;
-
+
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_CopyFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_COPY_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_COPY_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_COPY_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_COPY_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_CopyFileCmd_Test_OverwriteNonzero */
void FM_MoveFileCmd_Test_OverwriteZero(void)
{
- boolean Result;
- FM_MoveFileCmd_t CmdPacket;
+ boolean Result;
+ FM_MoveFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_MoveFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_MoveFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_MOVE_CC);
- strncpy (CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -257,30 +258,31 @@ void FM_MoveFileCmd_Test_OverwriteZero(void)
/* Execute the function being tested */
Result = FM_MoveFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_MOVE_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_MOVE_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_MOVE_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_MOVE_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_MoveFileCmd_Test_OverwriteZero */
void FM_MoveFileCmd_Test_OverwriteNonzero(void)
{
- boolean Result;
- FM_MoveFileCmd_t CmdPacket;
+ boolean Result;
+ FM_MoveFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_MoveFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_MoveFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_MOVE_CC);
- strncpy (CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -288,30 +290,31 @@ void FM_MoveFileCmd_Test_OverwriteNonzero(void)
/* Execute the function being tested */
Result = FM_MoveFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_MOVE_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_MOVE_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_MOVE_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_MOVE_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_MoveFileCmd_Test_OverwriteNonzero */
-void FM_RenameFileCmd_Test(void)
+void FM_RenameFileCmd_Test_OverwriteZero(void)
{
- boolean Result;
- FM_RenameFileCmd_t CmdPacket;
+ boolean Result;
+ FM_RenameFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_RenameFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_RenameFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_RENAME_CC);
- strncpy (CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -320,85 +323,121 @@ void FM_RenameFileCmd_Test(void)
/* Execute the function being tested */
Result = FM_RenameFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_RENAME_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_RENAME_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_RENAME_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_RENAME_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_RenameFileCmd_Test */
+void FM_RenameFileCmd_Test_OverwriteNonzero(void)
+{
+ boolean Result;
+ FM_RenameFileCmd_t CmdPacket;
+
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_RenameFileCmd_t), TRUE);
+ CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_RENAME_CC);
+
+ strncpy(CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
+
+ Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
+
+ CmdPacket.Overwrite = 1;
+
+ /* Execute the function being tested */
+ Result = FM_RenameFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
+
+ /* Verify results */
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_RENAME_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_RENAME_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
+
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+
+} /* end FM_MoveFileCmd_Test_OverwriteNonzero */
+
void FM_DeleteFileCmd_Test(void)
{
- boolean Result;
- FM_DeleteFileCmd_t CmdPacket;
+ boolean Result;
+ FM_DeleteFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_DELETE_CC);
- strncpy (CmdPacket.Filename, "filename.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Filename, "filename.txt", OS_MAX_PATH_LEN);
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_DeleteFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_DELETE_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_DELETE_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_DELETE_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_DELETE_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_DeleteFileCmd_Test */
void FM_DeleteAllFilesCmd_Test(void)
{
- boolean Result;
- FM_DeleteAllCmd_t CmdPacket;
+ boolean Result;
+ FM_DeleteAllCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteAllCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteAllCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_DELETE_ALL_CC);
- strncpy (CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
/* Satisfies second instanace of condition "CommandResult == TRUE" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsDirectory);
/* Execute the function being tested */
Result = FM_DeleteAllFilesCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_DELETE_ALL_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_DELETE_ALL_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_DELETE_ALL_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_DELETE_ALL_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_DeleteAllFilesCmd_Test */
+#ifdef FM_INCLUDE_DECOMPRESS
void FM_DecompressFileCmd_Test(void)
{
- boolean Result;
- FM_DecompressCmd_t CmdPacket;
+ boolean Result;
+ FM_DecompressCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DecompressCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DecompressCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_DECOMPRESS_CC);
- strncpy (CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Source, "./testfile.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
/* Satisfies first instance of condition "CommandResult == TRUE" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
@@ -408,120 +447,125 @@ void FM_DecompressFileCmd_Test(void)
/* Execute the function being tested */
Result = FM_DecompressFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_DECOMPRESS_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_DECOMPRESS_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_DECOMPRESS_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_DECOMPRESS_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_DecompressFileCmd_Test */
+#endif
void FM_ConcatFilesCmd_Test(void)
{
- boolean Result;
- FM_ConcatCmd_t CmdPacket;
+ boolean Result;
+ FM_ConcatCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_ConcatCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_ConcatCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_CONCAT_CC);
- strncpy (CmdPacket.Source1, "./testfile1.txt", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Source2, "./testfile2.txt", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Source1, "./testfile1.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Source2, "./testfile2.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Target, "./temp_dest.txt", OS_MAX_PATH_LEN);
/* Set target file to not exist */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 3);
-
+
/* Mark files as closed files on other calls to OS_stat */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_ConcatFilesCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_CONCAT_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_CONCAT_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source1, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source1, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Source2, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Source2, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_CONCAT_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_CONCAT_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source1, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Source1, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Source2, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Source2, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Target, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_ConcatFilesCmd_Test */
void FM_GetFileInfoCmd_Test_Nominal(void)
{
- boolean Result;
- FM_GetFileInfoCmd_t CmdPacket;
+ boolean Result;
+ FM_GetFileInfoCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetFileInfoCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetFileInfoCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_FILE_INFO_CC);
- strncpy (CmdPacket.Filename, "./testfile.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Filename, "./testfile.txt", OS_MAX_PATH_LEN);
/* Satisfies second instance of condition "CommandResult == TRUE" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_GetFileInfoCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_FILE_INFO_CC, "FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_FILE_INFO_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (FM_GlobalData.ChildQueue[0].FileInfoState == FM_NAME_IS_FILE_CLOSED, "FM_GlobalData.ChildQueue[0].FileInfoState == FM_NAME_IS_FILE_CLOSED");
- UtAssert_True (FM_GlobalData.ChildQueue[0].FileInfoCRC == 0, "FM_GlobalData.ChildQueue[0].FileInfoCRC == 0");
- UtAssert_True (FM_GlobalData.ChildQueue[0].FileInfoSize == 0, "FM_GlobalData.ChildQueue[0].FileInfoSize == 0");
- UtAssert_True (FM_GlobalData.ChildQueue[0].FileInfoTime == 0, "FM_GlobalData.ChildQueue[0].FileInfoTime == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_FILE_INFO_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_FILE_INFO_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].FileInfoState == FM_NAME_IS_FILE_CLOSED,
+ "FM_GlobalData.ChildQueue[0].FileInfoState == FM_NAME_IS_FILE_CLOSED");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].FileInfoCRC == 0, "FM_GlobalData.ChildQueue[0].FileInfoCRC == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].FileInfoSize == 0, "FM_GlobalData.ChildQueue[0].FileInfoSize == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].FileInfoTime == 0, "FM_GlobalData.ChildQueue[0].FileInfoTime == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_GetFileInfoCmd_Test_Nominal */
void FM_GetFileInfoCmd_Test_InvalidFilename(void)
{
- boolean Result;
- FM_GetFileInfoCmd_t CmdPacket;
+ boolean Result;
+ FM_GetFileInfoCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetFileInfoCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetFileInfoCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_FILE_INFO_CC);
- strncpy (CmdPacket.Filename, "", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Filename, "", OS_MAX_PATH_LEN);
/* Satisfies second instance of condition "CommandResult == TRUE" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_GetFileInfoCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_SRC_ERR_EID, CFE_EVS_ERROR, "Get File Info error: invalid name: name = "),
+ UtAssert_True(
+ Ut_CFE_EVS_EventSent(FM_GET_FILE_INFO_SRC_ERR_EID, CFE_EVS_ERROR, "Get File Info error: invalid name: name = "),
"Get File Info error: invalid name: name = ");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_GetFileInfoCmd_Test_InvalidFilename */
void FM_GetOpenFilesCmd_Test(void)
{
- boolean Result;
- FM_GetOpenFilesCmd_t CmdPacket;
+ boolean Result;
+ FM_GetOpenFilesCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetOpenFilesCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetOpenFilesCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_OPEN_FILES_CC);
/* Sets file descriptor table (fd_prop) to all zero, to prevent segmentation fault */
@@ -529,109 +573,110 @@ void FM_GetOpenFilesCmd_Test(void)
/* Execute the function being tested */
Result = FM_GetOpenFilesCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.OpenFilesPkt.NumOpenFiles == OS_MAX_NUM_OPEN_FILES, "FM_GlobalData.OpenFilesPkt.NumOpenFiles == OS_MAX_NUM_OPEN_FILES");
+ UtAssert_True(FM_GlobalData.OpenFilesPkt.NumOpenFiles == OS_MAX_NUM_OPEN_FILES,
+ "FM_GlobalData.OpenFilesPkt.NumOpenFiles == OS_MAX_NUM_OPEN_FILES");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_OPEN_FILES_CMD_EID, CFE_EVS_DEBUG, "Get Open Files command"),
- "Get Open Files command");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_OPEN_FILES_CMD_EID, CFE_EVS_DEBUG, "Get Open Files command"),
+ "Get Open Files command");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_GetOpenFilesCmd_Test */
void FM_CreateDirectoryCmd_Test(void)
{
- boolean Result;
- FM_CreateDirCmd_t CmdPacket;
+ boolean Result;
+ FM_CreateDirCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_CreateDirCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_CreateDirCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_CREATE_DIR_CC);
- strncpy (CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
/* Set target file to not exist */
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 1);
/* Execute the function being tested */
Result = FM_CreateDirectoryCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_CreateDirectoryCmd_Test */
void FM_DeleteDirectoryCmd_Test(void)
{
- boolean Result;
- FM_DeleteDirCmd_t CmdPacket;
+ boolean Result;
+ FM_DeleteDirCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteDirCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_DeleteDirCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_DELETE_DIR_CC);
- strncpy (CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
/* Satisfies second instance of condition "CommandResult == TRUE" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsDirectory);
/* Execute the function being tested */
Result = FM_DeleteDirectoryCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_DeleteDirectoryCmd_Test */
void FM_GetDirListFileCmd_Test_DefaultFilename(void)
{
- boolean Result;
- FM_GetDirFileCmd_t CmdPacket;
+ boolean Result;
+ FM_GetDirFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_DIR_FILE_CC);
- strncpy (CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Filename, "", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Filename, "", OS_MAX_PATH_LEN);
/* Satisfies second and third instances of condition "CommandResult == TRUE" */
- Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CFE_OSFILEAPI_StatHook3);
+ Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CFE_OSFILEAPI_StatHook3);
UT_FM_CFE_OSFILEAPI_StatStatHook3RunCount = 0;
/* Execute the function being tested */
Result = FM_GetDirListFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_DIR_FILE_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_GET_DIR_FILE_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Target, FM_DIR_LIST_FILE_DEFNAME, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Target, FM_DIR_LIST_FILE_DEFNAME, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_DIR_FILE_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_GET_DIR_FILE_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, FM_DIR_LIST_FILE_DEFNAME, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, FM_DIR_LIST_FILE_DEFNAME, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_GetDirListFileCmd_Test_DefaultFilename */
void FM_GetDirListFileCmd_Test_SpecifiedFilename(void)
{
- boolean Result;
- FM_GetDirFileCmd_t CmdPacket;
+ boolean Result;
+ FM_GetDirFileCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirFileCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirFileCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_DIR_FILE_CC);
- strncpy (CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
- strncpy (CmdPacket.Filename, "filename.txt", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Filename, "filename.txt", OS_MAX_PATH_LEN);
/* Satisfies second and third instances of condition "CommandResult == TRUE" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CFE_OSFILEAPI_StatHook3);
@@ -639,60 +684,63 @@ void FM_GetDirListFileCmd_Test_SpecifiedFilename(void)
/* Execute the function being tested */
Result = FM_GetDirListFileCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_DIR_FILE_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_GET_DIR_FILE_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_DIR_FILE_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_GET_DIR_FILE_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Target, CmdPacket.Filename, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_GetDirListFileCmd_Test_SpecifiedFilename */
void FM_GetDirListPktCmd_Test(void)
{
- boolean Result;
- FM_GetDirPktCmd_t CmdPacket;
+ boolean Result;
+ FM_GetDirPktCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirPktCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetDirPktCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_DIR_PKT_CC);
- strncpy (CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
+ strncpy(CmdPacket.Directory, "/directory/", OS_MAX_PATH_LEN);
/* Satisfies second instance of condition "CommandResult == TRUE" */
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsDirectory);
/* Execute the function being tested */
Result = FM_GetDirListPktCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
+
+ UtAssert_True(FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_DIR_PKT_CC,
+ "FM_GlobalData.ChildQueue[0].CommandCode = FM_GET_DIR_PKT_CC");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0,
+ "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
- UtAssert_True (FM_GlobalData.ChildQueue[0].CommandCode == FM_GET_DIR_PKT_CC, "FM_GlobalData.ChildQueue[0].CommandCode = FM_GET_DIR_PKT_CC");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source1, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
- UtAssert_True
- (strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0, "strncmp(FM_GlobalData.ChildQueue[0].Source2, CmdPacket.Directory, OS_MAX_PATH_LEN) == 0");
-
- UtAssert_True (FM_GlobalData.ChildQueue[0].DirListOffset == CmdPacket.DirListOffset, "FM_GlobalData.ChildQueue[0].DirListOffset == CmdPacket.DirListOffset");
+ UtAssert_True(FM_GlobalData.ChildQueue[0].DirListOffset == CmdPacket.DirListOffset,
+ "FM_GlobalData.ChildQueue[0].DirListOffset == CmdPacket.DirListOffset");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_GetDirListPktCmd_Test */
void FM_GetFreeSpaceCmd_Test_Nominal(void)
{
- boolean Result;
- FM_GetFreeSpaceCmd_t CmdPacket;
- FM_FreeSpaceTable_t FreeSpaceTable;
+ boolean Result;
+ FM_GetFreeSpaceCmd_t CmdPacket;
+ FM_FreeSpaceTable_t FreeSpaceTable;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetFreeSpaceCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetFreeSpaceCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_FREE_SPACE_CC);
FM_GlobalData.FreeSpaceTablePtr = &FreeSpaceTable;
@@ -703,50 +751,51 @@ void FM_GetFreeSpaceCmd_Test_Nominal(void)
/* Execute the function being tested */
Result = FM_GetFreeSpaceCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True (strncmp (FM_GlobalData.FreeSpacePkt.FileSys[0].Name, "Name", OS_MAX_PATH_LEN) == 0, "strncmp (FM_GlobalData.FreeSpacePkt.FileSys[0].Name, 'Name', OS_MAX_PATH_LEN) == 0");
- UtAssert_True (FM_GlobalData.FreeSpacePkt.FileSys[0].FreeSpace_A == 0, "FM_GlobalData.FreeSpacePkt.FileSys[0].FreeSpace_A == 0");
+ UtAssert_True(strncmp(FM_GlobalData.FreeSpacePkt.FileSys[0].Name, "Name", OS_MAX_PATH_LEN) == 0,
+ "strncmp (FM_GlobalData.FreeSpacePkt.FileSys[0].Name, 'Name', OS_MAX_PATH_LEN) == 0");
+ UtAssert_True(FM_GlobalData.FreeSpacePkt.FileSys[0].FreeSpace_A == 0,
+ "FM_GlobalData.FreeSpacePkt.FileSys[0].FreeSpace_A == 0");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FREE_SPACE_CMD_EID, CFE_EVS_DEBUG, "Get Free Space command"),
- "Get Free Space command");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_FREE_SPACE_CMD_EID, CFE_EVS_DEBUG, "Get Free Space command"),
+ "Get Free Space command");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_GetFreeSpaceCmd_Test_Nominal */
void FM_GetFreeSpaceCmd_Test_TableNotLoaded(void)
{
- boolean Result;
- FM_GetFreeSpaceCmd_t CmdPacket;
+ boolean Result;
+ FM_GetFreeSpaceCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_GetFreeSpaceCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_GetFreeSpaceCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_GET_FREE_SPACE_CC);
/* Execute the function being tested */
Result = FM_GetFreeSpaceCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_GET_FREE_SPACE_TBL_ERR_EID, CFE_EVS_ERROR, "Get Free Space error: file system free space table is not loaded"),
- "Get Free Space error: file system free space table is not loaded");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_GET_FREE_SPACE_TBL_ERR_EID, CFE_EVS_ERROR,
+ "Get Free Space error: file system free space table is not loaded"),
+ "Get Free Space error: file system free space table is not loaded");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_GetFreeSpaceCmd_Test_TableNotLoaded */
void FM_SetTableStateCmd_Test_Nominal(void)
{
- boolean Result;
- FM_SetTableStateCmd_t CmdPacket;
- FM_FreeSpaceTable_t FreeSpaceTable;
+ boolean Result;
+ FM_SetTableStateCmd_t CmdPacket;
+ FM_FreeSpaceTable_t FreeSpaceTable;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_SET_TABLE_STATE_CC);
CmdPacket.TableEntryIndex = 0;
@@ -758,52 +807,51 @@ void FM_SetTableStateCmd_Test_Nominal(void)
/* Execute the function being tested */
Result = FM_SetTableStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
- UtAssert_True
- (FM_GlobalData.FreeSpaceTablePtr->FileSys[CmdPacket.TableEntryIndex].State == CmdPacket.TableEntryState,
+ UtAssert_True(
+ FM_GlobalData.FreeSpaceTablePtr->FileSys[CmdPacket.TableEntryIndex].State == CmdPacket.TableEntryState,
"FM_GlobalData.FreeSpaceTablePtr->FileSys[CmdPacket.TableEntryIndex].State == CmdPacket.TableEntryState");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_CMD_EID, CFE_EVS_INFORMATION, "Set Table State command: index = 0, state = 1"),
- "Set Table State command: index = 0, state = 1");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_CMD_EID, CFE_EVS_INFORMATION,
+ "Set Table State command: index = 0, state = 1"),
+ "Set Table State command: index = 0, state = 1");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_SetTableStateCmd_Test_Nominal */
void FM_SetTableStateCmd_Test_TableNotLoaded(void)
{
- boolean Result;
- FM_SetTableStateCmd_t CmdPacket;
+ boolean Result;
+ FM_SetTableStateCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_SET_TABLE_STATE_CC);
/* Execute the function being tested */
Result = FM_SetTableStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_TBL_ERR_EID, CFE_EVS_ERROR,
- "Set Table State error: file system free space table is not loaded"),
- "Set Table State error: file system free space table is not loaded");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_TBL_ERR_EID, CFE_EVS_ERROR,
+ "Set Table State error: file system free space table is not loaded"),
+ "Set Table State error: file system free space table is not loaded");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_SetTableStateCmd_Test_TableNotLoaded */
void FM_SetTableStateCmd_Test_TableIndexOutOfRange(void)
{
- boolean Result;
- FM_SetTableStateCmd_t CmdPacket;
- FM_FreeSpaceTable_t FreeSpaceTable;
+ boolean Result;
+ FM_SetTableStateCmd_t CmdPacket;
+ FM_FreeSpaceTable_t FreeSpaceTable;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_SET_TABLE_STATE_CC);
CmdPacket.TableEntryIndex = FM_TABLE_ENTRY_COUNT + 1;
@@ -815,25 +863,25 @@ void FM_SetTableStateCmd_Test_TableIndexOutOfRange(void)
/* Execute the function being tested */
Result = FM_SetTableStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_ARG_IDX_ERR_EID, CFE_EVS_ERROR, "Set Table State error: invalid command argument: index = 9"),
- "Set Table State error: invalid command argument: index = 9");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_ARG_IDX_ERR_EID, CFE_EVS_ERROR,
+ "Set Table State error: invalid command argument: index = 9"),
+ "Set Table State error: invalid command argument: index = 9");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_SetTableStateCmd_Test_TableIndexOutOfRange */
void FM_SetTableStateCmd_Test_InvalidState(void)
{
- boolean Result;
- FM_SetTableStateCmd_t CmdPacket;
- FM_FreeSpaceTable_t FreeSpaceTable;
+ boolean Result;
+ FM_SetTableStateCmd_t CmdPacket;
+ FM_FreeSpaceTable_t FreeSpaceTable;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_SET_TABLE_STATE_CC);
CmdPacket.TableEntryIndex = 0;
@@ -845,25 +893,25 @@ void FM_SetTableStateCmd_Test_InvalidState(void)
/* Execute the function being tested */
Result = FM_SetTableStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_ARG_STATE_ERR_EID, CFE_EVS_ERROR, "Set Table State error: invalid command argument: state = 99"),
- "Set Table State error: invalid command argument: state = 99");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_ARG_STATE_ERR_EID, CFE_EVS_ERROR,
+ "Set Table State error: invalid command argument: state = 99"),
+ "Set Table State error: invalid command argument: state = 99");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_SetTableStateCmd_Test_InvalidState */
void FM_SetTableStateCmd_Test_UnusedTable(void)
{
- boolean Result;
- FM_SetTableStateCmd_t CmdPacket;
- FM_FreeSpaceTable_t FreeSpaceTable;
+ boolean Result;
+ FM_SetTableStateCmd_t CmdPacket;
+ FM_FreeSpaceTable_t FreeSpaceTable;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_SetTableStateCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_SET_TABLE_STATE_CC);
CmdPacket.TableEntryIndex = 0;
@@ -875,59 +923,57 @@ void FM_SetTableStateCmd_Test_UnusedTable(void)
/* Execute the function being tested */
Result = FM_SetTableStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_UNUSED_ERR_EID, CFE_EVS_ERROR, "Set Table State error: cannot modify unused table entry: index = 0"),
- "Set Table State error: cannot modify unused table entry: index = 0");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_SET_TABLE_STATE_UNUSED_ERR_EID, CFE_EVS_ERROR,
+ "Set Table State error: cannot modify unused table entry: index = 0"),
+ "Set Table State error: cannot modify unused table entry: index = 0");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_SetTableStateCmd_Test_UnusedTable */
-
void FM_SetPermissionsCmd_Test_Nominal(void)
{
- boolean Result = FALSE;
- FM_SetPermCmd_t CmdPacket;
+ boolean Result = FALSE;
+ FM_SetPermCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_SetPermCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_SetPermCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_SET_FILE_PERM_CC);
- strcpy( CmdPacket.FileName,"/tmp/name");
+ strcpy(CmdPacket.FileName, "/tmp/name");
CmdPacket.Mode = 0777;
-// Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, OS_SUCCESS, 1);
+ // Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, OS_SUCCESS, 1);
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_SetPermissionsCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == TRUE, "Result == TRUE");
+ UtAssert_True(Result == TRUE, "Result == TRUE");
} /* end FM_SetPermissionsCmd_Test_Nominal */
-
void FM_SetPermissionsCmd_Test_InvalidPathTest(void)
{
- boolean Result = TRUE;
- FM_SetPermCmd_t CmdPacket;
+ boolean Result = TRUE;
+ FM_SetPermCmd_t CmdPacket;
- CFE_SB_InitMsg (&CmdPacket, FM_CMD_MID, sizeof(FM_SetPermCmd_t), TRUE);
+ CFE_SB_InitMsg(&CmdPacket, FM_CMD_MID, sizeof(FM_SetPermCmd_t), TRUE);
CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)&CmdPacket, FM_SET_FILE_PERM_CC);
- strcpy( CmdPacket.FileName,"");
+ strcpy(CmdPacket.FileName, "");
CmdPacket.Mode = 0777;
Ut_OSFILEAPI_SetReturnCode(UT_OSFILEAPI_STAT_INDEX, -1, 1);
Ut_OSFILEAPI_SetFunctionHook(UT_OSFILEAPI_STAT_INDEX, &UT_FM_CMDS_TEST_CFE_OSFILEAPI_StatHookIsFile);
/* Execute the function being tested */
Result = FM_SetPermissionsCmd((CFE_SB_MsgPtr_t)(&CmdPacket));
-
+
/* Verify results */
- UtAssert_True (Result == FALSE, "Result == FALSE");
+ UtAssert_True(Result == FALSE, "Result == FALSE");
} /* end FM_SetPermissionsCmd_Test_DirTest */
@@ -936,32 +982,48 @@ void FM_Cmds_Test_AddTestCases(void)
UtTest_Add(FM_NoopCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_NoopCmd_Test");
UtTest_Add(FM_ResetCountersCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_ResetCountersCmd_Test");
UtTest_Add(FM_CopyFileCmd_Test_OverwriteZero, FM_Test_Setup, FM_Test_TearDown, "FM_CopyFileCmd_Test_OverwriteZero");
- UtTest_Add(FM_CopyFileCmd_Test_OverwriteNonzero, FM_Test_Setup, FM_Test_TearDown, "FM_CopyFileCmd_Test_OverwriteNonzero");
+ UtTest_Add(FM_CopyFileCmd_Test_OverwriteNonzero, FM_Test_Setup, FM_Test_TearDown,
+ "FM_CopyFileCmd_Test_OverwriteNonzero");
UtTest_Add(FM_MoveFileCmd_Test_OverwriteZero, FM_Test_Setup, FM_Test_TearDown, "FM_MoveFileCmd_Test_OverwriteZero");
- UtTest_Add(FM_MoveFileCmd_Test_OverwriteNonzero, FM_Test_Setup, FM_Test_TearDown, "FM_MoveFileCmd_Test_OverwriteNonzero");
- UtTest_Add(FM_RenameFileCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_RenameFileCmd_Test");
+ UtTest_Add(FM_MoveFileCmd_Test_OverwriteNonzero, FM_Test_Setup, FM_Test_TearDown,
+ "FM_MoveFileCmd_Test_OverwriteNonzero");
+ UtTest_Add(FM_RenameFileCmd_Test_OverwriteZero, FM_Test_Setup, FM_Test_TearDown,
+ "FM_RenameFileCmd_Test_OverwriteZero");
+ UtTest_Add(FM_RenameFileCmd_Test_OverwriteNonzero, FM_Test_Setup, FM_Test_TearDown,
+ "FM_RenameFileCmd_Test_OverwriteNonzero");
UtTest_Add(FM_DeleteFileCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_DeleteFileCmd_Test");
UtTest_Add(FM_DeleteAllFilesCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_DeleteAllFilesCmd_Test");
+#ifdef FM_INCLUDE_DECOMPRESS
UtTest_Add(FM_DecompressFileCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_DecompressFileCmd_Test");
+#endif
UtTest_Add(FM_ConcatFilesCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_ConcatFilesCmd_Test");
UtTest_Add(FM_GetFileInfoCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_GetFileInfoCmd_Test_Nominal");
- UtTest_Add(FM_GetFileInfoCmd_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown, "FM_GetFileInfoCmd_Test_InvalidFilename");
+ UtTest_Add(FM_GetFileInfoCmd_Test_InvalidFilename, FM_Test_Setup, FM_Test_TearDown,
+ "FM_GetFileInfoCmd_Test_InvalidFilename");
UtTest_Add(FM_GetOpenFilesCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_GetOpenFilesCmd_Test");
UtTest_Add(FM_CreateDirectoryCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_CreateDirectoryCmd_Test");
UtTest_Add(FM_DeleteDirectoryCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_DeleteDirectoryCmd_Test");
- UtTest_Add(FM_GetDirListFileCmd_Test_DefaultFilename, FM_Test_Setup, FM_Test_TearDown, "FM_GetDirListFileCmd_Test_DefaultFilename");
- UtTest_Add(FM_GetDirListFileCmd_Test_SpecifiedFilename, FM_Test_Setup, FM_Test_TearDown, "FM_GetDirListFileCmd_Test_SpecifiedFilename");
+ UtTest_Add(FM_GetDirListFileCmd_Test_DefaultFilename, FM_Test_Setup, FM_Test_TearDown,
+ "FM_GetDirListFileCmd_Test_DefaultFilename");
+ UtTest_Add(FM_GetDirListFileCmd_Test_SpecifiedFilename, FM_Test_Setup, FM_Test_TearDown,
+ "FM_GetDirListFileCmd_Test_SpecifiedFilename");
UtTest_Add(FM_GetDirListPktCmd_Test, FM_Test_Setup, FM_Test_TearDown, "FM_GetDirListPktCmd_Test");
UtTest_Add(FM_GetFreeSpaceCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_GetFreeSpaceCmd_Test_Nominal");
- UtTest_Add(FM_GetFreeSpaceCmd_Test_TableNotLoaded, FM_Test_Setup, FM_Test_TearDown, "FM_GetFreeSpaceCmd_Test_TableNotLoaded");
+ UtTest_Add(FM_GetFreeSpaceCmd_Test_TableNotLoaded, FM_Test_Setup, FM_Test_TearDown,
+ "FM_GetFreeSpaceCmd_Test_TableNotLoaded");
UtTest_Add(FM_SetTableStateCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_SetTableStateCmd_Test_Nominal");
- UtTest_Add(FM_SetTableStateCmd_Test_TableNotLoaded, FM_Test_Setup, FM_Test_TearDown, "FM_SetTableStateCmd_Test_TableNotLoaded");
- UtTest_Add(FM_SetTableStateCmd_Test_TableIndexOutOfRange, FM_Test_Setup, FM_Test_TearDown, "FM_SetTableStateCmd_Test_TableIndexOutOfRange");
- UtTest_Add(FM_SetTableStateCmd_Test_InvalidState, FM_Test_Setup, FM_Test_TearDown, "FM_SetTableStateCmd_Test_InvalidState");
- UtTest_Add(FM_SetTableStateCmd_Test_UnusedTable, FM_Test_Setup, FM_Test_TearDown, "FM_SetTableStateCmd_Test_UnusedTable");
-
+ UtTest_Add(FM_SetTableStateCmd_Test_TableNotLoaded, FM_Test_Setup, FM_Test_TearDown,
+ "FM_SetTableStateCmd_Test_TableNotLoaded");
+ UtTest_Add(FM_SetTableStateCmd_Test_TableIndexOutOfRange, FM_Test_Setup, FM_Test_TearDown,
+ "FM_SetTableStateCmd_Test_TableIndexOutOfRange");
+ UtTest_Add(FM_SetTableStateCmd_Test_InvalidState, FM_Test_Setup, FM_Test_TearDown,
+ "FM_SetTableStateCmd_Test_InvalidState");
+ UtTest_Add(FM_SetTableStateCmd_Test_UnusedTable, FM_Test_Setup, FM_Test_TearDown,
+ "FM_SetTableStateCmd_Test_UnusedTable");
+
UtTest_Add(FM_SetPermissionsCmd_Test_Nominal, FM_Test_Setup, FM_Test_TearDown, "FM_SetPermissionsCmd_Test_Nominal");
- UtTest_Add(FM_SetPermissionsCmd_Test_InvalidPathTest, FM_Test_Setup, FM_Test_TearDown, "FM_SetPermissionsCmd_Test_InvalidPathTest");
+ UtTest_Add(FM_SetPermissionsCmd_Test_InvalidPathTest, FM_Test_Setup, FM_Test_TearDown,
+ "FM_SetPermissionsCmd_Test_InvalidPathTest");
} /* end FM_Cmds_Test_AddTestCases */
/************************/
diff --git a/fsw/unit_test/fm_cmds_test.h b/fsw/unit_test/fm_cmds_test.h
index 19f86c5..f4d4284 100644
--- a/fsw/unit_test/fm_cmds_test.h
+++ b/fsw/unit_test/fm_cmds_test.h
@@ -6,22 +6,22 @@
* File Manager Application Version 2.5.3
*
* Copyright © 2020 United States Government as represented by the Administrator of
- * the National Aeronautics and Space Administration. All Rights Reserved.
+ * the National Aeronautics and Space Administration. All Rights Reserved.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
* Purpose: This file contains the function prototypes for the unit test cases for fm_cmds.c
- *
+ *
*/
/*
diff --git a/fsw/unit_test/fm_tbl.c.gcov b/fsw/unit_test/fm_tbl.c.gcov
deleted file mode 100644
index 7980974..0000000
--- a/fsw/unit_test/fm_tbl.c.gcov
+++ /dev/null
@@ -1,244 +0,0 @@
- -: 0:Source:../src/fm_tbl.c
- -: 0:Programs:5
- -: 1:/*
- -: 2:** $Id: fm_tbl.c.gcov 1.4.1.1 2017/01/25 00:20:21EST mdeschu Exp $
- -: 3:**
- -: 4:** Copyright (c) 2007-2014 United States Government as represented by the
- -: 5:** Administrator of the National Aeronautics and Space Administration.
- -: 6:** All Other Rights Reserved.
- -: 7:**
- -: 8:** This software was created at NASA's Goddard Space Flight Center.
- -: 9:** This software is governed by the NASA Open Source Agreement and may be
- -: 10:** used, distributed and modified only pursuant to the terms of that
- -: 11:** agreement.
- -: 12:**
- -: 13:** Title: File Manager (FM) Application Table Definitions
- -: 14:**
- -: 15:** Purpose: Provides functions for the initialization, validation, and
- -: 16:** management of the FM File System Free Space Table
- -: 17:**
- -: 18:** Author: Susanne L. Strege, Code 582 NASA GSFC
- -: 19:**
- -: 20:** Notes:
- -: 21:**
- -: 22:**
- -: 23:*/
- -: 24:
- -: 25:#include "cfe.h"
- -: 26:#include "fm_platform_cfg.h"
- -: 27:#include "fm_msg.h"
- -: 28:#include "fm_tbl.h"
- -: 29:#include "fm_events.h"
- -: 30:#include "cfs_utils.h"
- -: 31:
- -: 32:#include
- -: 33:
- -: 34:
- -: 35:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 36:/* */
- -: 37:/* FM table function -- startup initialization */
- -: 38:/* */
- -: 39:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 40:
- 5: 41:int32 FM_TableInit(void)
- -: 42:{
- -: 43: int32 Status;
- -: 44:
- -: 45: /* Initialize file system free space table pointer */
- 5: 46: FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *) NULL;
- -: 47:
- -: 48: /* Register the file system free space table - this must succeed! */
- 5: 49: Status = CFE_TBL_Register(&FM_GlobalData.FreeSpaceTableHandle,
- -: 50: FM_TABLE_CFE_NAME, sizeof(FM_FreeSpaceTable_t),
- -: 51: (CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_LOAD_DUMP),
- -: 52: (CFE_TBL_CallbackFuncPtr_t) FM_ValidateTable);
- -: 53:
- 5: 54: if (Status == CFE_SUCCESS)
- -: 55: {
- -: 56: /* Make an attempt to load the default table data - OK if this fails */
- 4: 57: CFE_TBL_Load(FM_GlobalData.FreeSpaceTableHandle,
- -: 58: CFE_TBL_SRC_FILE, FM_TABLE_DEF_NAME);
- -: 59:
- -: 60: /* Allow cFE a chance to dump, update, etc. */
- 4: 61: FM_AcquireTablePointers();
- -: 62: }
- -: 63:
- 5: 64: return(Status);
- -: 65:
- -: 66:} /* End FM_TableInit */
- -: 67:
- -: 68:
- -: 69:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 70:/* */
- -: 71:/* FM table function -- table data verification */
- -: 72:/* */
- -: 73:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 74:
- 6: 75:int32 FM_ValidateTable(void *TableData)
- -: 76:{
- 6: 77: FM_FreeSpaceTable_t *TablePtr = (FM_FreeSpaceTable_t *) TableData;
- 6: 78: int32 Result = CFE_SUCCESS;
- -: 79: int32 NameLength;
- -: 80: int32 i;
- -: 81:
- 6: 82: int32 CountGood = 0;
- 6: 83: int32 CountBad = 0;
- 6: 84: int32 CountUnused = 0;
- -: 85:
- -: 86: /*
- -: 87: ** Free space table data verification
- -: 88: **
- -: 89: ** -- table entries must be enabled or disabled or unused
- -: 90: **
- -: 91: ** -- enabled table entries may be disabled by command
- -: 92: ** -- disabled table entries may be enabled by command
- -: 93: ** -- unused table entries cannot be modified by command
- -: 94: **
- -: 95: ** -- enabled or disabled entries must have a valid file system name
- -: 96: **
- -: 97: ** -- file system name for unused entries is ignored
- -: 98: */
- 54: 99: for (i = 0; i < FM_TABLE_ENTRY_COUNT; i++)
- -: 100: {
- -: 101: /* Validate file system name if state is enabled or disabled */
- 98: 102: if ((TablePtr->FileSys[i].State == FM_TABLE_ENTRY_ENABLED) ||
- 44: 103: (TablePtr->FileSys[i].State == FM_TABLE_ENTRY_DISABLED))
- -: 104: {
- -: 105: /* Search file system name buffer for a string terminator */
- 95: 106: for (NameLength = 0; NameLength < OS_MAX_PATH_LEN; NameLength++)
- -: 107: {
- 94: 108: if (TablePtr->FileSys[i].Name[NameLength] == '\0')
- -: 109: {
- 5: 110: break;
- -: 111: }
- -: 112: }
- -: 113:
- 6: 114: if (NameLength == 0)
- -: 115: {
- -: 116: /* Error - must have a non-zero file system name length */
- 1: 117: CountBad++;
- -: 118:
- -: 119: /* Send event describing first error only*/
- 1: 120: if (CountBad == 1)
- -: 121: {
- 1: 122: CFE_EVS_SendEvent(FM_TABLE_VERIFY_ERR_EID, CFE_EVS_ERROR,
- -: 123: "Free Space Table verify error: index = %d, empty name string", (int)i);
- -: 124: }
- -: 125: }
- 5: 126: else if (NameLength == OS_MAX_PATH_LEN)
- -: 127: {
- -: 128: /* Error - file system name does not have a string terminator */
- 1: 129: CountBad++;
- -: 130:
- -: 131: /* Send event describing first error only*/
- 1: 132: if (CountBad == 1)
- -: 133: {
- 1: 134: CFE_EVS_SendEvent(FM_TABLE_VERIFY_ERR_EID, CFE_EVS_ERROR,
- -: 135: "Free Space Table verify error: index = %d, name too long", (int)i);
- -: 136: }
- -: 137: }
- 4: 138: else if (!CFS_IsValidFilename(TablePtr->FileSys[i].Name, NameLength))
- -: 139: {
- -: 140: /* Error - file system name has invalid characters */
- 2: 141: CountBad++;
- -: 142:
- -: 143: /* Send event describing first error only*/
- 2: 144: if (CountBad == 1)
- -: 145: {
- 1: 146: CFE_EVS_SendEvent(FM_TABLE_VERIFY_ERR_EID, CFE_EVS_ERROR,
- -: 147: "Free Space Table verify error: index = %d, invalid name = %s",
- -: 148: (int)i, TablePtr->FileSys[i].Name);
- -: 149: }
- -: 150: }
- -: 151: else
- -: 152: {
- -: 153: /* Maintain count of good in-use table entries */
- 2: 154: CountGood++;
- -: 155: }
- -: 156: }
- 42: 157: else if (TablePtr->FileSys[i].State == FM_TABLE_ENTRY_UNUSED)
- -: 158: {
- -: 159: /* Ignore (but count) unused table entries */
- 35: 160: CountUnused++;
- -: 161: }
- -: 162: else
- -: 163: {
- -: 164: /* Error - table entry state is invalid */
- 7: 165: CountBad++;
- -: 166:
- -: 167: /* Send event describing first error only*/
- 7: 168: if (CountBad == 1)
- -: 169: {
- 1: 170: CFE_EVS_SendEvent(FM_TABLE_VERIFY_ERR_EID, CFE_EVS_ERROR,
- -: 171: "Table verify error: index = %d, invalid state = %d",
- -: 172: (int)i, (int)TablePtr->FileSys[i].State);
- -: 173: }
- -: 174: }
- -: 175: }
- -: 176:
- -: 177: /* Display verify results */
- 6: 178: CFE_EVS_SendEvent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION,
- -: 179: "Free Space Table verify results: good entries = %d, bad = %d, unused = %d",
- -: 180: (int)CountGood, (int)CountBad, (int)CountUnused);
- -: 181:
- 6: 182: if (CountBad != 0)
- -: 183: {
- 4: 184: Result = FM_TABLE_VALIDATION_ERR;
- -: 185: }
- -: 186:
- 6: 187: return(Result);
- -: 188:
- -: 189:} /* End FM_ValidateTable */
- -: 190:
- -: 191:
- -: 192:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 193:/* */
- -: 194:/* FM table function -- acquire table data pointer */
- -: 195:/* */
- -: 196:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 197:
- 7: 198:void FM_AcquireTablePointers(void)
- -: 199:{
- -: 200: int32 Status;
- -: 201:
- -: 202: /* Allow cFE an opportunity to make table updates */
- 7: 203: CFE_TBL_Manage(FM_GlobalData.FreeSpaceTableHandle);
- -: 204:
- -: 205: /* Acquire pointer to file system free space table */
- 7: 206: Status = CFE_TBL_GetAddress((void *) &FM_GlobalData.FreeSpaceTablePtr,
- 7: 207: FM_GlobalData.FreeSpaceTableHandle);
- -: 208:
- 7: 209: if (Status == CFE_TBL_ERR_NEVER_LOADED)
- -: 210: {
- -: 211: /* Make sure we don't try to use the empty table buffer */
- 1: 212: FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *) NULL;
- -: 213: }
- -: 214:
- 7: 215: return;
- -: 216:
- -: 217:} /* End FM_AcquireTablePointers */
- -: 218:
- -: 219:
- -: 220:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 221:/* */
- -: 222:/* FM table function -- release table data pointer */
- -: 223:/* */
- -: 224:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- -: 225:
- 2: 226:void FM_ReleaseTablePointers(void)
- -: 227:{
- -: 228: /* Release pointer to file system free space table */
- 2: 229: CFE_TBL_ReleaseAddress(FM_GlobalData.FreeSpaceTableHandle);
- -: 230:
- -: 231: /* Prevent table pointer use while released */
- 2: 232: FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *) NULL;
- -: 233:
- 2: 234: return;
- -: 235:
- -: 236:} /* End FM_ReleaseTablePointers */
- -: 237:
- -: 238:
- -: 239:/************************/
- -: 240:/* End of File Comment */
- -: 241:/************************/
- -: 242:
diff --git a/fsw/unit_test/fm_tbl_test.c b/fsw/unit_test/fm_tbl_test.c
index f2a94e5..eb5528d 100644
--- a/fsw/unit_test/fm_tbl_test.c
+++ b/fsw/unit_test/fm_tbl_test.c
@@ -1,33 +1,33 @@
- /*************************************************************************
- ** Filename: fm_tbl_test.c
- **
- ** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
- ** File Manager Application Version 2.5.3
- **
- ** Copyright © 2020 United States Government as represented by the Administrator of
- ** the National Aeronautics and Space Administration. All Rights Reserved.
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- **
- ** You may obtain a copy of the License at
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- **
- ** Purpose:
- ** This file contains unit test cases for the functions contained in the file fm_tbl.c.
- **
- ** References:
- ** Flight Software Branch C Coding Standard Version 1.2
- ** CFS Development Standards Document
- ** Notes:
- **
- *************************************************************************/
+/*************************************************************************
+** Filename: fm_tbl_test.c
+**
+** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
+** File Manager Application Version 2.5.3
+**
+** Copyright © 2020 United States Government as represented by the Administrator of
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+**
+** Purpose:
+** This file contains unit test cases for the functions contained in the file fm_tbl.c.
+**
+** References:
+** Flight Software Branch C Coding Standard Version 1.2
+** CFS Development Standards Document
+** Notes:
+**
+*************************************************************************/
/*
* Includes
@@ -68,24 +68,24 @@ void FM_TableInit_Test(void)
/* Execute the function being tested */
Result = FM_TableInit();
-
+
/* Verify results */
- UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
+ UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_TableInit_Test */
void FM_ValidateTable_Test_NominalTableEntryEnabled(void)
{
- int32 Result;
+ int32 Result;
FM_FreeSpaceTable_t TableData;
- uint16 i;
- char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
- uint32 GoodEntries = 0;
- uint32 BadEntries = 0;
- uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
+ uint16 i;
+ char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
+ uint32 GoodEntries = 0;
+ uint32 BadEntries = 0;
+ uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
for (i = 0; i < FM_TABLE_ENTRY_COUNT; i++)
{
@@ -93,37 +93,36 @@ void FM_ValidateTable_Test_NominalTableEntryEnabled(void)
}
TableData.FileSys[0].State = FM_TABLE_ENTRY_ENABLED;
- GoodEntries = 1; /* Since one entry is assumed to be good, adjust the entry counts accordingly */
-
+ GoodEntries = 1; /* Since one entry is assumed to be good, adjust the entry counts accordingly */
+
UnusedEntries = UnusedEntries - GoodEntries - BadEntries;
- strncpy (TableData.FileSys[0].Name, "filename", OS_MAX_PATH_LEN);
+ strncpy(TableData.FileSys[0].Name, "filename", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_ValidateTable(&TableData);
-
+
/* Verify results */
- UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
+ UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
sprintf(ExpectedEventText, "Free Space Table verify results: good entries = %d, bad = %d, unused = %d",
(int)GoodEntries, (int)BadEntries, (int)UnusedEntries);
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ValidateTable_Test_NominalTableEntryEnabled */
void FM_ValidateTable_Test_NominalTableEntryDisabled(void)
{
- int32 Result;
+ int32 Result;
FM_FreeSpaceTable_t TableData;
- uint16 i;
- char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
- uint32 GoodEntries = 0;
- uint32 BadEntries = 0;
- uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
+ uint16 i;
+ char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
+ uint32 GoodEntries = 0;
+ uint32 BadEntries = 0;
+ uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
for (i = 0; i < FM_TABLE_ENTRY_COUNT; i++)
{
@@ -132,74 +131,72 @@ void FM_ValidateTable_Test_NominalTableEntryDisabled(void)
TableData.FileSys[0].State = FM_TABLE_ENTRY_DISABLED;
- GoodEntries = 1; /* Since one entry is assumed to be good, adjust the entry counts accordingly */
+ GoodEntries = 1; /* Since one entry is assumed to be good, adjust the entry counts accordingly */
UnusedEntries = UnusedEntries - GoodEntries - BadEntries;
- strncpy (TableData.FileSys[0].Name, "filename", OS_MAX_PATH_LEN);
+ strncpy(TableData.FileSys[0].Name, "filename", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_ValidateTable(&TableData);
-
+
/* Verify results */
- UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
+ UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
sprintf(ExpectedEventText, "Free Space Table verify results: good entries = %d, bad = %d, unused = %d",
(int)GoodEntries, (int)BadEntries, (int)UnusedEntries);
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1");
} /* end FM_ValidateTable_Test_NominalTableEntryDisabled */
void FM_ValidateTable_Test_InvalidState(void)
{
- int32 Result;
+ int32 Result;
FM_FreeSpaceTable_t TableData;
- char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
- uint32 GoodEntries = 0;
- uint32 BadEntries = 0;
- uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
-
+ char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
+ uint32 GoodEntries = 0;
+ uint32 BadEntries = 0;
+ uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
+
memset(&TableData, 0, sizeof(TableData));
TableData.FileSys[0].State = 99;
- BadEntries = FM_TABLE_ENTRY_COUNT; /* Setting all entries bad, adjust unused accordingly */
+ BadEntries = FM_TABLE_ENTRY_COUNT; /* Setting all entries bad, adjust unused accordingly */
UnusedEntries = UnusedEntries - GoodEntries - BadEntries;
/* Execute the function being tested */
Result = FM_ValidateTable(&TableData);
-
+
/* Verify results */
- UtAssert_True ((int32)Result == (int32)FM_TABLE_VALIDATION_ERR, "Result == FM_TABLE_VALIDATION_ERR");
+ UtAssert_True((int32)Result == (int32)FM_TABLE_VALIDATION_ERR, "Result == FM_TABLE_VALIDATION_ERR");
- /* Since index and state are explicitly set above, there is no dependency on external values,
+ /* Since index and state are explicitly set above, there is no dependency on external values,
and therefore no need for an sprintf for this test. */
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_BAD_STATE_ERR_EID, CFE_EVS_ERROR, "Table verify error: index = 0, invalid state = 99"),
- "Table verify error: index = 0, invalid state = 99");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_BAD_STATE_ERR_EID, CFE_EVS_ERROR,
+ "Table verify error: index = 0, invalid state = 99"),
+ "Table verify error: index = 0, invalid state = 99");
sprintf(ExpectedEventText, "Free Space Table verify results: good entries = %d, bad = %d, unused = %d",
(int)GoodEntries, (int)BadEntries, (int)UnusedEntries);
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ValidateTable_Test_InvalidState */
void FM_ValidateTable_Test_EmptyNameString(void)
{
- int32 Result;
+ int32 Result;
FM_FreeSpaceTable_t TableData;
- uint16 i;
- char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
- uint32 GoodEntries = 0;
- uint32 BadEntries = 0;
- uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
+ uint16 i;
+ char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
+ uint32 GoodEntries = 0;
+ uint32 BadEntries = 0;
+ uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
for (i = 0; i < FM_TABLE_ENTRY_COUNT; i++)
{
@@ -208,40 +205,39 @@ void FM_ValidateTable_Test_EmptyNameString(void)
TableData.FileSys[0].State = FM_TABLE_ENTRY_ENABLED;
- BadEntries = 1; /* Since one entry is assumed to be bad, adjust the entry counts accordingly */
+ BadEntries = 1; /* Since one entry is assumed to be bad, adjust the entry counts accordingly */
UnusedEntries = UnusedEntries - GoodEntries - BadEntries;
- strncpy (TableData.FileSys[0].Name, "", OS_MAX_PATH_LEN);
+ strncpy(TableData.FileSys[0].Name, "", OS_MAX_PATH_LEN);
/* Execute the function being tested */
Result = FM_ValidateTable(&TableData);
-
+
/* Verify results */
- UtAssert_True ((int32)Result == (int32)FM_TABLE_VALIDATION_ERR, "Result == FM_TABLE_VALIDATION_ERR");
+ UtAssert_True((int32)Result == (int32)FM_TABLE_VALIDATION_ERR, "Result == FM_TABLE_VALIDATION_ERR");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EMPTY_ERR_EID, CFE_EVS_ERROR, "Free Space Table verify error: index = 0, empty name string"),
- "Free Space Table verify error: index = 0, empty name string");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EMPTY_ERR_EID, CFE_EVS_ERROR,
+ "Free Space Table verify error: index = 0, empty name string"),
+ "Free Space Table verify error: index = 0, empty name string");
sprintf(ExpectedEventText, "Free Space Table verify results: good entries = %d, bad = %d, unused = %d",
(int)GoodEntries, (int)BadEntries, (int)UnusedEntries);
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ValidateTable_Test_EmptyNameString */
void FM_ValidateTable_Test_NameTooLong(void)
{
- int32 Result;
+ int32 Result;
FM_FreeSpaceTable_t TableData;
- uint16 i;
- char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
- uint32 GoodEntries = 0;
- uint32 BadEntries = 0;
- uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
+ uint16 i;
+ char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
+ uint32 GoodEntries = 0;
+ uint32 BadEntries = 0;
+ uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
for (i = 0; i < OS_MAX_PATH_LEN; i++)
{
@@ -257,38 +253,37 @@ void FM_ValidateTable_Test_NameTooLong(void)
TableData.FileSys[0].State = FM_TABLE_ENTRY_ENABLED;
- BadEntries = 1; /* Since one entry is assumed to be bad, adjust the entry counts accordingly */
+ BadEntries = 1; /* Since one entry is assumed to be bad, adjust the entry counts accordingly */
UnusedEntries = UnusedEntries - GoodEntries - BadEntries;
/* Execute the function being tested */
Result = FM_ValidateTable(&TableData);
-
+
/* Verify results */
- UtAssert_True ((int32)Result == (int32)FM_TABLE_VALIDATION_ERR, "Result == FM_TABLE_VALIDATION_ERR");
+ UtAssert_True((int32)Result == (int32)FM_TABLE_VALIDATION_ERR, "Result == FM_TABLE_VALIDATION_ERR");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_TOOLONG_ERR_EID, CFE_EVS_ERROR, "Free Space Table verify error: index = 0, name too long"),
- "Free Space Table verify error: index = 0, name too long");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_TOOLONG_ERR_EID, CFE_EVS_ERROR,
+ "Free Space Table verify error: index = 0, name too long"),
+ "Free Space Table verify error: index = 0, name too long");
sprintf(ExpectedEventText, "Free Space Table verify results: good entries = %d, bad = %d, unused = %d",
(int)GoodEntries, (int)BadEntries, (int)UnusedEntries);
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ValidateTable_Test_NameTooLong */
void FM_ValidateTable_Test_InvalidName(void)
{
- int32 Result;
+ int32 Result;
FM_FreeSpaceTable_t TableData;
- uint16 i;
- char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
- uint32 GoodEntries = 0;
- uint32 BadEntries = 0;
- uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
+ uint16 i;
+ char ExpectedEventText[CFE_EVS_MAX_MESSAGE_LENGTH];
+ uint32 GoodEntries = 0;
+ uint32 BadEntries = 0;
+ uint32 UnusedEntries = FM_TABLE_ENTRY_COUNT;
for (i = 0; i < FM_TABLE_ENTRY_COUNT; i++)
{
@@ -297,28 +292,27 @@ void FM_ValidateTable_Test_InvalidName(void)
TableData.FileSys[0].State = FM_TABLE_ENTRY_ENABLED;
- strncpy (TableData.FileSys[0].Name, "*12345", OS_MAX_PATH_LEN);
+ strncpy(TableData.FileSys[0].Name, "*12345", OS_MAX_PATH_LEN);
- BadEntries = 1; /* Since one entry is assumed to be bad, adjust the entry counts accordingly */
+ BadEntries = 1; /* Since one entry is assumed to be bad, adjust the entry counts accordingly */
UnusedEntries = UnusedEntries - GoodEntries - BadEntries;
/* Execute the function being tested */
Result = FM_ValidateTable(&TableData);
-
+
/* Verify results */
- UtAssert_True ((int32)Result == (int32)FM_TABLE_VALIDATION_ERR, "Result == FM_TABLE_VALIDATION_ERR");
+ UtAssert_True((int32)Result == (int32)FM_TABLE_VALIDATION_ERR, "Result == FM_TABLE_VALIDATION_ERR");
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_INVALID_ERR_EID, CFE_EVS_ERROR, "Free Space Table verify error: index = 0, invalid name = *12345"),
- "Free Space Table verify error: index = 0, invalid name = *12345");
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_INVALID_ERR_EID, CFE_EVS_ERROR,
+ "Free Space Table verify error: index = 0, invalid name = *12345"),
+ "Free Space Table verify error: index = 0, invalid name = *12345");
sprintf(ExpectedEventText, "Free Space Table verify results: good entries = %d, bad = %d, unused = %d",
(int)GoodEntries, (int)BadEntries, (int)UnusedEntries);
- UtAssert_True
- (Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
+ UtAssert_True(Ut_CFE_EVS_EventSent(FM_TABLE_VERIFY_EID, CFE_EVS_INFORMATION, ExpectedEventText), ExpectedEventText);
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2");
} /* end FM_ValidateTable_Test_InvalidName */
@@ -329,9 +323,9 @@ void FM_AcquireTablePointers_TestNeverLoaded(void)
/* Execute the function being tested */
FM_AcquireTablePointers();
-
+
/* Verify results */
- UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
+ UtAssert_True(Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0");
} /* end FM_AcquireTablePointers_TestNeverLoaded */
@@ -340,13 +334,18 @@ void FM_AcquireTablePointers_TestNeverLoaded(void)
void FM_Tbl_Test_AddTestCases(void)
{
UtTest_Add(FM_TableInit_Test, FM_Test_Setup, FM_Test_TearDown, "FM_TableInit_Test");
- UtTest_Add(FM_ValidateTable_Test_NominalTableEntryEnabled, FM_Test_Setup, FM_Test_TearDown, "FM_ValidateTable_Test_NominalTableEntryEnabled");
- UtTest_Add(FM_ValidateTable_Test_NominalTableEntryDisabled, FM_Test_Setup, FM_Test_TearDown, "FM_ValidateTable_Test_NominalTableEntryDisabled");
- UtTest_Add(FM_ValidateTable_Test_InvalidState, FM_Test_Setup, FM_Test_TearDown, "FM_ValidateTable_Test_InvalidState");
- UtTest_Add(FM_ValidateTable_Test_EmptyNameString, FM_Test_Setup, FM_Test_TearDown, "FM_ValidateTable_Test_EmptyNameString");
+ UtTest_Add(FM_ValidateTable_Test_NominalTableEntryEnabled, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ValidateTable_Test_NominalTableEntryEnabled");
+ UtTest_Add(FM_ValidateTable_Test_NominalTableEntryDisabled, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ValidateTable_Test_NominalTableEntryDisabled");
+ UtTest_Add(FM_ValidateTable_Test_InvalidState, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ValidateTable_Test_InvalidState");
+ UtTest_Add(FM_ValidateTable_Test_EmptyNameString, FM_Test_Setup, FM_Test_TearDown,
+ "FM_ValidateTable_Test_EmptyNameString");
UtTest_Add(FM_ValidateTable_Test_NameTooLong, FM_Test_Setup, FM_Test_TearDown, "FM_ValidateTable_Test_NameTooLong");
UtTest_Add(FM_ValidateTable_Test_InvalidName, FM_Test_Setup, FM_Test_TearDown, "FM_ValidateTable_Test_InvalidName");
- UtTest_Add(FM_AcquireTablePointers_TestNeverLoaded, FM_Test_Setup, FM_Test_TearDown, "FM_AcquireTablePointers_TestNeverLoaded");
+ UtTest_Add(FM_AcquireTablePointers_TestNeverLoaded, FM_Test_Setup, FM_Test_TearDown,
+ "FM_AcquireTablePointers_TestNeverLoaded");
} /* end FM_Tbl_Test_AddTestCases */
/************************/
diff --git a/fsw/unit_test/fm_tbl_test.h b/fsw/unit_test/fm_tbl_test.h
index 0c251e0..6355dd9 100644
--- a/fsw/unit_test/fm_tbl_test.h
+++ b/fsw/unit_test/fm_tbl_test.h
@@ -6,22 +6,22 @@
* File Manager Application Version 2.5.3
*
* Copyright © 2020 United States Government as represented by the Administrator of
- * the National Aeronautics and Space Administration. All Rights Reserved.
+ * the National Aeronautics and Space Administration. All Rights Reserved.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
* Purpose: This file contains the function prototypes for the unit test cases for fm_tbl.c
- *
+ *
*/
/*
diff --git a/fsw/unit_test/fm_test_utils.c b/fsw/unit_test/fm_test_utils.c
index 939af51..a588d3b 100644
--- a/fsw/unit_test/fm_test_utils.c
+++ b/fsw/unit_test/fm_test_utils.c
@@ -1,33 +1,33 @@
- /*************************************************************************
- ** Filename: fm_test_utils.c
- **
- ** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
- ** File Manager Application Version 2.5.3
- **
- ** Copyright © 2020 United States Government as represented by the Administrator of
- ** the National Aeronautics and Space Administration. All Rights Reserved.
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- **
- ** You may obtain a copy of the License at
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- **
- ** Purpose:
- ** This file contains unit test utilities for the FM application.
- **
- ** References:
- ** Flight Software Branch C Coding Standard Version 1.2
- ** CFS Development Standards Document
- ** Notes:
- **
- *************************************************************************/
+/*************************************************************************
+** Filename: fm_test_utils.c
+**
+** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
+** File Manager Application Version 2.5.3
+**
+** Copyright © 2020 United States Government as represented by the Administrator of
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+**
+** Purpose:
+** This file contains unit test utilities for the FM application.
+**
+** References:
+** Flight Software Branch C Coding Standard Version 1.2
+** CFS Development Standards Document
+** Notes:
+**
+*************************************************************************/
/*
* Includes
@@ -36,7 +36,7 @@
#include "fm_test_utils.h"
#include "fm_msg.h"
-extern FM_GlobalData_t FM_GlobalData;
+extern FM_GlobalData_t FM_GlobalData;
/*
* Function Definitions
@@ -47,7 +47,7 @@ void FM_Test_Setup(void)
/* initialize test environment to default state for every test */
CFE_PSP_MemSet(&FM_GlobalData, 0, sizeof(FM_GlobalData_t));
-
+
Ut_CFE_EVS_Reset();
Ut_CFE_FS_Reset();
Ut_CFE_TIME_Reset();
diff --git a/fsw/unit_test/fm_test_utils.h b/fsw/unit_test/fm_test_utils.h
index 72fa956..d71348c 100644
--- a/fsw/unit_test/fm_test_utils.h
+++ b/fsw/unit_test/fm_test_utils.h
@@ -1,40 +1,41 @@
- /*************************************************************************
- ** Filename: fm_test_utils.h
- **
- ** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
- ** File Manager Application Version 2.5.3
- **
- ** Copyright © 2020 United States Government as represented by the Administrator of
- ** the National Aeronautics and Space Administration. All Rights Reserved.
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- **
- ** You may obtain a copy of the License at
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- **
- ** Purpose:
- ** This file contains the function prototypes and global variables for the
- ** unit test utilities for the FM application.
- **
- ** References:
- ** Flight Software Branch C Coding Standard Version 1.2
- ** CFS Development Standards Document
- ** Notes:
- **
- *************************************************************************/
+/*************************************************************************
+** Filename: fm_test_utils.h
+**
+** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
+** File Manager Application Version 2.5.3
+**
+** Copyright © 2020 United States Government as represented by the Administrator of
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+**
+** Purpose:
+** This file contains the function prototypes and global variables for the
+** unit test utilities for the FM application.
+**
+** References:
+** Flight Software Branch C Coding Standard Version 1.2
+** CFS Development Standards Document
+** Notes:
+**
+*************************************************************************/
/*
* Includes
*/
#include "fm_app.h"
+#include "fm_platform_cfg.h"
#include "ut_cfe_evs_hooks.h"
#include "ut_cfe_time_stubs.h"
#include "ut_cfe_psp_memutils_stubs.h"
diff --git a/fsw/unit_test/fm_testrunner.c b/fsw/unit_test/fm_testrunner.c
index ff91919..02c6e09 100644
--- a/fsw/unit_test/fm_testrunner.c
+++ b/fsw/unit_test/fm_testrunner.c
@@ -1,33 +1,33 @@
- /*************************************************************************
- ** Filename: fm_testrunner.c
- **
- ** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
- ** File Manager Application Version 2.5.3
- **
- ** Copyright © 2020 United States Government as represented by the Administrator of
- ** the National Aeronautics and Space Administration. All Rights Reserved.
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- **
- ** You may obtain a copy of the License at
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- **
- ** Purpose:
- ** This file contains the unit test runner for the FM.
- **
- ** References:
- ** Flight Software Branch C Coding Standard Version 1.2
- ** CFS Development Standards Document
- ** Notes:
- **
- *************************************************************************/
+/*************************************************************************
+** Filename: fm_testrunner.c
+**
+** NASA Docket No. GSC-18,475-1, identified as “Core Flight Software System (CFS)
+** File Manager Application Version 2.5.3
+**
+** Copyright © 2020 United States Government as represented by the Administrator of
+** the National Aeronautics and Space Administration. All Rights Reserved.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+**
+** You may obtain a copy of the License at
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+**
+** Purpose:
+** This file contains the unit test runner for the FM.
+**
+** References:
+** Flight Software Branch C Coding Standard Version 1.2
+** CFS Development Standards Document
+** Notes:
+**
+*************************************************************************/
/*
* Includes
@@ -45,14 +45,14 @@
*/
int main(void)
-{
+{
FM_App_Test_AddTestCases();
FM_Child_Test_AddTestCases();
FM_Cmds_Test_AddTestCases();
FM_Tbl_Test_AddTestCases();
FM_Cmd_Utils_Test_AddTestCases();
- return(UtTest_Run());
+ return (UtTest_Run());
} /* end main */
/************************/
diff --git a/fsw/unit_test/fm_testrunner.gcno b/fsw/unit_test/fm_testrunner.gcno
new file mode 100644
index 0000000..e69de29
diff --git a/fsw/unit_test/makefile b/fsw/unit_test/makefile
index bbc783b..e27622f 100644
--- a/fsw/unit_test/makefile
+++ b/fsw/unit_test/makefile
@@ -39,6 +39,7 @@ FM_PATH=../../
#
INCLUDES := -I.
INCLUDES += -I$(UT_ASSERT_SRC)/inc
+INCLUDES += -I$(CFS_MISSION)/build/inc
INCLUDES += -I$(CFS_MISSION)/build/pc-linux/inc
INCLUDES += -I$(APP_DIR)/cfs_lib/fsw/public_inc
INCLUDES += -I$(CFE_DIR)/fsw/cfe-core/os/inc
diff --git a/test_and_ground/Results/FM2.5.3/.gitkeep b/test_and_ground/Results/FM2.5.3/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/test_and_ground/Results/FM2.5.3/DataFiles.zip b/test_and_ground/Results/FM2.5.3/DataFiles.zip
new file mode 100644
index 0000000..dc75148
Binary files /dev/null and b/test_and_ground/Results/FM2.5.3/DataFiles.zip differ
diff --git a/test_and_ground/Results/FM2.5.3/FM_V2_5_3_0_TestReport-Signed.docx b/test_and_ground/Results/FM2.5.3/FM_V2_5_3_0_TestReport-Signed.docx
new file mode 100644
index 0000000..49d67fe
Binary files /dev/null and b/test_and_ground/Results/FM2.5.3/FM_V2_5_3_0_TestReport-Signed.docx differ
diff --git a/test_and_ground/Results/FM2.5.3/LogFiles.zip b/test_and_ground/Results/FM2.5.3/LogFiles.zip
new file mode 100644
index 0000000..76b62c8
Binary files /dev/null and b/test_and_ground/Results/FM2.5.3/LogFiles.zip differ
diff --git a/test_and_ground/Results/FM2.5.3/RTTM.xlsx b/test_and_ground/Results/FM2.5.3/RTTM.xlsx
new file mode 100644
index 0000000..dad5718
Binary files /dev/null and b/test_and_ground/Results/FM2.5.3/RTTM.xlsx differ
diff --git a/test_and_ground/Results/FM2.5.3/TES.xlsx b/test_and_ground/Results/FM2.5.3/TES.xlsx
new file mode 100644
index 0000000..763427d
Binary files /dev/null and b/test_and_ground/Results/FM2.5.3/TES.xlsx differ
diff --git a/test_and_ground/Results/FM_V2_5_4_0_TestReport.pdf b/test_and_ground/Results/FM_V2_5_4_0_TestReport.pdf
new file mode 100644
index 0000000..e6b405e
Binary files /dev/null and b/test_and_ground/Results/FM_V2_5_4_0_TestReport.pdf differ
diff --git a/test_and_ground/Results/caelum/scx_cpu1_fm_filedecom_basic-2021-127-11h31m11s.log b/test_and_ground/Results/caelum/scx_cpu1_fm_filedecom_basic-2021-127-11h31m11s.log
new file mode 100644
index 0000000..131460b
--- /dev/null
+++ b/test_and_ground/Results/caelum/scx_cpu1_fm_filedecom_basic-2021-127-11h31m11s.log
@@ -0,0 +1,3375 @@
+21-127-11:31:11.532 00 GEVH-I:STS The old event log has been compressed
+21-127-11:31:11.532 00 GEVH-I:STS The new event log is now open.
+21-127-11:31:11.512 00 CMH-D:COMM Received from gs582cfslab4:GEVH (4): IDs= : SFDU =
+21-127-11:31:11.512 00 CMH-D:COMM Handling my I class sfdu (GEVH)
+21-127-11:31:11.512 00 GEVH-D:STS A request to clear the event log (COMPRESSED) has been made.
+21-127-11:31:11.512 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:31:11.512 00 GEVH-I:DBG Sending: CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:093
+21-127-11:31:11.512 00 CMH-D:DIR Received from gs582cfslab4:GEVH (4): LACC <>
+21-127-11:31:11.512 00 CMH-D:LRES Message accepted locally
+21-127-11:31:11.512 00 CMH-D:COMM Received from gs582cfslab4:GEVH (4): IDs= : SFDU =
+21-127-11:31:11.512 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:31:11.512 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:093" ;;; ( )
+21-127-11:31:11.512 00 CMH-D:DIR Received from gs582cfslab4:GEVH (4): EACC
+21-127-11:31:11.512 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:31:11.512 00 SPR-D:ERES Received end-to-end reponse(tag=93): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:093
+21-127-11:31:11.512 00 SPR-D:STS Command 93 was accepted.
+21-127-11:31:11.522 00 UT_RUNPROC/99
+21-127-11:31:11.522 00 UT_RUNPROC/100 ; Build the database prefix using SC and CPU definitions from cfe_utils.h
+21-127-11:31:11.522 00 UT_RUNPROC/101 local db_prefix, cpu_prefix
+21-127-11:31:11.522 00 UT_RUNPROC/102
+21-127-11:31:11.522 00 UT_RUNPROC/103 ; If SC is set, use it
+21-127-11:31:11.522 00 UT_RUNPROC/104 if (SC <> "") then
+21-127-11:31:11.523 00 UT_RUNPROC/105 db_prefix = SC
+21-127-11:31:11.523 00 UT_RUNPROC/106 endif
+21-127-11:31:11.523 00 UT_RUNPROC/107
+21-127-11:31:11.523 00 UT_RUNPROC/109 db_prefix = db_prefix & CPU_CFG
+21-127-11:31:11.523 00 UT_RUNPROC/110
+21-127-11:31:11.523 00 UT_RUNPROC/111 cpu_prefix = db_prefix
+21-127-11:31:11.523 00 UT_RUNPROC/112
+21-127-11:31:11.523 00 UT_RUNPROC/113 ; Set the database prefix for CPU1
+21-127-11:31:11.523 00 UT_RUNPROC/114 if (numCPUs > 1) then
+21-127-11:31:11.523 00 UT_RUNPROC/116 endif
+21-127-11:31:11.523 00 UT_RUNPROC/117
+21-127-11:31:11.523 00 UT_RUNPROC/118 ; setup the database mnemonics for CPU1
+21-127-11:31:11.532 00 UT_RUNPROC/119 local cksumItem = cpu_prefix & "_ES_CKSUM"
+21-127-11:31:11.532 00 UT_RUNPROC/120 local cfeMajorVerItem = cpu_prefix & "_ES_CFEMAJORVER"
+21-127-11:31:11.533 00 UT_RUNPROC/121 local cfeMinorVerItem = cpu_prefix & "_ES_CFEMINORVER"
+21-127-11:31:11.533 00 UT_RUNPROC/122 local cfeRevisionItem = cpu_prefix & "_ES_CFEREVISION"
+21-127-11:31:11.533 00 UT_RUNPROC/123 local cfeMissionRevItem = cpu_prefix & "_ES_CFEMSNREV"
+21-127-11:31:11.533 00 UT_RUNPROC/124 local osMajorVerItem = cpu_prefix & "_ES_OSMAJORVER"
+21-127-11:31:11.533 00 UT_RUNPROC/125 local osMinorVerItem = cpu_prefix & "_ES_OSMINORVER"
+21-127-11:31:11.533 00 UT_RUNPROC/126 local osRevisionItem = cpu_prefix & "_ES_OSREVISION"
+21-127-11:31:11.533 00 UT_RUNPROC/127 local osMissionRevItem = cpu_prefix & "_ES_OSMISSIONREV"
+21-127-11:31:11.533 00 UT_RUNPROC/128
+21-127-11:31:11.533 00 UT_RUNPROC/129 ;
+21-127-11:31:11.533 00 UT_RUNPROC/130 ; Output FSW configuration information
+21-127-11:31:11.533 00 UT_RUNPROC/131 ;
+21-127-11:31:11.533 00 UT_RUNPROC/132 write "****************** FSW Configuration ******************"
+21-127-11:31:11.533 00 SPR-I:OPRO ****************** FSW Configuration ******************
+21-127-11:31:11.533 00 UT_RUNPROC/134 if (numCPUs = 1) then
+21-127-11:31:11.533 00 UT_RUNPROC/135 write " Checksum: ", {cksumItem}
+21-127-11:31:11.533 00 SPR-I:OPRO Checksum: 12545
+21-127-11:31:11.533 00 UT_RUNPROC/136 write " cFE Version: ", {cfeMajorVerItem} & "." & {cfeMinorVerItem} & "." & {cfeRevisionItem} & "." & {cfeMissionRevItem}
+21-127-11:31:11.534 00 SPR-I:OPRO cFE Version: 6.7.99.0
+21-127-11:31:11.534 00 UT_RUNPROC/137 write " OS Version: ", {osMajorVerItem} & "." & {osMinorVerItem} & "." & {osRevisionItem} & "." & {osMissionRevItem}
+21-127-11:31:11.534 00 SPR-I:OPRO OS Version: 5.0.0.255
+21-127-11:31:11.534 00 UT_RUNPROC/138 write " "
+21-127-11:31:11.534 00 SPR-I:OPRO
+21-127-11:31:11.534 00 UT_RUNPROC/139 endif
+21-127-11:31:11.534 00 UT_RUNPROC/140
+21-127-11:31:11.534 00 UT_RUNPROC/141 if (numCPUs >= 2) then
+21-127-11:31:11.534 00 UT_RUNPROC/166 endif
+21-127-11:31:11.534 00 UT_RUNPROC/167
+21-127-11:31:11.538 00 UT_RUNPROC/168 ; This proc only supports up to 3 CPUs.
+21-127-11:31:11.538 00 UT_RUNPROC/169 ; If there are more than 3, the additional CPUs must be added below
+21-127-11:31:11.538 00 UT_RUNPROC/170 if (numCPUs = 3) then
+21-127-11:31:11.539 00 UT_RUNPROC/189 endif
+21-127-11:31:11.539 00 UT_RUNPROC/190
+21-127-11:31:11.539 00 UT_RUNPROC/191 write " Connection Status"
+21-127-11:31:11.539 00 SPR-I:OPRO Connection Status
+21-127-11:31:11.539 00 UT_RUNPROC/192 write " -----------------"
+21-127-11:31:11.539 00 SPR-I:OPRO -----------------
+21-127-11:31:11.539 00 UT_RUNPROC/193 write " CFDP: ", %select(packet_valid("my_entity_id"),"UP","DOWN")
+21-127-11:31:11.539 00 SPR-I:OPRO CFDP: DOWN
+21-127-11:31:11.539 00 UT_RUNPROC/194 write " UDP: ", p@GSE_ICHAN
+21-127-11:31:11.539 00 SPR-I:OPRO UDP: UP
+21-127-11:31:11.539 00 UT_RUNPROC/195 write " SWTS: ", p@GSE_SCHAN
+21-127-11:31:11.539 00 SPR-I:OPRO SWTS: UNK
+21-127-11:31:11.539 00 UT_RUNPROC/196 ; write " ITOS: ", p@GSE_ZCHAN
+21-127-11:31:11.539 00 UT_RUNPROC/197
+21-127-11:31:11.539 00 UT_RUNPROC/199 gds_label = ""
+21-127-11:31:11.539 00 UT_RUNPROC/200 gds_version = "N/A"
+21-127-11:31:11.539 00 UT_RUNPROC/201
+21-127-11:31:11.539 00 UT_RUNPROC/202 #ifdef GDS_EXISTS
+21-127-11:31:11.539 00 UT_RUNPROC/203 write " GDS: ", %select(packet_valid("GDS_EXECUTOR_SIMULATION_TIME"),"UP", "DOWN")
+21-127-11:31:11.539 00 UT_RUNPROC/204 if (GSE_HCHAN = 1) then
+21-127-11:31:11.539 00 UT_RUNPROC/205 gds_label = "GDS"
+21-127-11:31:11.539 00 UT_RUNPROC/206 gds_version = GDS_EXECUTOR_GDS_VERSION_VALUE
+21-127-11:31:11.540 00 UT_RUNPROC/207 endif
+21-127-11:31:11.540 00 UT_RUNPROC/208 #endif
+21-127-11:31:11.540 00 UT_RUNPROC/209
+21-127-11:31:11.540 00 UT_RUNPROC/211 write " CMD / TLM Path"
+21-127-11:31:11.540 00 SPR-I:OPRO
+21-127-11:31:11.540 00 UT_RUNPROC/211 write " CMD / TLM Path"
+21-127-11:31:11.540 00 SPR-I:OPRO CMD / TLM Path
+21-127-11:31:11.540 00 UT_RUNPROC/212 write " --------------"
+21-127-11:31:11.540 00 SPR-I:OPRO --------------
+21-127-11:31:11.540 00 UT_RUNPROC/213 if (GSE_ICHAN = 1) then
+21-127-11:31:11.540 00 UT_RUNPROC/214 cmd_tlm_path = "UDP"
+21-127-11:31:11.540 00 UT_RUNPROC/219 endif
+21-127-11:31:11.540 00 UT_RUNPROC/220
+21-127-11:31:11.540 00 UT_RUNPROC/221 write " ", cmd_tlm_path
+21-127-11:31:11.540 00 SPR-I:OPRO UDP
+21-127-11:31:11.540 00 UT_RUNPROC/222 write " ", gds_label
+21-127-11:31:11.540 00 SPR-I:OPRO
+21-127-11:31:11.540 00 UT_RUNPROC/224 write " ASIST / GDS Configuration"
+21-127-11:31:11.540 00 SPR-I:OPRO
+21-127-11:31:11.540 00 UT_RUNPROC/224 write " ASIST / GDS Configuration"
+21-127-11:31:11.540 00 SPR-I:OPRO ASIST / GDS Configuration
+21-127-11:31:11.540 00 UT_RUNPROC/225 write " -------------------------"
+21-127-11:31:11.540 00 SPR-I:OPRO -------------------------
+21-127-11:31:11.540 00 UT_RUNPROC/226 write " Workstation: ", %upper(%liv(LOCALHOST))
+21-127-11:31:11.540 00 SPR-I:OPRO Workstation: GS582CFSLAB4
+21-127-11:31:11.540 00 UT_RUNPROC/227 write " Account: ", %env("ACCOUNT")
+21-127-11:31:11.540 00 SPR-I:OPRO Account: cfs_test
+21-127-11:31:11.541 00 UT_RUNPROC/228 write " Version: ", ASIST_VERSION
+21-127-11:31:11.541 00 SPR-I:OPRO Version: 21.0.7
+21-127-11:31:11.541 00 UT_RUNPROC/229 write " Tlm DB: Version: ",vidtlm.version, " Date: ", tlmdbdate, " Time: ", vidtlm.timeof
+21-127-11:31:11.542 00 SPR-I:OPRO Tlm DB: Version: 1.975 Date: 05-07-21 Time: 06:34:55 AM.
+21-127-11:31:11.542 00 UT_RUNPROC/230 write " Cmd DB: Version: ",%rpad(command_parm_attr("verid_cmd", "version", "description"),4," ")," Date: ",cmddbdate," Time: ",command_parm_attr("verid_cmd", "timeof", "description")
+21-127-11:31:11.542 00 SPR-I:OPRO Cmd DB: Version: 1.50 Date: 04-05-21 Time: 10:39:20 AM.EDT
+21-127-11:31:11.542 00 UT_RUNPROC/231
+21-127-11:31:11.542 00 UT_RUNPROC/232 #ifdef GDS_EXISTS
+21-127-11:31:11.542 00 UT_RUNPROC/233 write " GDS: ", gds_version
+21-127-11:31:11.542 00 UT_RUNPROC/234 #endif
+21-127-11:31:11.542 00 UT_RUNPROC/235
+21-127-11:31:11.542 00 UT_RUNPROC/237 write " Telemetry Info"
+21-127-11:31:11.542 00 SPR-I:OPRO
+21-127-11:31:11.542 00 UT_RUNPROC/237 write " Telemetry Info"
+21-127-11:31:11.542 00 SPR-I:OPRO Telemetry Info
+21-127-11:31:11.542 00 UT_RUNPROC/238 write " --------------"
+21-127-11:31:11.542 00 SPR-I:OPRO --------------
+21-127-11:31:11.542 00 UT_RUNPROC/240 write " Pkt Loss Count: N/A"
+21-127-11:31:11.542 00 SPR-I:OPRO Pkt Loss Count: N/A
+21-127-11:31:11.542 00 UT_RUNPROC/241 write "**************** End FSW Configuration ***************"
+21-127-11:31:11.542 00 SPR-I:OPRO **************** End FSW Configuration ***************
+21-127-11:31:11.542 00 UT_RUNPROC/242 ;
+21-127-11:31:11.542 00 UT_RUNPROC/243 ; Start the procedure
+21-127-11:31:11.542 00 UT_RUNPROC/244 ;
+21-127-11:31:11.542 00 UT_RUNPROC/245 write "Starting Procedure.... ", proc_to_run
+21-127-11:31:11.542 00 SPR-I:OPRO Starting Procedure.... scx_cpu1_fm_filedecom_basic
+21-127-11:31:11.542 00 UT_RUNPROC/246 rstol_dir = "rstol 'start " & proc_to_run & "'"
+21-127-11:31:11.542 00 UT_RUNPROC/247 stime = %gmt
+21-127-11:31:11.542 00 UT_RUNPROC/248 native(rstol_dir)
+21-127-11:31:11.653 00 ????-D:???? Command "start scx_cpu1_fm_filedecom_basic" sent to STOL
+21-127-11:31:11.653 00 SPR-D:STS Sent native operating system command "rstol 'start scx_cpu1_fm_filedecom_basic'"
+21-127-11:31:11.663 00 SPR-I:OPRI --> start scx_cpu1_fm_filedecom_basic
+21-127-11:31:11.664 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/scx_cpu1_fm_filedecom_basic.i
+21-127-11:31:11.667 00 SPR-I:STS Procedure SCX_CPU1_FM_FILEDECOM_BASIC started
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/2 ;*******************************************************************************
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/3 ; Test Name: FM_FileDecom_Basic
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/4 ; Test Level: Build Verification
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/5 ; Test Type: Functional
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/6 ;
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/7 ; Test Description
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/8 ; The purpose of this test is to verify that the File Manager (FM) File
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/9 ; Decompress Command functions properly. The FM_FileDecompress and FM_FileInfo
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/10 ; commands will be tested to see if the FM application handles these as
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/11 ; desired by the requirements.
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/12 ;
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/13 ; Requirements Tested
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/14 ; FM1003 If FM accepts any command as valid, FM shall execute the
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/15 ; command, increment the FM Valid Command Counter and issue
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/16 ; an event message
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/17 ; FM1004 If FM rejects any command, FM shall abort the command
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/18 ; execution, increment the FM Command Rejected Counter and
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/19 ; issue an error event message
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/20 ; FM2009 Upon receipt of a Decompress command, FM shall decompress the
+21-127-11:31:11.667 00 SCX_CPU1_FM_FI/21 ; command-specified file to the command-specified file.
+21-127-11:31:11.668 00 SCX_CPU1_FM_FI/22 ; FM2009.1 If the command-specified destination file exists, FM shall
+21-127-11:31:11.668 00 SCX_CPU1_FM_FI/23 ; reject the command.
+21-127-11:31:11.669 00 SCX_CPU1_FM_FI/24 ; FM2011 Upon receipt of a File Info command, FM shall generate a message
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/25 ; containing the following for the command-specified file:
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/26 ; a) the file size,
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/27 ; b) last modification time,
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/28 ; c) file status (Open, Closed, or Nonexistent)
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/29 ; d) CRC
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/30 ; e) the file mode (permissions), as a 4-byte value
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/31 ; f) command-specified filename
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/32 ; FM4000 FM shall generate a housekeeping message containing the
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/33 ; following:
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/34 ; a) Valid Command Counter
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/35 ; b) Command Rejected Counter
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/36 ; c) For each file system: Total number of open files
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/37 ; FM5000 Upon initialization of the FM Application, FM shall initialize
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/38 ; the following data to Zero
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/39 ; a) Valid Command Counter
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/40 ; b) Command Rejected Counter
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/41 ;
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/42 ; Prerequisite Conditions
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/43 ; The cFE & FM are up and running and ready to accept commands.
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/44 ; The FM commands and TLM items exist in the GSE database.
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/45 ; The display pages for the FM Telemetry exist.
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/46 ;
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/47 ; Assumptions and Constraints
+21-127-11:31:11.670 00 SCX_CPU1_FM_FI/48 ; All compressed files have been compressed using the gzip utility on the
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/49 ; ground system.
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/50 ; The CRC is just generated, it is not verified.
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/51 ;
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/52 ; Change History
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/53 ; Date Name Description
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/54 ; 05/08/08 D. Stewart Original Procedure
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/55 ; 12/08/08 W. Moleski Added requirement 2009.1 and general cleanup
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/56 ; 01/27/10 W. Moleski Updating for FM 2.1.0.0
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/57 ; 02/28/11 W. Moleski Added variables for App name and ram directory
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/58 ; 01/06/15 W. Moleski Modified CMD_EID events from INFO to DEBUG
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/59 ; 01/19/17 W. Moleski Updated for FM 2.5.0.0 using CPU1 for commanding
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/60 ; and added a hostCPU variable for the utility
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/61 ; procs to connect to the proper host IP address.
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/62 ;
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/63 ; Arguments
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/64 ; None
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/65 ;
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/66 ; Procedures Called
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/67 ; Name Description
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/68 ;
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/69 ; Required Post-Test Analysis
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/70 ;**********************************************************************
+21-127-11:31:11.671 00 SCX_CPU1_FM_FI/71
+21-127-11:31:11.673 00 SCX_CPU1_FM_FI/72 local logging = %liv (log_procedure)
+21-127-11:31:11.673 00 SCX_CPU1_FM_FI/73 %liv (log_procedure) = FALSE
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/81
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/82 #define FM_1003 0
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/83 #define FM_1004 1
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/84 #define FM_2009 2
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/85 #define FM_20091 3
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/86 #define FM_2011 4
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/87 #define FM_4000 5
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/88 #define FM_5000 6
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/89
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/90 ;**********************************************************************
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/91 ; Define variables
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/92 ;**********************************************************************
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/93 ; GLOBAL Variables
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/94
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/95 global ut_req_array_size = 6
+21-127-11:31:11.706 00 SCX_CPU1_FM_FI/96 global ut_requirement[0 .. ut_req_array_size]
+21-127-11:31:11.707 00 SCX_CPU1_FM_FI/97
+21-127-11:31:11.707 00 SCX_CPU1_FM_FI/98 FOR i = 0 to ut_req_array_size DO
+21-127-11:31:11.707 00 SCX_CPU1_FM_FI/99 ut_requirement[i] = "U"
+21-127-11:31:11.707 00 SCX_CPU1_FM_FI/100 ENDDO
+21-127-11:31:11.707 00 SCX_CPU1_FM_FI/98 FOR i = 0 to ut_req_array_size DO
+21-127-11:31:11.707 00 SCX_CPU1_FM_FI/99 ut_requirement[i] = "U"
+21-127-11:31:11.707 00 SCX_CPU1_FM_FI/100 ENDDO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/98 FOR i = 0 to ut_req_array_size DO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/99 ut_requirement[i] = "U"
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/100 ENDDO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/98 FOR i = 0 to ut_req_array_size DO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/99 ut_requirement[i] = "U"
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/100 ENDDO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/98 FOR i = 0 to ut_req_array_size DO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/99 ut_requirement[i] = "U"
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/100 ENDDO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/98 FOR i = 0 to ut_req_array_size DO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/99 ut_requirement[i] = "U"
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/100 ENDDO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/98 FOR i = 0 to ut_req_array_size DO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/99 ut_requirement[i] = "U"
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/100 ENDDO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/98 FOR i = 0 to ut_req_array_size DO
+21-127-11:31:11.708 00 SCX_CPU1_FM_FI/101
+21-127-11:31:11.709 00 SCX_CPU1_FM_FI/102 ; LOCAL Variables
+21-127-11:31:11.709 00 SCX_CPU1_FM_FI/103
+21-127-11:31:11.709 00 SCX_CPU1_FM_FI/104 local cfe_requirements[0 .. ut_req_array_size] = ["FM_1003", "FM_1004", "FM_2009", "FM_2009.1", "FM_2011", "FM_4000", "FM_5000"]
+21-127-11:31:11.709 00 SCX_CPU1_FM_FI/105
+21-127-11:31:11.709 00 SCX_CPU1_FM_FI/106 local FMAppName = FM_APP_NAME
+21-127-11:31:11.709 00 SCX_CPU1_FM_FI/107 local ramDir = "/ram"
+21-127-11:31:11.711 00 SCX_CPU1_FM_FI/108 local ramDirPhys = "RAM:0"
+21-127-11:31:11.711 00 SCX_CPU1_FM_FI/109 local hostCPU = "CPU3"
+21-127-11:31:11.711 00 SCX_CPU1_FM_FI/110 local testDir1 = ramDir & "/FMTEST1"
+21-127-11:31:11.711 00 SCX_CPU1_FM_FI/111 local testDir2 = ramDir & "/FMTEST2"
+21-127-11:31:11.711 00 SCX_CPU1_FM_FI/112
+21-127-11:31:11.711 00 SCX_CPU1_FM_FI/113 local uploadDir = ramDirPhys & "/FMTEST1"
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/114
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/115 local testFileCompressed = "FMDECOMORIG.TST.gz"
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/116 local testFileUncompressed = "FMDECOM.TST"
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/117 local fullOriginalTestFileName = testDir1 & "/" & testFileCompressed
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/118 local fullTestFileUncompressed1 = testDir1 & "/" & testFileUncompressed
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/119 local fullTestFileUncompressed2 = testDir2 & "/" & testFileUncompressed
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/120
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/121 local fileSize1
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/122 local fileSize2
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/123
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/124 local cmdctr
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/125 local errcnt
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/126
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/127 write ";*********************************************************************"
+21-127-11:31:11.712 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:31:11.712 00 SCX_CPU1_FM_FI/128 write "; Step 1.0: Initialize the CPU for this test. "
+21-127-11:31:11.712 00 SPR-I:OPRO ; Step 1.0: Initialize the CPU for this test.
+21-127-11:31:11.713 00 SCX_CPU1_FM_FI/129 write ";*********************************************************************"
+21-127-11:31:11.713 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:31:11.713 00 SCX_CPU1_FM_FI/130 write "; Step 1.1: Command a Power-On Reset on CPU1. "
+21-127-11:31:11.713 00 SPR-I:OPRO ; Step 1.1: Command a Power-On Reset on CPU1.
+21-127-11:31:11.713 00 SCX_CPU1_FM_FI/131 write ";********************************************************************"
+21-127-11:31:11.713 00 SPR-I:OPRO ;********************************************************************
+21-127-11:31:11.713 00 SCX_CPU1_FM_FI/132 /SCX_CPU1_ES_POWERONRESET
+21-127-11:31:11.713 00 SPR-D:CMD Sending: CCSD3ZA0000100000109C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:094C7333IA0CPKT000000201806C000000302220002
+21-127-11:31:11.713 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:31:11.713 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:31:11.713 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:31:11.713 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:31:11.713 00 CMH-I:CMD Command is /SCX_CPU1_ES_POWERONRESET ;;; (SCX CPU1 ES Power-On Reset command code)
+21-127-11:31:11.713 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:31:11.713 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:31:11.713 00 CMH-I:CMD Command SFDU received:<1806C000000302220002> from gs582cfslab4:SPR
+21-127-11:31:11.713 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <1806C000000302220002>
+21-127-11:31:11.713 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:31:11.714 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:31:11.714 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:31:11.714 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:31:11.714 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:31:11.714 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:31:11.714 00 CMH-D:LRES Message accepted locally
+21-127-11:31:11.714 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:31:11.714 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:31:11.714 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:094" ;;; ( )
+21-127-11:31:11.714 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:31:11.714 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:31:11.714 00 SPR-D:ERES Received end-to-end reponse(tag=94): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:094
+21-127-11:31:11.714 00 SPR-D:STS Command 94 was accepted.
+21-127-11:31:11.714 00 SCX_CPU1_FM_FI/133 wait 10
+21-127-11:31:11.714 00 SPR-I:STTE Wait mode - waiting 10 seconds ...
+21-127-11:31:21.723 00 SCX_CPU1_FM_FI/134
+21-127-11:31:21.723 00 SCX_CPU1_FM_FI/135 close_data_center
+21-127-11:31:21.724 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/clear_spacecraft_status.i
+21-127-11:31:21.725 00 SPR-I:STS Procedure CLEAR_SPACECRAFT_STATUS started
+21-127-11:31:21.725 00 CLEAR_SPACECRA/2 ;
+21-127-11:31:21.725 00 CLEAR_SPACECRA/3 local logging = %liv(log_procedure)
+21-127-11:31:21.726 00 CLEAR_SPACECRA/4 %liv (log_procedure) = FALSE
+21-127-11:31:21.731 00 CLEAR_SPACECRA/135
+21-127-11:31:21.731 00 CLEAR_SPACECRA/136 endproc
+21-127-11:31:21.731 00 SPR-I:STS Procedure CLEAR_SPACECRAFT_STATUS completed
+21-127-11:31:21.748 00 SPR-D:STS Sent native operating system command "killall data_center"
+21-127-11:31:21.748 00 SCX_CPU1_FM_FI/136 wait 60
+21-127-11:31:21.749 00 SPR-I:STTE Wait mode - waiting 60 seconds ...
+21-127-11:31:21.752 00 TIO-W:STS Channel I disconnected. Retrying
+21-127-11:32:21.802 00 SCX_CPU1_FM_FI/137
+21-127-11:32:21.802 00 SCX_CPU1_FM_FI/138 cfe_startup {hostCPU}
+21-127-11:32:21.810 00 SPR-D:STS Sent native operating system command "echo .extern_ignore xterm -ls -T DATA_CENTER -e 'data_center -t 5001 -c 5002' > /home/cfs_test/.asist/log/gmsec_startup.imon"
+21-127-11:32:21.810 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:32:27.770 00 CMH-D:COMM Connected to host gs582cfslab4
+21-127-11:32:27.770 00 CMH-D:DBG Input Client #0 has gen_connected to FEDS_CLIENT.
+21-127-11:32:27.770 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:27.770 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:27.771 00 CMH-I:COMM Attached to upstream server #0-> FEDS:FEDS
+21-127-11:32:27.771 00 CMH-I:STS Connected to FEDS:FEDS for commanding (internal ID 0).
+21-127-11:32:27.771 00 CMH-D:COMM CMHQ #0 reconnection is <00>
+21-127-11:32:31.759 00 TIO-I:STS Connected to I channel as SFID 0.
+21-127-11:32:31.822 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:32:31.823 00 SPR-D:CMD Sending: CCSD3ZA0000100000126C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:095C7333IA0DDIR00000037open udp_read C%03X 1235 packet_only
+21-127-11:32:31.823 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:32:31.823 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:32:31.823 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:32:31.823 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:32:31.823 00 CMH-I:CMD SFDU is /DDIR DATA="open udp_read C%03X 1235 packet_only" ;;; ( )
+21-127-11:32:31.824 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:32:31.824 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:32:31.824 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DDIR
+21-127-11:32:31.824 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:32:31.824 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:32:31.824 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:31.825 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:31.825 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:32:31.825 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:32:31.825 00 CMH-D:LRES Message accepted locally
+21-127-11:32:31.826 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:31.826 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:32:31.826 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:095" ;;; ( )
+21-127-11:32:31.826 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:32:31.826 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:32:31.827 00 SPR-D:ERES Received end-to-end reponse(tag=95): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:095
+21-127-11:32:31.827 00 SPR-D:STS Command 95 was accepted.
+21-127-11:32:31.839 00 SPR-D:CMD Sending: CCSD3ZA0000100000129C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:096C7333IA0DDIR00000040open udp_write CPKT cpu3 1234 ascii_pkt
+21-127-11:32:31.839 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:32:31.839 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:32:31.839 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:32:31.839 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:32:31.840 00 CMH-I:CMD SFDU is /DDIR DATA="open udp_write CPKT cpu3 1234 ascii_pkt" ;;; ( )
+21-127-11:32:31.840 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:32:31.840 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:32:31.840 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DDIR
+21-127-11:32:31.840 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:32:31.840 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:32:31.840 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:31.840 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:31.841 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:32:31.841 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:32:31.841 00 CMH-D:LRES Message accepted locally
+21-127-11:32:31.880 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:31.880 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:32:31.880 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:096" ;;; ( )
+21-127-11:32:31.880 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:32:31.880 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:32:31.880 00 SPR-D:ERES Received end-to-end reponse(tag=96): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:096
+21-127-11:32:31.880 00 SPR-D:STS Command 96 was accepted.
+21-127-11:32:31.891 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/send_that_to_command.i
+21-127-11:32:31.891 00 SPR-I:STS Procedure SEND_THAT_TO_COMMAND started
+21-127-11:32:31.891 00 SEND_THAT_TO_C/2 ;
+21-127-11:32:31.891 00 SEND_THAT_TO_C/3 local logging = %liv (log_procedure)
+21-127-11:32:31.891 00 SEND_THAT_TO_C/4 %liv (log_procedure) = FALSE
+21-127-11:32:31.892 00 SPR-I:OPRO Sending: /SCX_CPU1_TO_OUTPUT_ENA gs582cfslab4
+21-127-11:32:31.892 00 SPR-D:CMD Sending: CCSD3ZA0000100000137C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:097C7333IA0CPKT000000481880C0000011069A3139322E3136382E312E313031000000
+21-127-11:32:31.892 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:32:31.892 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:32:31.892 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:32:31.892 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:32:31.893 00 CMH-I:CMD Command is /SCX_CPU1_TO_OUTPUT_ENA GS582CFSLAB4 ;;; (SCX CPU1 Enables TO output)
+21-127-11:32:31.893 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:32:31.893 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:32:31.893 00 CMH-I:CMD Command SFDU received:<1880C0000011069A3139322E3136382E312E313031000000> from gs582cfslab4:SPR
+21-127-11:32:31.893 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <1880C0000011069A3139322E3136382E312E313031000000>
+21-127-11:32:31.893 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:32:31.893 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:32:31.893 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:31.893 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:31.893 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:32:31.893 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:32:31.893 00 CMH-D:LRES Message accepted locally
+21-127-11:32:31.933 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:31.933 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:32:31.933 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:097" ;;; ( )
+21-127-11:32:31.933 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:32:31.934 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:32:31.934 00 SPR-D:ERES Received end-to-end reponse(tag=97): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:097
+21-127-11:32:31.934 00 SPR-D:STS Command 97 was accepted.
+21-127-11:32:31.944 00 SEND_THAT_TO_C/83
+21-127-11:32:31.944 00 SEND_THAT_TO_C/84 endproc
+21-127-11:32:31.944 00 SPR-I:STS Procedure SEND_THAT_TO_COMMAND completed
+21-127-11:32:31.945 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:32:33.260 00 TLMH-I:STS 58-012-14:03:49.383 INFO CPU=CPU1 APPNAME=TO_LAB_APP EVENT ID=3 TO telemetry output enabled for IP 192.168.1.101
+21-127-11:32:35.950 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:32:35.951 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/fill_in_spacecraft_status.i
+21-127-11:32:35.952 00 SPR-I:STS Procedure FILL_IN_SPACECRAFT_STATUS started
+21-127-11:32:35.953 00 FILL_IN_SPACEC/2 ;
+21-127-11:32:35.953 00 FILL_IN_SPACEC/3 local logging = %liv (log_procedure)
+21-127-11:32:35.953 00 FILL_IN_SPACEC/4 %liv (log_procedure) = FALSE
+21-127-11:32:35.957 00 FILL_IN_SPACEC/152
+21-127-11:32:35.957 00 FILL_IN_SPACEC/153 endproc
+21-127-11:32:35.957 00 SPR-I:STS Procedure FILL_IN_SPACECRAFT_STATUS completed
+21-127-11:32:35.958 00 SCX_CPU1_FM_FI/139 wait 5
+21-127-11:32:35.958 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:32:40.962 00 SCX_CPU1_FM_FI/140
+21-127-11:32:40.962 00 SCX_CPU1_FM_FI/141 write ";*********************************************************************"
+21-127-11:32:40.962 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:32:40.962 00 SCX_CPU1_FM_FI/142 write "; Step 1.2: Create the FreeSpace table load image, upload this image, "
+21-127-11:32:40.962 00 SPR-I:OPRO ; Step 1.2: Create the FreeSpace table load image, upload this image,
+21-127-11:32:40.963 00 SCX_CPU1_FM_FI/143 write "; and start the File Manager (FM) and Test (TST_FM) Applications. "
+21-127-11:32:40.963 00 SPR-I:OPRO ; and start the File Manager (FM) and Test (TST_FM) Applications.
+21-127-11:32:40.963 00 SCX_CPU1_FM_FI/144 write ";********************************************************************"
+21-127-11:32:40.963 00 SPR-I:OPRO ;********************************************************************
+21-127-11:32:40.963 00 SCX_CPU1_FM_FI/145 s scx_cpu1_fm_tableloadfile
+21-127-11:32:40.963 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/scx_cpu1_fm_tableloadfile.i
+21-127-11:32:40.969 00 SPR-I:STS Procedure SCX_CPU1_FM_TABLELOADFILE started
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/2 ;*******************************************************************************
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/3 ; Name: fm_tableloadfile
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/4 ;
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/5 ; Test Description
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/6 ; This procedure populates the CFS File Manager free space table and
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/7 ; generates a table load image for that table. This table image can be
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/8 ; loaded via the CFE_TBL_LOAD command.
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/9 ;
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/10 ; Change History
+21-127-11:32:40.970 00 SCX_CPU1_FM_TA/11 ; Date Name Description
+21-127-11:32:40.971 00 SCX_CPU1_FM_TA/12 ; 12/10/08 W. Moleski Original Procedure.
+21-127-11:32:40.971 00 SCX_CPU1_FM_TA/13 ; 02/01/10 W. Moleski Updated for FM 2.1.0.0
+21-127-11:32:40.971 00 SCX_CPU1_FM_TA/14 ; 03/01/11 W. Moleski Added variables for App name and ram directory
+21-127-11:32:40.971 00 SCX_CPU1_FM_TA/15 ; 01/19/17 W. Moleski Updated for FM 2.5.0.0 using CPU1 for commanding
+21-127-11:32:40.971 00 SCX_CPU1_FM_TA/16 ; and added a hostCPU variable for the utility
+21-127-11:32:40.971 00 SCX_CPU1_FM_TA/17 ; procs to connect to the proper host IP address.
+21-127-11:32:40.971 00 SCX_CPU1_FM_TA/18 ;
+21-127-11:32:40.972 00 SCX_CPU1_FM_TA/19 ; Arguments
+21-127-11:32:40.972 00 SCX_CPU1_FM_TA/20 ; None.
+21-127-11:32:40.972 00 SCX_CPU1_FM_TA/21 ;
+21-127-11:32:40.972 00 SCX_CPU1_FM_TA/22 ; Procedures Called
+21-127-11:32:40.972 00 SCX_CPU1_FM_TA/23 ; Name Description
+21-127-11:32:40.973 00 SCX_CPU1_FM_TA/24 ;**********************************************************************
+21-127-11:32:40.974 00 SCX_CPU1_FM_TA/25
+21-127-11:32:40.974 00 SCX_CPU1_FM_TA/26 local logging = %liv (log_procedure)
+21-127-11:32:40.974 00 SCX_CPU1_FM_TA/27 %liv (log_procedure) = FALSE
+21-127-11:32:41.072 00 SCX_CPU1_FM_TA/35
+21-127-11:32:41.072 00 SCX_CPU1_FM_TA/36 ;**********************************************************************
+21-127-11:32:41.072 00 SCX_CPU1_FM_TA/37 ; Define local variables
+21-127-11:32:41.072 00 SCX_CPU1_FM_TA/38 ;**********************************************************************
+21-127-11:32:41.072 00 SCX_CPU1_FM_TA/39 local FMAppName = FM_APP_NAME
+21-127-11:32:41.072 00 SCX_CPU1_FM_TA/40 local ramDir = "/ram"
+21-127-11:32:41.072 00 SCX_CPU1_FM_TA/41 local hostCPU = "CPU3"
+21-127-11:32:41.072 00 SCX_CPU1_FM_TA/42 local freeSpaceTblName = FMAppName & "." & FM_TABLE_CFE_NAME
+21-127-11:32:41.072 00 SCX_CPU1_FM_TA/43
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/44 LOCAL tblAppId, tblPktId
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/45
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/49 tblAppId = "0FBA"
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/50 tblPktId = 4026
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/51
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/52 write ";*********************************************************************"
+21-127-11:32:41.073 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/53 write "; Create & upload the Free Space Table file."
+21-127-11:32:41.073 00 SPR-I:OPRO ; Create & upload the Free Space Table file.
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/54 write ";********************************************************************"
+21-127-11:32:41.073 00 SPR-I:OPRO ;********************************************************************
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/56 SCX_CPU1_FM_FreeSpaceTBL[0].State = FM_TABLE_ENTRY_ENABLED
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/57 SCX_CPU1_FM_FreeSpaceTBL[0].Name = ramDir
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/58
+21-127-11:32:41.073 00 SCX_CPU1_FM_TA/59 SCX_CPU1_FM_FreeSpaceTBL[1].State = FM_TABLE_ENTRY_ENABLED
+21-127-11:32:41.074 00 SCX_CPU1_FM_TA/60 SCX_CPU1_FM_FreeSpaceTBL[1].Name = "/cf"
+21-127-11:32:41.074 00 SCX_CPU1_FM_TA/61
+21-127-11:32:41.074 00 SCX_CPU1_FM_TA/62 for i = 2 to FM_TABLE_ENTRY_COUNT-1 do
+21-127-11:32:41.074 00 SCX_CPU1_FM_TA/63 SCX_CPU1_FM_FreeSpaceTBL[i].State = FM_TABLE_ENTRY_UNUSED
+21-127-11:32:41.074 00 SCX_CPU1_FM_TA/64 SCX_CPU1_FM_FreeSpaceTBL[i].Name = ""
+21-127-11:32:41.074 00 SCX_CPU1_FM_TA/65 enddo
+21-127-11:32:41.074 00 SCX_CPU1_FM_TA/62 for i = 2 to FM_TABLE_ENTRY_COUNT-1 do
+21-127-11:32:41.075 00 SCX_CPU1_FM_TA/63 SCX_CPU1_FM_FreeSpaceTBL[i].State = FM_TABLE_ENTRY_UNUSED
+21-127-11:32:41.075 00 SCX_CPU1_FM_TA/64 SCX_CPU1_FM_FreeSpaceTBL[i].Name = ""
+21-127-11:32:41.075 00 SCX_CPU1_FM_TA/65 enddo
+21-127-11:32:41.075 00 SCX_CPU1_FM_TA/62 for i = 2 to FM_TABLE_ENTRY_COUNT-1 do
+21-127-11:32:41.075 00 SCX_CPU1_FM_TA/63 SCX_CPU1_FM_FreeSpaceTBL[i].State = FM_TABLE_ENTRY_UNUSED
+21-127-11:32:41.075 00 SCX_CPU1_FM_TA/64 SCX_CPU1_FM_FreeSpaceTBL[i].Name = ""
+21-127-11:32:41.076 00 SCX_CPU1_FM_TA/65 enddo
+21-127-11:32:41.076 00 SCX_CPU1_FM_TA/62 for i = 2 to FM_TABLE_ENTRY_COUNT-1 do
+21-127-11:32:41.076 00 SCX_CPU1_FM_TA/63 SCX_CPU1_FM_FreeSpaceTBL[i].State = FM_TABLE_ENTRY_UNUSED
+21-127-11:32:41.076 00 SCX_CPU1_FM_TA/64 SCX_CPU1_FM_FreeSpaceTBL[i].Name = ""
+21-127-11:32:41.076 00 SCX_CPU1_FM_TA/65 enddo
+21-127-11:32:41.076 00 SCX_CPU1_FM_TA/62 for i = 2 to FM_TABLE_ENTRY_COUNT-1 do
+21-127-11:32:41.076 00 SCX_CPU1_FM_TA/63 SCX_CPU1_FM_FreeSpaceTBL[i].State = FM_TABLE_ENTRY_UNUSED
+21-127-11:32:41.077 00 SCX_CPU1_FM_TA/64 SCX_CPU1_FM_FreeSpaceTBL[i].Name = ""
+21-127-11:32:41.077 00 SCX_CPU1_FM_TA/65 enddo
+21-127-11:32:41.077 00 SCX_CPU1_FM_TA/62 for i = 2 to FM_TABLE_ENTRY_COUNT-1 do
+21-127-11:32:41.077 00 SCX_CPU1_FM_TA/63 SCX_CPU1_FM_FreeSpaceTBL[i].State = FM_TABLE_ENTRY_UNUSED
+21-127-11:32:41.077 00 SCX_CPU1_FM_TA/64 SCX_CPU1_FM_FreeSpaceTBL[i].Name = ""
+21-127-11:32:41.077 00 SCX_CPU1_FM_TA/65 enddo
+21-127-11:32:41.078 00 SCX_CPU1_FM_TA/62 for i = 2 to FM_TABLE_ENTRY_COUNT-1 do
+21-127-11:32:41.078 00 SCX_CPU1_FM_TA/66
+21-127-11:32:41.078 00 SCX_CPU1_FM_TA/67 local maxIndex = FM_TABLE_ENTRY_COUNT-1
+21-127-11:32:41.078 00 SCX_CPU1_FM_TA/68 local endmnemonic = "SCX_CPU1_FM_FreeSpaceTBL[" & maxIndex & "]"
+21-127-11:32:41.078 00 SCX_CPU1_FM_TA/69
+21-127-11:32:41.078 00 SCX_CPU1_FM_TA/71 s create_tbl_file_from_cvt (hostCPU,tblAppId,"FM FreeSpace Table Load 1","cpu1_fmdevtbl_ld_1",freeSpaceTblName,"SCX_CPU1_FM_FreeSpaceTBL[0].State",endmnemonic)
+21-127-11:32:41.078 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/create_tbl_file_from_cvt.i
+21-127-11:32:41.079 00 SPR-I:STS Procedure CREATE_TBL_FILE_FROM_CVT started
+21-127-11:32:41.079 00 CREATE_TBL_FIL/2 ;
+21-127-11:32:41.079 00 CREATE_TBL_FIL/3 local logging = %liv(log_procedure)
+21-127-11:32:41.079 00 CREATE_TBL_FIL/4 %liv (log_procedure) = FALSE
+21-127-11:32:41.082 00 SPR-I:OPRO ********** cpu1_fmdevtbl_ld_1 **********
+21-127-11:32:41.082 00 SPR-I:OPRO
+21-127-11:32:41.082 00 SPR-I:OPRO Content Type: cFE1
+21-127-11:32:41.082 00 SPR-I:OPRO Sub Type: 8
+21-127-11:32:41.082 00 SPR-I:OPRO Length: 12
+21-127-11:32:41.082 00 SPR-I:OPRO Spacecraft Id: SCX
+21-127-11:32:41.082 00 SPR-I:OPRO Processor Id: CPU3
+21-127-11:32:41.082 00 SPR-I:OPRO Application Id: 0
+21-127-11:32:41.083 00 SPR-I:OPRO Create Time Secs: 1620387161
+21-127-11:32:41.083 00 SPR-I:OPRO Create Time Subsecs: 0
+21-127-11:32:41.083 00 SPR-I:OPRO File Description: FM FreeSpace Table Load 1
+21-127-11:32:41.083 00 SPR-I:OPRO
+21-127-11:32:41.083 00 SPR-I:OPRO ********** FM.FreeSpace **********
+21-127-11:32:41.083 00 SPR-I:OPRO
+21-127-11:32:41.083 00 SPR-I:OPRO Start Mnemonic: SCX_CPU1_FM_FreeSpaceTBL[0].State
+21-127-11:32:41.083 00 SPR-I:OPRO Byte Offset: 0
+21-127-11:32:41.083 00 SPR-I:OPRO End Mnemonic: SCX_CPU1_FM_FreeSpaceTBL[7]
+21-127-11:32:41.083 00 SPR-I:OPRO Number of Bytes: 544
+21-127-11:32:41.083 00 SPR-I:OPRO
+21-127-11:32:41.091 00 SPR-D:STS Sent native operating system command "cd /s/opr/accounts/cfs_test/image;cvt2file P0EFE cpu1_fmdevtbl_ld_1.tmp"
+21-127-11:32:41.091 00 SPR-I:STS Loading file /s/opr/accounts/global/prc/partial_cvt_to_file_beta.i
+21-127-11:32:41.091 00 SPR-I:STS Procedure PARTIAL_CVT_TO_FILE_BETA started
+21-127-11:32:41.092 00 SPR-I:OPRO The unix command is cd /s/opr/accounts/cfs_test/image;cvt2file -s 116 -e 659 P0FBA fm.freespace
+21-127-11:32:41.097 00 SPR-D:STS Sent native operating system command "cd /s/opr/accounts/cfs_test/image;cvt2file -s 116 -e 659 P0FBA fm.freespace"
+21-127-11:32:41.097 00 SPR-I:STS Procedure PARTIAL_CVT_TO_FILE_BETA completed
+21-127-11:32:41.097 00 SPR-I:OPRO cd /s/opr/accounts/cfs_test/image;cat cpu1_fmdevtbl_ld_1.tmp fm.freespace > cpu1_fmdevtbl_ld_1
+21-127-11:32:41.103 00 SPR-D:STS Sent native operating system command "cd /s/opr/accounts/cfs_test/image;cat cpu1_fmdevtbl_ld_1.tmp fm.freespace > cpu1_fmdevtbl_ld_1"
+21-127-11:32:41.103 00 SPR-I:OPRO cd /s/opr/accounts/cfs_test/image;rm fm.freespace cpu1_fmdevtbl_ld_1.tmp
+21-127-11:32:41.106 00 SPR-D:STS Sent native operating system command "cd /s/opr/accounts/cfs_test/image;rm fm.freespace cpu1_fmdevtbl_ld_1.tmp"
+21-127-11:32:41.107 00 CREATE_TBL_FIL/128
+21-127-11:32:41.107 00 CREATE_TBL_FIL/129 ENDPROC
+21-127-11:32:41.107 00 SPR-I:STS Procedure CREATE_TBL_FILE_FROM_CVT completed
+21-127-11:32:41.107 00 SCX_CPU1_FM_TA/72
+21-127-11:32:41.107 00 SCX_CPU1_FM_TA/73 ENDPROC
+21-127-11:32:41.107 00 SPR-I:STS Procedure SCX_CPU1_FM_TABLELOADFILE completed
+21-127-11:32:41.107 00 SCX_CPU1_FM_FI/146 wait 5
+21-127-11:32:41.107 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:32:46.112 00 SCX_CPU1_FM_FI/147
+21-127-11:32:46.112 00 SCX_CPU1_FM_FI/148 s ftp_file ("CF:0", "cpu1_fmdevtbl_ld_1", FM_TABLE_FILENAME, hostCPU, "P")
+21-127-11:32:46.113 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/ftp_file.i
+21-127-11:32:46.114 00 SPR-I:STS Procedure FTP_FILE started
+21-127-11:32:46.114 00 FTP_FILE/2 ;
+21-127-11:32:46.114 00 FTP_FILE/3 local logging = %liv (log_procedure)
+21-127-11:32:46.114 00 FTP_FILE/4 %liv (log_procedure) = FALSE
+21-127-11:32:46.385 00 SPR-D:STS Sent native operating system command "perl /s/opr/accounts/global/tools/ftp_file.pl CF:0 cpu1_fmdevtbl_ld_1 fm_freespace.tbl binary 192.168.1.8 P"
+21-127-11:32:46.385 00 SPR-I:OPRO Return code from ftp_file.pl: 0
+21-127-11:32:46.386 00 FTP_FILE/85 ENDPROC
+21-127-11:32:46.386 00 SPR-I:STS Procedure FTP_FILE completed
+21-127-11:32:46.387 00 SCX_CPU1_FM_FI/149 wait 5
+21-127-11:32:46.387 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:32:51.392 00 SCX_CPU1_FM_FI/150
+21-127-11:32:51.392 00 SCX_CPU1_FM_FI/151 s scx_cpu1_fm_startfmapps
+21-127-11:32:51.392 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/scx_cpu1_fm_startfmapps.i
+21-127-11:32:51.399 00 SPR-I:STS Procedure SCX_CPU1_FM_STARTFMAPPS started
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/2 ;*******************************************************************************
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/3 ; Proc Name: FM_StartFMApps
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/4 ; Test Level: none
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/5 ;
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/6 ; Proc Description
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/7 ; The purpose of this procedure is to start the FM and TST_FM apps
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/8 ; and add any telemetry subscriptions so that commands can be sent from
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/9 ; the command line and telemetry seen outside of testing procedures
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/10 ; The pages for all telemetry subscriptions are also opened
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/11 ;
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/12 ; Tlm Subscriptions: FM HK
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/13 ; FM File Info
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/14 ; FM Dir List to Tlm
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/15 ; FM Open File List
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/16 ; FM Free Space Packet
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/17 ; TST_FM HK
+21-127-11:32:51.399 00 SCX_CPU1_FM_ST/18 ;
+21-127-11:32:51.400 00 SCX_CPU1_FM_ST/19 ; Pages Opened: FM HK Page
+21-127-11:32:51.400 00 SCX_CPU1_FM_ST/20 ; FM File Info Page
+21-127-11:32:51.400 00 SCX_CPU1_FM_ST/21 ; FM Dir List Tlm Page
+21-127-11:32:51.400 00 SCX_CPU1_FM_ST/22 ; FM Dir List File Page
+21-127-11:32:51.400 00 SCX_CPU1_FM_ST/23 ; FM Open File List Page
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/24 ; FM Free Space Table Page
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/25 ; FM Free Space Tlm Page
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/26 ; TST FM HK Page
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/27 ;
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/28 ; Change History
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/29 ; Date Name Description
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/30 ; 05/01/08 D. Stewart Original Procedure
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/31 ; 08/08/08 D. Stewart Modified to be used by all fm testing procedures
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/32 ; 01/13/10 W. Moleski Added code to turn logging off around the
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/33 ; includes and added the FM Free Space Telemetry
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/34 ; packet subscription
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/35 ; 03/01/11 W. Moleski Added variables for App name
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/36 ; 01/07/15 W. Moleski Updated this proc to determine if the apps are
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/37 ; executing and only start them if they are not.
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/38 ; Also, the Child Task Priority setting is checked
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/39 ; to make sure it is lower than the priority of
+21-127-11:32:51.401 00 SCX_CPU1_FM_ST/40 ; the FM app.
+21-127-11:32:51.402 00 SCX_CPU1_FM_ST/41 ; 01/18/17 W. Moleski Updated for FM 2.5.0.0 using CPU1 for commanding
+21-127-11:32:51.402 00 SCX_CPU1_FM_ST/42 ; and added a hostCPU variable for the utility
+21-127-11:32:51.402 00 SCX_CPU1_FM_ST/43 ; procs to connect to the proper host IP address.
+21-127-11:32:51.402 00 SCX_CPU1_FM_ST/44 ;
+21-127-11:32:51.402 00 SCX_CPU1_FM_ST/45 ; Arguments
+21-127-11:32:51.402 00 SCX_CPU1_FM_ST/46 ; None
+21-127-11:32:51.402 00 SCX_CPU1_FM_ST/47 ;**********************************************************************
+21-127-11:32:51.404 00 SCX_CPU1_FM_ST/48
+21-127-11:32:51.405 00 SCX_CPU1_FM_ST/50 local logging = %liv (log_procedure)
+21-127-11:32:51.405 00 SCX_CPU1_FM_ST/51 %liv (log_procedure) = FALSE
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/62
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/63 ;**********************************************************************
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/64 ; Define variables
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/65 ;**********************************************************************
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/66 ; LOCAL Variables
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/67 local stream1, stream2, stream3, stream4, stream5
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/68
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/69 local found_app1, found_app2
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/70 local FMAppName = FM_APP_NAME
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/71 local ramDir = "RAM:0"
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/72 local hostCPU = "CPU3"
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/74 local fm_task_priority = 200
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/75
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/76 write ";*********************************************************************"
+21-127-11:32:51.482 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/77 write "; Display all FM and TST_FM pages"
+21-127-11:32:51.482 00 SPR-I:OPRO ; Display all FM and TST_FM pages
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/78 write ";*********************************************************************"
+21-127-11:32:51.482 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/79 write "Opening FM HK Page."
+21-127-11:32:51.482 00 SPR-I:OPRO Opening FM HK Page.
+21-127-11:32:51.482 00 SCX_CPU1_FM_ST/80 page SCX_CPU1_FM_HK
+21-127-11:32:51.583 00 DPD-I:STS Page SCX_CPU1_FM_HK added (cid:1).
+21-127-11:32:51.586 00 SPR-D:STS Sent native operating system command "evt_client -c "aw SCX_CPU1_FM_HK""
+21-127-11:32:51.587 00 SCX_CPU1_FM_ST/81
+21-127-11:32:51.587 00 SCX_CPU1_FM_ST/82 write "Opening FM File Info Page."
+21-127-11:32:51.587 00 SPR-I:OPRO Opening FM File Info Page.
+21-127-11:32:51.587 00 SCX_CPU1_FM_ST/83 page SCX_CPU1_FM_FILE_INFO
+21-127-11:32:51.652 00 DPD-I:STS Page SCX_CPU1_FM_FILE_INFO added (cid:1).
+21-127-11:32:51.656 00 SPR-D:STS Sent native operating system command "evt_client -c "aw SCX_CPU1_FM_FILE_INFO""
+21-127-11:32:51.656 00 SCX_CPU1_FM_ST/84
+21-127-11:32:51.656 00 SCX_CPU1_FM_ST/85 write "Opening FM Dir List File Page."
+21-127-11:32:51.656 00 SPR-I:OPRO Opening FM Dir List File Page.
+21-127-11:32:51.656 00 SCX_CPU1_FM_ST/86 page SCX_CPU1_FM_DIR_LIST_FILE
+21-127-11:32:51.711 00 SFDU-D:STS Received connection from gs582cfslab4
+21-127-11:32:51.738 00 DPD-I:STS Page SCX_CPU1_FM_DIR_LIST_FILE added (cid:1).
+21-127-11:32:51.741 00 SPR-D:STS Sent native operating system command "evt_client -c "aw SCX_CPU1_FM_DIR_LIST_FILE""
+21-127-11:32:51.742 00 SCX_CPU1_FM_ST/87
+21-127-11:32:51.742 00 SCX_CPU1_FM_ST/88 write "Opening FM Dir List Tlm Page."
+21-127-11:32:51.742 00 SPR-I:OPRO Opening FM Dir List Tlm Page.
+21-127-11:32:51.742 00 SCX_CPU1_FM_ST/89 page SCX_CPU1_FM_DIR_LIST
+21-127-11:32:51.833 00 DPD-I:STS Page SCX_CPU1_FM_DIR_LIST added (cid:1).
+21-127-11:32:51.837 00 SPR-D:STS Sent native operating system command "evt_client -c "aw SCX_CPU1_FM_DIR_LIST""
+21-127-11:32:51.837 00 SCX_CPU1_FM_ST/90
+21-127-11:32:51.837 00 SCX_CPU1_FM_ST/91 write "Opening FM Open File List Page."
+21-127-11:32:51.837 00 SPR-I:OPRO Opening FM Open File List Page.
+21-127-11:32:51.837 00 SCX_CPU1_FM_ST/92 page SCX_CPU1_FM_OPEN_FILE_LIST
+21-127-11:32:51.880 00 SFDU-D:STS Received connection from gs582cfslab4
+21-127-11:32:51.957 00 DPD-I:STS Page SCX_CPU1_FM_OPEN_FILE_LIST added (cid:1).
+21-127-11:32:51.971 00 SPR-D:STS Sent native operating system command "evt_client -c "aw SCX_CPU1_FM_OPEN_FILE_LIST""
+21-127-11:32:51.971 00 SCX_CPU1_FM_ST/93
+21-127-11:32:51.971 00 SCX_CPU1_FM_ST/94 write "Opening FM Free Space Pages"
+21-127-11:32:51.971 00 SPR-I:OPRO Opening FM Free Space Pages
+21-127-11:32:51.971 00 SCX_CPU1_FM_ST/95 page SCX_CPU1_FM_FREESPACE_TABLE
+21-127-11:32:52.040 00 SFDU-D:STS Received connection from gs582cfslab4
+21-127-11:32:52.095 00 DPD-I:STS Page SCX_CPU1_FM_FREESPACE_TABLE added (cid:1).
+21-127-11:32:52.103 00 SPR-D:STS Sent native operating system command "evt_client -c "aw SCX_CPU1_FM_FREESPACE_TABLE""
+21-127-11:32:52.104 00 SCX_CPU1_FM_ST/96 page SCX_CPU1_FM_FREESPACE_TLM
+21-127-11:32:52.265 00 DPD-I:STS Page SCX_CPU1_FM_FREESPACE_TLM added (cid:1).
+21-127-11:32:52.274 00 SPR-D:STS Sent native operating system command "evt_client -c "aw SCX_CPU1_FM_FREESPACE_TLM""
+21-127-11:32:52.274 00 SCX_CPU1_FM_ST/97
+21-127-11:32:52.274 00 SCX_CPU1_FM_ST/98 write "Opening TST FM HK Page."
+21-127-11:32:52.274 00 SPR-I:OPRO Opening TST FM HK Page.
+21-127-11:32:52.274 00 SCX_CPU1_FM_ST/99 page SCX_CPU1_TST_FM_HK
+21-127-11:32:52.299 00 SFDU-D:STS Received connection from gs582cfslab4
+21-127-11:32:52.395 00 DPD-I:STS Page SCX_CPU1_TST_FM_HK added (cid:1).
+21-127-11:32:52.401 00 SPR-D:STS Sent native operating system command "evt_client -c "aw SCX_CPU1_TST_FM_HK""
+21-127-11:32:52.401 00 SCX_CPU1_FM_ST/100
+21-127-11:32:52.401 00 SCX_CPU1_FM_ST/101 write ";*********************************************************************"
+21-127-11:32:52.401 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:32:52.401 00 SCX_CPU1_FM_ST/102 write "; Determine if the applications are running."
+21-127-11:32:52.401 00 SPR-I:OPRO ; Determine if the applications are running.
+21-127-11:32:52.401 00 SCX_CPU1_FM_ST/103 write ";*********************************************************************"
+21-127-11:32:52.401 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:32:52.401 00 SCX_CPU1_FM_ST/104 start get_file_to_cvt (ramDir, "cfe_es_app_info.log", "scx_cpu1_es_app_info.log", hostCPU)
+21-127-11:32:52.401 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/get_file_to_cvt.i
+21-127-11:32:52.404 00 SPR-I:STS Procedure GET_FILE_TO_CVT started
+21-127-11:32:52.404 00 GET_FILE_TO_CV/2 ;
+21-127-11:32:52.404 00 GET_FILE_TO_CV/3 local logging = %liv (log_procedure)
+21-127-11:32:52.404 00 GET_FILE_TO_CV/4 %liv (log_procedure) = FALSE
+21-127-11:32:52.416 00 SFDU-D:STS Received connection from gs582cfslab4
+21-127-11:32:52.440 00 SPR-I:OPRO Sending Command: /SCX_CPU1_ES_WRITEAPPINFO2FILE APPFILENAME="/ram/cfe_es_app_info.log"
+21-127-11:32:52.440 00 SPR-D:CMD Sending: CCSD3ZA0000100000233C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:098C7333IA0CPKT000001441806C0000041091B2F72616D2F6366655F65735F6170705F696E666F2E6C6F6700000000000000000000000000000000000000000000000000000000000000000000000000000000
+21-127-11:32:52.440 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:32:52.440 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:32:52.441 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:32:52.441 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:32:52.441 00 CMH-I:CMD Command is /SCX_CPU1_ES_WRITEAPPINFO2FILE APPFILENAME="/ram/cfe_es_app_info.log" ;;; (SCX CPU1 ES Write App Info command code)
+21-127-11:32:52.441 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:32:52.441 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:32:52.441 00 CMH-I:CMD Command SFDU received:<1806C0000041091B2F72616D2F6366655F65735F6170705F696E666F2E6C6F6700000000000000000000000000000000000000000000000000000000000000000000000000000000> from gs582cfslab4:SPR
+21-127-11:32:52.441 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <1806C0000041091B2F72616D2F6366655F65735F6170705F696E666F2E6C6F6700000000000000000000000000000000000000000000000000000000000000000000000000000000>
+21-127-11:32:52.441 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:32:52.441 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:52.441 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:32:52.442 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:52.442 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:32:52.442 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:32:52.442 00 CMH-D:LRES Message accepted locally
+21-127-11:32:52.442 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:32:52.442 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:32:52.442 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:098" ;;; ( )
+21-127-11:32:52.442 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:32:52.442 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:32:52.442 00 SPR-D:ERES Received end-to-end reponse(tag=98): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:098
+21-127-11:32:52.442 00 SPR-D:STS Command 98 was accepted.
+21-127-11:32:52.453 00 SPR-I:STTE Wait mode - waiting 15 seconds ...
+21-127-11:32:52.577 00 SFDU-D:STS Received connection from gs582cfslab4
+21-127-11:32:52.583 00 SFDU-D:STS Received connection from gs582cfslab4
+21-127-11:32:52.717 00 SFDU-D:STS Received connection from gs582cfslab4
+21-127-11:33:07.466 00 SPR-I:OPRO The APID is: P0F05
+21-127-11:33:07.467 00 SPR-I:OPRO The CPU is: CPU3
+21-127-11:33:07.467 00 SPR-I:OPRO The IP Address is: 192.168.1.8
+21-127-11:33:07.471 00 SPR-I:OPRO The perl command is: perl /s/opr/accounts/global/tools/ftp.pl RAM:0 cfe_es_app_info.log scx_cpu1_es_app_info.log binary 192.168.1.8
+21-127-11:33:07.643 00 SPR-D:STS Sent native operating system command "perl /s/opr/accounts/global/tools/ftp.pl RAM:0 cfe_es_app_info.log scx_cpu1_es_app_info.log binary 192.168.1.8"
+21-127-11:33:07.643 00 SPR-I:OPRO Return code from ftp_file.pl: 0
+21-127-11:33:07.644 00 SPR-I:STTE Wait mode - waiting 15 seconds ...
+21-127-11:33:17.908 00 DPD-I:STS Deleting page SCX_CPU1_TST_FM_HK
+21-127-11:33:17.917 00 SFDU-D:STS Terminated connection from gs582cfslab4
+21-127-11:33:19.984 00 DPD-I:STS Deleting page SCX_CPU1_FM_DIR_LIST
+21-127-11:33:19.999 00 SFDU-D:STS Terminated connection from gs582cfslab4
+21-127-11:33:21.278 00 DPD-I:STS Deleting page SCX_CPU1_FM_OPEN_FILE_LIST
+21-127-11:33:21.286 00 SFDU-D:STS Terminated connection from gs582cfslab4
+21-127-11:33:22.658 00 SPR-I:OPRO
+21-127-11:33:22.678 00 SPR-D:STS Sent native operating system command "cd /s/opr/accounts/cfs_test/image;file2cvt -z P0F05 scx_cpu1_es_app_info.log"
+21-127-11:33:22.693 00 SPR-D:STS Sent native operating system command "cvt -ws file_list[3845].file_write_time "`date +%y-%j-%T -r /s/opr/accounts/cfs_test/image/scx_cpu1_es_app_info.log`""
+21-127-11:33:22.693 00 SPR-I:OPRO The unix command is cvt -ws file_list[3845].file_write_time "`date +%y-%j-%T -r /s/opr/accounts/cfs_test/image/scx_cpu1_es_app_info.log`"
+21-127-11:33:22.693 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:33:24.421 00 DPD-I:STS Deleting page SCX_CPU1_FM_FREESPACE_TABLE
+21-127-11:33:24.435 00 SFDU-D:STS Terminated connection from gs582cfslab4
+21-127-11:33:26.208 00 DPD-I:STS Deleting page SCX_CPU1_FM_FREESPACE_TLM
+21-127-11:33:26.217 00 SFDU-D:STS Terminated connection from gs582cfslab4
+21-127-11:33:27.698 00 GET_FILE_TO_CV/513
+21-127-11:33:27.698 00 GET_FILE_TO_CV/514 ENDPROC
+21-127-11:33:27.698 00 SPR-I:STS Procedure GET_FILE_TO_CVT completed
+21-127-11:33:27.700 00 SCX_CPU1_FM_ST/105
+21-127-11:33:27.701 00 SCX_CPU1_FM_ST/106 found_app1 = FALSE
+21-127-11:33:27.701 00 SCX_CPU1_FM_ST/107 found_app2 = FALSE
+21-127-11:33:27.701 00 SCX_CPU1_FM_ST/108
+21-127-11:33:27.701 00 SCX_CPU1_FM_ST/109 ;Loop thru the table looking for the CS and TST_CS
+21-127-11:33:27.701 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.702 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.702 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.702 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.702 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.702 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.702 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.702 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.702 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.703 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.703 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.703 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.703 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.703 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.703 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.703 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.703 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.704 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.704 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.704 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.704 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.704 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.704 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.704 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.704 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.705 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.705 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.705 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.705 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.705 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.705 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.705 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.705 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.706 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.706 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.706 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.706 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.706 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.706 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.706 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.706 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.706 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.707 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.707 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.707 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.707 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.707 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.707 00 SCX_CPU1_FM_ST/112 found_app1 = TRUE
+21-127-11:33:27.707 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.708 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.709 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.709 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.709 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.709 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.709 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.710 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.710 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.710 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.710 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.710 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.710 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.710 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.710 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.711 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.711 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.711 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.711 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.711 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.711 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.711 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.711 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.711 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.712 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.712 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.717 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.718 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.719 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.720 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.720 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.720 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.720 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.721 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.722 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.722 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.722 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.722 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.722 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.722 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.722 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.722 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.722 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.726 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.727 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.727 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.727 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.727 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.727 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.727 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.727 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.727 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.727 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.728 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.729 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/111 if (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = FMAppName) then
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/113 elseif (SCX_CPU1_ES_ALE[file_index].ES_AL_AppName = "TST_FM") then
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/115 endif
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/116 enddo
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/110 for file_index = 1 to CFE_ES_MAX_APPLICATIONS do
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/117
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/118 if ((found_app1 = TRUE) AND (found_app2 = TRUE)) then
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/121 else
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/122 write "At least one application is not running. They will be started."
+21-127-11:33:27.730 00 SPR-I:OPRO At least one application is not running. They will be started.
+21-127-11:33:27.730 00 SCX_CPU1_FM_ST/123 wait 10
+21-127-11:33:27.730 00 SPR-I:STTE Wait mode - waiting 10 seconds ...
+21-127-11:33:27.982 00 DPD-I:STS Deleting page SCX_CPU1_FM_DIR_LIST_FILE
+21-127-11:33:27.989 00 SFDU-D:STS Terminated connection from gs582cfslab4
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/124 endif
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/125
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/127 local cmdCtr
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/128 if (found_app1 = FALSE) AND (found_app2 = TRUE) then
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/142 endif
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/143
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/145 if (found_app1 = FALSE) then
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/211 endif
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/212
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/213 write ";***********************************************************************"
+21-127-11:33:37.738 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/214 write "; Enable DEBUG Event Messages for the FM application "
+21-127-11:33:37.738 00 SPR-I:OPRO ; Enable DEBUG Event Messages for the FM application
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/215 write ";***********************************************************************"
+21-127-11:33:37.738 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/216 local cmdCtr = SCX_CPU1_EVS_CMDPC + 1
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/217
+21-127-11:33:37.738 00 SCX_CPU1_FM_ST/219 /SCX_CPU1_EVS_EnaAppEVTType Application=FMAppName DEBUG
+21-127-11:33:37.738 00 SPR-D:CMD Sending: CCSD3ZA0000100000149C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:099C7333IA0CPKT000000601801C0000017053E464D0000000000000000000000000000000000000100
+21-127-11:33:37.739 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:33:37.739 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:33:37.739 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:33:37.739 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:33:37.739 00 CMH-I:CMD Command is /SCX_CPU1_EVS_ENAAPPEVTTYPE APPLICATION="FM" DEBUG ;;; (SCX CPU1 EVS Enable Event Type for the App)
+21-127-11:33:37.739 00 CMH-I:CMD Or Command is /SCX_CPU1_EVS_ENAAPPEVTTYPEMASK APPLICATION="FM" BITMASK= 1 (x1) ;;; (SCX CPU1 EVS Enable Event Type for the App (mask))
+21-127-11:33:37.739 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:33:37.739 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:33:37.739 00 CMH-I:CMD Command SFDU received:<1801C0000017053E464D0000000000000000000000000000000000000100> from gs582cfslab4:SPR
+21-127-11:33:37.739 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <1801C0000017053E464D0000000000000000000000000000000000000100>
+21-127-11:33:37.739 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:33:37.739 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:33:37.739 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:33:37.739 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:33:37.739 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:33:37.739 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:33:37.739 00 CMH-D:LRES Message accepted locally
+21-127-11:33:37.739 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:33:37.739 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:33:37.739 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:099" ;;; ( )
+21-127-11:33:37.739 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:33:37.740 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:33:37.740 00 SPR-D:ERES Received end-to-end reponse(tag=99): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:099
+21-127-11:33:37.740 00 SPR-D:STS Command 99 was accepted.
+21-127-11:33:37.750 00 SCX_CPU1_FM_ST/220
+21-127-11:33:37.750 00 SCX_CPU1_FM_ST/221 ut_tlmwait SCX_CPU1_EVS_CMDPC, {cmdCtr}
+21-127-11:33:37.752 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:33:40.756 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:33:40.758 00 SCX_CPU1_FM_ST/222 if (UT_TW_Status = UT_Success) then
+21-127-11:33:40.758 00 SCX_CPU1_FM_ST/223 write "<*> Passed - Enable Debug events command sent properly."
+21-127-11:33:40.758 00 SPR-I:OPRO <*> Passed - Enable Debug events command sent properly.
+21-127-11:33:40.758 00 SCX_CPU1_FM_ST/226 endif
+21-127-11:33:40.758 00 SCX_CPU1_FM_ST/227
+21-127-11:33:40.758 00 SCX_CPU1_FM_ST/229 if (found_app2 = FALSE) then
+21-127-11:33:40.758 00 SCX_CPU1_FM_ST/230 write ";*********************************************************************"
+21-127-11:33:40.758 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:33:40.758 00 SCX_CPU1_FM_ST/231 write "; Start the File Manager Test (TST_FM) Application and add any"
+21-127-11:33:40.759 00 SPR-I:OPRO ; Start the File Manager Test (TST_FM) Application and add any
+21-127-11:33:40.759 00 SCX_CPU1_FM_ST/232 write "; required subscriptions. "
+21-127-11:33:40.759 00 SPR-I:OPRO ; required subscriptions.
+21-127-11:33:40.759 00 SCX_CPU1_FM_ST/233 write ";********************************************************************"
+21-127-11:33:40.759 00 SPR-I:OPRO ;********************************************************************
+21-127-11:33:40.759 00 SCX_CPU1_FM_ST/234 ut_setupevents "SCX", "CPU1", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1
+21-127-11:33:40.762 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:33:40.762 00 SPR-I:OPRO ; Setup event 1 with CFE_ES INFO 6
+21-127-11:33:40.762 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:33:40.763 00 SCX_CPU1_FM_ST/235 ut_setupevents "SCX", "CPU1", "TST_FM", TST_FM_INIT_INF_EID, "INFO", 2
+21-127-11:33:40.764 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:33:40.764 00 SPR-I:OPRO ; Setup event 2 with TST_FM INFO 1
+21-127-11:33:40.765 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:33:40.765 00 SCX_CPU1_FM_ST/236
+21-127-11:33:40.765 00 SCX_CPU1_FM_ST/237 s load_start_app ("TST_FM",hostCPU,"TST_FM_AppMain")
+21-127-11:33:40.765 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/load_start_app.i
+21-127-11:33:40.765 00 SPR-I:STS Procedure LOAD_START_APP started
+21-127-11:33:40.765 00 LOAD_START_APP/2 ;
+21-127-11:33:40.765 00 LOAD_START_APP/3 local logging = %liv (log_procedure)
+21-127-11:33:40.765 00 LOAD_START_APP/4 %liv (log_procedure) = FALSE
+21-127-11:33:40.766 00 SPR-I:OPRO Application Filename: tst_fm.o
+21-127-11:33:40.767 00 SPR-I:OPRO The perl command is perl /s/opr/accounts/global/tools/fsw_ftp.pl 192.168.1.8 tst_fm.o RAM:0 3
+21-127-11:33:40.898 00 SPR-D:STS Sent native operating system command "perl /s/opr/accounts/global/tools/fsw_ftp.pl 192.168.1.8 tst_fm.o RAM:0 3"
+21-127-11:33:40.899 00 SPR-I:OPRO Return code from ftp_file.pl: 0
+21-127-11:33:40.899 00 SPR-I:OPRO Sending Command: /SCX_CPU1_ES_STARTAPP APPLICATION="TST_FM" APP_ENTRY_PT="TST_FM_AppMain" APP_FILE_NAME="/ram/tst_fm.o" STACKSIZE=X'2000' PRIORITY=X'b7' RESTARTCPU
+21-127-11:33:40.900 00 SPR-D:CMD Sending: CCSD3ZA0000100000329C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:100C7333IA0CPKT000002401806C000007104EF5453545F464D00000000000000000000000000005453545F464D5F4170704D61696E0000000000002F72616D2F7473745F666D2E6F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000100B7
+21-127-11:33:40.900 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:33:40.900 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:33:40.900 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:33:40.900 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:33:40.900 00 CMH-I:CMD Command is /SCX_CPU1_ES_STARTAPP APPLICATION="TST_FM" APP_ENTRY_PT="TST_FM_AppMain" APP_FILE_NAME="/ram/tst_fm.o" STACKSIZE= 8192 (x2000) RESTARTCPU PRIORITY= 183 (xB7) ;;; (SCX CPU1 ES load and start single application command code)
+21-127-11:33:40.900 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:33:40.900 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:33:40.900 00 CMH-I:CMD Command SFDU received:<1806C000007104EF5453545F464D00000000000000000000000000005453545F464D5F4170704D61696E0000000000002F72616D2F7473745F666D2E6F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000100B7> from gs582cfslab4:SPR
+21-127-11:33:40.900 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <1806C000007104EF5453545F464D00000000000000000000000000005453545F464D5F4170704D61696E0000000000002F72616D2F7473745F666D2E6F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000100B7>
+21-127-11:33:40.901 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:33:40.901 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:33:40.901 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:33:40.901 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:33:40.901 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:33:40.902 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:33:40.902 00 CMH-D:LRES Message accepted locally
+21-127-11:33:40.902 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:33:40.902 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:33:40.902 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:100" ;;; ( )
+21-127-11:33:40.902 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:33:40.902 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:33:40.902 00 SPR-D:ERES Received end-to-end reponse(tag=100): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:100
+21-127-11:33:40.902 00 SPR-D:STS Command 100 was accepted.
+21-127-11:33:40.912 00 LOAD_START_APP/128
+21-127-11:33:40.913 00 LOAD_START_APP/129 ENDPROC
+21-127-11:33:40.913 00 SPR-I:STS Procedure LOAD_START_APP completed
+21-127-11:33:40.913 00 SCX_CPU1_FM_ST/238
+21-127-11:33:40.913 00 SCX_CPU1_FM_ST/239 ; Wait for app startup events
+21-127-11:33:40.913 00 SCX_CPU1_FM_ST/240 ut_tlmwait SCX_CPU1_find_event[2].num_found_messages, 1
+21-127-11:33:40.918 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:33:41.752 00 TLMH-I:STS 58-012-14:04:58.383 ERROR CPU=CPU1 APPNAME=CFE_ES EVENT ID=26 Failed to start TST_FM from /ram/tst_fm.o, RC = 0xC8000005
+21-127-11:34:04.946 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:34:04.948 00 SCX_CPU1_FM_ST/241 IF (UT_TW_Status = UT_Success) THEN
+21-127-11:34:04.948 00 SCX_CPU1_FM_ST/247 else
+21-127-11:34:04.948 00 SCX_CPU1_FM_ST/248 write " Failed - TST_FM Application start Event Message not received."
+21-127-11:34:04.949 00 SPR-I:OPRO Failed - TST_FM Application start Event Message not received.
+21-127-11:34:04.949 00 SCX_CPU1_FM_ST/249 goto procerror
+21-127-11:34:04.949 00 SCX_CPU1_FM_ST/263 procerror:
+21-127-11:34:04.949 00 SCX_CPU1_FM_ST/264 write "; There was a problem with this procedure"
+21-127-11:34:04.949 00 SPR-I:OPRO ; There was a problem with this procedure
+21-127-11:34:04.949 00 SCX_CPU1_FM_ST/265
+21-127-11:34:04.949 00 SCX_CPU1_FM_ST/266 procterm:
+21-127-11:34:04.949 00 SCX_CPU1_FM_ST/267 write ";*********************************************************************"
+21-127-11:34:04.949 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:04.949 00 SCX_CPU1_FM_ST/268 write "; End procedure scx_cpu1_fm_startfmapps "
+21-127-11:34:04.949 00 SPR-I:OPRO ; End procedure scx_cpu1_fm_startfmapps
+21-127-11:34:04.950 00 SCX_CPU1_FM_ST/269 write ";*********************************************************************"
+21-127-11:34:04.950 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:04.950 00 SCX_CPU1_FM_ST/270 ENDPROC
+21-127-11:34:04.950 00 SPR-I:STS Procedure SCX_CPU1_FM_STARTFMAPPS completed
+21-127-11:34:04.952 00 SCX_CPU1_FM_FI/152 wait 5
+21-127-11:34:04.952 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:34:09.956 00 SCX_CPU1_FM_FI/153
+21-127-11:34:09.956 00 SCX_CPU1_FM_FI/154 write ";*********************************************************************"
+21-127-11:34:09.957 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:09.957 00 SCX_CPU1_FM_FI/155 write "; Step 1.3: Verify that the FM Housekeeping telemetry items are "
+21-127-11:34:09.957 00 SPR-I:OPRO ; Step 1.3: Verify that the FM Housekeeping telemetry items are
+21-127-11:34:09.957 00 SCX_CPU1_FM_FI/156 write "; initialized to zero (0). "
+21-127-11:34:09.957 00 SPR-I:OPRO ; initialized to zero (0).
+21-127-11:34:09.957 00 SCX_CPU1_FM_FI/157 write ";*********************************************************************"
+21-127-11:34:09.957 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:09.957 00 SCX_CPU1_FM_FI/158 local hkPktId
+21-127-11:34:09.958 00 SCX_CPU1_FM_FI/159
+21-127-11:34:09.958 00 SCX_CPU1_FM_FI/162 hkPktId = "p08A"
+21-127-11:34:09.958 00 SCX_CPU1_FM_FI/163
+21-127-11:34:09.958 00 SCX_CPU1_FM_FI/166 local seqTlmItem = hkPktId & "scnt"
+21-127-11:34:09.958 00 SCX_CPU1_FM_FI/167 local currSCnt = {seqTlmItem}
+21-127-11:34:09.959 00 SCX_CPU1_FM_FI/168 local expectedSCnt = currSCnt + 2
+21-127-11:34:09.959 00 SCX_CPU1_FM_FI/169
+21-127-11:34:09.959 00 SCX_CPU1_FM_FI/170 ut_tlmwait {seqTlmItem}, {expectedSCnt}
+21-127-11:34:09.972 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:34:15.980 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:34:15.982 00 SCX_CPU1_FM_FI/171 if (UT_TW_Status = UT_Success) then
+21-127-11:34:15.982 00 SCX_CPU1_FM_FI/172 write "<*> Passed (4000) - Housekeeping packet is being generated."
+21-127-11:34:15.982 00 SPR-I:OPRO <*> Passed (4000) - Housekeeping packet is being generated.
+21-127-11:34:15.982 00 SCX_CPU1_FM_FI/173 ut_setrequirements FM_4000, "P"
+21-127-11:34:15.985 00 SCX_CPU1_FM_FI/177 endif
+21-127-11:34:15.985 00 SCX_CPU1_FM_FI/178
+21-127-11:34:15.985 00 SCX_CPU1_FM_FI/180 if (SCX_CPU1_FM_CMDPC = 0) AND (SCX_CPU1_FM_CMDEC = 0) THEN
+21-127-11:34:15.985 00 SCX_CPU1_FM_FI/181 write "<*> Passed (5000) - Housekeeping telemetry initialized properly."
+21-127-11:34:15.985 00 SPR-I:OPRO <*> Passed (5000) - Housekeeping telemetry initialized properly.
+21-127-11:34:15.985 00 SCX_CPU1_FM_FI/182 ut_setrequirements FM_5000, "P"
+21-127-11:34:15.989 00 SCX_CPU1_FM_FI/188 endif
+21-127-11:34:15.989 00 SCX_CPU1_FM_FI/189
+21-127-11:34:15.989 00 SCX_CPU1_FM_FI/190 wait 5
+21-127-11:34:15.989 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:34:20.994 00 SCX_CPU1_FM_FI/191
+21-127-11:34:20.994 00 SCX_CPU1_FM_FI/192 write ";*********************************************************************"
+21-127-11:34:20.994 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:20.994 00 SCX_CPU1_FM_FI/193 write "; Step 2.0: File System Preparation."
+21-127-11:34:20.994 00 SPR-I:OPRO ; Step 2.0: File System Preparation.
+21-127-11:34:20.994 00 SCX_CPU1_FM_FI/194 write ";*********************************************************************"
+21-127-11:34:20.994 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:20.994 00 SCX_CPU1_FM_FI/195 write "; Step 2.1: Create Test Directory 1."
+21-127-11:34:20.994 00 SPR-I:OPRO ; Step 2.1: Create Test Directory 1.
+21-127-11:34:20.995 00 SCX_CPU1_FM_FI/196 write ";*********************************************************************"
+21-127-11:34:20.995 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:20.995 00 SCX_CPU1_FM_FI/197 ut_setupevents "SCX", "CPU1", {FMAppName}, FM_CREATE_DIR_CMD_EID, "DEBUG", 1
+21-127-11:34:21.003 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:21.003 00 SPR-I:OPRO ; Setup event 1 with FM DEBUG 55
+21-127-11:34:21.003 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:21.004 00 SCX_CPU1_FM_FI/198
+21-127-11:34:21.004 00 SCX_CPU1_FM_FI/199 cmdCtr = SCX_CPU1_FM_CMDPC + 1
+21-127-11:34:21.005 00 SCX_CPU1_FM_FI/200
+21-127-11:34:21.005 00 SCX_CPU1_FM_FI/201 /SCX_CPU1_FM_DirCreate DirName=testDir1
+21-127-11:34:21.005 00 SPR-D:CMD Sending: CCSD3ZA0000100000233C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:101C7333IA0CPKT00000144188CC00000410CB42F72616D2F464D544553543100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+21-127-11:34:21.006 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:21.006 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:34:21.006 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:34:21.006 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:34:21.007 00 CMH-I:CMD Command is /SCX_CPU1_FM_DIRCREATE DIRNAME="/ram/FMTEST1" ;;; (SCX CPU1 FM Dircectory Create command code)
+21-127-11:34:21.007 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:34:21.007 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:34:21.007 00 CMH-I:CMD Command SFDU received:<188CC00000410CB42F72616D2F464D544553543100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000> from gs582cfslab4:SPR
+21-127-11:34:21.007 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <188CC00000410CB42F72616D2F464D544553543100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000>
+21-127-11:34:21.007 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:34:21.008 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:34:21.008 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:21.009 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:21.009 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:34:21.009 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:34:21.009 00 CMH-D:LRES Message accepted locally
+21-127-11:34:21.009 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:21.009 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:34:21.009 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:101" ;;; ( )
+21-127-11:34:21.009 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:34:21.010 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:21.010 00 SPR-D:ERES Received end-to-end reponse(tag=101): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:101
+21-127-11:34:21.010 00 SPR-D:STS Command 101 was accepted.
+21-127-11:34:21.021 00 SCX_CPU1_FM_FI/202
+21-127-11:34:21.021 00 SCX_CPU1_FM_FI/203 ut_tlmwait SCX_CPU1_FM_CMDPC, {cmdCtr}
+21-127-11:34:21.031 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:34:21.755 00 TLMH-I:STS 58-012-14:05:38.002 DEBUG CPU=CPU1 APPNAME=FM EVENT ID=55 Create Directory command: src = /ram/FMTEST1
+21-127-11:34:24.034 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:34:24.036 00 SCX_CPU1_FM_FI/204 if (UT_TW_Status = UT_Success) then
+21-127-11:34:24.036 00 SCX_CPU1_FM_FI/205 write "<*> Passed (1003) - Create Directory command sent properly."
+21-127-11:34:24.036 00 SPR-I:OPRO <*> Passed (1003) - Create Directory command sent properly.
+21-127-11:34:24.036 00 SCX_CPU1_FM_FI/206 ut_setrequirements FM_1003, "P"
+21-127-11:34:24.039 00 SCX_CPU1_FM_FI/210 endif
+21-127-11:34:24.039 00 SCX_CPU1_FM_FI/211
+21-127-11:34:24.039 00 SCX_CPU1_FM_FI/212 if (SCX_CPU1_find_event[1].num_found_messages = 1) THEN
+21-127-11:34:24.040 00 SCX_CPU1_FM_FI/213 write "<*> Passed (1003) - Event message ",SCX_CPU1_find_event[1].eventid, " received"
+21-127-11:34:24.040 00 SPR-I:OPRO <*> Passed (1003) - Event message 55 received
+21-127-11:34:24.040 00 SCX_CPU1_FM_FI/214 ut_setrequirements FM_1003, "P"
+21-127-11:34:24.044 00 SCX_CPU1_FM_FI/218 endif
+21-127-11:34:24.044 00 SCX_CPU1_FM_FI/219
+21-127-11:34:24.044 00 SCX_CPU1_FM_FI/220 wait 5
+21-127-11:34:24.044 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:34:29.049 00 SCX_CPU1_FM_FI/221
+21-127-11:34:29.049 00 SCX_CPU1_FM_FI/222 write ";*********************************************************************"
+21-127-11:34:29.049 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:29.049 00 SCX_CPU1_FM_FI/223 write "; Step 2.2: Create Test Directory 2."
+21-127-11:34:29.049 00 SPR-I:OPRO ; Step 2.2: Create Test Directory 2.
+21-127-11:34:29.049 00 SCX_CPU1_FM_FI/224 write ";*********************************************************************"
+21-127-11:34:29.050 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:29.050 00 SCX_CPU1_FM_FI/225 ut_setupevents "SCX", "CPU1", {FMAppName}, FM_CREATE_DIR_CMD_EID, "DEBUG", 1
+21-127-11:34:29.057 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:29.058 00 SPR-I:OPRO ; Setup event 1 with FM DEBUG 55
+21-127-11:34:29.058 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:29.059 00 SCX_CPU1_FM_FI/226
+21-127-11:34:29.059 00 SCX_CPU1_FM_FI/227 cmdCtr = SCX_CPU1_FM_CMDPC + 1
+21-127-11:34:29.059 00 SCX_CPU1_FM_FI/228
+21-127-11:34:29.060 00 SCX_CPU1_FM_FI/229 /SCX_CPU1_FM_DirCreate DirName=testDir2
+21-127-11:34:29.060 00 SPR-D:CMD Sending: CCSD3ZA0000100000233C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:102C7333IA0CPKT00000144188CC00000410CB72F72616D2F464D544553543200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+21-127-11:34:29.061 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:29.061 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:34:29.061 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:34:29.061 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:34:29.062 00 CMH-I:CMD Command is /SCX_CPU1_FM_DIRCREATE DIRNAME="/ram/FMTEST2" ;;; (SCX CPU1 FM Dircectory Create command code)
+21-127-11:34:29.062 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:34:29.062 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:34:29.062 00 CMH-I:CMD Command SFDU received:<188CC00000410CB72F72616D2F464D544553543200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000> from gs582cfslab4:SPR
+21-127-11:34:29.062 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <188CC00000410CB72F72616D2F464D544553543200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000>
+21-127-11:34:29.062 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:34:29.062 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:34:29.063 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:29.063 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:29.063 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:34:29.063 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:34:29.064 00 CMH-D:LRES Message accepted locally
+21-127-11:34:29.064 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:29.064 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:34:29.064 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:102" ;;; ( )
+21-127-11:34:29.064 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:34:29.064 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:29.065 00 SPR-D:ERES Received end-to-end reponse(tag=102): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:102
+21-127-11:34:29.065 00 SPR-D:STS Command 102 was accepted.
+21-127-11:34:29.075 00 SCX_CPU1_FM_FI/230
+21-127-11:34:29.075 00 SCX_CPU1_FM_FI/231 ut_tlmwait SCX_CPU1_FM_CMDPC, {cmdCtr}
+21-127-11:34:29.087 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:34:29.757 00 TLMH-I:STS 58-012-14:05:46.002 DEBUG CPU=CPU1 APPNAME=FM EVENT ID=55 Create Directory command: src = /ram/FMTEST2
+21-127-11:34:32.091 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:34:32.092 00 SCX_CPU1_FM_FI/232 if (UT_TW_Status = UT_Success) then
+21-127-11:34:32.092 00 SCX_CPU1_FM_FI/233 write "<*> Passed (1003) - Create Directory command sent properly."
+21-127-11:34:32.092 00 SPR-I:OPRO <*> Passed (1003) - Create Directory command sent properly.
+21-127-11:34:32.092 00 SCX_CPU1_FM_FI/234 ut_setrequirements FM_1003, "P"
+21-127-11:34:32.095 00 SCX_CPU1_FM_FI/238 endif
+21-127-11:34:32.095 00 SCX_CPU1_FM_FI/239
+21-127-11:34:32.095 00 SCX_CPU1_FM_FI/240 if (SCX_CPU1_find_event[1].num_found_messages = 1) THEN
+21-127-11:34:32.096 00 SCX_CPU1_FM_FI/241 write "<*> Passed (1003) - Event message ",SCX_CPU1_find_event[1].eventid, " received"
+21-127-11:34:32.096 00 SPR-I:OPRO <*> Passed (1003) - Event message 55 received
+21-127-11:34:32.096 00 SCX_CPU1_FM_FI/242 ut_setrequirements FM_1003, "P"
+21-127-11:34:32.099 00 SCX_CPU1_FM_FI/246 endif
+21-127-11:34:32.099 00 SCX_CPU1_FM_FI/247
+21-127-11:34:32.099 00 SCX_CPU1_FM_FI/248 wait 5
+21-127-11:34:32.099 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:34:37.104 00 SCX_CPU1_FM_FI/249
+21-127-11:34:37.104 00 SCX_CPU1_FM_FI/250 write ";*********************************************************************"
+21-127-11:34:37.104 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:37.104 00 SCX_CPU1_FM_FI/251 write "; Step 2.3: Upload Test File to Source Directory."
+21-127-11:34:37.104 00 SPR-I:OPRO ; Step 2.3: Upload Test File to Source Directory.
+21-127-11:34:37.104 00 SCX_CPU1_FM_FI/252 write ";*********************************************************************"
+21-127-11:34:37.104 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:37.105 00 SCX_CPU1_FM_FI/254 ; proc ftp_file (remote_directory, filename, dest_filename, cpu, getorput)
+21-127-11:34:37.105 00 SCX_CPU1_FM_FI/255 s ftp_file (uploadDir, testFileCompressed, testFileCompressed, hostCPU,"P")
+21-127-11:34:37.105 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/ftp_file.i
+21-127-11:34:37.106 00 SPR-I:STS Procedure FTP_FILE started
+21-127-11:34:37.107 00 FTP_FILE/2 ;
+21-127-11:34:37.107 00 FTP_FILE/3 local logging = %liv (log_procedure)
+21-127-11:34:37.107 00 FTP_FILE/4 %liv (log_procedure) = FALSE
+21-127-11:34:37.198 00 SPR-D:STS Sent native operating system command "perl /s/opr/accounts/global/tools/ftp_file.pl RAM:0/FMTEST1 FMDECOMORIG.TST.gz FMDECOMORIG.TST.gz binary 192.168.1.8 P"
+21-127-11:34:37.198 00 SPR-I:OPRO Return code from ftp_file.pl: 0
+21-127-11:34:37.198 00 FTP_FILE/85 ENDPROC
+21-127-11:34:37.198 00 SPR-I:STS Procedure FTP_FILE completed
+21-127-11:34:37.198 00 SCX_CPU1_FM_FI/256 wait 5
+21-127-11:34:37.198 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:34:42.203 00 SCX_CPU1_FM_FI/257
+21-127-11:34:42.203 00 SCX_CPU1_FM_FI/258 write ";*********************************************************************"
+21-127-11:34:42.203 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:42.203 00 SCX_CPU1_FM_FI/259 write "; Step 3.0: File Decompress Test - Decompress File to Same Directory"
+21-127-11:34:42.203 00 SPR-I:OPRO ; Step 3.0: File Decompress Test - Decompress File to Same Directory
+21-127-11:34:42.203 00 SCX_CPU1_FM_FI/260 write ";*********************************************************************"
+21-127-11:34:42.203 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:42.203 00 SCX_CPU1_FM_FI/261 write "; Step 3.1: File Info Command to Verify Source File exists."
+21-127-11:34:42.203 00 SPR-I:OPRO ; Step 3.1: File Info Command to Verify Source File exists.
+21-127-11:34:42.203 00 SCX_CPU1_FM_FI/262 write ";*********************************************************************"
+21-127-11:34:42.203 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:42.203 00 SCX_CPU1_FM_FI/263 ut_setupevents "SCX", "CPU1", {FMAppName}, FM_GET_FILE_INFO_CMD_EID, "DEBUG", 1
+21-127-11:34:42.205 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:42.205 00 SPR-I:OPRO ; Setup event 1 with FM DEBUG 46
+21-127-11:34:42.205 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:42.206 00 SCX_CPU1_FM_FI/264
+21-127-11:34:42.206 00 SCX_CPU1_FM_FI/265 cmdctr = SCX_CPU1_FM_CMDPC + 1
+21-127-11:34:42.206 00 SCX_CPU1_FM_FI/266
+21-127-11:34:42.206 00 SCX_CPU1_FM_FI/267 s scx_cpu1_fm_fileinfodisplay (fullOriginalTestFileName)
+21-127-11:34:42.206 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/scx_cpu1_fm_fileinfodisplay.i
+21-127-11:34:42.206 00 SPR-I:STS Procedure SCX_CPU1_FM_FILEINFODISPLAY started
+21-127-11:34:42.206 00 SCX_CPU1_FM_FI/2 ;==============================================================================
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/3 ;
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/4 ; Purpose: The purpose of this procedure is to perform the file info
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/5 ; cmd and then write the contents of the packet to the log.
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/6 ;
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/7 ; Waring: It is advised that before running a fresh procedure that calls this
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/8 ; to initialize the telemetry points P08Bscnt, P18Bscnt, & P28Bscnt
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/9 ; to 0 so that a previous proc run does not interfere with whether
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/10 ; the packet is viewed as stale or not
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/11 ;
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/12 ; History:
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/13 ; Date Name Description
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/14 ; 07/31/08 D. Stewart Initial development of this proc.
+21-127-11:34:42.207 00 SCX_CPU1_FM_FI/15 ; 02/28/11 W. Moleski Added variables for App name and ram directory
+21-127-11:34:42.209 00 SCX_CPU1_FM_FI/16 ; 05/09/12 W. Moleski Added check of ChildCMDPC and ChildCMDEC
+21-127-11:34:42.209 00 SCX_CPU1_FM_FI/17 ; 01/19/17 W. Moleski Added print of File permissions
+21-127-11:34:42.209 00 SCX_CPU1_FM_FI/18 ;==============================================================================
+21-127-11:34:42.209 00 SCX_CPU1_FM_FI/19
+21-127-11:34:42.209 00 SCX_CPU1_FM_FI/20 if (%nargs < 2) then
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/21 crcVal = 0
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/22 expResult = "Pass"
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/25 endif
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/26
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/27 local cmdctr
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/28 local errcnt
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/29 local seqCount
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/30 local writeToLog = 1
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/31 local actualResult
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/32
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/33 ;****************************************
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/34 ; start of sub-proc
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/35 ;****************************************
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/36 ; grab the current sequence counter for the info packet
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/37 ; CPU1 is the default
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/38 seqCount = P08Bscnt
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/39
+21-127-11:34:42.210 00 SCX_CPU1_FM_FI/40 write " Packet Sequence Counter before cmd = ", seqCount
+21-127-11:34:42.210 00 SPR-I:OPRO Packet Sequence Counter before cmd = 8
+21-127-11:34:42.213 00 SCX_CPU1_FM_FI/41
+21-127-11:34:42.213 00 SCX_CPU1_FM_FI/42 cmdctr = SCX_CPU1_FM_CMDPC + 1
+21-127-11:34:42.213 00 SCX_CPU1_FM_FI/43 errcnt = SCX_CPU1_FM_CMDEC + 1
+21-127-11:34:42.213 00 SCX_CPU1_FM_FI/44 local childCmdCtr = SCX_CPU1_FM_CHILDCMDPC + 1
+21-127-11:34:42.213 00 SCX_CPU1_FM_FI/45
+21-127-11:34:42.213 00 SCX_CPU1_FM_FI/46 /SCX_CPU1_FM_FileInfo File=filename CRC_Method=crcVal
+21-127-11:34:42.213 00 SPR-D:CMD Sending: CCSD3ZA0000100000241C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:103C7333IA0CPKT00000152188CC00000450A8F2F72616D2F464D54455354312F464D4445434F4D4F5249472E5453542E677A00000000000000000000000000000000000000000000000000000000000000000000000000
+21-127-11:34:42.214 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:42.214 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:34:42.214 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:34:42.214 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:34:42.214 00 CMH-I:CMD Command is /SCX_CPU1_FM_FILEINFO FILE="/ram/FMTEST1/FMDECOMORIG.TST.gz" CRC_METHOD= 0 (x0) ;;; (SCX CPU1 FM Generates a telemetry packet with details on the specified File)
+21-127-11:34:42.214 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:34:42.214 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:34:42.214 00 CMH-I:CMD Command SFDU received:<188CC00000450A8F2F72616D2F464D54455354312F464D4445434F4D4F5249472E5453542E677A00000000000000000000000000000000000000000000000000000000000000000000000000> from gs582cfslab4:SPR
+21-127-11:34:42.214 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <188CC00000450A8F2F72616D2F464D54455354312F464D4445434F4D4F5249472E5453542E677A00000000000000000000000000000000000000000000000000000000000000000000000000>
+21-127-11:34:42.214 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:34:42.214 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:34:42.214 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:42.214 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:42.214 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:34:42.214 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:34:42.214 00 CMH-D:LRES Message accepted locally
+21-127-11:34:42.215 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:42.215 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:34:42.215 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:103" ;;; ( )
+21-127-11:34:42.215 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:34:42.215 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:42.215 00 SPR-D:ERES Received end-to-end reponse(tag=103): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:103
+21-127-11:34:42.215 00 SPR-D:STS Command 103 was accepted.
+21-127-11:34:42.225 00 SCX_CPU1_FM_FI/47
+21-127-11:34:42.225 00 SCX_CPU1_FM_FI/48 wait until (((SCX_CPU1_FM_CMDPC = cmdctr) AND ;;
+21-127-11:34:42.225 00 SCX_CPU1_FM_FI/49 (SCX_CPU1_FM_CHILDCMDPC = childCmdCtr)) OR ;;
+21-127-11:34:42.225 00 SCX_CPU1_FM_FI/50 (SCX_CPU1_FM_CMDEC = errcnt))
+21-127-11:34:42.225 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:34:42.753 00 TLMH-I:STS 58-012-14:05:59.002 DEBUG CPU=CPU1 APPNAME=FM EVENT ID=46 Get File Info command: file = /ram/FMTEST1/FMDECOMORIG.TST.gz
+21-127-11:34:44.228 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:34:44.228 00 SCX_CPU1_FM_FI/51 if (SCX_CPU1_FM_CMDPC = cmdctr) then
+21-127-11:34:44.228 00 SCX_CPU1_FM_FI/52 actualResult = "Pass"
+21-127-11:34:44.228 00 SCX_CPU1_FM_FI/53 if (expResult = "Pass") then
+21-127-11:34:44.228 00 SCX_CPU1_FM_FI/54 write "<*> Passed - File Info command accepted."
+21-127-11:34:44.229 00 SPR-I:OPRO <*> Passed - File Info command accepted.
+21-127-11:34:44.229 00 SCX_CPU1_FM_FI/56 if (SCX_CPU1_FM_CHILDCMDPC = childCmdCtr) then
+21-127-11:34:44.229 00 SCX_CPU1_FM_FI/57 write "<*> Passed - Child CMDPC incremented as expected."
+21-127-11:34:44.229 00 SPR-I:OPRO <*> Passed - Child CMDPC incremented as expected.
+21-127-11:34:44.229 00 SCX_CPU1_FM_FI/60 endif
+21-127-11:34:44.229 00 SCX_CPU1_FM_FI/63 endif
+21-127-11:34:44.229 00 SCX_CPU1_FM_FI/71 endif
+21-127-11:34:44.229 00 SCX_CPU1_FM_FI/72
+21-127-11:34:44.230 00 SCX_CPU1_FM_FI/73 if (actualResult = "Pass") then
+21-127-11:34:44.230 00 SCX_CPU1_FM_FI/74 ; Write contents of the packet to the log
+21-127-11:34:44.230 00 SCX_CPU1_FM_FI/75 write "Contents of the File Info Packet:"
+21-127-11:34:44.230 00 SPR-I:OPRO Contents of the File Info Packet:
+21-127-11:34:44.230 00 SCX_CPU1_FM_FI/76 local newSeqCount = P08Bscnt
+21-127-11:34:44.231 00 SCX_CPU1_FM_FI/77
+21-127-11:34:44.231 00 SCX_CPU1_FM_FI/78 if (seqCount = newSeqCount) then
+21-127-11:34:44.231 00 SCX_CPU1_FM_FI/81 endif
+21-127-11:34:44.231 00 SCX_CPU1_FM_FI/82 write ""
+21-127-11:34:44.231 00 SPR-I:OPRO
+21-127-11:34:44.231 00 SCX_CPU1_FM_FI/83 write " Sequence Counter = ", newSeqCount
+21-127-11:34:44.232 00 SPR-I:OPRO Sequence Counter = 1
+21-127-11:34:44.232 00 SCX_CPU1_FM_FI/84
+21-127-11:34:44.232 00 SCX_CPU1_FM_FI/85 if (writeToLog = 1) then
+21-127-11:34:44.232 00 SCX_CPU1_FM_FI/86 write " File Name = ", SCX_CPU1_FM_InfoFileName
+21-127-11:34:44.233 00 SPR-I:OPRO File Name = /ram/FMTEST1/FMDECOMORIG.TST.gz
+21-127-11:34:44.233 00 SCX_CPU1_FM_FI/87 write " File Status = ", P@SCX_CPU1_FM_FileStatus
+21-127-11:34:44.233 00 SPR-I:OPRO File Status = Closed
+21-127-11:34:44.233 00 SCX_CPU1_FM_FI/88 write " File Size = ", SCX_CPU1_FM_InfoFileSize
+21-127-11:34:44.234 00 SPR-I:OPRO File Size = 160
+21-127-11:34:44.234 00 SCX_CPU1_FM_FI/89 write " Compute CRC Flag = ", SCX_CPU1_FM_ComputeCRC
+21-127-11:34:44.234 00 SPR-I:OPRO Compute CRC Flag = 0
+21-127-11:34:44.234 00 SCX_CPU1_FM_FI/90 write " CRC = ", SCX_CPU1_FM_CRC
+21-127-11:34:44.234 00 SPR-I:OPRO CRC = 0
+21-127-11:34:44.235 00 SCX_CPU1_FM_FI/91 write " last Mod Time = ", SCX_CPU1_FM_ModTime
+21-127-11:34:44.235 00 SPR-I:OPRO last Mod Time = 315532972
+21-127-11:34:44.236 00 SCX_CPU1_FM_FI/92 write " Permissions = ", SCX_CPU1_FM_Perms
+21-127-11:34:44.236 00 SPR-I:OPRO Permissions = 7
+21-127-11:34:44.236 00 SCX_CPU1_FM_FI/93 write ""
+21-127-11:34:44.236 00 SPR-I:OPRO
+21-127-11:34:44.236 00 SCX_CPU1_FM_FI/94 endif
+21-127-11:34:44.236 00 SCX_CPU1_FM_FI/95 endif
+21-127-11:34:44.237 00 SCX_CPU1_FM_FI/96
+21-127-11:34:44.237 00 SCX_CPU1_FM_FI/97 ENDPROC
+21-127-11:34:44.237 00 SPR-I:STS Procedure SCX_CPU1_FM_FILEINFODISPLAY completed
+21-127-11:34:44.237 00 SCX_CPU1_FM_FI/268
+21-127-11:34:44.237 00 SCX_CPU1_FM_FI/269 if (cmdctr = SCX_CPU1_FM_CMDPC) then
+21-127-11:34:44.238 00 SCX_CPU1_FM_FI/270 write "<*> Passed (2011) - File Info Command Completed."
+21-127-11:34:44.238 00 SPR-I:OPRO <*> Passed (2011) - File Info Command Completed.
+21-127-11:34:44.238 00 SCX_CPU1_FM_FI/271 ut_setrequirements FM_2011, "P"
+21-127-11:34:44.242 00 SCX_CPU1_FM_FI/272
+21-127-11:34:44.242 00 SCX_CPU1_FM_FI/273 if (SCX_CPU1_find_event[1].num_found_messages = 1) THEN
+21-127-11:34:44.242 00 SCX_CPU1_FM_FI/274 write "<*> Passed (1003) - Event message ",SCX_CPU1_find_event[1].eventid, " received"
+21-127-11:34:44.243 00 SPR-I:OPRO <*> Passed (1003) - Event message 46 received
+21-127-11:34:44.243 00 SCX_CPU1_FM_FI/275 ut_setrequirements FM_1003, "P"
+21-127-11:34:44.245 00 SCX_CPU1_FM_FI/279 endif
+21-127-11:34:44.245 00 SCX_CPU1_FM_FI/280
+21-127-11:34:44.245 00 SCX_CPU1_FM_FI/281 if (SCX_CPU1_FM_FileStatus > 1) THEN
+21-127-11:34:44.246 00 SCX_CPU1_FM_FI/282 write "<*> Passed - File status indicates that the file exists."
+21-127-11:34:44.246 00 SPR-I:OPRO <*> Passed - File status indicates that the file exists.
+21-127-11:34:44.246 00 SCX_CPU1_FM_FI/285 endif
+21-127-11:34:44.246 00 SCX_CPU1_FM_FI/286
+21-127-11:34:44.265 00 SCX_CPU1_FM_FI/287 if (SCX_CPU1_FM_InfoFileName = fullOriginalTestFileName) THEN
+21-127-11:34:44.265 00 SCX_CPU1_FM_FI/288 write "<*> Passed (2011) - File Info Telemetry Matches expected file: ", fullOriginalTestFileName
+21-127-11:34:44.265 00 SPR-I:OPRO <*> Passed (2011) - File Info Telemetry Matches expected file: /ram/FMTEST1/FMDECOMORIG.TST.gz
+21-127-11:34:44.265 00 SCX_CPU1_FM_FI/289 ut_setrequirements FM_2011, "P"
+21-127-11:34:44.267 00 SCX_CPU1_FM_FI/293 endif
+21-127-11:34:44.267 00 SCX_CPU1_FM_FI/298 endif
+21-127-11:34:44.267 00 SCX_CPU1_FM_FI/299
+21-127-11:34:44.267 00 SCX_CPU1_FM_FI/300 wait 5
+21-127-11:34:44.267 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:34:49.273 00 SCX_CPU1_FM_FI/301
+21-127-11:34:49.273 00 SCX_CPU1_FM_FI/302 write ";*********************************************************************"
+21-127-11:34:49.273 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:49.273 00 SCX_CPU1_FM_FI/303 write "; Step 3.2: File Info Command to Verify Destination File does not"
+21-127-11:34:49.273 00 SPR-I:OPRO ; Step 3.2: File Info Command to Verify Destination File does not
+21-127-11:34:49.273 00 SCX_CPU1_FM_FI/304 write "; exist in Directory."
+21-127-11:34:49.273 00 SPR-I:OPRO ; exist in Directory.
+21-127-11:34:49.273 00 SCX_CPU1_FM_FI/305 write ";*********************************************************************"
+21-127-11:34:49.274 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:49.274 00 SCX_CPU1_FM_FI/306 ut_setupevents "SCX", "CPU1", {FMAppName}, FM_GET_FILE_INFO_CMD_EID, "DEBUG", 1
+21-127-11:34:49.279 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:49.279 00 SPR-I:OPRO ; Setup event 1 with FM DEBUG 46
+21-127-11:34:49.279 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:49.279 00 SCX_CPU1_FM_FI/307
+21-127-11:34:49.279 00 SCX_CPU1_FM_FI/308 cmdctr = SCX_CPU1_FM_CMDPC + 1
+21-127-11:34:49.279 00 SCX_CPU1_FM_FI/309 errcnt = SCX_CPU1_FM_CMDEC + 1
+21-127-11:34:49.279 00 SCX_CPU1_FM_FI/310
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/311 s scx_cpu1_fm_fileinfodisplay (fullTestFileUncompressed1)
+21-127-11:34:49.280 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/scx_cpu1_fm_fileinfodisplay.i
+21-127-11:34:49.280 00 SPR-I:STS Procedure SCX_CPU1_FM_FILEINFODISPLAY started
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/2 ;==============================================================================
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/3 ;
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/4 ; Purpose: The purpose of this procedure is to perform the file info
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/5 ; cmd and then write the contents of the packet to the log.
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/6 ;
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/7 ; Waring: It is advised that before running a fresh procedure that calls this
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/8 ; to initialize the telemetry points P08Bscnt, P18Bscnt, & P28Bscnt
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/9 ; to 0 so that a previous proc run does not interfere with whether
+21-127-11:34:49.280 00 SCX_CPU1_FM_FI/10 ; the packet is viewed as stale or not
+21-127-11:34:49.281 00 SCX_CPU1_FM_FI/11 ;
+21-127-11:34:49.281 00 SCX_CPU1_FM_FI/12 ; History:
+21-127-11:34:49.281 00 SCX_CPU1_FM_FI/13 ; Date Name Description
+21-127-11:34:49.281 00 SCX_CPU1_FM_FI/14 ; 07/31/08 D. Stewart Initial development of this proc.
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/15 ; 02/28/11 W. Moleski Added variables for App name and ram directory
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/16 ; 05/09/12 W. Moleski Added check of ChildCMDPC and ChildCMDEC
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/17 ; 01/19/17 W. Moleski Added print of File permissions
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/18 ;==============================================================================
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/19
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/20 if (%nargs < 2) then
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/21 crcVal = 0
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/22 expResult = "Pass"
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/25 endif
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/26
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/27 local cmdctr
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/28 local errcnt
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/29 local seqCount
+21-127-11:34:49.284 00 SCX_CPU1_FM_FI/30 local writeToLog = 1
+21-127-11:34:49.285 00 SCX_CPU1_FM_FI/31 local actualResult
+21-127-11:34:49.285 00 SCX_CPU1_FM_FI/32
+21-127-11:34:49.285 00 SCX_CPU1_FM_FI/33 ;****************************************
+21-127-11:34:49.285 00 SCX_CPU1_FM_FI/34 ; start of sub-proc
+21-127-11:34:49.285 00 SCX_CPU1_FM_FI/35 ;****************************************
+21-127-11:34:49.285 00 SCX_CPU1_FM_FI/36 ; grab the current sequence counter for the info packet
+21-127-11:34:49.285 00 SCX_CPU1_FM_FI/37 ; CPU1 is the default
+21-127-11:34:49.285 00 SCX_CPU1_FM_FI/38 seqCount = P08Bscnt
+21-127-11:34:49.285 00 SCX_CPU1_FM_FI/39
+21-127-11:34:49.289 00 SCX_CPU1_FM_FI/40 write " Packet Sequence Counter before cmd = ", seqCount
+21-127-11:34:49.289 00 SPR-I:OPRO Packet Sequence Counter before cmd = 1
+21-127-11:34:49.289 00 SCX_CPU1_FM_FI/41
+21-127-11:34:49.289 00 SCX_CPU1_FM_FI/42 cmdctr = SCX_CPU1_FM_CMDPC + 1
+21-127-11:34:49.289 00 SCX_CPU1_FM_FI/43 errcnt = SCX_CPU1_FM_CMDEC + 1
+21-127-11:34:49.289 00 SCX_CPU1_FM_FI/44 local childCmdCtr = SCX_CPU1_FM_CHILDCMDPC + 1
+21-127-11:34:49.289 00 SCX_CPU1_FM_FI/45
+21-127-11:34:49.290 00 SCX_CPU1_FM_FI/46 /SCX_CPU1_FM_FileInfo File=filename CRC_Method=crcVal
+21-127-11:34:49.290 00 SPR-D:CMD Sending: CCSD3ZA0000100000241C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:104C7333IA0CPKT00000152188CC00000450AAF2F72616D2F464D54455354312F464D4445434F4D2E5453540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+21-127-11:34:49.290 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:49.290 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:34:49.290 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:34:49.290 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:34:49.290 00 CMH-I:CMD Command is /SCX_CPU1_FM_FILEINFO FILE="/ram/FMTEST1/FMDECOM.TST" CRC_METHOD= 0 (x0) ;;; (SCX CPU1 FM Generates a telemetry packet with details on the specified File)
+21-127-11:34:49.290 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:34:49.290 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:34:49.290 00 CMH-I:CMD Command SFDU received:<188CC00000450AAF2F72616D2F464D54455354312F464D4445434F4D2E5453540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000> from gs582cfslab4:SPR
+21-127-11:34:49.290 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <188CC00000450AAF2F72616D2F464D54455354312F464D4445434F4D2E5453540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000>
+21-127-11:34:49.291 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:34:49.291 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:34:49.291 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:49.291 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:49.291 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:34:49.291 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:34:49.292 00 CMH-D:LRES Message accepted locally
+21-127-11:34:49.292 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:49.292 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:34:49.292 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:104" ;;; ( )
+21-127-11:34:49.292 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:34:49.292 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:49.292 00 SPR-D:ERES Received end-to-end reponse(tag=104): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:104
+21-127-11:34:49.292 00 SPR-D:STS Command 104 was accepted.
+21-127-11:34:49.302 00 SCX_CPU1_FM_FI/47
+21-127-11:34:49.302 00 SCX_CPU1_FM_FI/48 wait until (((SCX_CPU1_FM_CMDPC = cmdctr) AND ;;
+21-127-11:34:49.302 00 SCX_CPU1_FM_FI/49 (SCX_CPU1_FM_CHILDCMDPC = childCmdCtr)) OR ;;
+21-127-11:34:49.302 00 SCX_CPU1_FM_FI/50 (SCX_CPU1_FM_CMDEC = errcnt))
+21-127-11:34:49.302 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:34:49.757 00 TLMH-I:STS 58-012-14:06:06.002 DEBUG CPU=CPU1 APPNAME=FM EVENT ID=46 Get File Info command: file = /ram/FMTEST1/FMDECOM.TST
+21-127-11:34:52.307 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:34:52.307 00 SCX_CPU1_FM_FI/51 if (SCX_CPU1_FM_CMDPC = cmdctr) then
+21-127-11:34:52.307 00 SCX_CPU1_FM_FI/52 actualResult = "Pass"
+21-127-11:34:52.307 00 SCX_CPU1_FM_FI/53 if (expResult = "Pass") then
+21-127-11:34:52.307 00 SCX_CPU1_FM_FI/54 write "<*> Passed - File Info command accepted."
+21-127-11:34:52.307 00 SPR-I:OPRO <*> Passed - File Info command accepted.
+21-127-11:34:52.308 00 SCX_CPU1_FM_FI/56 if (SCX_CPU1_FM_CHILDCMDPC = childCmdCtr) then
+21-127-11:34:52.308 00 SCX_CPU1_FM_FI/57 write "<*> Passed - Child CMDPC incremented as expected."
+21-127-11:34:52.308 00 SPR-I:OPRO <*> Passed - Child CMDPC incremented as expected.
+21-127-11:34:52.308 00 SCX_CPU1_FM_FI/60 endif
+21-127-11:34:52.308 00 SCX_CPU1_FM_FI/63 endif
+21-127-11:34:52.308 00 SCX_CPU1_FM_FI/71 endif
+21-127-11:34:52.308 00 SCX_CPU1_FM_FI/72
+21-127-11:34:52.309 00 SCX_CPU1_FM_FI/73 if (actualResult = "Pass") then
+21-127-11:34:52.309 00 SCX_CPU1_FM_FI/74 ; Write contents of the packet to the log
+21-127-11:34:52.309 00 SCX_CPU1_FM_FI/75 write "Contents of the File Info Packet:"
+21-127-11:34:52.309 00 SPR-I:OPRO Contents of the File Info Packet:
+21-127-11:34:52.309 00 SCX_CPU1_FM_FI/76 local newSeqCount = P08Bscnt
+21-127-11:34:52.309 00 SCX_CPU1_FM_FI/77
+21-127-11:34:52.309 00 SCX_CPU1_FM_FI/78 if (seqCount = newSeqCount) then
+21-127-11:34:52.310 00 SCX_CPU1_FM_FI/81 endif
+21-127-11:34:52.310 00 SCX_CPU1_FM_FI/82 write ""
+21-127-11:34:52.310 00 SPR-I:OPRO
+21-127-11:34:52.310 00 SCX_CPU1_FM_FI/83 write " Sequence Counter = ", newSeqCount
+21-127-11:34:52.310 00 SPR-I:OPRO Sequence Counter = 2
+21-127-11:34:52.310 00 SCX_CPU1_FM_FI/84
+21-127-11:34:52.311 00 SCX_CPU1_FM_FI/85 if (writeToLog = 1) then
+21-127-11:34:52.311 00 SCX_CPU1_FM_FI/86 write " File Name = ", SCX_CPU1_FM_InfoFileName
+21-127-11:34:52.311 00 SPR-I:OPRO File Name = /ram/FMTEST1/FMDECOM.TST
+21-127-11:34:52.311 00 SCX_CPU1_FM_FI/87 write " File Status = ", P@SCX_CPU1_FM_FileStatus
+21-127-11:34:52.311 00 SPR-I:OPRO File Status = Not Used
+21-127-11:34:52.311 00 SCX_CPU1_FM_FI/88 write " File Size = ", SCX_CPU1_FM_InfoFileSize
+21-127-11:34:52.312 00 SPR-I:OPRO File Size = 0
+21-127-11:34:52.312 00 SCX_CPU1_FM_FI/89 write " Compute CRC Flag = ", SCX_CPU1_FM_ComputeCRC
+21-127-11:34:52.312 00 SPR-I:OPRO Compute CRC Flag = 0
+21-127-11:34:52.312 00 SCX_CPU1_FM_FI/90 write " CRC = ", SCX_CPU1_FM_CRC
+21-127-11:34:52.312 00 SPR-I:OPRO CRC = 0
+21-127-11:34:52.312 00 SCX_CPU1_FM_FI/91 write " last Mod Time = ", SCX_CPU1_FM_ModTime
+21-127-11:34:52.312 00 SPR-I:OPRO last Mod Time = 0
+21-127-11:34:52.312 00 SCX_CPU1_FM_FI/92 write " Permissions = ", SCX_CPU1_FM_Perms
+21-127-11:34:52.312 00 SPR-I:OPRO Permissions = 0
+21-127-11:34:52.312 00 SCX_CPU1_FM_FI/93 write ""
+21-127-11:34:52.312 00 SPR-I:OPRO
+21-127-11:34:52.312 00 SCX_CPU1_FM_FI/94 endif
+21-127-11:34:52.312 00 SCX_CPU1_FM_FI/95 endif
+21-127-11:34:52.312 00 SCX_CPU1_FM_FI/96
+21-127-11:34:52.312 00 SCX_CPU1_FM_FI/97 ENDPROC
+21-127-11:34:52.312 00 SPR-I:STS Procedure SCX_CPU1_FM_FILEINFODISPLAY completed
+21-127-11:34:52.313 00 SCX_CPU1_FM_FI/312
+21-127-11:34:52.313 00 SCX_CPU1_FM_FI/313 wait until ((SCX_CPU1_FM_CMDPC = cmdctr) OR (SCX_CPU1_FM_CMDEC = errcnt)) timeout 20
+21-127-11:34:52.313 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:34:52.313 00 SCX_CPU1_FM_FI/314 if (SCX_CPU1_FM_CMDPC = cmdctr) then
+21-127-11:34:52.313 00 SCX_CPU1_FM_FI/315 write "<*> Passed (2011) - File Info command sent properly"
+21-127-11:34:52.313 00 SPR-I:OPRO <*> Passed (2011) - File Info command sent properly
+21-127-11:34:52.313 00 SCX_CPU1_FM_FI/316 ut_setrequirements FM_2011, "P"
+21-127-11:34:52.314 00 SCX_CPU1_FM_FI/317
+21-127-11:34:52.314 00 SCX_CPU1_FM_FI/318 if (SCX_CPU1_find_event[1].num_found_messages = 1) THEN
+21-127-11:34:52.315 00 SCX_CPU1_FM_FI/319 write "<*> Passed (1003) - Event message ", SCX_CPU1_find_event[1].eventid, " received"
+21-127-11:34:52.315 00 SPR-I:OPRO <*> Passed (1003) - Event message 46 received
+21-127-11:34:52.315 00 SCX_CPU1_FM_FI/322 endif
+21-127-11:34:52.315 00 SCX_CPU1_FM_FI/323
+21-127-11:34:52.315 00 SCX_CPU1_FM_FI/324 if (p@SCX_CPU1_FM_FileStatus = "Not Used") THEN
+21-127-11:34:52.315 00 SCX_CPU1_FM_FI/325 write "<*> Passed - File status indicates that the file does not exist."
+21-127-11:34:52.315 00 SPR-I:OPRO <*> Passed - File status indicates that the file does not exist.
+21-127-11:34:52.315 00 SCX_CPU1_FM_FI/328 endif
+21-127-11:34:52.315 00 SCX_CPU1_FM_FI/332 endif
+21-127-11:34:52.315 00 SCX_CPU1_FM_FI/333
+21-127-11:34:52.320 00 SCX_CPU1_FM_FI/334 wait 5
+21-127-11:34:52.320 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:34:57.325 00 SCX_CPU1_FM_FI/335
+21-127-11:34:57.325 00 SCX_CPU1_FM_FI/336 write ";*********************************************************************"
+21-127-11:34:57.325 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:57.325 00 SCX_CPU1_FM_FI/337 write "; Step 3.3: Perform FM_FileDecompress Command to Decompress Source"
+21-127-11:34:57.325 00 SPR-I:OPRO ; Step 3.3: Perform FM_FileDecompress Command to Decompress Source
+21-127-11:34:57.325 00 SCX_CPU1_FM_FI/338 write "; File to Destination File in the same directory."
+21-127-11:34:57.325 00 SPR-I:OPRO ; File to Destination File in the same directory.
+21-127-11:34:57.326 00 SCX_CPU1_FM_FI/339 write ";*********************************************************************"
+21-127-11:34:57.326 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:34:57.326 00 SCX_CPU1_FM_FI/340 ut_setupevents "SCX", "CPU1", {FMAppName}, FM_DECOM_CMD_EID, "DEBUG", 1
+21-127-11:34:57.335 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:57.335 00 SPR-I:OPRO ; Setup event 1 with FM DEBUG 36
+21-127-11:34:57.335 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:34:57.335 00 SCX_CPU1_FM_FI/341
+21-127-11:34:57.335 00 SCX_CPU1_FM_FI/342 cmdCtr = SCX_CPU1_FM_CMDPC + 1
+21-127-11:34:57.336 00 SCX_CPU1_FM_FI/343
+21-127-11:34:57.336 00 SCX_CPU1_FM_FI/344 /SCX_CPU1_FM_Decompress File=fullOriginalTestFileName DestName=fullTestFileUncompressed1
+21-127-11:34:57.336 00 SPR-D:CMD Sending: CCSD3ZA0000100000361C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:105C7333IA0CPKT00000272188CC000008108022F72616D2F464D54455354312F464D4445434F4D4F5249472E5453542E677A0000000000000000000000000000000000000000000000000000000000000000002F72616D2F464D54455354312F464D4445434F4D2E54535400000000000000000000000000000000000000000000000000000000000000000000000000000000
+21-127-11:34:57.336 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:57.336 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:34:57.336 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:34:57.336 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:34:57.336 00 CMH-I:CMD Command is /SCX_CPU1_FM_DECOMPRESS FILE="/ram/FMTEST1/FMDECOMORIG.TST.gz" DESTNAME="/ram/FMTEST1/FMDECOM.TST" ;;; (SCX CPU1 FM File Decompress command code)
+21-127-11:34:57.336 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:34:57.336 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:34:57.336 00 CMH-I:CMD Command SFDU received:<188CC000008108022F72616D2F464D54455354312F464D4445434F4D4F5249472E5453542E677A0000000000000000000000000000000000000000000000000000000000000000002F72616D2F464D54455354312F464D4445434F4D2E54535400000000000000000000000000000000000000000000000000000000000000000000000000000000> from gs582cfslab4:SPR
+21-127-11:34:57.336 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <188CC000008108022F72616D2F464D54455354312F464D4445434F4D4F5249472E5453542E677A0000000000000000000000000000000000000000000000000000000000000000002F72616D2F464D54455354312F464D4445434F4D2E54535400000000000000000000000000000000000000000000000000000000000000000000000000000000>
+21-127-11:34:57.336 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:34:57.337 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:34:57.337 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:57.337 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:57.337 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:34:57.337 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:34:57.337 00 CMH-D:LRES Message accepted locally
+21-127-11:34:57.337 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:34:57.337 00 CMH-D:CMD SFDU is /EACC MSG ;;; (End-to-end accept)
+21-127-11:34:57.337 00 CMH-D:CMD Or SFDU is /EACC_GENERATE MSG="gs582cfslab4:SPR:105" ;;; ( )
+21-127-11:34:57.337 00 CMH-D:DIR Received from FEDS:FEDS (0): EACC
+21-127-11:34:57.337 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:34:57.337 00 SPR-D:ERES Received end-to-end reponse(tag=105): CCSD3ZA0000100000040C7333IA0EACC00000020gs582cfslab4:SPR:105
+21-127-11:34:57.337 00 SPR-D:STS Command 105 was accepted.
+21-127-11:34:57.347 00 SCX_CPU1_FM_FI/345
+21-127-11:34:57.347 00 SCX_CPU1_FM_FI/346 ut_tlmwait SCX_CPU1_FM_CMDPC, {cmdCtr}
+21-127-11:34:57.352 00 SPR-I:STTE Wait mode - WAIT UNTIL ...
+21-127-11:34:57.752 00 TLMH-I:STS 58-012-14:06:14.004 DEBUG CPU=CPU1 APPNAME=FM EVENT ID=36 Decompress File command: src = /ram/FMTEST1/FMDECOMORIG.TST.gz, tgt = /ram/FMTEST1/FMDECOM.TST
+21-127-11:35:00.355 00 SPR-I:STTE WAIT UNTIL completed
+21-127-11:35:00.357 00 SCX_CPU1_FM_FI/347 if (UT_TW_Status = UT_Success) then
+21-127-11:35:00.357 00 SCX_CPU1_FM_FI/348 write "<*> Passed (1003;2009) - File Decompress command sent properly."
+21-127-11:35:00.357 00 SPR-I:OPRO <*> Passed (1003;2009) - File Decompress command sent properly.
+21-127-11:35:00.358 00 SCX_CPU1_FM_FI/349 ut_setrequirements FM_1003, "P"
+21-127-11:35:00.361 00 SCX_CPU1_FM_FI/350 ut_setrequirements FM_2009, "P"
+21-127-11:35:00.362 00 SCX_CPU1_FM_FI/351
+21-127-11:35:00.362 00 SCX_CPU1_FM_FI/352 if (SCX_CPU1_find_event[1].num_found_messages = 1) THEN
+21-127-11:35:00.362 00 SCX_CPU1_FM_FI/353 write "<*> Passed (1003) - Event message ",SCX_CPU1_find_event[1].eventid, " received"
+21-127-11:35:00.362 00 SPR-I:OPRO <*> Passed (1003) - Event message 36 received
+21-127-11:35:00.362 00 SCX_CPU1_FM_FI/354 ut_setrequirements FM_1003, "P"
+21-127-11:35:00.363 00 SCX_CPU1_FM_FI/358 endif
+21-127-11:35:00.363 00 SCX_CPU1_FM_FI/363 endif
+21-127-11:35:00.363 00 SCX_CPU1_FM_FI/364
+21-127-11:35:00.363 00 SCX_CPU1_FM_FI/365 wait 5
+21-127-11:35:00.363 00 SPR-I:STTE Wait mode - waiting 5 seconds ...
+21-127-11:35:05.367 00 SCX_CPU1_FM_FI/366
+21-127-11:35:05.367 00 SCX_CPU1_FM_FI/367 write ";*********************************************************************"
+21-127-11:35:05.367 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:35:05.367 00 SCX_CPU1_FM_FI/368 write "; Step 3.4: File Info Command to Verify Source File Still Exists."
+21-127-11:35:05.367 00 SPR-I:OPRO ; Step 3.4: File Info Command to Verify Source File Still Exists.
+21-127-11:35:05.368 00 SCX_CPU1_FM_FI/369 write ";*********************************************************************"
+21-127-11:35:05.368 00 SPR-I:OPRO ;*********************************************************************
+21-127-11:35:05.368 00 SCX_CPU1_FM_FI/370 ut_setupevents "SCX", "CPU1", {FMAppName}, FM_GET_FILE_INFO_CMD_EID, "DEBUG", 1
+21-127-11:35:05.373 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:35:05.373 00 SPR-I:OPRO ; Setup event 1 with FM DEBUG 46
+21-127-11:35:05.373 00 SPR-I:OPRO ;***********************************************************************
+21-127-11:35:05.374 00 SCX_CPU1_FM_FI/371
+21-127-11:35:05.374 00 SCX_CPU1_FM_FI/372 cmdctr = SCX_CPU1_FM_CMDPC + 1
+21-127-11:35:05.374 00 SCX_CPU1_FM_FI/373
+21-127-11:35:05.374 00 SCX_CPU1_FM_FI/374 s scx_cpu1_fm_fileinfodisplay (fullOriginalTestFileName)
+21-127-11:35:05.374 00 SPR-I:STS Loading file /s/opr/accounts/cfs_test/prc/scx_cpu1_fm_fileinfodisplay.i
+21-127-11:35:05.374 00 SPR-I:STS Procedure SCX_CPU1_FM_FILEINFODISPLAY started
+21-127-11:35:05.374 00 SCX_CPU1_FM_FI/2 ;==============================================================================
+21-127-11:35:05.374 00 SCX_CPU1_FM_FI/3 ;
+21-127-11:35:05.374 00 SCX_CPU1_FM_FI/4 ; Purpose: The purpose of this procedure is to perform the file info
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/5 ; cmd and then write the contents of the packet to the log.
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/6 ;
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/7 ; Waring: It is advised that before running a fresh procedure that calls this
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/8 ; to initialize the telemetry points P08Bscnt, P18Bscnt, & P28Bscnt
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/9 ; to 0 so that a previous proc run does not interfere with whether
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/10 ; the packet is viewed as stale or not
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/11 ;
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/12 ; History:
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/13 ; Date Name Description
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/14 ; 07/31/08 D. Stewart Initial development of this proc.
+21-127-11:35:05.375 00 SCX_CPU1_FM_FI/15 ; 02/28/11 W. Moleski Added variables for App name and ram directory
+21-127-11:35:05.377 00 SCX_CPU1_FM_FI/16 ; 05/09/12 W. Moleski Added check of ChildCMDPC and ChildCMDEC
+21-127-11:35:05.377 00 SCX_CPU1_FM_FI/17 ; 01/19/17 W. Moleski Added print of File permissions
+21-127-11:35:05.377 00 SCX_CPU1_FM_FI/18 ;==============================================================================
+21-127-11:35:05.377 00 SCX_CPU1_FM_FI/19
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/20 if (%nargs < 2) then
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/21 crcVal = 0
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/22 expResult = "Pass"
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/25 endif
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/26
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/27 local cmdctr
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/28 local errcnt
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/29 local seqCount
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/30 local writeToLog = 1
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/31 local actualResult
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/32
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/33 ;****************************************
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/34 ; start of sub-proc
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/35 ;****************************************
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/36 ; grab the current sequence counter for the info packet
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/37 ; CPU1 is the default
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/38 seqCount = P08Bscnt
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/39
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/40 write " Packet Sequence Counter before cmd = ", seqCount
+21-127-11:35:05.378 00 SPR-I:OPRO Packet Sequence Counter before cmd = 2
+21-127-11:35:05.378 00 SCX_CPU1_FM_FI/41
+21-127-11:35:05.381 00 SCX_CPU1_FM_FI/42 cmdctr = SCX_CPU1_FM_CMDPC + 1
+21-127-11:35:05.381 00 SCX_CPU1_FM_FI/43 errcnt = SCX_CPU1_FM_CMDEC + 1
+21-127-11:35:05.381 00 SCX_CPU1_FM_FI/44 local childCmdCtr = SCX_CPU1_FM_CHILDCMDPC + 1
+21-127-11:35:05.382 00 SCX_CPU1_FM_FI/45
+21-127-11:35:05.382 00 SCX_CPU1_FM_FI/46 /SCX_CPU1_FM_FileInfo File=filename CRC_Method=crcVal
+21-127-11:35:05.382 00 SPR-D:CMD Sending: CCSD3ZA0000100000241C7333IA0DEST00000009FEDS:FEDSC7333IA0LABL00000020gs582cfslab4:SPR:106C7333IA0CPKT00000152188CC00000450A8F2F72616D2F464D54455354312F464D4445434F4D4F5249472E5453542E677A00000000000000000000000000000000000000000000000000000000000000000000000000
+21-127-11:35:05.382 00 CMH-D:COMM Received from gs582cfslab4:SPR (5): IDs= : SFDU =
+21-127-11:35:05.382 00 CMH-D:CMD SFDU is /DEST ;;; (C733:DEST)
+21-127-11:35:05.382 00 CMH-D:CMD Or SFDU is /DEST_ONLY TO_YOU="FEDS:FEDS" ;;; ( )
+21-127-11:35:05.382 00 CMH-D:CMD SFDU is /LABL ;;; (C733:LABL)
+21-127-11:35:05.382 00 CMH-I:CMD Command is /SCX_CPU1_FM_FILEINFO FILE="/ram/FMTEST1/FMDECOMORIG.TST.gz" CRC_METHOD= 0 (x0) ;;; (SCX CPU1 FM Generates a telemetry packet with details on the specified File)
+21-127-11:35:05.382 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): DEST
+21-127-11:35:05.382 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): LABL
+21-127-11:35:05.382 00 CMH-I:CMD Command SFDU received:<188CC00000450A8F2F72616D2F464D54455354312F464D4445434F4D4F5249472E5453542E677A00000000000000000000000000000000000000000000000000000000000000000000000000> from gs582cfslab4:SPR
+21-127-11:35:05.382 00 CMH-D:DIR Received from gs582cfslab4:SPR (5): CPKT <188CC00000450A8F2F72616D2F464D54455354312F464D4445434F4D4F5249472E5453542E677A00000000000000000000000000000000000000000000000000000000000000000000000000>
+21-127-11:35:05.382 00 CMH-D:COMM Send to gs582cfslab4:SPR (5): IDs= : SFDU = >
+21-127-11:35:05.383 00 SPR-D:LRES Received local reponse: CCSD3ZA0000100000042C7333IA0LACC00000022
+21-127-11:35:05.383 00 CMH-D:COMM Send to FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:35:05.383 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =
+21-127-11:35:05.383 00 CMH-D:CMD SFDU is /LACC ;;; (Local accept)
+21-127-11:35:05.383 00 CMH-D:DIR Received from FEDS:FEDS (0): LACC <>
+21-127-11:35:05.383 00 CMH-D:LRES Message accepted locally
+21-127-11:35:05.383 00 CMH-D:COMM Received from FEDS:FEDS (0): IDs= : SFDU =