From 12412c2d29234fd08c6675dd59d9c6f41486dc77 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 26 Feb 2021 16:00:04 -0500 Subject: [PATCH] Fix #972, Reorganize CFE core into separate modules Significant reorganization of the CFE core directory and header file structure. All modules become separate subdirectories under fsw/modules. Additionally, the interfaces to CFE core (public and internal) are also separated into modules. CMake "interface libraries" and related constructs are used to manage the include paths to all the separate modules. --- CMakeLists.txt | 7 +- cmake/arch_build.cmake | 73 +- cmake/check_header.c.in | 4 + cmake/global_functions.cmake | 14 +- cmake/mission_build.cmake | 29 +- cmake/mission_defaults.cmake | 11 +- cmake/target/src/target_config.c | 2 +- fsw/cfe-core/CMakeLists.txt | 34 - fsw/cfe-core/src/inc/private/README.txt | 22 - fsw/cfe-core/src/inc/private/cfe_private.h | 338 ---- fsw/cfe-core/unit-test/CMakeLists.txt | 88 - .../unit-test/HowToRunCFEUnitTests.txt | 104 - fsw/cfe-core/unit-test/cFE_UT_Doxyfile | 1781 ----------------- fsw/cfe-core/version_info.cmake | 3 - modules/cfe_app_intf/CMakeLists.txt | 54 + modules/cfe_app_intf/arch_build.cmake | 19 + .../cfe_app_intf}/eds/base_types.xml | 0 .../cfe_app_intf}/eds/ccsds_spacepacket.xml | 0 .../cfe_app_intf}/eds/cfe_fs.xml | 0 .../cfe_app_intf}/eds/config.xml | 0 .../cfe_app_intf/fsw}/inc/cfe.h | 9 +- .../cfe_app_intf/fsw/inc/cfe_endian.h | 12 +- .../cfe_app_intf/fsw}/inc/cfe_error.h | 0 .../cfe_app_intf/fsw}/inc/cfe_es.h | 273 ++- .../fsw/inc/cfe_es_api_typedefs.h | 194 ++ .../fsw}/inc/cfe_es_extern_typedefs.h | 2 +- .../cfe_app_intf/fsw}/inc/cfe_evs.h | 113 +- .../fsw/inc/cfe_evs_api_typedefs.h | 70 + .../fsw}/inc/cfe_evs_extern_typedefs.h | 2 +- .../cfe_app_intf/fsw}/inc/cfe_fs.h | 121 +- .../fsw/inc/cfe_fs_api_typedefs.h | 132 ++ .../fsw}/inc/cfe_fs_extern_typedefs.h | 2 +- .../cfe_app_intf/fsw/inc/cfe_msg.h | 8 +- .../fsw/inc/cfe_msg_api_typedefs.h | 25 + .../cfe_app_intf/fsw/inc/cfe_resourceid.h | 39 +- .../fsw/inc/cfe_resourceid_api_typedefs.h | 82 + .../cfe_app_intf/fsw}/inc/cfe_sb.h | 220 +- .../fsw/inc/cfe_sb_api_typedefs.h | 190 ++ .../fsw}/inc/cfe_sb_extern_typedefs.h | 15 +- .../cfe_app_intf/fsw}/inc/cfe_tbl.h | 161 +- .../fsw/inc/cfe_tbl_api_typedefs.h | 127 ++ .../fsw}/inc/cfe_tbl_extern_typedefs.h | 4 +- .../cfe_app_intf/fsw}/inc/cfe_tbl_filedef.h | 0 .../cfe_app_intf/fsw}/inc/cfe_time.h | 134 +- .../fsw/inc/cfe_time_api_typedefs.h | 88 + .../fsw}/inc/cfe_time_extern_typedefs.h | 19 +- .../cfe_app_intf/fsw}/inc/cfe_version.h | 21 - .../cfe_app_intf}/mission_build.cmake | 0 modules/cfe_app_intf/ut-stubs/CMakeLists.txt | 41 + .../cfe_app_intf/ut-stubs/src}/ut_es_stubs.c | 27 +- .../cfe_app_intf/ut-stubs/src}/ut_evs_stubs.c | 4 +- .../cfe_app_intf/ut-stubs/src}/ut_fs_stubs.c | 0 .../cfe_app_intf/ut-stubs/src}/ut_msg_stubs.c | 0 .../ut-stubs/src}/ut_resourceid_stubs.c | 2 +- .../cfe_app_intf/ut-stubs/src}/ut_sb_stubs.c | 5 +- .../cfe_app_intf/ut-stubs/src}/ut_tbl_stubs.c | 4 +- .../ut-stubs/src}/ut_time_stubs.c | 2 +- modules/cfe_internal_intf/CMakeLists.txt | 34 + .../cfe_internal_intf}/arch_build.cmake | 6 - modules/cfe_internal_intf/eds/base_types.xml | 148 ++ modules/cfe_internal_intf/eds/config.xml | 59 + .../fsw/inc}/cfe_core_resourceid_basevalues.h | 0 .../fsw/inc}/cfe_es_erlog_typedef.h | 5 +- .../fsw/inc}/cfe_es_perfdata_typedef.h | 0 .../fsw/inc}/cfe_es_resetdata_typedef.h | 2 +- .../fsw/inc}/cfe_evs_log_typedef.h | 2 + .../fsw/inc}/cfe_sb_destination_typedef.h | 2 +- .../cfe_internal_intf/fsw/inc}/cfe_sbr.h | 51 +- .../fsw/inc/cfe_sbr_api_typedefs.h | 78 + .../fsw/inc/cfe_time_resetvars_typedef.h | 70 + .../ut-stubs/CMakeLists.txt | 24 +- .../ut-stubs/inc}/ut_osprintf_stubs.h | 0 .../ut-stubs/inc}/ut_support.h | 9 +- .../ut-stubs/src}/ut_osprintf_stubs.c | 0 .../ut-stubs/src}/ut_support.c | 0 modules/es/CMakeLists.txt | 39 + {fsw/cfe-core => modules/es}/eds/cfe_es.xml | 0 .../es/fsw}/inc/cfe_es_events.h | 0 .../src => modules/es/fsw}/inc/cfe_es_msg.h | 4 +- .../es => modules/es/fsw/src}/cfe_es_api.c | 12 +- .../es => modules/es/fsw/src}/cfe_es_apps.c | 9 +- .../es => modules/es/fsw/src}/cfe_es_apps.h | 4 +- .../es/fsw/src}/cfe_es_backgroundtask.c | 6 +- .../es => modules/es/fsw/src}/cfe_es_cds.c | 9 +- .../es => modules/es/fsw/src}/cfe_es_cds.h | 4 - .../es/fsw/src}/cfe_es_cds_mempool.c | 8 +- .../es/fsw/src}/cfe_es_cds_mempool.h | 1 - .../es => modules/es/fsw/src}/cfe_es_erlog.c | 9 +- .../es/fsw/src}/cfe_es_generic_pool.c | 9 +- .../es/fsw/src}/cfe_es_generic_pool.h | 1 - .../es => modules/es/fsw/src}/cfe_es_global.h | 24 +- modules/es/fsw/src/cfe_es_internal.h | 60 + .../es => modules/es/fsw/src}/cfe_es_log.h | 6 +- .../es/fsw/src}/cfe_es_mempool.c | 9 +- .../es/fsw/src}/cfe_es_mempool.h | 1 + .../es => modules/es/fsw/src}/cfe_es_objtab.c | 4 +- .../es => modules/es/fsw/src}/cfe_es_perf.c | 11 +- .../es => modules/es/fsw/src}/cfe_es_perf.h | 10 +- .../es/fsw/src}/cfe_es_resource.c | 5 +- .../es/fsw/src}/cfe_es_resource.h | 4 +- .../es => modules/es/fsw/src}/cfe_es_start.c | 9 +- .../es => modules/es/fsw/src}/cfe_es_start.h | 2 +- .../es => modules/es/fsw/src}/cfe_es_syslog.c | 6 +- .../es => modules/es/fsw/src}/cfe_es_task.c | 16 +- .../es => modules/es/fsw/src}/cfe_es_task.h | 12 +- .../es => modules/es/fsw/src}/cfe_es_verify.h | 0 modules/es/ut-coverage/CMakeLists.txt | 7 + .../es/ut-coverage}/es_UT.c | 0 .../es/ut-coverage}/es_UT.h | 0 modules/evs/CMakeLists.txt | 33 + {fsw/cfe-core => modules/evs}/eds/cfe_evs.xml | 0 .../evs/fsw}/inc/cfe_evs_events.h | 0 .../src => modules/evs/fsw}/inc/cfe_evs_msg.h | 5 +- .../src/evs => modules/evs/fsw/src}/cfe_evs.c | 10 +- .../evs => modules/evs/fsw/src}/cfe_evs_log.c | 5 +- .../evs => modules/evs/fsw/src}/cfe_evs_log.h | 0 .../evs/fsw/src}/cfe_evs_task.c | 15 +- .../evs/fsw/src}/cfe_evs_task.h | 16 +- .../evs/fsw/src}/cfe_evs_utils.c | 10 +- .../evs/fsw/src}/cfe_evs_utils.h | 3 + .../evs/fsw/src}/cfe_evs_verify.h | 0 modules/evs/ut-coverage/CMakeLists.txt | 7 + .../evs/ut-coverage}/evs_UT.c | 0 .../evs/ut-coverage}/evs_UT.h | 0 modules/fs/CMakeLists.txt | 25 + .../fs => modules/fs/fsw/src}/cfe_fs_api.c | 10 +- modules/fs/fsw/src/cfe_fs_internal.h | 44 + .../fs => modules/fs/fsw/src}/cfe_fs_priv.c | 7 +- .../fs => modules/fs/fsw/src}/cfe_fs_priv.h | 4 +- modules/fs/ut-coverage/CMakeLists.txt | 7 + .../fs/ut-coverage}/fs_UT.c | 0 .../fs/ut-coverage}/fs_UT.h | 0 modules/msg/CMakeLists.txt | 36 +- .../src => modules/msg/fsw}/inc/ccsds_hdr.h | 1 - modules/msg/{ => fsw}/src/cfe_msg_ccsdsext.c | 2 +- modules/msg/{ => fsw}/src/cfe_msg_ccsdspri.c | 2 +- .../src}/cfe_msg_defaults.h | 1 + modules/msg/{ => fsw}/src/cfe_msg_init.c | 2 +- .../src/cfe_msg_initdefaulthdr_pri.c | 0 .../src/cfe_msg_initdefaulthdr_priext.c | 0 .../msg/{ => fsw}/src/cfe_msg_msgid_shared.c | 2 +- modules/msg/{ => fsw}/src/cfe_msg_msgid_v1.c | 3 +- modules/msg/{ => fsw}/src/cfe_msg_msgid_v2.c | 2 +- .../{private_inc => fsw/src}/cfe_msg_priv.h | 1 + .../{ => fsw}/src/cfe_msg_sechdr_checksum.c | 2 +- modules/msg/{ => fsw}/src/cfe_msg_sechdr_fc.c | 2 +- .../msg/{ => fsw}/src/cfe_msg_sechdr_time.c | 2 +- modules/msg/mission_build.cmake | 4 +- .../default_cfe_msg_hdr_pri.h | 23 +- .../default_cfe_msg_hdr_priext.h | 0 .../default_cfe_msg_sechdr.h | 0 .../CMakeLists.txt | 6 +- .../msg_UT.c | 0 .../test_cfe_msg_ccsdsext.c | 2 +- .../test_cfe_msg_ccsdsext.h | 0 .../test_cfe_msg_ccsdspri.c | 2 +- .../test_cfe_msg_ccsdspri.h | 0 .../test_cfe_msg_checksum.c | 2 +- .../test_cfe_msg_checksum.h | 0 .../test_cfe_msg_fc.c | 2 +- .../test_cfe_msg_fc.h | 0 .../test_cfe_msg_init.c | 2 +- .../test_cfe_msg_init.h | 0 .../test_cfe_msg_msgid.h | 0 .../test_cfe_msg_msgid_shared.c | 2 +- .../test_cfe_msg_msgid_shared.h | 0 .../test_cfe_msg_msgid_v1.c | 2 +- .../test_cfe_msg_msgid_v2.c | 2 +- .../test_cfe_msg_time.c | 2 +- .../test_cfe_msg_time.h | 0 .../test_msg_ext_not.c | 2 +- .../test_msg_not.c | 2 +- .../test_msg_not.h | 0 .../test_msg_pri_not.c | 2 +- .../test_msg_prionly.c | 2 +- .../test_msg_utils.h | 2 +- modules/resourceid/CMakeLists.txt | 8 +- modules/resourceid/arch_build.cmake | 13 - .../{ => fsw}/src/cfe_resourceid_api.c | 2 +- modules/resourceid/mission_build.cmake | 4 +- .../cfe_resourceid_osal_compatible.h | 0 .../cfe_resourceid_simple.h | 0 .../cfe_resourceid_strict.h | 0 .../CMakeLists.txt | 8 +- .../test_cfe_resourceid.c | 2 +- modules/sb/CMakeLists.txt | 39 + {fsw/cfe-core => modules/sb}/eds/cfe_sb.xml | 0 .../sb/fsw}/inc/cfe_sb_events.h | 0 .../src => modules/sb/fsw}/inc/cfe_sb_msg.h | 7 +- .../sb => modules/sb/fsw/src}/cfe_sb_api.c | 12 +- .../sb => modules/sb/fsw/src}/cfe_sb_buf.c | 6 +- .../sb => modules/sb/fsw/src}/cfe_sb_init.c | 10 +- modules/sb/fsw/src/cfe_sb_internal.h | 51 + .../sb/fsw/src}/cfe_sb_msg_id_util.c | 9 +- .../sb => modules/sb/fsw/src}/cfe_sb_priv.c | 12 +- .../sb => modules/sb/fsw/src}/cfe_sb_priv.h | 14 +- .../sb => modules/sb/fsw/src}/cfe_sb_task.c | 13 +- .../sb => modules/sb/fsw/src}/cfe_sb_util.c | 7 +- .../sb => modules/sb/fsw/src}/cfe_sb_verify.h | 0 modules/sb/ut-coverage/CMakeLists.txt | 7 + .../sb/ut-coverage}/sb_UT.c | 4 +- .../sb/ut-coverage}/sb_UT.h | 0 modules/sbr/CMakeLists.txt | 14 +- .../sbr/{ => fsw}/src/cfe_sbr_map_direct.c | 4 +- modules/sbr/{ => fsw}/src/cfe_sbr_map_hash.c | 4 +- .../{private_inc => fsw/src}/cfe_sbr_priv.h | 2 +- .../{ => fsw}/src/cfe_sbr_route_unsorted.c | 4 +- .../CMakeLists.txt | 14 +- .../test_cfe_sbr_map_direct.c | 2 +- .../test_cfe_sbr_map_hash.c | 2 +- .../test_cfe_sbr_route_unsorted.c | 2 +- modules/tbl/CMakeLists.txt | 33 + {fsw/cfe-core => modules/tbl}/eds/cfe_tbl.xml | 0 .../tbl/fsw}/inc/cfe_tbl_events.h | 0 .../src => modules/tbl/fsw}/inc/cfe_tbl_msg.h | 5 +- .../tbl => modules/tbl/fsw/src}/cfe_tbl_api.c | 8 +- .../tbl/fsw/src}/cfe_tbl_internal.c | 8 +- .../tbl/fsw/src}/cfe_tbl_internal.h | 15 +- .../tbl/fsw/src}/cfe_tbl_task.c | 9 +- .../tbl/fsw/src}/cfe_tbl_task.h | 2 - .../tbl/fsw/src}/cfe_tbl_task_cmds.c | 11 +- .../tbl/fsw/src}/cfe_tbl_task_cmds.h | 7 +- .../tbl/fsw/src}/cfe_tbl_verify.h | 0 modules/tbl/ut-coverage/CMakeLists.txt | 7 + .../tbl/ut-coverage}/tbl_UT.c | 2 +- .../tbl/ut-coverage}/tbl_UT.h | 0 modules/time/CMakeLists.txt | 33 + .../time}/eds/cfe_time.xml | 0 .../time/fsw}/inc/cfe_time_events.h | 0 .../time/fsw}/inc/cfe_time_msg.h | 4 +- .../time/fsw/src}/cfe_time_api.c | 2 + .../time/fsw/src}/cfe_time_task.c | 6 + .../time/fsw/src}/cfe_time_tone.c | 8 + .../time/fsw/src}/cfe_time_utils.c | 6 +- .../time/fsw/src}/cfe_time_utils.h | 5 +- .../time/fsw/src}/cfe_time_verify.h | 3 + modules/time/ut-coverage/CMakeLists.txt | 7 + .../time/ut-coverage}/time_UT.c | 0 .../time/ut-coverage}/time_UT.h | 0 239 files changed, 2715 insertions(+), 3584 deletions(-) create mode 100644 cmake/check_header.c.in delete mode 100644 fsw/cfe-core/CMakeLists.txt delete mode 100644 fsw/cfe-core/src/inc/private/README.txt delete mode 100644 fsw/cfe-core/src/inc/private/cfe_private.h delete mode 100644 fsw/cfe-core/unit-test/CMakeLists.txt delete mode 100644 fsw/cfe-core/unit-test/HowToRunCFEUnitTests.txt delete mode 100644 fsw/cfe-core/unit-test/cFE_UT_Doxyfile delete mode 100644 fsw/cfe-core/version_info.cmake create mode 100644 modules/cfe_app_intf/CMakeLists.txt create mode 100644 modules/cfe_app_intf/arch_build.cmake rename {fsw/cfe-core => modules/cfe_app_intf}/eds/base_types.xml (100%) rename {fsw/cfe-core => modules/cfe_app_intf}/eds/ccsds_spacepacket.xml (100%) rename {fsw/cfe-core => modules/cfe_app_intf}/eds/cfe_fs.xml (100%) rename {fsw/cfe-core => modules/cfe_app_intf}/eds/config.xml (100%) rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe.h (92%) rename fsw/cfe-core/src/inc/ccsds.h => modules/cfe_app_intf/fsw/inc/cfe_endian.h (88%) rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_error.h (100%) rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_es.h (93%) create mode 100644 modules/cfe_app_intf/fsw/inc/cfe_es_api_typedefs.h rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_es_extern_typedefs.h (99%) rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_evs.h (88%) create mode 100644 modules/cfe_app_intf/fsw/inc/cfe_evs_api_typedefs.h rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_evs_extern_typedefs.h (99%) rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_fs.h (80%) create mode 100644 modules/cfe_app_intf/fsw/inc/cfe_fs_api_typedefs.h rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_fs_extern_typedefs.h (99%) rename fsw/cfe-core/src/inc/cfe_msg_api.h => modules/cfe_app_intf/fsw/inc/cfe_msg.h (99%) rename fsw/cfe-core/src/inc/cfe_msg_typedefs.h => modules/cfe_app_intf/fsw/inc/cfe_msg_api_typedefs.h (84%) rename fsw/cfe-core/src/inc/cfe_resourceid_api.h => modules/cfe_app_intf/fsw/inc/cfe_resourceid.h (87%) create mode 100644 modules/cfe_app_intf/fsw/inc/cfe_resourceid_api_typedefs.h rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_sb.h (90%) create mode 100644 modules/cfe_app_intf/fsw/inc/cfe_sb_api_typedefs.h rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_sb_extern_typedefs.h (85%) rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_tbl.h (90%) create mode 100644 modules/cfe_app_intf/fsw/inc/cfe_tbl_api_typedefs.h rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_tbl_extern_typedefs.h (96%) rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_tbl_filedef.h (100%) rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_time.h (91%) create mode 100644 modules/cfe_app_intf/fsw/inc/cfe_time_api_typedefs.h rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_time_extern_typedefs.h (91%) rename {fsw/cfe-core/src => modules/cfe_app_intf/fsw}/inc/cfe_version.h (81%) rename {fsw/cfe-core => modules/cfe_app_intf}/mission_build.cmake (100%) create mode 100644 modules/cfe_app_intf/ut-stubs/CMakeLists.txt rename {fsw/cfe-core/ut-stubs => modules/cfe_app_intf/ut-stubs/src}/ut_es_stubs.c (98%) rename {fsw/cfe-core/ut-stubs => modules/cfe_app_intf/ut-stubs/src}/ut_evs_stubs.c (99%) rename {fsw/cfe-core/ut-stubs => modules/cfe_app_intf/ut-stubs/src}/ut_fs_stubs.c (100%) rename {fsw/cfe-core/ut-stubs => modules/cfe_app_intf/ut-stubs/src}/ut_msg_stubs.c (100%) rename {fsw/cfe-core/ut-stubs => modules/cfe_app_intf/ut-stubs/src}/ut_resourceid_stubs.c (99%) rename {fsw/cfe-core/ut-stubs => modules/cfe_app_intf/ut-stubs/src}/ut_sb_stubs.c (99%) rename {fsw/cfe-core/ut-stubs => modules/cfe_app_intf/ut-stubs/src}/ut_tbl_stubs.c (99%) rename {fsw/cfe-core/ut-stubs => modules/cfe_app_intf/ut-stubs/src}/ut_time_stubs.c (99%) create mode 100644 modules/cfe_internal_intf/CMakeLists.txt rename {fsw/cfe-core => modules/cfe_internal_intf}/arch_build.cmake (79%) create mode 100644 modules/cfe_internal_intf/eds/base_types.xml create mode 100644 modules/cfe_internal_intf/eds/config.xml rename {fsw/cfe-core/src/inc/private => modules/cfe_internal_intf/fsw/inc}/cfe_core_resourceid_basevalues.h (100%) rename {fsw/cfe-core/src/inc/private => modules/cfe_internal_intf/fsw/inc}/cfe_es_erlog_typedef.h (95%) rename {fsw/cfe-core/src/inc/private => modules/cfe_internal_intf/fsw/inc}/cfe_es_perfdata_typedef.h (100%) rename {fsw/cfe-core/src/inc/private => modules/cfe_internal_intf/fsw/inc}/cfe_es_resetdata_typedef.h (96%) rename {fsw/cfe-core/src/inc/private => modules/cfe_internal_intf/fsw/inc}/cfe_evs_log_typedef.h (98%) rename {fsw/cfe-core/src/inc/private => modules/cfe_internal_intf/fsw/inc}/cfe_sb_destination_typedef.h (95%) rename {fsw/cfe-core/src/inc/private => modules/cfe_internal_intf/fsw/inc}/cfe_sbr.h (79%) create mode 100644 modules/cfe_internal_intf/fsw/inc/cfe_sbr_api_typedefs.h create mode 100644 modules/cfe_internal_intf/fsw/inc/cfe_time_resetvars_typedef.h rename {fsw/cfe-core => modules/cfe_internal_intf}/ut-stubs/CMakeLists.txt (69%) rename {fsw/cfe-core/unit-test => modules/cfe_internal_intf/ut-stubs/inc}/ut_osprintf_stubs.h (100%) rename {fsw/cfe-core/unit-test => modules/cfe_internal_intf/ut-stubs/inc}/ut_support.h (99%) rename {fsw/cfe-core/unit-test => modules/cfe_internal_intf/ut-stubs/src}/ut_osprintf_stubs.c (100%) rename {fsw/cfe-core/unit-test => modules/cfe_internal_intf/ut-stubs/src}/ut_support.c (100%) create mode 100644 modules/es/CMakeLists.txt rename {fsw/cfe-core => modules/es}/eds/cfe_es.xml (100%) rename {fsw/cfe-core/src => modules/es/fsw}/inc/cfe_es_events.h (100%) rename {fsw/cfe-core/src => modules/es/fsw}/inc/cfe_es_msg.h (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_api.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_apps.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_apps.h (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_backgroundtask.c (98%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_cds.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_cds.h (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_cds_mempool.c (98%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_cds_mempool.h (98%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_erlog.c (98%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_generic_pool.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_generic_pool.h (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_global.h (91%) create mode 100644 modules/es/fsw/src/cfe_es_internal.h rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_log.h (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_mempool.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_mempool.h (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_objtab.c (98%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_perf.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_perf.h (96%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_resource.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_resource.h (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_start.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_start.h (98%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_syslog.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_task.c (99%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_task.h (97%) rename {fsw/cfe-core/src/es => modules/es/fsw/src}/cfe_es_verify.h (100%) create mode 100644 modules/es/ut-coverage/CMakeLists.txt rename {fsw/cfe-core/unit-test => modules/es/ut-coverage}/es_UT.c (100%) rename {fsw/cfe-core/unit-test => modules/es/ut-coverage}/es_UT.h (100%) create mode 100644 modules/evs/CMakeLists.txt rename {fsw/cfe-core => modules/evs}/eds/cfe_evs.xml (100%) rename {fsw/cfe-core/src => modules/evs/fsw}/inc/cfe_evs_events.h (100%) rename {fsw/cfe-core/src => modules/evs/fsw}/inc/cfe_evs_msg.h (99%) rename {fsw/cfe-core/src/evs => modules/evs/fsw/src}/cfe_evs.c (98%) rename {fsw/cfe-core/src/evs => modules/evs/fsw/src}/cfe_evs_log.c (98%) rename {fsw/cfe-core/src/evs => modules/evs/fsw/src}/cfe_evs_log.h (100%) rename {fsw/cfe-core/src/evs => modules/evs/fsw/src}/cfe_evs_task.c (99%) rename {fsw/cfe-core/src/evs => modules/evs/fsw/src}/cfe_evs_task.h (93%) rename {fsw/cfe-core/src/evs => modules/evs/fsw/src}/cfe_evs_utils.c (99%) rename {fsw/cfe-core/src/evs => modules/evs/fsw/src}/cfe_evs_utils.h (98%) rename {fsw/cfe-core/src/evs => modules/evs/fsw/src}/cfe_evs_verify.h (100%) create mode 100644 modules/evs/ut-coverage/CMakeLists.txt rename {fsw/cfe-core/unit-test => modules/evs/ut-coverage}/evs_UT.c (100%) rename {fsw/cfe-core/unit-test => modules/evs/ut-coverage}/evs_UT.h (100%) create mode 100644 modules/fs/CMakeLists.txt rename {fsw/cfe-core/src/fs => modules/fs/fsw/src}/cfe_fs_api.c (99%) create mode 100644 modules/fs/fsw/src/cfe_fs_internal.h rename {fsw/cfe-core/src/fs => modules/fs/fsw/src}/cfe_fs_priv.c (96%) rename {fsw/cfe-core/src/fs => modules/fs/fsw/src}/cfe_fs_priv.h (98%) create mode 100644 modules/fs/ut-coverage/CMakeLists.txt rename {fsw/cfe-core/unit-test => modules/fs/ut-coverage}/fs_UT.c (100%) rename {fsw/cfe-core/unit-test => modules/fs/ut-coverage}/fs_UT.h (100%) rename {fsw/cfe-core/src => modules/msg/fsw}/inc/ccsds_hdr.h (99%) rename modules/msg/{ => fsw}/src/cfe_msg_ccsdsext.c (99%) rename modules/msg/{ => fsw}/src/cfe_msg_ccsdspri.c (99%) rename modules/msg/{private_inc => fsw/src}/cfe_msg_defaults.h (98%) rename modules/msg/{ => fsw}/src/cfe_msg_init.c (98%) rename modules/msg/{ => fsw}/src/cfe_msg_initdefaulthdr_pri.c (100%) rename modules/msg/{ => fsw}/src/cfe_msg_initdefaulthdr_priext.c (100%) rename modules/msg/{ => fsw}/src/cfe_msg_msgid_shared.c (98%) rename modules/msg/{ => fsw}/src/cfe_msg_msgid_v1.c (98%) rename modules/msg/{ => fsw}/src/cfe_msg_msgid_v2.c (99%) rename modules/msg/{private_inc => fsw/src}/cfe_msg_priv.h (99%) rename modules/msg/{ => fsw}/src/cfe_msg_sechdr_checksum.c (99%) rename modules/msg/{ => fsw}/src/cfe_msg_sechdr_fc.c (99%) rename modules/msg/{ => fsw}/src/cfe_msg_sechdr_time.c (99%) rename modules/msg/{mission_inc => option_inc}/default_cfe_msg_hdr_pri.h (88%) rename modules/msg/{mission_inc => option_inc}/default_cfe_msg_hdr_priext.h (100%) rename modules/msg/{mission_inc => option_inc}/default_cfe_msg_sechdr.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/CMakeLists.txt (94%) rename modules/msg/{unit-test-coverage => ut-coverage}/msg_UT.c (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_ccsdsext.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_ccsdsext.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_ccsdspri.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_ccsdspri.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_checksum.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_checksum.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_fc.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_fc.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_init.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_init.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_msgid.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_msgid_shared.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_msgid_shared.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_msgid_v1.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_msgid_v2.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_time.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_cfe_msg_time.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_msg_ext_not.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_msg_not.c (98%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_msg_not.h (100%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_msg_pri_not.c (99%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_msg_prionly.c (97%) rename modules/msg/{unit-test-coverage => ut-coverage}/test_msg_utils.h (96%) delete mode 100644 modules/resourceid/arch_build.cmake rename modules/resourceid/{ => fsw}/src/cfe_resourceid_api.c (99%) rename modules/resourceid/{option => option_inc}/cfe_resourceid_osal_compatible.h (100%) rename modules/resourceid/{option => option_inc}/cfe_resourceid_simple.h (100%) rename modules/resourceid/{option => option_inc}/cfe_resourceid_strict.h (100%) rename modules/resourceid/{unit-test-coverage => ut-coverage}/CMakeLists.txt (82%) rename modules/resourceid/{unit-test-coverage => ut-coverage}/test_cfe_resourceid.c (99%) create mode 100644 modules/sb/CMakeLists.txt rename {fsw/cfe-core => modules/sb}/eds/cfe_sb.xml (100%) rename {fsw/cfe-core/src => modules/sb/fsw}/inc/cfe_sb_events.h (100%) rename {fsw/cfe-core/src => modules/sb/fsw}/inc/cfe_sb_msg.h (99%) rename {fsw/cfe-core/src/sb => modules/sb/fsw/src}/cfe_sb_api.c (99%) rename {fsw/cfe-core/src/sb => modules/sb/fsw/src}/cfe_sb_buf.c (98%) rename {fsw/cfe-core/src/sb => modules/sb/fsw/src}/cfe_sb_init.c (95%) create mode 100644 modules/sb/fsw/src/cfe_sb_internal.h rename {fsw/cfe-core/src/sb => modules/sb/fsw/src}/cfe_sb_msg_id_util.c (93%) rename {fsw/cfe-core/src/sb => modules/sb/fsw/src}/cfe_sb_priv.c (98%) rename {fsw/cfe-core/src/sb => modules/sb/fsw/src}/cfe_sb_priv.h (98%) rename {fsw/cfe-core/src/sb => modules/sb/fsw/src}/cfe_sb_task.c (99%) rename {fsw/cfe-core/src/sb => modules/sb/fsw/src}/cfe_sb_util.c (98%) rename {fsw/cfe-core/src/sb => modules/sb/fsw/src}/cfe_sb_verify.h (100%) create mode 100644 modules/sb/ut-coverage/CMakeLists.txt rename {fsw/cfe-core/unit-test => modules/sb/ut-coverage}/sb_UT.c (99%) rename {fsw/cfe-core/unit-test => modules/sb/ut-coverage}/sb_UT.h (100%) rename modules/sbr/{ => fsw}/src/cfe_sbr_map_direct.c (98%) rename modules/sbr/{ => fsw}/src/cfe_sbr_map_hash.c (99%) rename modules/sbr/{private_inc => fsw/src}/cfe_sbr_priv.h (98%) rename modules/sbr/{ => fsw}/src/cfe_sbr_route_unsorted.c (99%) rename modules/sbr/{unit-test-coverage => ut-coverage}/CMakeLists.txt (78%) rename modules/sbr/{unit-test-coverage => ut-coverage}/test_cfe_sbr_map_direct.c (99%) rename modules/sbr/{unit-test-coverage => ut-coverage}/test_cfe_sbr_map_hash.c (99%) rename modules/sbr/{unit-test-coverage => ut-coverage}/test_cfe_sbr_route_unsorted.c (99%) create mode 100644 modules/tbl/CMakeLists.txt rename {fsw/cfe-core => modules/tbl}/eds/cfe_tbl.xml (100%) rename {fsw/cfe-core/src => modules/tbl/fsw}/inc/cfe_tbl_events.h (100%) rename {fsw/cfe-core/src => modules/tbl/fsw}/inc/cfe_tbl_msg.h (99%) rename {fsw/cfe-core/src/tbl => modules/tbl/fsw/src}/cfe_tbl_api.c (99%) rename {fsw/cfe-core/src/tbl => modules/tbl/fsw/src}/cfe_tbl_internal.c (99%) rename {fsw/cfe-core/src/tbl => modules/tbl/fsw/src}/cfe_tbl_internal.h (98%) rename {fsw/cfe-core/src/tbl => modules/tbl/fsw/src}/cfe_tbl_task.c (98%) rename {fsw/cfe-core/src/tbl => modules/tbl/fsw/src}/cfe_tbl_task.h (99%) rename {fsw/cfe-core/src/tbl => modules/tbl/fsw/src}/cfe_tbl_task_cmds.c (99%) rename {fsw/cfe-core/src/tbl => modules/tbl/fsw/src}/cfe_tbl_task_cmds.h (99%) rename {fsw/cfe-core/src/tbl => modules/tbl/fsw/src}/cfe_tbl_verify.h (100%) create mode 100644 modules/tbl/ut-coverage/CMakeLists.txt rename {fsw/cfe-core/unit-test => modules/tbl/ut-coverage}/tbl_UT.c (99%) rename {fsw/cfe-core/unit-test => modules/tbl/ut-coverage}/tbl_UT.h (100%) create mode 100644 modules/time/CMakeLists.txt rename {fsw/cfe-core => modules/time}/eds/cfe_time.xml (100%) rename {fsw/cfe-core/src => modules/time/fsw}/inc/cfe_time_events.h (100%) rename {fsw/cfe-core/src => modules/time/fsw}/inc/cfe_time_msg.h (99%) rename {fsw/cfe-core/src/time => modules/time/fsw/src}/cfe_time_api.c (99%) rename {fsw/cfe-core/src/time => modules/time/fsw/src}/cfe_time_task.c (99%) rename {fsw/cfe-core/src/time => modules/time/fsw/src}/cfe_time_tone.c (99%) rename {fsw/cfe-core/src/time => modules/time/fsw/src}/cfe_time_utils.c (99%) rename {fsw/cfe-core/src/time => modules/time/fsw/src}/cfe_time_utils.h (99%) rename {fsw/cfe-core/src/time => modules/time/fsw/src}/cfe_time_verify.h (99%) create mode 100644 modules/time/ut-coverage/CMakeLists.txt rename {fsw/cfe-core/unit-test => modules/time/ut-coverage}/time_UT.c (100%) rename {fsw/cfe-core/unit-test => modules/time/ut-coverage}/time_UT.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69218c849..4e1348424 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,9 +51,10 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) # (this is not required, and the directory can be empty/nonexistent) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../psp/cmake/Modules" ${CMAKE_MODULE_PATH}) -# The minimum CMake version is chosen because 2.6.4 is what is -# included by default with RHEL/Centos 5.x -cmake_minimum_required(VERSION 2.6.4) +# The minimum CMake version is chosen because v3.5.1 is what is +# available by default with Ubuntu 16.04 LTS at the time of development +# RHEL/CentOS users should install the "cmake3" package from EPEL repo +cmake_minimum_required(VERSION 3.5) # This top-level file does not define ANY targets directly but we know # that the subdirectories will at least use the "C" language, so diff --git a/cmake/arch_build.cmake b/cmake/arch_build.cmake index ec964ae59..599018089 100644 --- a/cmake/arch_build.cmake +++ b/cmake/arch_build.cmake @@ -62,7 +62,6 @@ endfunction(initialize_globals) function(add_psp_module MOD_NAME MOD_SRC_FILES) # Include the PSP shared directory so it can get to cfe_psp_module.h - include_directories(${MISSION_SOURCE_DIR}/psp/fsw/shared/inc) add_definitions(-D_CFE_PSP_MODULE_) # Create the module @@ -89,6 +88,7 @@ function(add_cfe_app APP_NAME APP_SRC_FILES) # Create the app module add_library(${APP_NAME} ${APPTYPE} ${APP_SRC_FILES} ${ARGN}) + target_link_libraries(${APP_NAME} cfe_app_intf) # An "install" step is only needed for dynamic/runtime loaded apps if (APP_DYNAMIC_TARGET_LIST) @@ -105,11 +105,6 @@ endfunction(add_cfe_app) # function(add_cfe_tables APP_NAME TBL_SRC_FILES) - # The table source must be compiled using the same "include_directories" - # as any other target, but it uses the "add_custom_command" so there is - # no automatic way to do this (at least in the older cmakes) - get_current_cflags(TBL_CFLAGS ${CMAKE_C_FLAGS}) - # Create the intermediate table objects using the target compiler, # then use "elf2cfetbl" to convert to a .tbl file set(TBL_LIST) @@ -148,6 +143,9 @@ function(add_cfe_tables APP_NAME TBL_SRC_FILES) message("NOTE: Selected ${TBL_SRC} as source for ${TBLWE}") endif() + add_library(${TGT}_${TBLWE}-obj OBJECT ${TBL_SRC}) + target_link_libraries(${TGT}_${TBLWE}-obj PRIVATE cfe_app_intf) + # IMPORTANT: This rule assumes that the output filename of elf2cfetbl matches # the input file name but with a different extension (.o -> .tbl) # The actual output filename is embedded in the source file (.c), however @@ -156,9 +154,9 @@ function(add_cfe_tables APP_NAME TBL_SRC_FILES) # current content of a dependency (rightfully so). add_custom_command( OUTPUT "${TABLE_DESTDIR}/${TBLWE}.tbl" - COMMAND ${CMAKE_C_COMPILER} ${TBL_CFLAGS} -c -o ${TBLWE}.o ${TBL_SRC} - COMMAND ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TBLWE}.o - DEPENDS ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TBL_SRC} + #COMMAND ${CMAKE_C_COMPILER} ${TBL_CFLAGS} -c -o ${TBLWE}.o ${TBL_SRC} + COMMAND ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl $ + DEPENDS ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TGT}_${TBLWE}-obj WORKING_DIRECTORY ${TABLE_DESTDIR} ) # Create the install targets for all the tables @@ -254,6 +252,38 @@ function(cfs_app_do_install APP_NAME) endfunction(cfs_app_do_install) +################################################################## +# +# FUNCTION: cfs_app_check_intf +# +# Adds a special target that checks the structure of header files +# in the public interface for this module. A synthetic .c source file +# is created which has a "#include" of each individual header, which +# then compiled as part of the validation. The intent is to confirm +# that each header is valid in a standalone fashion and have no +# implicit prerequisites. +# +function(cfs_app_check_intf MODULE_NAME) + set(${MODULE_NAME}_hdrcheck_SOURCES) + foreach(HDR ${ARGN}) + configure_file(${CFE_SOURCE_DIR}/cmake/check_header.c.in ${CMAKE_CURRENT_BINARY_DIR}/src/check_${HDR}.c) + list(APPEND ${MODULE_NAME}_hdrcheck_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/src/check_${HDR}.c) + endforeach(HDR ${ARGN}) + add_library(${MODULE_NAME}_headercheck OBJECT ${${MODULE_NAME}_hdrcheck_SOURCES}) + + # This causes the check to compile with the same set of defines and include dirs as specified + # in the "INTERFACE" properties of the actual module + target_link_libraries(${MODULE_NAME}_headercheck PRIVATE + cfe_app_intf + ${DEP} + ) + + # Build this as part of the synthetic "check-headers" target + add_dependencies(check-headers ${MODULE_NAME}_headercheck) +endfunction(cfs_app_check_intf) + + + ################################################################## # @@ -329,6 +359,7 @@ function(process_arch SYSVAR) # Generate a list of targets that share this system architecture set(INSTALL_TARGET_LIST ${TGTSYS_${SYSVAR}}) + message("INSTALL_TARGET_LIST=${INSTALL_TARGET_LIST}") # Assume use of an OSAL BSP of the same name as the CFE PSP # This can be overridden by the PSP-specific build_options but normally this is expected. @@ -350,6 +381,10 @@ function(process_arch SYSVAR) include_directories(${MISSION_BINARY_DIR}/inc) include_directories(${CMAKE_BINARY_DIR}/inc) + # Add a custom target for "headercheck" - this is a special target confirms that + # checks the sanity of headers within the public interface of modules + add_custom_target(check-headers) + # Configure OSAL target first, as it also determines important compiler flags add_subdirectory("${osal_MISSION_DIR}" osal) @@ -357,26 +392,6 @@ function(process_arch SYSVAR) # This can help with debugging if things go wrong. message(STATUS "PSP Selection: ${CFE_SYSTEM_PSPNAME}") - # Add all widely-used public headers to the include path chain - include_directories(${MISSION_SOURCE_DIR}/osal/src/os/inc) - include_directories(${MISSION_SOURCE_DIR}/psp/fsw/inc) - include_directories(${MISSION_SOURCE_DIR}/cfe/fsw/cfe-core/src/inc) - include_directories(${MISSION_SOURCE_DIR}/cfe/cmake/target/inc) - - # propagate any OSAL interface compile definitions and include directories to this build - # This is set as a directory property here at the top level so it will apply to all code. - # This includes MODULE libraries that do not directly/statically link with OSAL but still - # should be compiled with these flags. - get_target_property(OSAL_COMPILE_DEFINITIONS osal INTERFACE_COMPILE_DEFINITIONS) - get_target_property(OSAL_INCLUDE_DIRECTORIES osal INTERFACE_INCLUDE_DIRECTORIES) - - if (OSAL_COMPILE_DEFINITIONS) - set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "${OSAL_COMPILE_DEFINITIONS}") - endif (OSAL_COMPILE_DEFINITIONS) - if (OSAL_INCLUDE_DIRECTORIES) - include_directories(${OSAL_INCLUDE_DIRECTORIES}) - endif (OSAL_INCLUDE_DIRECTORIES) - # Append the PSP and OSAL selections to the Doxyfile so it will be included # in the generated documentation automatically. # Also extract the "-D" options within CFLAGS and inform Doxygen about these diff --git a/cmake/check_header.c.in b/cmake/check_header.c.in new file mode 100644 index 000000000..a3a9d8031 --- /dev/null +++ b/cmake/check_header.c.in @@ -0,0 +1,4 @@ +#include "@HDR@" + +/* A no-op function so this compilation unit is not empty */ +void CheckHeader(void) {} diff --git a/cmake/global_functions.cmake b/cmake/global_functions.cmake index 6c5b437f2..f6acabaa2 100644 --- a/cmake/global_functions.cmake +++ b/cmake/global_functions.cmake @@ -278,6 +278,8 @@ endfunction(read_targetconfig) # function(get_current_cflags OUTPUT_LIST) + message(FATAL_ERROR "BROKEN!") + # Start by converting the supplied string to a list set(FLAGLIST) foreach (FLGSTR ${ARGN}) @@ -285,14 +287,16 @@ function(get_current_cflags OUTPUT_LIST) list(APPEND FLAGLIST ${TEMPFLG}) endforeach (FLGSTR ${ARGN}) - # Append any compile definitions from the directory properties - get_directory_property(CURRENT_DEFS COMPILE_DEFINITIONS) - foreach(DEF ${CURRENT_DEFS}) + # Append any compile definitions from the CFE API + get_target_property(CURRENT_DEFS cfe_app INTERFACE_COMPILE_DEFINITIONS) + message("DEFS=${CURRENT_DEFS}") + foreach(DEF $) list(APPEND FLAGLIST "-D${DEF}") endforeach(DEF ${CURRENT_DEFS}) - # Append any include directories from the directory properties - get_directory_property(CURRENT_INCDIRS INCLUDE_DIRECTORIES) + # Append any include directories from the CFE API + get_target_property(CURRENT_INCDIRS cfe_app INTERFACE_INCLUDE_DIRECTORIES) + message("INCDIRS=${CURRENT_INCDIRS}") foreach(INC ${CURRENT_INCDIRS}) list(APPEND FLAGLIST "-I${INC}") endforeach(INC ${CURRENT_INCDIRS}) diff --git a/cmake/mission_build.cmake b/cmake/mission_build.cmake index 7920af487..f9b9d8b28 100644 --- a/cmake/mission_build.cmake +++ b/cmake/mission_build.cmake @@ -161,7 +161,6 @@ function(generate_build_version_templates) endfunction(generate_build_version_templates) - ################################################################## # # FUNCTION: prepare @@ -249,7 +248,7 @@ function(prepare) foreach(APP ${MISSION_DEPS}) # OSAL is handled specially, as only part of it is used - if (NOT APP STREQUAL "osal" AND NOT APP STREQUAL "cfe-core") + if (NOT APP STREQUAL "osal") if (EXISTS "${${APP}_MISSION_DIR}/docs/${APP}.doxyfile.in") # If the module provides its own doxyfile, then include it directly # This allows for app-specific fine-tuning of the sources, based on its own source tree @@ -283,11 +282,19 @@ function(prepare) "${CMAKE_BINARY_DIR}/doc/osconfig-example.h") # The user guide should include the doxygen from the _public_ API files from CFE + OSAL + # NOTE: the userguide is built against the headers of the default core apps. Even if + # an alternate version of the module is in use, it should adhere to the same interface. file(GLOB MISSION_USERGUIDE_HEADERFILES - "${cfe-core_MISSION_DIR}/src/inc/*.h" + "${es_MISSION_DIR}/fsw/inc/*.h" + "${evs_MISSION_DIR}/fsw/inc/*.h" + "${fs_MISSION_DIR}/fsw/inc/*.h" + "${sb_MISSION_DIR}/fsw/inc/*.h" + "${tbl_MISSION_DIR}/fsw/inc/*.h" + "${time_MISSION_DIR}/fsw/inc/*.h" "${osal_MISSION_DIR}/src/os/inc/*.h" + "${psp_MISSION_DIR}/psp/fsw/inc/*.h" "${CMAKE_BINARY_DIR}/doc/osconfig-example.h" - "${MISSION_SOURCE_DIR}/psp/fsw/inc/*.h") + ) string(REPLACE ";" " \\\n" MISSION_USERGUIDE_HEADERFILES "${MISSION_USERGUIDE_HEADERFILES}") # OSAL API GUIDE include PUBLIC API @@ -312,7 +319,7 @@ function(prepare) add_custom_target(osalguide doxygen osalguide.doxyfile - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc") + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc") # Pull in any application-specific mission-scope configuration # This may include user configuration files such as cfe_mission_cfg.h, @@ -360,6 +367,18 @@ function(prepare) generate_build_version_templates() # Generate the tools for the native (host) arch + # Add all public include dirs for core components to include path for tools + include_directories( + ${cfe_app_intf_MISSION_DIR}/fsw/inc + #${es_MISSION_DIR}/fsw/inc + #${evs_MISSION_DIR}/fsw/inc + #${fs_MISSION_DIR}/fsw/inc + #${sb_MISSION_DIR}/fsw/inc + #${tbl_MISSION_DIR}/fsw/inc + #${time_MISSION_DIR}/fsw/inc + ${osal_MISSION_DIR}/src/os/inc + ${psp_MISSION_DIR}/psp/fsw/inc + ) add_subdirectory(${MISSION_SOURCE_DIR}/tools tools) # Add a dependency on the table generator tool as this is required for table builds diff --git a/cmake/mission_defaults.cmake b/cmake/mission_defaults.cmake index 2f7ee42c1..2a8d55834 100644 --- a/cmake/mission_defaults.cmake +++ b/cmake/mission_defaults.cmake @@ -10,8 +10,16 @@ # The "MISSION_CORE_MODULES" will be built and statically linked as part # of the CFE core executable on every target. These can be used to amend # or override parts of the CFE core on a mission-specific basis. +# The "intf" modules are headers only, and define the interface(s) between components set(MISSION_CORE_MODULES - "cfe-core" + "cfe_app_intf" + "cfe_internal_intf" + "es" + "evs" + "fs" + "sb" + "tbl" + "time" "osal" "psp" "msg" @@ -45,7 +53,6 @@ set(MISSION_MODULE_SEARCH_PATH # a variable named "_SEARCH_PATH". This is # used for locating cfe-core and osal which are not part # of the standard search path. -set(cfe-core_SEARCH_PATH "cfe/fsw") set(osal_SEARCH_PATH ".") set(psp_SEARCH_PATH ".") diff --git a/cmake/target/src/target_config.c b/cmake/target/src/target_config.c index 6bda3825c..d9d95f88b 100644 --- a/cmake/target/src/target_config.c +++ b/cmake/target/src/target_config.c @@ -37,7 +37,7 @@ #include "cfe_platform_cfg.h" #include "cfe_es.h" #include "cfe_time.h" -#include "private/cfe_es_resetdata_typedef.h" +#include "cfe_es_resetdata_typedef.h" #include "cfe_version.h" /* for CFE_VERSION_STRING */ #include "osapi-version.h" /* for OS_VERSION_STRING */ diff --git a/fsw/cfe-core/CMakeLists.txt b/fsw/cfe-core/CMakeLists.txt deleted file mode 100644 index 4aa275555..000000000 --- a/fsw/cfe-core/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -################################################################## -# -# cFE core module CMake build recipe -# -# This CMakeLists.txt file contains recipes for building the 6 -# core applications included in the cFE distribution. The entire -# set of source code is built into a static library that in turn -# is linked into the final executable. -# -# Note this is different than applications which are dynamically -# linked to support runtime loading. The core applications all -# use static linkage. -# -################################################################## - -project(CFECORE C) - -# Define the "_CFE_CORE_" macro during compilation of all CFE core sources -add_definitions(-D_CFE_CORE_) - -set(CFE_CORE_MODULES es sb evs tbl time fs) -set(CFE_ALL_MODULE_SRCS) - -foreach(MODULE ${CFE_CORE_MODULES}) - aux_source_directory(src/${MODULE} CFE_ALL_MODULE_SRCS) -endforeach(MODULE ${CFE_CORE_MODULES}) - -add_library(cfe-core STATIC ${CFE_ALL_MODULE_SRCS}) - -if (ENABLE_UNIT_TESTS) - add_subdirectory(ut-stubs) - add_subdirectory(unit-test) -endif (ENABLE_UNIT_TESTS) - diff --git a/fsw/cfe-core/src/inc/private/README.txt b/fsw/cfe-core/src/inc/private/README.txt deleted file mode 100644 index e5e32ba57..000000000 --- a/fsw/cfe-core/src/inc/private/README.txt +++ /dev/null @@ -1,22 +0,0 @@ -About the "private" cFE include directory ------------------------------------------ - -This directory is for include files that are used within the cFE core library -only, including types and definitions that are shared between more than one -cFE module. - -External libraries and applications should *NOT* include anything from this -directory. Doing so may cause the build to break. The reason is because -directly using definitions in here at compile-time will cause the external -entity (lib or app) to become hard-linked to the same specific cFE config -used to build the cFE - and it will surely break if that app is used with -a cFE instance that has been built with a different config (and probably -in a non-obvious way). - -Instead, the external app or lib should use the configuration exported from -the cFE library via the proper external ABI. - -Include files in here should check that _CFE_CORE_ is defined to prevent -accidental usage by external entities. - - diff --git a/fsw/cfe-core/src/inc/private/cfe_private.h b/fsw/cfe-core/src/inc/private/cfe_private.h deleted file mode 100644 index e3738e493..000000000 --- a/fsw/cfe-core/src/inc/private/cfe_private.h +++ /dev/null @@ -1,338 +0,0 @@ -/* -** GSC-18128-1, "Core Flight Executive Version 6.7" -** -** Copyright (c) 2006-2019 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. -*/ - -/* - * cfe_private.h - * - * Created on: Dec 3, 2013 - * Author: jphickey - */ - -#ifndef CFE_PRIVATE_H_ -#define CFE_PRIVATE_H_ - -#include "common_types.h" -#include "cfe.h" - -#include "cfe_platform_cfg.h" /* Define platform configuration parameters */ - - -/*****************************************************************************/ -/** cFE Core task entry point prototypes *************************************/ -/*****************************************************************************/ -/* - * All cFE core apps should define an entry point and the prototype should be here - * These may also be called from the unit test - */ - -/*****************************************************************************/ -/** -** \brief Entry Point for cFE Core Application -** -** \par Description -** This is the entry point to the cFE TIME Core Application. -** -** \par Assumptions, External Events, and Notes: -** None -** -** -******************************************************************************/ -extern void CFE_TIME_TaskMain(void); - -/*****************************************************************************/ -/** -** \brief Entry Point for cFE Core Application -** -** \par Description -** This is the entry point to the cFE SB Core Application. -** -** \par Assumptions, External Events, and Notes: -** None -** -** -******************************************************************************/ -extern void CFE_SB_TaskMain(void); - -/*****************************************************************************/ -/** -** \brief Entry Point for cFE Core Application -** -** \par Description -** This is the entry point to the cFE EVS Core Application. -** -** \par Assumptions, External Events, and Notes: -** None -** -** -******************************************************************************/ -extern void CFE_EVS_TaskMain(void); - -/*****************************************************************************/ -/** -** \brief Entry Point for cFE Core Application -** -** \par Description -** This is the entry point to the cFE ES Core Application. -** -** \par Assumptions, External Events, and Notes: -** None -** -** -******************************************************************************/ -extern void CFE_ES_TaskMain(void); - -/*****************************************************************************/ -/** -** \brief Entry Point for cFE Table Services Core Application -** -** \par Description -** This is the entry point to the cFE Table Services Core Application. -** This Application provides the ground interface to the cFE Table -** Services. -** -** \par Assumptions, External Events, and Notes: -** None -** -** -******************************************************************************/ -extern void CFE_TBL_TaskMain(void); - - - - -/*****************************************************************************/ -/** cFE Core task early init prototypes **************************************/ -/*****************************************************************************/ -/* - * cFE core apps may define an early init function and the prototype should be here - * These may also be called from the unit test - */ - -/*****************************************************************************/ -/** -** \brief Initializes the cFE core module API Library -** -** \par Description -** Initializes the cFE core module API Library -** -** \par Assumptions, External Events, and Notes: -** -# This function MUST be called before any module API's are called. -** -******************************************************************************/ -extern int32 CFE_EVS_EarlyInit(void); - -/*****************************************************************************/ -/** -** \brief Initializes the cFE core module API Library -** -** \par Description -** Initializes the cFE core module API Library -** -** \par Assumptions, External Events, and Notes: -** -# This function MUST be called before any module API's are called. -** -******************************************************************************/ -extern int32 CFE_SB_EarlyInit(void); - -/*****************************************************************************/ -/** -** \brief Initializes the cFE core module API Library -** -** \par Description -** Initializes the cFE core module API Library -** -** \par Assumptions, External Events, and Notes: -** -# This function MUST be called before any module API's are called. -** -******************************************************************************/ -extern int32 CFE_TIME_EarlyInit(void); - -/*****************************************************************************/ -/** -** \brief Initializes the Table Services API Library -** -** \par Description -** Initializes the Table Services API Library -** -** \par Assumptions, External Events, and Notes: -** -# This function MUST be called before any TBL API's are called. -** -******************************************************************************/ -extern int32 CFE_TBL_EarlyInit(void); - -/*****************************************************************************/ -/** -** \brief Initializes the cFE core module API Library -** -** \par Description -** Initializes the cFE core module API Library -** -** \par Assumptions, External Events, and Notes: -** -# This function MUST be called before any module API's are called. -** -******************************************************************************/ -extern int32 CFE_ES_CDS_EarlyInit(void); - -/*****************************************************************************/ -/** -** \brief Initializes the cFE core module API Library -** -** \par Description -** Initializes the cFE core module API Library -** -** \par Assumptions, External Events, and Notes: -** -# This function MUST be called before any module API's are called. -** -******************************************************************************/ -extern int32 CFE_FS_EarlyInit(void); - - - -/*****************************************************************************/ -/** cFE Core task clean up prototypes ****************************************/ -/*****************************************************************************/ -/* - * cFE core apps may define a clean up function and the prototype should be here - * These may also be called from the unit test - */ -/*****************************************************************************/ -/** -** \brief Removes TBL resources associated with specified Application -** -** \par Description -** This function is called by cFE Executive Services to cleanup after -** an Application has been terminated. It frees TBL services resources -** that have been allocated to the specified Application. -** -** \par Assumptions, External Events, and Notes: -** -# This function DOES NOT remove any critical tables associated with -** the specified application from the Critical Data Store. -** -******************************************************************************/ -extern int32 CFE_TBL_CleanUpApp(CFE_ES_AppId_t AppId); - -/*****************************************************************************/ -/** -** \brief Removes SB resources associated with specified Application -** -** \par Description -** This function is called by cFE Executive Services to cleanup after -** an Application has been terminated. It frees resources -** that have been allocated to the specified Application. -** -******************************************************************************/ -extern int32 CFE_SB_CleanUpApp(CFE_ES_AppId_t AppId); - -/*****************************************************************************/ -/** -** \brief Removes EVS resources associated with specified Application -** -** \par Description -** This function is called by cFE Executive Services to cleanup after -** an Application has been terminated. It frees resources -** that have been allocated to the specified Application. -** -******************************************************************************/ -extern int32 CFE_EVS_CleanUpApp(CFE_ES_AppId_t AppId); - -/*****************************************************************************/ -/** -** \brief Removes TIME resources associated with specified Application -** -** \par Description -** This function is called by cFE Executive Services to cleanup after -** an Application has been terminated. It frees resources -** that have been allocated to the specified Application. -** -******************************************************************************/ -extern int32 CFE_TIME_CleanUpApp(CFE_ES_AppId_t AppId); - - -/*****************************************************************************/ -/** cFE Core task other function call prototypes *****************************/ -/*****************************************************************************/ -/* - * Functions that are used in a cFE core module other than the module that - * actually defines the function should be prototyped here. - * - * Including the prototype here allows the function to be called properly - * without redefining it at the point of use. - */ - -/*****************************************************************************/ -/** -** \brief Reserve space (or re-obtain previously reserved space) in the Critical Data Store (CDS) -** -** \par Description -** This routine is identical to #CFE_ES_RegisterCDS except it identifies the contents -** of the CDS as a critical table. This is crucial because a critical table CDS must -** only be deleted by cFE Table Services, not via an ES delete CDS command. Otherwise, -** Table Services may be out of sync with the contents of the CDS. -** -** \par Assumptions, External Events, and Notes: -** -# This function assumes input parameters are error free and have met size/value restrictions. -** -# The calling function is responsible for issuing any event messages associated with errors. -** -** \param[in, out] HandlePtr Pointer Application's variable that will contain the CDS Memory Block Handle. *HandlePtr is the handle of the CDS block that can be used in #CFE_ES_CopyToCDS and #CFE_ES_RestoreFromCDS. -** -** \param[in] UserBlockSize The number of bytes needed in the CDS. -** -** \param[in] Name Pointer to character string containing the Application's local name for -** the CDS. -** -** \param[in] CriticalTbl Indicates whether the CDS is to be used as a Critical Table or not -** -** -** \return See return codes for #CFE_ES_RegisterCDS -** -******************************************************************************/ -int32 CFE_ES_RegisterCDSEx(CFE_ES_CDSHandle_t *HandlePtr, size_t UserBlockSize, const char *Name, bool CriticalTbl); - -/*****************************************************************************/ -/** -** \brief Deletes the specified CDS from the CDS Registry and frees CDS Memory -** -** \par Description -** Removes the record of the specified CDS from the CDS Registry and -** frees the associated CDS memory for future use. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param[in] CDSName - Pointer to character string containing complete -** CDS Name (of the format "AppName.CDSName"). -** -** \param[in] CalledByTblServices - Flag that identifies whether the CDS is supposed to -** be a Critical Table Image or not. -** -** \return #CFE_SUCCESS \copydoc CFE_SUCCESS -** \return #CFE_ES_CDS_WRONG_TYPE_ERR \copydoc CFE_ES_CDS_WRONG_TYPE_ERR -** \return #CFE_ES_CDS_OWNER_ACTIVE_ERR \copydoc CFE_ES_CDS_OWNER_ACTIVE_ERR -** \return #CFE_ES_ERR_NAME_NOT_FOUND \copydoc CFE_ES_ERR_NAME_NOT_FOUND -** \return Any of the return values from #CFE_ES_UpdateCDSRegistry -** \return Any of the return values from #CFE_ES_GenPoolPutBlock -** -******************************************************************************/ -int32 CFE_ES_DeleteCDS(const char *CDSName, bool CalledByTblServices); - - - - -#endif /* CFE_PRIVATE_H_ */ diff --git a/fsw/cfe-core/unit-test/CMakeLists.txt b/fsw/cfe-core/unit-test/CMakeLists.txt deleted file mode 100644 index 9df8b60af..000000000 --- a/fsw/cfe-core/unit-test/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -################################################################## -# -# cFE unit test build recipe -# -# This CMake file contains the recipe for building the cFE unit tests. -# It is invoked from the parent directory when unit tests are enabled. -# -################################################################## - -include_directories(${osal_MISSION_DIR}/ut_assert/inc) - -# allow direct inclusion of module-private header files by UT code -# NOTE: this should be minimized and moved to a more targeted -# approach, where only each specific UT module does this. -include_directories( - ${cfe-core_MISSION_DIR}/src/es - ${cfe-core_MISSION_DIR}/src/evs - ${cfe-core_MISSION_DIR}/src/sb - ${cfe-core_MISSION_DIR}/src/tbl - ${cfe-core_MISSION_DIR}/src/time - ${cfe-core_MISSION_DIR}/src/fs -) - -# CFE needs a supplemental test support hook library -add_library(ut_cfe-core_support STATIC - ut_support.c - ut_osprintf_stubs.c -) -target_include_directories(ut_cfe-core_support PUBLIC - ${cfe-core_MISSION_DIR}/src/es - ${cfe-core_MISSION_DIR}/src/evs - ${cfe-core_MISSION_DIR}/src/time - ${CMAKE_CURRENT_SOURCE_DIR}) - -# For each core module, generate the associated unit test -# This is done by linking the stubs of every OTHER module with the -# UT version of the real module (compiled with coverage flags) -foreach(MODULE ${CFE_CORE_MODULES}) - - # The "UT_TARGET_NAME" is a concatenation of the configuration name with the current module - # This avoids target name duplication in case more than one configuration is used - # (All targets should be based on this name) - set(UT_TARGET_NAME "cfe-core_${MODULE}") - - set(CFE_MODULE_FILES) - aux_source_directory(${cfe-core_MISSION_DIR}/src/${MODULE} CFE_MODULE_FILES) - - # Compile the unit(s) under test as an object library - # this allows easy configuration of special flags and include paths - # in particular this should use the UT_COVERAGE_COMPILE_FLAGS for coverage instrumentation - add_library(ut_${UT_TARGET_NAME}_object OBJECT - ${CFE_MODULE_FILES}) - - # Apply the UT_COVERAGE_COMPILE_FLAGS to the units under test - # This should enable coverage analysis on platforms that support this - target_compile_options(ut_${UT_TARGET_NAME}_object PRIVATE ${UT_COVERAGE_COMPILE_FLAGS}) - - # For this object target only, the "override" includes should be injected - # into the include path BEFORE any other include path. This is so the - # override will take precedence over any system-provided version. - target_include_directories(ut_${UT_TARGET_NAME}_object BEFORE PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/modules/inc/overrides) - - add_executable(${UT_TARGET_NAME}_UT - ${MODULE}_UT.c - $) - - # Also add the UT_COVERAGE_LINK_FLAGS to the link command - # This should enable coverage analysis on platforms that support this - target_link_libraries(${UT_TARGET_NAME}_UT - ${UT_COVERAGE_LINK_FLAGS} - ut_cfe-core_support - ut_cfe-core_stubs - sbr # Will be removed when sbr stubs are implemented - ut_assert) - - add_test(${UT_TARGET_NAME}_UT ${UT_TARGET_NAME}_UT) - foreach(TGTNAME ${INSTALL_TARGET_LIST}) - install(TARGETS ${UT_TARGET_NAME}_UT DESTINATION ${TGTNAME}/${UT_INSTALL_SUBDIR}) - endforeach(TGTNAME ${INSTALL_TARGET_LIST}) -endforeach(MODULE ${CFE_CORE_MODULES}) - -# Generate the FS test input files -# As these are just arbitrary data, they only have to be present - they do not need to be updated -execute_process(COMMAND gzip -c ${CMAKE_CURRENT_SOURCE_DIR}/fs_UT.c OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/fs_test.gz) -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/fs_test.nongz "This is an ordinary file\n") - - diff --git a/fsw/cfe-core/unit-test/HowToRunCFEUnitTests.txt b/fsw/cfe-core/unit-test/HowToRunCFEUnitTests.txt deleted file mode 100644 index 0a08226fc..000000000 --- a/fsw/cfe-core/unit-test/HowToRunCFEUnitTests.txt +++ /dev/null @@ -1,104 +0,0 @@ - -Running the cFE Unit tests - ------- Classic Build Instructions --------------- -The cFE Core unit tests are run from the mission/build/"cpuX" directory, where -cpuX is either cpu1 or the name of the mission specific cpu set by the user. The -unit test source code resides in the mission/cfe/fsw/cfe-core/unit-test directory. -The mission/build/cpuX directory contains a script, make_cfe_ut, for building and -executing these tests. The default script uses pc-linux for the baseline platform. -The script may be modified accordingly for running the tests on alternate platforms -(i.e.,ARINC653). This script allows for running a subset of the tests by service -(ES,EVS,etc.). The usage is make_cfe_ut , where service is es, evs, fs, -sb,tbl or time. If no service is specified, all tests are compiled and executed. -In addition, there are several cFE Unit Test Compiler Flags that may be set to -display/log various test results. These flags are defined and set in the -make_cfe_ut script file and may be modified in accordance with the users -needs. - -1. Setup the Mission Build environment -2. Edit the mission/build/cpuX/cfe/cfe-config.mak for the linux platform -3. Go to the mission/build/cpuX directory -4. Run the desired unit test(s) using the make_cfe_ut script as described above -5. View Results -6. Check-in results (if applicable) - ------- Details ------------------------------------ - -1. Setup the Mission Build environment by going to the mission/ directory. Edit -the setvars.sh file and make sure that the environment variables specify the -proper directories. Make any updates as needed. After verifying the contents of -the setvars.sh file, type ". ./setvars.sh" to execute and set these variables. -This sets up the required environment variables used to build and execute the -cFE Unit Tests. - -2. Edit the mission/build/cpuX/cfe/cfe-config.mak for the linux platform. The OS -setting should be "posix" and the PSP setting should be "pc-linux" for the -default platform. NOTE: the cfe-config.mak file identifies additional settings -for supported OS and platforms. - -3. Go to the mission/build/cpuX directory - -4. Run the desired unit test(s) by typing "./make_cfe_ut " - where service is es,evs,fs,sb,tbl or time. If no service is specified, all - tests are compiled and executed. - -5. View results -Pass/Fail/Informational and coverage results will be displayed in the terminal where it -has run. It is recommended to capture these results to a ut_cfe_xx_log.txt file. -see mission/build/cpuX/cfe/unit-test/xx/cfe_xx_???.c.gcov for detailed coverage results. - ##### in file means the line has not been executed. - -see mission/cfe/fsw/cfe-core/unit-test/xxResults/ut_cfe_xx_log.txt for the baselined unit -test output. - -see mission/cfe/fsw/cfe-core/unit-test/xxResults/README.txt for the details on the expected -coverage - -6. To check-in results (if applicable) -Each subsystem should have a ut_cfe_XX_log.txt file that contains the expected baselined -results captured from the console output. All pass/fail/info/coverage results are printed to -the console when the test is executed. - -If any file is not covered 100%, we need to check in the corresponding *.gcov file to show -exactly what lines have not been covered. In most cases, at a minimum this should be the -cfe_xx_task.c.gov file since the forever loop will not have coverage. - -All files specifying results should be checked into the corresponding subproject -under the unit-test subproject. (i.e., SbResults subproject in -mission/cfe/fsw/cfe-core/unit-test/) - - - ------- CMake Build Instructions ----------------------- - -While the The cFE Core unit tests are run from the mission/build/"cpuX" directory -for the classic build, the unit tests for the CMake build are run from -mission/build/cpuX/cfe_core_default_cpuX/unit-tests, -where cpuX is either cpu1 or the name of the mission specific cpu set by the user. The -unit test source code resides in the mission/cfe/fsw/cfe-core/unit-test directory. - - -1. Setup the Mission Build environment via the CMake build instructions with - the additions: - - a. Set 'ENABLE_UNIT_TESTS' to 'TRUE' - b. Optionally set OSAL_USER_C_FLAGS to capture code coverage results during make prep stage. - - e.g. "make ENABLE_UNIT_TESTS=TRUE OSAL_USER_C_FLAGS='-fprofile-arcs -ftest-coverage' prep" - -2. Go to build/cpuX/cfe_core_default_cpuX/unit-tests -3. Run 'make' to build the cFE unit tests -4. Run 'make test' to run the unit tests -5. Results are in Testing/Temporary/LastTest.log -6. Results of failed tests are in Testing/Temporary/LastTest.log - - -If OSAL_USER_C_FLAGS was set up to capture the code coverage, the results may be obtained -via the following steps: - -1. From the top level run 'make lcov' -2. Results will be under - mission/build/cpu1/lcov/index.html - and viewable locally via a web browser - diff --git a/fsw/cfe-core/unit-test/cFE_UT_Doxyfile b/fsw/cfe-core/unit-test/cFE_UT_Doxyfile deleted file mode 100644 index 501b10d00..000000000 --- a/fsw/cfe-core/unit-test/cFE_UT_Doxyfile +++ /dev/null @@ -1,1781 +0,0 @@ -# Doxyfile 1.7.6.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a 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 config 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 -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or sequence of words) that should -# identify the project. Note that if you do not use Doxywizard you need -# to put quotes around the project name if it contains spaces. - -PROJECT_NAME = "cFE Unit Tests" - -# 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 an logo or 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) -# base path where the generated documentation will be put. -# 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 = docs - -# 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 cause performance problems for the file system. - -CREATE_SUBDIRS = 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. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) 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. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) 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. - -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" "the" - -ABBREVIATE_BRIEF = - -# 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. - -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. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then 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. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then 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. - -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 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 if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. - -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 -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = 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 comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -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 behaviour. -# 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 behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -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. - -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. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# 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. - -ALIASES = - -# 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. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -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. - -OPTIMIZE_OUTPUT_VHDL = 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++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. 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 that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# 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); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip 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. - -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 (the default) -# will make doxygen 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. - -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. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) 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. - -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). - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and -# unions with only public data 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 (the default), -# structs, classes, and unions are shown on a separate page (for HTML and Man -# pages) or section (for LaTeX and RTF). - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT 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. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penalty. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will roughly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols. - -SYMBOL_CACHE_SIZE = 0 - -# Similar to the SYMBOL_CACHE_SIZE 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 appear 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. - -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 and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# 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. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When 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 (the default) only methods in the interface are included. - -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 namespaces are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) 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. - -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 (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -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 (the default) these declarations will be included in the -# documentation. - -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 (the default) these blocks will be appended to the -# function's detailed documentation block. - -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 (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -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 -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# 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. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) 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. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -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 default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to 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 default) -# the group names will appear in their defined order. - -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 default), 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. - -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. - -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. - -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. - -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. - -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. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of 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 initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -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. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# 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 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 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 , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -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. The 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. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files -# containing the references data. This must be a list of .bib files. The -# .bib extension is automatically appended if omitted. Using this command -# requires the bibtex tool to be installed. See also -# http://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. - -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 -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED 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. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR 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. - -WARN_IF_DOC_ERROR = YES - -# The 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 (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = 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) - -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 stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be 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. - -INPUT = - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -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 pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# 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 = - -# 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. - -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 - -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. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# 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. - -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 -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -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 option only has effect when -# FILTER_SOURCE_FILES is enabled. - -FILTER_SOURCE_PATTERNS = - -#--------------------------------------------------------------------------- -# 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 also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -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. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# 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. - -REFERENCES_LINK_SOURCE = 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 http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) 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. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# 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. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -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 one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -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. If left blank `html' will be used as the default path. - -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). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. Note that when using a custom header you are responsible -# for the proper inclusion of any scripts and style sheets that doxygen -# needs, which is dependent on the configuration options used. -# It is advised to generate a default header using "doxygen -w html -# header.html footer.html stylesheet.css YourConfigFile" and then modify -# that header. Note that the header is subject to change so you typically -# have to redo this when upgrading to a newer version of doxygen or when -# changing the value of configuration settings such as GENERATE_TREEVIEW! - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -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 the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# style sheet in the HTML output directory as well, or it will be erased! - -HTML_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. - -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 http://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. -# The allowed range is 0 to 359. - -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. - -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. - -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 NO can help when comparing the output of multiple runs. - -HTML_TIMESTAMP = YES - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = 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. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# 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, 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 http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# 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. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, 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. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# When GENERATE_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. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, 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. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, 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. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, 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). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, 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. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -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. - -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. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -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 -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. - -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. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, 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. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, 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. - -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. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) -# at top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. Since the tabs have the same information as the -# navigation tree you can set this option to NO if you already set -# GENERATE_TREEVIEW 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. -# Since the tree basically has the same information as the tab index you -# could consider to set DISABLE_INDEX to NO when enabling this option. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values -# (range [0,1..20]) 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. - -ENUM_VALUES_PER_LINE = 4 - -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = NO - -# 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. - -TREEVIEW_WIDTH = 250 - -# When 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. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# 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. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT 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 before the changes have effect. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered 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 also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. - -USE_MATHJAX = NO - -# 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.org site, so you can quickly see the result without installing -# MathJax, but it is strongly recommended to install a local copy of MathJax -# before deployment. - -MATHJAX_RELPATH = http://www.mathjax.org/mathjax - -# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension -# names that should be enabled during MathJax rendering. - -MATHJAX_EXTENSIONS = - -# 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. - -SEARCHENGINE = YES - -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a PHP enabled web server instead of at the web client -# using Javascript. Doxygen will generate the search PHP script and index -# file to put on the web server. The advantage of the server -# based approach is that it scales better to large projects and allows -# full text search. The disadvantages are that it is more difficult to setup -# and does not have live searching capabilities. - -SERVER_BASED_SEARCH = NO - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -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. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the -# Makefile that is written to the output directory. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = 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. - -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, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4 - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -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. Notice: only use this tag if you know what you are doing! - -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. Notice: only use this tag if you know what you are doing! - -LATEX_FOOTER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). 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. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -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. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE 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. - -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. The default style is "plain". See -# http://en.wikipedia.org/wiki/BibTeX for more info. - -LATEX_BIB_STYLE = plain - -#--------------------------------------------------------------------------- -# 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 very pretty with -# other RTF readers or editors. - -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. If left blank `rtf' will be used as the default path. - -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. - -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 other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load style sheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -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. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# 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 is NO. - -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. - -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. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# 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. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -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. - -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. - -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. - -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. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -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 (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF 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. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# pointed to by INCLUDE_PATH will be searched when a #include is found. - -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. - -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. - -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 -# 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. - -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. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) 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, because these will confuse the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. 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. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that 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. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -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. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF 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. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_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. - -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, 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) - -HAVE_DOT = NO - -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is -# allowed to run in parallel. When set to 0 (the default) 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. - -DOT_NUM_THREADS = 0 - -# By default doxygen will use the Helvetica font for all dot files that -# doxygen generates. When you want a differently looking font 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. - -DOT_FONTNAME = Helvetica - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the Helvetica font. -# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to -# set the path where dot can find it. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are 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. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are 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. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -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. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# 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. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are 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. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are 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. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will generate a graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are 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. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are svg, png, jpg, or gif. -# If left blank png will be used. 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). - -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. 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. - -INTERACTIVE_SVG = NO - -# The tag DOT_PATH 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. - -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). - -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 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. - -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. - -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). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES 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. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/fsw/cfe-core/version_info.cmake b/fsw/cfe-core/version_info.cmake deleted file mode 100644 index d0367a5fa..000000000 --- a/fsw/cfe-core/version_info.cmake +++ /dev/null @@ -1,3 +0,0 @@ -# This indicates the git tag/branch name in the repository that corresponds to this module -# this will be supplied to commands such as "git describe" to get a user-friendly version string. -set(NAME "cfe") diff --git a/modules/cfe_app_intf/CMakeLists.txt b/modules/cfe_app_intf/CMakeLists.txt new file mode 100644 index 000000000..dc241eae3 --- /dev/null +++ b/modules/cfe_app_intf/CMakeLists.txt @@ -0,0 +1,54 @@ +################################################################## +# +# cFE Global/Public Application Interface +# +################################################################## + +# NOTE: This module is shared headers and configuration only, it has has no +# source files of its own. It just defines the intefaces betwen the CFE core +# modules and other private headers that define CFE internal shared data objects. +add_library(cfe_app_intf INTERFACE) + +# The fsw/inc here defines global/shared structures and interfaces +target_include_directories(cfe_app_intf INTERFACE fsw/inc) + +# The list of modules that comprise the "CFE app interface" +# This is the set of APIs that applications and libraries may call directly +# The include path to all of them is +set(cfe_app_intf_MODULES es evs fs msg resourceid sb tbl time osal psp) + +# Propagate any INTERFACE-level include dirs and compile defintions from +# the modules into this abstract interface target +foreach(MOD ${cfe_app_intf_MODULES}) + target_include_directories(cfe_app_intf INTERFACE + $ + ) + target_compile_definitions(cfe_app_intf INTERFACE + $ + ) +endforeach(MOD ${cfe_app_intf_MODULES}) + +# Add unit test coverage subdirectory +# This provides stubs for functions declared in fsw/inc +if (ENABLE_UNIT_TESTS) + add_subdirectory(ut-stubs) +endif (ENABLE_UNIT_TESTS) + +cfs_app_check_intf(${DEP} + cfe_resourceid.h + cfe_endian.h + cfe_msg.h + cfe_error.h + cfe.h + cfe_version.h + + cfe_es_extern_typedefs.h + cfe_evs_extern_typedefs.h + cfe_fs_extern_typedefs.h + cfe_sb_extern_typedefs.h + cfe_tbl_extern_typedefs.h + cfe_time_extern_typedefs.h + + cfe_tbl_filedef.h +) + diff --git a/modules/cfe_app_intf/arch_build.cmake b/modules/cfe_app_intf/arch_build.cmake new file mode 100644 index 000000000..053fbc40f --- /dev/null +++ b/modules/cfe_app_intf/arch_build.cmake @@ -0,0 +1,19 @@ +########################################################### +# +# CFE arch/platform build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# Generate the "cfe_platform_cfg.h" and "cfe_msgids.h" header files +# these must come from mission config + +generate_config_includefile( + FILE_NAME "cfe_msgids.h" + MATCH_SUFFIX "msgids.h" + PREFIXES ${BUILD_CONFIG} +) + diff --git a/fsw/cfe-core/eds/base_types.xml b/modules/cfe_app_intf/eds/base_types.xml similarity index 100% rename from fsw/cfe-core/eds/base_types.xml rename to modules/cfe_app_intf/eds/base_types.xml diff --git a/fsw/cfe-core/eds/ccsds_spacepacket.xml b/modules/cfe_app_intf/eds/ccsds_spacepacket.xml similarity index 100% rename from fsw/cfe-core/eds/ccsds_spacepacket.xml rename to modules/cfe_app_intf/eds/ccsds_spacepacket.xml diff --git a/fsw/cfe-core/eds/cfe_fs.xml b/modules/cfe_app_intf/eds/cfe_fs.xml similarity index 100% rename from fsw/cfe-core/eds/cfe_fs.xml rename to modules/cfe_app_intf/eds/cfe_fs.xml diff --git a/fsw/cfe-core/eds/config.xml b/modules/cfe_app_intf/eds/config.xml similarity index 100% rename from fsw/cfe-core/eds/config.xml rename to modules/cfe_app_intf/eds/config.xml diff --git a/fsw/cfe-core/src/inc/cfe.h b/modules/cfe_app_intf/fsw/inc/cfe.h similarity index 92% rename from fsw/cfe-core/src/inc/cfe.h rename to modules/cfe_app_intf/fsw/inc/cfe.h index b58931d00..d3a62f206 100644 --- a/fsw/cfe-core/src/inc/cfe.h +++ b/modules/cfe_app_intf/fsw/inc/cfe.h @@ -36,8 +36,8 @@ /* ** Ensure that header is included only once... */ -#ifndef _cfe_ -#define _cfe_ +#ifndef CFE_H +#define CFE_H #include "common_types.h" /* Define basic data types */ @@ -54,8 +54,9 @@ #include "cfe_time.h" /* Define Time Service API */ #include "cfe_tbl.h" /* Define Table Service API */ -#include "cfe_msg_api.h" /* Define Message API */ +#include "cfe_msg.h" /* Define Message API */ +#include "cfe_resourceid.h" /* Define ResourceID API */ #include "cfe_psp.h" /* Define Platform Support Package API */ -#endif /* _cfe_ */ +#endif /* CFE_H */ diff --git a/fsw/cfe-core/src/inc/ccsds.h b/modules/cfe_app_intf/fsw/inc/cfe_endian.h similarity index 88% rename from fsw/cfe-core/src/inc/ccsds.h rename to modules/cfe_app_intf/fsw/inc/cfe_endian.h index b928062f5..b43af6cbb 100644 --- a/fsw/cfe-core/src/inc/ccsds.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_endian.h @@ -19,22 +19,20 @@ */ /****************************************************************************** -** File: ccsds.h +** File: cfe_endian.h ** ** Purpose: -** Define typedefs and macros for CCSDS packet headers. +** Define macros to enforce big-endian/network byte order for 16 and 32 bit integers ** ******************************************************************************/ -#ifndef _ccsds_ -#define _ccsds_ +#ifndef CFE_ENDIAN_H +#define CFE_ENDIAN_H /* ** Include Files */ #include "common_types.h" -#include "cfe_mission_cfg.h" -#include "cfe_msg_hdr.h" /* Macro to convert 16/32 bit types from platform "endianness" to Big Endian */ @@ -46,4 +44,4 @@ #define CFE_MAKE_BIG32(n) ( (((n) << 24) & 0xFF000000) | (((n) << 8) & 0x00FF0000) | (((n) >> 8) & 0x0000FF00) | (((n) >> 24) & 0x000000FF) ) #endif -#endif /* _ccsds_ */ +#endif /* CFE_ENDIAN_H */ diff --git a/fsw/cfe-core/src/inc/cfe_error.h b/modules/cfe_app_intf/fsw/inc/cfe_error.h similarity index 100% rename from fsw/cfe-core/src/inc/cfe_error.h rename to modules/cfe_app_intf/fsw/inc/cfe_error.h diff --git a/fsw/cfe-core/src/inc/cfe_es.h b/modules/cfe_app_intf/fsw/inc/cfe_es.h similarity index 93% rename from fsw/cfe-core/src/inc/cfe_es.h rename to modules/cfe_app_intf/fsw/inc/cfe_es.h index 2e00165bf..c75746ffc 100644 --- a/fsw/cfe-core/src/inc/cfe_es.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_es.h @@ -32,24 +32,16 @@ ** */ -#ifndef _cfe_es_ -#define _cfe_es_ +#ifndef CFE_ES_API_H +#define CFE_ES_API_H /* ** Includes */ -#include "cfe_es_extern_typedefs.h" -#include "cfe_es_msg.h" -#include "cfe_mission_cfg.h" -#include "cfe_perfids.h" +#include "common_types.h" #include "cfe_error.h" -#include "cfe_resourceid_api.h" +#include "cfe_es_api_typedefs.h" -/*****************************************************************************/ - -/* -** Macro Definitions -*/ /* ** The OS_PRINTF macro may be defined by OSAL to enable @@ -60,156 +52,14 @@ #define OS_PRINTF(m,n) #endif -#define CFE_ES_DBIT(x) (1L << (x)) /* Places a one at bit positions 0 thru 31 */ -#define CFE_ES_DTEST(i,x) (((i) & CFE_ES_DBIT(x)) != 0) /* true iff bit x of i is set */ -#define CFE_ES_TEST_LONG_MASK(m,s) (CFE_ES_DTEST(m[(s)/32],(s)%32)) /* Test a bit within an array of 32-bit integers. */ - - -/* -** Note about reset type and subtypes: -** -** These values come from the PSP so the actual definition of these enumerations -** was moved to the PSP header file . -** -** In the future the Electronic Data sheets (EDS) for PSP/ES -** will define the exact values to use in telemetry messages. -*/ - -/* -** Reset types -*/ -/** \name Reset Type extensions */ -/** \{ */ -#define CFE_ES_APP_RESTART CFE_PSP_RST_TYPE_MAX /**< Application only was reset (extend the PSP enumeration here) */ -/** \} */ - -/** \name Conversions for ES resource IDs */ -/** \{ */ - -/* - * Conversion macros for each ES resource ID subtype - * - * These accept a generic/non-specific CFE_ResourceId_t value - * and convert it to the corresponding resource-specific type. - * - * These should only be used when with the resource ID constants, - * or where the code has confirmed or is determining the generic - * identifier does correspond to a resource of that type. - */ -#define CFE_ES_APPID_C(val) ((CFE_ES_AppId_t)CFE_RESOURCEID_WRAP(val)) -#define CFE_ES_TASKID_C(val) ((CFE_ES_TaskId_t)CFE_RESOURCEID_WRAP(val)) -#define CFE_ES_LIBID_C(val) ((CFE_ES_LibId_t)CFE_RESOURCEID_WRAP(val)) -#define CFE_ES_COUNTERID_C(val) ((CFE_ES_CounterId_t)CFE_RESOURCEID_WRAP(val)) -#define CFE_ES_MEMHANDLE_C(val) ((CFE_ES_MemHandle_t)CFE_RESOURCEID_WRAP(val)) -#define CFE_ES_CDSHANDLE_C(val) ((CFE_ES_CDSHandle_t)CFE_RESOURCEID_WRAP(val)) - -/** \} */ - -/** \name Type-specific initalizers for "undefined" resource IDs */ -/** \{ */ - -#define CFE_ES_APPID_UNDEFINED CFE_ES_APPID_C(CFE_RESOURCEID_UNDEFINED) -#define CFE_ES_TASKID_UNDEFINED CFE_ES_TASKID_C(CFE_RESOURCEID_UNDEFINED) -#define CFE_ES_LIBID_UNDEFINED CFE_ES_LIBID_C(CFE_RESOURCEID_UNDEFINED) -#define CFE_ES_COUNTERID_UNDEFINED CFE_ES_COUNTERID_C(CFE_RESOURCEID_UNDEFINED) -#define CFE_ES_MEMHANDLE_UNDEFINED CFE_ES_MEMHANDLE_C(CFE_RESOURCEID_UNDEFINED) -#define CFE_ES_CDS_BAD_HANDLE CFE_ES_CDSHANDLE_C(CFE_RESOURCEID_UNDEFINED) -/** \} */ - -#define CFE_ES_NO_MUTEX false /**< \brief Indicates that the memory pool selection will not use a semaphore */ -#define CFE_ES_USE_MUTEX true /**< \brief Indicates that the memory pool selection will use a semaphore */ - -/** \name Task Stack Constants */ -/** \{ */ - -/** - * \brief Indicates that the stack for the child task should be dynamically allocated. - * - * This value may be supplied as the Stack Pointer argument to CFE_ES_ChildTaskCreate() - * to indicate that the stack should be dynamically allocated. - */ -#define CFE_ES_TASK_STACK_ALLOCATE NULL /* aka OS_TASK_STACK_ALLOCATE in proposed OSAL change */ -/** \} */ - - - - -/*****************************************************************************/ /* -** Type Definitions -*/ - -/* -** Entry Function Prototypes +** Macro Definitions */ -typedef void (*CFE_ES_TaskEntryFuncPtr_t)(void); /**< \brief Required Prototype of Task Main Functions */ -typedef int32 (*CFE_ES_LibraryEntryFuncPtr_t)(CFE_ES_LibId_t LibId); /**< \brief Required Prototype of Library Initialization Functions */ -/** - * \brief Compatible typedef for ES child task entry point. - * - * All ES task functions (main + child) use the same entry point type. - */ -typedef CFE_ES_TaskEntryFuncPtr_t CFE_ES_ChildTaskMainFuncPtr_t; - -/** - * @brief Type for the stack pointer of tasks. - * - * This type is used in the CFE ES task API. - */ -typedef void* CFE_ES_StackPointer_t; /* aka osal_stackptr_t in proposed OSAL change */ - -/** - * \brief Pool Alignement - * - * Union that can be used for minimum memory alignment of ES memory pools on the target. - * It contains the longest native data types such that the alignment of this structure - * should reflect the largest possible alignment requirements for any data on this processor. - */ -typedef union CFE_ES_PoolAlign -{ - void *Ptr; /**< \brief Aligned pointer */ - /* note -- native types (int/double) are intentional here */ - long long int LongInt; /**< \brief Aligned Long Integer */ - long double LongDouble; /**< \brief Aligned Long Double */ -} CFE_ES_PoolAlign_t; - -/** - * \brief Static Pool Type - * - * A macro to help instantiate static memory pools that are correctly aligned. - * This resolves to a union type that contains a member called "Data" that will - * be correctly aligned to be a memory pool and sized according to the argument. - */ -#define CFE_ES_STATIC_POOL_TYPE(size) union { CFE_ES_PoolAlign_t Align; uint8 Data[size]; } - -/** - * @brief Pointer type used for memory pool API - * - * This is used in the Get/Put API calls to refer to a pool buffer. - * - * This pointer is expected to be type cast to the real object - * type after getting a new buffer. Using void* allows this - * type conversion to occur easily. - * - * @note Older versions of CFE implemented the API using a uint32*, - * which required explicit type casting everywhere it was called. - * Although the API type is now void* to make usage easier, the - * pool buffers are aligned to machine requirements - typically 64 bits. - */ -typedef void* CFE_ES_MemPoolBuf_t; +#define CFE_ES_DBIT(x) (1L << (x)) /* Places a one at bit positions 0 thru 31 */ +#define CFE_ES_DTEST(i,x) (((i) & CFE_ES_DBIT(x)) != 0) /* true iff bit x of i is set */ +#define CFE_ES_TEST_LONG_MASK(m,s) (CFE_ES_DTEST(m[(s)/32],(s)%32)) /* Test a bit within an array of 32-bit integers. */ -/** - * @brief Conversion macro to create buffer pointer from another type - * - * In cases where the actual buffer pointer is computed, this macro - * aids in converting the computed address (typically an OSAL "cpuaddr" - * type) into a buffer pointer. - * - * @note Any address calculation needs to take machine alignment - * requirements into account. - */ -#define CFE_ES_MEMPOOLBUF_C(x) ((CFE_ES_MemPoolBuf_t)(x)) /*****************************************************************************/ /* @@ -1818,4 +1668,109 @@ CFE_Status_t CFE_ES_GetGenCounterName(char *CounterName, CFE_ES_CounterId_t Coun /**@}*/ -#endif /* _cfe_es_ */ + +/* + * The internal APIs prototyped within this block are only intended to be invoked from + * other CFE core apps. They still need to be prototyped in the shared header such that + * they can be called from other core modules, but applications should not call these. + */ +#ifdef _CFE_CORE_ + +/** @defgroup CFEAPIESCoreInternal cFE Internal Executive Service APIs, internal to CFE core + * @{ + */ + + +/*****************************************************************************/ +/** +** \brief Entry Point for cFE Core Application +** +** \par Description +** This is the entry point to the cFE ES Core Application. +** +** \par Assumptions, External Events, and Notes: +** None +** +** +******************************************************************************/ +extern void CFE_ES_TaskMain(void); + + +/*****************************************************************************/ +/** +** \brief Initializes the cFE core module API Library +** +** \par Description +** Initializes the cFE core module API Library +** +** \par Assumptions, External Events, and Notes: +** -# This function MUST be called before any module API's are called. +** +******************************************************************************/ +extern int32 CFE_ES_CDS_EarlyInit(void); + + +/*****************************************************************************/ +/** +** \brief Reserve space (or re-obtain previously reserved space) in the Critical Data Store (CDS) +** +** \par Description +** This routine is identical to #CFE_ES_RegisterCDS except it identifies the contents +** of the CDS as a critical table. This is crucial because a critical table CDS must +** only be deleted by cFE Table Services, not via an ES delete CDS command. Otherwise, +** Table Services may be out of sync with the contents of the CDS. +** +** \par Assumptions, External Events, and Notes: +** -# This function assumes input parameters are error free and have met size/value restrictions. +** -# The calling function is responsible for issuing any event messages associated with errors. +** +** \param[in, out] HandlePtr Pointer Application's variable that will contain the CDS Memory Block Handle. *HandlePtr is the handle of the CDS block that can be used in #CFE_ES_CopyToCDS and #CFE_ES_RestoreFromCDS. +** +** \param[in] UserBlockSize The number of bytes needed in the CDS. +** +** \param[in] Name Pointer to character string containing the Application's local name for +** the CDS. +** +** \param[in] CriticalTbl Indicates whether the CDS is to be used as a Critical Table or not +** +** +** \return See return codes for #CFE_ES_RegisterCDS +** +******************************************************************************/ +int32 CFE_ES_RegisterCDSEx(CFE_ES_CDSHandle_t *HandlePtr, size_t UserBlockSize, const char *Name, bool CriticalTbl); + +/*****************************************************************************/ +/** +** \brief Deletes the specified CDS from the CDS Registry and frees CDS Memory +** +** \par Description +** Removes the record of the specified CDS from the CDS Registry and +** frees the associated CDS memory for future use. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param[in] CDSName - Pointer to character string containing complete +** CDS Name (of the format "AppName.CDSName"). +** +** \param[in] CalledByTblServices - Flag that identifies whether the CDS is supposed to +** be a Critical Table Image or not. +** +** \return #CFE_SUCCESS \copydoc CFE_SUCCESS +** \return #CFE_ES_CDS_WRONG_TYPE_ERR \copydoc CFE_ES_CDS_WRONG_TYPE_ERR +** \return #CFE_ES_CDS_OWNER_ACTIVE_ERR \copydoc CFE_ES_CDS_OWNER_ACTIVE_ERR +** \return #CFE_ES_ERR_NAME_NOT_FOUND \copydoc CFE_ES_ERR_NAME_NOT_FOUND +** \return Any of the return values from #CFE_ES_UpdateCDSRegistry +** \return Any of the return values from #CFE_ES_GenPoolPutBlock +** +******************************************************************************/ +int32 CFE_ES_DeleteCDS(const char *CDSName, bool CalledByTblServices); + + +/**@}*/ + +#endif /* _CFE_CORE_ */ + + + +#endif /* CFE_ES_API_H */ diff --git a/modules/cfe_app_intf/fsw/inc/cfe_es_api_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_es_api_typedefs.h new file mode 100644 index 000000000..e88839a1e --- /dev/null +++ b/modules/cfe_app_intf/fsw/inc/cfe_es_api_typedefs.h @@ -0,0 +1,194 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/* +** File: cfe_es_api_typedefs.h +** +** Purpose: +** Unit specification for Executive Services library functions and macros. +** +** References: +** Flight Software Branch C Coding Standard Version 1.0a +** cFE Flight Software Application Developers Guide +** +** Notes: +** +*/ + +#ifndef CFE_ES_ABSTRACT_TYPES_H +#define CFE_ES_ABSTRACT_TYPES_H + +/* +** Includes +*/ +#include "common_types.h" +#include "cfe_es_extern_typedefs.h" +#include "cfe_es_msg.h" + + + +/* +** Note about reset type and subtypes: +** +** These values come from the PSP so the actual definition of these enumerations +** was moved to the PSP header file . +** +** In the future the Electronic Data sheets (EDS) for PSP/ES +** will define the exact values to use in telemetry messages. +*/ + +/* +** Reset types +*/ +/** \name Reset Type extensions */ +/** \{ */ +#define CFE_ES_APP_RESTART CFE_PSP_RST_TYPE_MAX /**< Application only was reset (extend the PSP enumeration here) */ +/** \} */ + + +/*****************************************************************************/ +/* +** Type Definitions +*/ + +/* +** Entry Function Prototypes +*/ +typedef void (*CFE_ES_TaskEntryFuncPtr_t)(void); /**< \brief Required Prototype of Task Main Functions */ +typedef int32 (*CFE_ES_LibraryEntryFuncPtr_t)(CFE_ES_LibId_t LibId); /**< \brief Required Prototype of Library Initialization Functions */ + +/** + * \brief Compatible typedef for ES child task entry point. + * + * All ES task functions (main + child) use the same entry point type. + */ +typedef CFE_ES_TaskEntryFuncPtr_t CFE_ES_ChildTaskMainFuncPtr_t; + +/** + * @brief Type for the stack pointer of tasks. + * + * This type is used in the CFE ES task API. + */ +typedef void* CFE_ES_StackPointer_t; /* aka osal_stackptr_t in proposed OSAL change */ + +/** + * \brief Pool Alignement + * + * Union that can be used for minimum memory alignment of ES memory pools on the target. + * It contains the longest native data types such that the alignment of this structure + * should reflect the largest possible alignment requirements for any data on this processor. + */ +typedef union CFE_ES_PoolAlign +{ + void *Ptr; /**< \brief Aligned pointer */ + /* note -- native types (int/double) are intentional here */ + long long int LongInt; /**< \brief Aligned Long Integer */ + long double LongDouble; /**< \brief Aligned Long Double */ +} CFE_ES_PoolAlign_t; + +/** + * \brief Static Pool Type + * + * A macro to help instantiate static memory pools that are correctly aligned. + * This resolves to a union type that contains a member called "Data" that will + * be correctly aligned to be a memory pool and sized according to the argument. + */ +#define CFE_ES_STATIC_POOL_TYPE(size) union { CFE_ES_PoolAlign_t Align; uint8 Data[size]; } + + +/** + * @brief Pointer type used for memory pool API + * + * This is used in the Get/Put API calls to refer to a pool buffer. + * + * This pointer is expected to be type cast to the real object + * type after getting a new buffer. Using void* allows this + * type conversion to occur easily. + * + * @note Older versions of CFE implemented the API using a uint32*, + * which required explicit type casting everywhere it was called. + * Although the API type is now void* to make usage easier, the + * pool buffers are aligned to machine requirements - typically 64 bits. + */ +typedef void* CFE_ES_MemPoolBuf_t; + +/** + * @brief Conversion macro to create buffer pointer from another type + * + * In cases where the actual buffer pointer is computed, this macro + * aids in converting the computed address (typically an OSAL "cpuaddr" + * type) into a buffer pointer. + * + * @note Any address calculation needs to take machine alignment + * requirements into account. + */ +#define CFE_ES_MEMPOOLBUF_C(x) ((CFE_ES_MemPoolBuf_t)(x)) + +/** \name Conversions for ES resource IDs */ +/** \{ */ + +/* + * Conversion macros for each ES resource ID subtype + * + * These accept a generic/non-specific CFE_ResourceId_t value + * and convert it to the corresponding resource-specific type. + * + * These should only be used when with the resource ID constants, + * or where the code has confirmed or is determining the generic + * identifier does correspond to a resource of that type. + */ +#define CFE_ES_APPID_C(val) ((CFE_ES_AppId_t)CFE_RESOURCEID_WRAP(val)) +#define CFE_ES_TASKID_C(val) ((CFE_ES_TaskId_t)CFE_RESOURCEID_WRAP(val)) +#define CFE_ES_LIBID_C(val) ((CFE_ES_LibId_t)CFE_RESOURCEID_WRAP(val)) +#define CFE_ES_COUNTERID_C(val) ((CFE_ES_CounterId_t)CFE_RESOURCEID_WRAP(val)) +#define CFE_ES_MEMHANDLE_C(val) ((CFE_ES_MemHandle_t)CFE_RESOURCEID_WRAP(val)) +#define CFE_ES_CDSHANDLE_C(val) ((CFE_ES_CDSHandle_t)CFE_RESOURCEID_WRAP(val)) + +/** \} */ + +/** \name Type-specific initalizers for "undefined" resource IDs */ +/** \{ */ + +#define CFE_ES_APPID_UNDEFINED CFE_ES_APPID_C(CFE_RESOURCEID_UNDEFINED) +#define CFE_ES_TASKID_UNDEFINED CFE_ES_TASKID_C(CFE_RESOURCEID_UNDEFINED) +#define CFE_ES_LIBID_UNDEFINED CFE_ES_LIBID_C(CFE_RESOURCEID_UNDEFINED) +#define CFE_ES_COUNTERID_UNDEFINED CFE_ES_COUNTERID_C(CFE_RESOURCEID_UNDEFINED) +#define CFE_ES_MEMHANDLE_UNDEFINED CFE_ES_MEMHANDLE_C(CFE_RESOURCEID_UNDEFINED) +#define CFE_ES_CDS_BAD_HANDLE CFE_ES_CDSHANDLE_C(CFE_RESOURCEID_UNDEFINED) +/** \} */ + +/** \name Task Stack Constants */ +/** \{ */ + +/** + * \brief Indicates that the stack for the child task should be dynamically allocated. + * + * This value may be supplied as the Stack Pointer argument to CFE_ES_ChildTaskCreate() + * to indicate that the stack should be dynamically allocated. + */ +#define CFE_ES_TASK_STACK_ALLOCATE NULL /* aka OS_TASK_STACK_ALLOCATE in proposed OSAL change */ +/** \} */ + +#define CFE_ES_NO_MUTEX false /**< \brief Indicates that the memory pool selection will not use a semaphore */ +#define CFE_ES_USE_MUTEX true /**< \brief Indicates that the memory pool selection will use a semaphore */ + + + +#endif /* CFE_ES_ABSTRACT_TYPES_H */ diff --git a/fsw/cfe-core/src/inc/cfe_es_extern_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_es_extern_typedefs.h similarity index 99% rename from fsw/cfe-core/src/inc/cfe_es_extern_typedefs.h rename to modules/cfe_app_intf/fsw/inc/cfe_es_extern_typedefs.h index 36c2d1ee3..86e73fff9 100644 --- a/fsw/cfe-core/src/inc/cfe_es_extern_typedefs.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_es_extern_typedefs.h @@ -26,7 +26,7 @@ #ifdef CFE_EDS_ENABLED_BUILD /* Use the EDS generated version of these types */ -#include "cfe_es_eds_typedefs.h" +#include "cfe_es_eds_api_typedefs.h" #else /* Use the local definitions of these types */ diff --git a/fsw/cfe-core/src/inc/cfe_evs.h b/modules/cfe_app_intf/fsw/inc/cfe_evs.h similarity index 88% rename from fsw/cfe-core/src/inc/cfe_evs.h rename to modules/cfe_app_intf/fsw/inc/cfe_evs.h index 104fc05d6..0462f56aa 100644 --- a/fsw/cfe-core/src/inc/cfe_evs.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_evs.h @@ -32,33 +32,16 @@ ** Flight Software Branch C Coding Standard Version 1.0a **/ -#ifndef _cfe_evs_ -#define _cfe_evs_ +#ifndef CFE_EVS_API_H +#define CFE_EVS_API_H /********************************** Include Files ************************************/ -#include "cfe_evs_extern_typedefs.h" -#include "cfe_error.h" #include "common_types.h" /* Basic data types */ -#include "cfe_time.h" /* Time library function definitions */ -#include "cfe_evs_msg.h" /* EVS command codes and data structures*/ -#include "osapi.h" -#include "cfe_sb.h" - - - - - - -/******************* Macro Definitions ***********************/ +#include "cfe_error.h" +#include "cfe_evs_api_typedefs.h" +#include "cfe_es_api_typedefs.h" +#include "cfe_time_api_typedefs.h" -/* -** The OS_PRINTF macro may be defined by OSAL to enable -** printf-style argument checking. If using a version of OSAL -** that does not define this then define it as a no-op. -*/ -#ifndef OS_PRINTF -#define OS_PRINTF(m,n) -#endif /* ** Utility macros to make for simpler/more compact/readable code. @@ -69,32 +52,6 @@ #define CFE_EVS_SendErr(E,...) CFE_EVS_Send(E, ERROR, __VA_ARGS__) #define CFE_EVS_SendCrit(E,...) CFE_EVS_Send(E, CRITICAL, __VA_ARGS__) -/** \name Common Event Filter Mask Values */ -/** \{ */ -#define CFE_EVS_NO_FILTER 0x0000 /**< \brief Stops any filtering. All messages are sent. */ -#define CFE_EVS_FIRST_ONE_STOP 0xFFFF /**< \brief Sends the first event. All remaining messages are filtered. */ -#define CFE_EVS_FIRST_TWO_STOP 0xFFFE /**< \brief Sends the first 2 events. All remaining messages are filtered. */ -#define CFE_EVS_FIRST_4_STOP 0xFFFC /**< \brief Sends the first 4 events. All remaining messages are filtered. */ -#define CFE_EVS_FIRST_8_STOP 0xFFF8 /**< \brief Sends the first 8 events. All remaining messages are filtered. */ -#define CFE_EVS_FIRST_16_STOP 0xFFF0 /**< \brief Sends the first 16 events. All remaining messages are filtered. */ -#define CFE_EVS_FIRST_32_STOP 0xFFE0 /**< \brief Sends the first 32 events. All remaining messages are filtered. */ -#define CFE_EVS_FIRST_64_STOP 0xFFC0 /**< \brief Sends the first 64 events. All remaining messages are filtered. */ -#define CFE_EVS_EVERY_OTHER_ONE 0x0001 /**< \brief Sends every other event. */ -#define CFE_EVS_EVERY_OTHER_TWO 0x0002 /**< \brief Sends two, filters one, sends two, filters one, etc */ -#define CFE_EVS_EVERY_FOURTH_ONE 0x0003 /**< \brief Sends every fourth event message. All others are filtered. */ -/** \} */ - -/****************** Structure Definitions *********************/ - -/** \brief Event message filter defintion structure */ -typedef struct CFE_EVS_BinFilter { - uint16 EventID; /**< \brief Numerical event identifier */ - uint16 Mask; /**< \brief Binary filter mask value */ - -} CFE_EVS_BinFilter_t; - -/* Command packet structures */ - /****************** Function Prototypes **********************/ @@ -381,4 +338,60 @@ CFE_Status_t CFE_EVS_ResetAllFilters ( void ); /**@}*/ -#endif /* _cfe_evs_ */ +/* + * The internal APIs prototyped within this block are only intended to be invoked from + * other CFE core apps. They still need to be prototyped in the shared header such that + * they can be called from other core modules, but applications should not call these. + */ +#ifdef _CFE_CORE_ + +/** @defgroup CFEAPIEVSCoreInternal cFE Internal Event Services APIs, internal to CFE core + * @{ + */ + +/*****************************************************************************/ +/** +** \brief Entry Point for cFE Core Application +** +** \par Description +** This is the entry point to the cFE EVS Core Application. +** +** \par Assumptions, External Events, and Notes: +** None +** +** +******************************************************************************/ +extern void CFE_EVS_TaskMain(void); + +/*****************************************************************************/ +/** +** \brief Initializes the cFE core module API Library +** +** \par Description +** Initializes the cFE core module API Library +** +** \par Assumptions, External Events, and Notes: +** -# This function MUST be called before any module API's are called. +** +******************************************************************************/ +extern int32 CFE_EVS_EarlyInit(void); + +/*****************************************************************************/ +/** +** \brief Removes EVS resources associated with specified Application +** +** \par Description +** This function is called by cFE Executive Services to cleanup after +** an Application has been terminated. It frees resources +** that have been allocated to the specified Application. +** +******************************************************************************/ +extern int32 CFE_EVS_CleanUpApp(CFE_ES_AppId_t AppId); + + +/**@}*/ + +#endif /* _CFE_CORE_ */ + + +#endif /* CFE_EVS_API_H */ diff --git a/modules/cfe_app_intf/fsw/inc/cfe_evs_api_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_evs_api_typedefs.h new file mode 100644 index 000000000..427505193 --- /dev/null +++ b/modules/cfe_app_intf/fsw/inc/cfe_evs_api_typedefs.h @@ -0,0 +1,70 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/* +** Filename: cfe_evs.h +** +** Title: Event Services API Application Library Header File +** +** Purpose: +** Unit specification for Event services library functions and macros. +** +** Design Notes: +** +** References: +** Flight Software Branch C Coding Standard Version 1.0a +**/ + +#ifndef CFE_EVS_ABSTRACT_TYPES_H +#define CFE_EVS_ABSTRACT_TYPES_H + +/********************************** Include Files ************************************/ +#include "common_types.h" /* Basic data types */ +#include "cfe_evs_extern_typedefs.h" + +/** \name Common Event Filter Mask Values */ +/** \{ */ +#define CFE_EVS_NO_FILTER 0x0000 /**< \brief Stops any filtering. All messages are sent. */ +#define CFE_EVS_FIRST_ONE_STOP 0xFFFF /**< \brief Sends the first event. All remaining messages are filtered. */ +#define CFE_EVS_FIRST_TWO_STOP 0xFFFE /**< \brief Sends the first 2 events. All remaining messages are filtered. */ +#define CFE_EVS_FIRST_4_STOP 0xFFFC /**< \brief Sends the first 4 events. All remaining messages are filtered. */ +#define CFE_EVS_FIRST_8_STOP 0xFFF8 /**< \brief Sends the first 8 events. All remaining messages are filtered. */ +#define CFE_EVS_FIRST_16_STOP 0xFFF0 /**< \brief Sends the first 16 events. All remaining messages are filtered. */ +#define CFE_EVS_FIRST_32_STOP 0xFFE0 /**< \brief Sends the first 32 events. All remaining messages are filtered. */ +#define CFE_EVS_FIRST_64_STOP 0xFFC0 /**< \brief Sends the first 64 events. All remaining messages are filtered. */ +#define CFE_EVS_EVERY_OTHER_ONE 0x0001 /**< \brief Sends every other event. */ +#define CFE_EVS_EVERY_OTHER_TWO 0x0002 /**< \brief Sends two, filters one, sends two, filters one, etc */ +#define CFE_EVS_EVERY_FOURTH_ONE 0x0003 /**< \brief Sends every fourth event message. All others are filtered. */ +/** \} */ + + + +/****************** Structure Definitions *********************/ + +/** \brief Event message filter defintion structure */ +typedef struct CFE_EVS_BinFilter { + uint16 EventID; /**< \brief Numerical event identifier */ + uint16 Mask; /**< \brief Binary filter mask value */ + +} CFE_EVS_BinFilter_t; + + + +#endif /* CFE_EVS_ABSTRACT_TYPES_H */ diff --git a/fsw/cfe-core/src/inc/cfe_evs_extern_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_evs_extern_typedefs.h similarity index 99% rename from fsw/cfe-core/src/inc/cfe_evs_extern_typedefs.h rename to modules/cfe_app_intf/fsw/inc/cfe_evs_extern_typedefs.h index e0b701427..5021ef0f9 100644 --- a/fsw/cfe-core/src/inc/cfe_evs_extern_typedefs.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_evs_extern_typedefs.h @@ -26,7 +26,7 @@ #ifdef CFE_EDS_ENABLED_BUILD /* Use the EDS generated version of these types */ -#include "cfe_evs_eds_typedefs.h" +#include "cfe_evs_eds_api_typedefs.h" #else /* Use the local definitions of these types */ diff --git a/fsw/cfe-core/src/inc/cfe_fs.h b/modules/cfe_app_intf/fsw/inc/cfe_fs.h similarity index 80% rename from fsw/cfe-core/src/inc/cfe_fs.h rename to modules/cfe_app_intf/fsw/inc/cfe_fs.h index 13be4d0c3..a75cff8fc 100644 --- a/fsw/cfe-core/src/inc/cfe_fs.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_fs.h @@ -37,91 +37,12 @@ /* ** Required header files... */ -#include "cfe_fs_extern_typedefs.h" -#include "cfe_error.h" #include "common_types.h" -#include "cfe_time.h" - -/** - * \brief Generalized file types/categories known to FS - * - * This defines different categories of files, where they - * may reside in different default locations of the virtualized file system. - * - * This is different from, and should not be confused with, the "SubType" - * field in the FS header. This value is only used at runtime for FS APIs - * and should not actually appear in any output file or message. - */ -typedef enum -{ - CFE_FS_FileCategory_UNKNOWN, /**< Placeholder, unknown file category */ - CFE_FS_FileCategory_DYNAMIC_MODULE, /**< Dynamically loadable apps/libraries (e.g. .so, .o, .dll, etc) */ - CFE_FS_FileCategory_BINARY_DATA_DUMP, /**< Binary log file generated by various data dump commands */ - CFE_FS_FileCategory_TEXT_LOG, /**< Text-based log file generated by various commands */ - CFE_FS_FileCategory_SCRIPT, /**< Text-based Script files (e.g. ES startup script) */ - CFE_FS_FileCategory_TEMP, /**< Temporary/Ephemeral files */ - CFE_FS_FileCategory_MAX /**< Placeholder, keep last */ -} CFE_FS_FileCategory_t; - -/* - * Because FS is a library not an app, it does not have its own context or - * event IDs. The file writer runs in the context of the ES background task - * on behalf of whatever App requested the file write. - * - * This is a list of abstract events associated with background file write jobs. - * An app requesting the file write must supply a callback function to translate - * these into its own event IDs for feedback (i.e. file complete, error conditions, etc). - */ -typedef enum -{ - CFE_FS_FileWriteEvent_UNDEFINED, /* placeholder, no-op, keep as 0 */ - - CFE_FS_FileWriteEvent_COMPLETE, /**< File is completed successfully */ - CFE_FS_FileWriteEvent_CREATE_ERROR, /**< Unable to create/open file */ - CFE_FS_FileWriteEvent_HEADER_WRITE_ERROR, /**< Unable to write FS header */ - CFE_FS_FileWriteEvent_RECORD_WRITE_ERROR, /**< Unable to write data record */ - - CFE_FS_FileWriteEvent_MAX /* placeholder, no-op, keep last */ - -} CFE_FS_FileWriteEvent_t; - - -/** - * Data Getter routine provided by requester - * - * Outputs a data block. Should return true if the file is complete (last record/EOF), otherwise return false. - */ -typedef bool (*CFE_FS_FileWriteGetData_t)(void *Meta, uint32 RecordNum, void **Buffer, size_t *BufSize); - -/** - * Event generator routine provided by requester - * - * Invoked from certain points in the file write process. Implementation may invoke CFE_EVS_SendEvent() appropriately - * to inform of progress. - */ -typedef void (*CFE_FS_FileWriteOnEvent_t)(void *Meta, CFE_FS_FileWriteEvent_t Event, int32 Status, uint32 RecordNum, size_t BlockSize, size_t Position); - -/** - * \brief External Metadata/State object associated with background file writes - * - * Applications intending to schedule background file write jobs should instantiate - * this object in static/global data memory. This keeps track of the state of the - * file write request(s). - */ -typedef struct CFE_FS_FileWriteMetaData -{ - volatile bool IsPending; /**< Whether request is pending (volatile as it may be checked outside lock) */ - - char FileName[OS_MAX_PATH_LEN]; /**< Name of file to write */ - - /* Data for FS header */ - uint32 FileSubType; /**< Type of file to write (for FS header) */ - char Description[CFE_FS_HDR_DESC_MAX_LEN]; /**< Description of file (for FS header) */ - - CFE_FS_FileWriteGetData_t GetData; /**< Application callback to get a data record */ - CFE_FS_FileWriteOnEvent_t OnEvent; /**< Application callback for abstract event processing */ - -} CFE_FS_FileWriteMetaData_t; +#include "osconfig.h" +#include "cfe_platform_cfg.h" +#include "cfe_error.h" +#include "cfe_fs_api_typedefs.h" +#include "cfe_fs_extern_typedefs.h" /** @defgroup CFEAPIFSHeader cFE File Header Management APIs @@ -424,6 +345,38 @@ bool CFE_FS_RunBackgroundFileDump(uint32 ElapsedTime, void *Arg); /**@}*/ + +/* + * The internal APIs prototyped within this block are only intended to be invoked from + * other CFE core apps. They still need to be prototyped in the shared header such that + * they can be called from other core modules, but applications should not call these. + */ +#ifdef _CFE_CORE_ + +/** @defgroup CFEAPIFSCoreInternal cFE Internal File Service APIs, internal to CFE core + * @{ + */ + +/*****************************************************************************/ +/** +** \brief Initializes the cFE core module API Library +** +** \par Description +** Initializes the cFE core module API Library +** +** \par Assumptions, External Events, and Notes: +** -# This function MUST be called before any module API's are called. +** +******************************************************************************/ +extern int32 CFE_FS_EarlyInit(void); + + +/**@}*/ + +#endif /* _CFE_CORE_ */ + + + #endif /* _cfe_fs_ */ /************************/ diff --git a/modules/cfe_app_intf/fsw/inc/cfe_fs_api_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_fs_api_typedefs.h new file mode 100644 index 000000000..0349ab5a9 --- /dev/null +++ b/modules/cfe_app_intf/fsw/inc/cfe_fs_api_typedefs.h @@ -0,0 +1,132 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/* +** File: cfe_fs_api_typedefs.h +** +** Purpose: cFE File Services (FS) library API header file +** +** Author: S.Walling/Microtel +** +*/ + +/* +** Ensure that header is included only once... +*/ +#ifndef CFE_FS_ABSTRACT_TYPES_H +#define CFE_FS_ABSTRACT_TYPES_H + + +/* +** Required header files... +*/ +#include "common_types.h" +#include "osconfig.h" +#include "cfe_fs_extern_typedefs.h" + +/** + * \brief Generalized file types/categories known to FS + * + * This defines different categories of files, where they + * may reside in different default locations of the virtualized file system. + * + * This is different from, and should not be confused with, the "SubType" + * field in the FS header. This value is only used at runtime for FS APIs + * and should not actually appear in any output file or message. + */ +typedef enum +{ + CFE_FS_FileCategory_UNKNOWN, /**< Placeholder, unknown file category */ + CFE_FS_FileCategory_DYNAMIC_MODULE, /**< Dynamically loadable apps/libraries (e.g. .so, .o, .dll, etc) */ + CFE_FS_FileCategory_BINARY_DATA_DUMP, /**< Binary log file generated by various data dump commands */ + CFE_FS_FileCategory_TEXT_LOG, /**< Text-based log file generated by various commands */ + CFE_FS_FileCategory_SCRIPT, /**< Text-based Script files (e.g. ES startup script) */ + CFE_FS_FileCategory_TEMP, /**< Temporary/Ephemeral files */ + CFE_FS_FileCategory_MAX /**< Placeholder, keep last */ +} CFE_FS_FileCategory_t; + +/* + * Because FS is a library not an app, it does not have its own context or + * event IDs. The file writer runs in the context of the ES background task + * on behalf of whatever App requested the file write. + * + * This is a list of abstract events associated with background file write jobs. + * An app requesting the file write must supply a callback function to translate + * these into its own event IDs for feedback (i.e. file complete, error conditions, etc). + */ +typedef enum +{ + CFE_FS_FileWriteEvent_UNDEFINED, /* placeholder, no-op, keep as 0 */ + + CFE_FS_FileWriteEvent_COMPLETE, /**< File is completed successfully */ + CFE_FS_FileWriteEvent_CREATE_ERROR, /**< Unable to create/open file */ + CFE_FS_FileWriteEvent_HEADER_WRITE_ERROR, /**< Unable to write FS header */ + CFE_FS_FileWriteEvent_RECORD_WRITE_ERROR, /**< Unable to write data record */ + + CFE_FS_FileWriteEvent_MAX /* placeholder, no-op, keep last */ + +} CFE_FS_FileWriteEvent_t; + + + +/** + * Data Getter routine provided by requester + * + * Outputs a data block. Should return true if the file is complete (last record/EOF), otherwise return false. + */ +typedef bool (*CFE_FS_FileWriteGetData_t)(void *Meta, uint32 RecordNum, void **Buffer, size_t *BufSize); + +/** + * Event generator routine provided by requester + * + * Invoked from certain points in the file write process. Implementation may invoke CFE_EVS_SendEvent() appropriately + * to inform of progress. + */ +typedef void (*CFE_FS_FileWriteOnEvent_t)(void *Meta, CFE_FS_FileWriteEvent_t Event, int32 Status, uint32 RecordNum, size_t BlockSize, size_t Position); + +/** + * \brief External Metadata/State object associated with background file writes + * + * Applications intending to schedule background file write jobs should instantiate + * this object in static/global data memory. This keeps track of the state of the + * file write request(s). + */ +typedef struct CFE_FS_FileWriteMetaData +{ + volatile bool IsPending; /**< Whether request is pending (volatile as it may be checked outside lock) */ + + char FileName[OS_MAX_PATH_LEN]; /**< Name of file to write */ + + /* Data for FS header */ + uint32 FileSubType; /**< Type of file to write (for FS header) */ + char Description[CFE_FS_HDR_DESC_MAX_LEN]; /**< Description of file (for FS header) */ + + CFE_FS_FileWriteGetData_t GetData; /**< Application callback to get a data record */ + CFE_FS_FileWriteOnEvent_t OnEvent; /**< Application callback for abstract event processing */ + +} CFE_FS_FileWriteMetaData_t; + + + +#endif /* CFE_FS_ABSTRACT_TYPES_H */ + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/cfe-core/src/inc/cfe_fs_extern_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_fs_extern_typedefs.h similarity index 99% rename from fsw/cfe-core/src/inc/cfe_fs_extern_typedefs.h rename to modules/cfe_app_intf/fsw/inc/cfe_fs_extern_typedefs.h index 55c539e6e..0a379a654 100644 --- a/fsw/cfe-core/src/inc/cfe_fs_extern_typedefs.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_fs_extern_typedefs.h @@ -26,7 +26,7 @@ #ifdef CFE_EDS_ENABLED_BUILD /* Use the EDS generated version of these types */ -#include "cfe_fs_eds_typedefs.h" +#include "cfe_fs_eds_api_typedefs.h" #else /* Use the local definitions of these types */ diff --git a/fsw/cfe-core/src/inc/cfe_msg_api.h b/modules/cfe_app_intf/fsw/inc/cfe_msg.h similarity index 99% rename from fsw/cfe-core/src/inc/cfe_msg_api.h rename to modules/cfe_app_intf/fsw/inc/cfe_msg.h index 3dfe24b4f..ba84ecaf9 100644 --- a/fsw/cfe-core/src/inc/cfe_msg_api.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_msg.h @@ -31,9 +31,11 @@ #include "common_types.h" #include "cfe_error.h" #include "cfe_msg_hdr.h" -#include "cfe_msg_typedefs.h" -#include "cfe_time.h" -#include "cfe_sb.h" +#include "cfe_msg_api_typedefs.h" + +#include "cfe_es_api_typedefs.h" +#include "cfe_sb_api_typedefs.h" +#include "cfe_time_api_typedefs.h" /** \defgroup CFEAPIMSGHeader cFE Message header APIs * \{ diff --git a/fsw/cfe-core/src/inc/cfe_msg_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_msg_api_typedefs.h similarity index 84% rename from fsw/cfe-core/src/inc/cfe_msg_typedefs.h rename to modules/cfe_app_intf/fsw/inc/cfe_msg_api_typedefs.h index 4df7bfd41..a2c5ee543 100644 --- a/fsw/cfe-core/src/inc/cfe_msg_typedefs.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_msg_api_typedefs.h @@ -87,4 +87,29 @@ typedef enum CFE_MSG_PlaybackFlag CFE_MSG_PlayFlag_Playback /**< \brief Playback */ } CFE_MSG_PlaybackFlag_t; +/* + * Abstract Message Base Types + * + * The concrete definition of these is provided by "cfe_msg_hdr.h" which is + * user-selectable depending on the actual desired message defintion. These + * abstract types are used in the API definition; the API is defined based + * on these abstract types, independent of the actual message definition. + */ + +/** + * \brief cFS generic base message + */ +typedef union CFE_MSG_Message CFE_MSG_Message_t; + +/** + * \brief cFS command header + */ +typedef struct CFE_MSG_CommandHeader CFE_MSG_CommandHeader_t; + +/** + * \brief cFS telemetry header + */ +typedef struct CFE_MSG_TelemetryHeader CFE_MSG_TelemetryHeader_t; + + #endif /* _cfe_msg_typedefs_ */ diff --git a/fsw/cfe-core/src/inc/cfe_resourceid_api.h b/modules/cfe_app_intf/fsw/inc/cfe_resourceid.h similarity index 87% rename from fsw/cfe-core/src/inc/cfe_resourceid_api.h rename to modules/cfe_app_intf/fsw/inc/cfe_resourceid.h index 6a1ef4d18..12f2fef27 100644 --- a/fsw/cfe-core/src/inc/cfe_resourceid_api.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_resourceid.h @@ -19,7 +19,7 @@ */ /** - * \file cfe_resourceid_api.h + * \file cfe_resourceid.h * * Contains global prototypes and definitions related to resource * management and related CFE resource IDs. @@ -40,43 +40,10 @@ #define CFE_RESOURCEID_API_H /* - * The basic resource ID typedef - * - * This is provided via the external resourceid library - * and may be customized by the user/mission preferences. + * The basic resource ID API definitions */ -#include "cfe_resourceid_typedef.h" +#include "cfe_resourceid_api_typedefs.h" -/* -** Defines -*/ - -/** \name Resource ID predefined values */ -/** \{ */ - - -/** - * @brief A resource ID value that represents an undefined/unused resource - * - * This constant may be used to initialize local variables of the - * CFE_ResourceId_t type to a safe value that will not alias a valid ID. - * - * By design, this value is also the result of zeroing a CFE_ResourceId_t - * type via standard functions like memset(), such that objects initialized - * using this method will also be set to safe values. - */ -#define CFE_RESOURCEID_UNDEFINED ((CFE_ResourceId_t) CFE_RESOURCEID_WRAP(0)) - -/** - * @brief A resource ID value that represents a reserved entry - * - * This is not a valid value for any resource type, but is used to mark - * table entries that are not available for use. For instance, this may - * be used while setting up an entry initially. - */ -#define CFE_RESOURCEID_RESERVED ((CFE_ResourceId_t) CFE_RESOURCEID_WRAP(0xFFFFFFFF)) - -/** \} */ /** \name Resource ID test/conversion macros and inline functions */ /** \{ */ diff --git a/modules/cfe_app_intf/fsw/inc/cfe_resourceid_api_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_resourceid_api_typedefs.h new file mode 100644 index 000000000..89a03bf3e --- /dev/null +++ b/modules/cfe_app_intf/fsw/inc/cfe_resourceid_api_typedefs.h @@ -0,0 +1,82 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/** + * \file cfe_resourceid_api_typedefs.h + * + * Contains global prototypes and definitions related to resource + * management and related CFE resource IDs. + * + * A CFE ES Resource ID is a common way to identify CFE-managed resources such + * as apps, tasks, counters, memory pools, CDS blocks, and other entities. + * + * Simple operations are provided as inline functions, which + * should alleviate the need to do direct manipulation of resource IDs: + * + * - Check for undefined ID value + * - Check for equality of two ID values + * - Convert ID to simple integer (typically for printing/logging) + * - Convert simple integer to ID (inverse of above) + */ + +#ifndef CFE_RESOURCEID_API_TYPEDEFS_H +#define CFE_RESOURCEID_API_TYPEDEFS_H + +/* + * The basic resource ID typedef + * + * This is provided via the external resourceid library + * and may be customized by the user/mission preferences. + */ +#include "cfe_resourceid_typedef.h" + +/* +** Defines +*/ + +/** \name Resource ID predefined values */ +/** \{ */ + + +/** + * @brief A resource ID value that represents an undefined/unused resource + * + * This constant may be used to initialize local variables of the + * CFE_ResourceId_t type to a safe value that will not alias a valid ID. + * + * By design, this value is also the result of zeroing a CFE_ResourceId_t + * type via standard functions like memset(), such that objects initialized + * using this method will also be set to safe values. + */ +#define CFE_RESOURCEID_UNDEFINED ((CFE_ResourceId_t) CFE_RESOURCEID_WRAP(0)) + +/** + * @brief A resource ID value that represents a reserved entry + * + * This is not a valid value for any resource type, but is used to mark + * table entries that are not available for use. For instance, this may + * be used while setting up an entry initially. + */ +#define CFE_RESOURCEID_RESERVED ((CFE_ResourceId_t) CFE_RESOURCEID_WRAP(0xFFFFFFFF)) + +/** \} */ + + +#endif /* CFE_RESOURCEID_API_TYPEDEFS_H */ diff --git a/fsw/cfe-core/src/inc/cfe_sb.h b/modules/cfe_app_intf/fsw/inc/cfe_sb.h similarity index 90% rename from fsw/cfe-core/src/inc/cfe_sb.h rename to modules/cfe_app_intf/fsw/inc/cfe_sb.h index aa7862e37..039ccd8c4 100644 --- a/fsw/cfe-core/src/inc/cfe_sb.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_sb.h @@ -29,90 +29,21 @@ ** ******************************************************************************/ -#ifndef _cfe_sb_ -#define _cfe_sb_ +#ifndef CFE_SB_API_H +#define CFE_SB_API_H /* ** Includes */ -#include "cfe_sb_extern_typedefs.h" -#include "cfe_error.h" -#include "osconfig.h" -#include "cfe_psp.h" #include "common_types.h" -#include "cfe_mission_cfg.h" -#include "ccsds.h" -#include "cfe_time.h" - - -/* -** Defines -*/ -#define CFE_SB_POLL 0 /**< \brief Option used with #CFE_SB_ReceiveBuffer to request immediate pipe status */ -#define CFE_SB_PEND_FOREVER -1 /**< \brief Option used with #CFE_SB_ReceiveBuffer to force a wait for next message */ -#define CFE_SB_SUB_ENTRIES_PER_PKT 20 /**< \brief Configuration parameter used by SBN App */ -#define CFE_SB_SUBSCRIPTION 0 /**< \brief Subtype specifier used in #CFE_SB_SingleSubscriptionTlm_t by SBN App */ -#define CFE_SB_UNSUBSCRIPTION 1 /**< \brief Subtype specified used in #CFE_SB_SingleSubscriptionTlm_t by SBN App */ - -/* ------------------------------------------------------ */ -/* Macro Constants for use with the CFE_SB_MsgId_t type */ -/* ------------------------------------------------------ */ - -/** - * \brief Translation macro to convert from MsgId integer values to opaque/abstract API values - * - * This conversion exists in macro form to allow compile-time evaluation for constants, and - * should not be used directly in application code. - * - * For applications, use the CFE_SB_ValueToMsgId() inline function instead. - * - * \sa CFE_SB_ValueToMsgId() - */ -#define CFE_SB_MSGID_WRAP_VALUE(val) ((CFE_SB_MsgId_t)(val)) - -/** - * \brief Translation macro to convert to MsgId integer values from opaque/abstract API values - * - * This conversion exists in macro form to allow compile-time evaluation for constants, and - * should not be used directly in application code. - * - * For applications, use the CFE_SB_MsgIdToValue() inline function instead. - * - * \sa CFE_SB_MsgIdToValue() - */ -#define CFE_SB_MSGID_UNWRAP_VALUE(mid) ((CFE_SB_MsgId_Atom_t)(mid)) - -/** - * \brief Reserved value for CFE_SB_MsgId_t that will not match any valid MsgId - * - * This rvalue macro can be used for static/compile-time data initialization to ensure that - * the initialized value does not alias to a valid MsgId object. - */ -#define CFE_SB_MSGID_RESERVED CFE_SB_MSGID_WRAP_VALUE(-1) - -/** - * \brief A literal of the CFE_SB_MsgId_t type representing an invalid ID - * - * This value should be used for runtime initialization of CFE_SB_MsgId_t values. - * - * \note This may be a compound literal in a future revision. Per C99, compound - * literals are lvalues, not rvalues, so this value should not be used in - * static/compile-time data initialization. For static data initialization - * purposes (rvalue), #CFE_SB_MSGID_RESERVED should be used instead. - * However, in the current implementation, they are equivalent. - */ -#define CFE_SB_INVALID_MSG_ID CFE_SB_MSGID_RESERVED +#include "cfe_error.h" +#include "cfe_sb_api_typedefs.h" +#include "cfe_es_api_typedefs.h" #ifndef CFE_OMIT_DEPRECATED_6_8 -/** - * \defgroup CFESBPktTypeDefs cFE SB Packet Type Defines - * \{ - */ -#define CFE_SB_PKTTYPE_INVALID CFE_MSG_Type_Invalid /**< \brief #CFE_SB_GetPktType response if message type can not be determined */ -#define CFE_SB_PKTTYPE_CMD CFE_MSG_Type_Cmd /**< \brief #CFE_SB_GetPktType response for command packets */ -#define CFE_SB_PKTTYPE_TLM CFE_MSG_Type_Tlm /**< \brief #CFE_SB_GetPktType response for telemetry packets */ -/** \} */ -#endif /* CFE_OMIT_DEPRECATED_6_8 */ +/* only deprecated functions depend on TIME types */ +#include "cfe_time_api_typedefs.h" +#endif /* ** Macro Definitions @@ -122,80 +53,6 @@ #define CFE_CLR(i,x) ((i) &= ~CFE_BIT(x)) /**< \brief Clears bit x of i */ #define CFE_TST(i,x) (((i) & CFE_BIT(x)) != 0)/**< \brief true(non zero) if bit x of i is set */ -/** - * \brief Cast/Convert a generic CFE_ResourceId_t to a CFE_SB_PipeId_t - */ -#define CFE_SB_PIPEID_C(val) ((CFE_SB_PipeId_t)CFE_RESOURCEID_WRAP(val)) - - -/** - * \brief A CFE_SB_PipeId_t value which is always invalid - * - * This may be used as a safe initializer for CFE_SB_PipeId_t values - */ -#define CFE_SB_INVALID_PIPE CFE_SB_PIPEID_C(CFE_RESOURCEID_UNDEFINED) - -/* -** Pipe option bit fields. -*/ -#define CFE_SB_PIPEOPTS_IGNOREMINE 0x00000001 /**< \brief Messages sent by the app that owns this pipe will not be sent to this pipe. */ - -/* -** Type Definitions -*/ - -/** \brief Software Bus generic message */ -typedef union CFE_SB_Msg { - CFE_MSG_Message_t Msg; /**< \brief Base message type without enforced alignment */ - long long int LongInt; /**< \brief Align to support Long Integer */ - long double LongDouble; /**< \brief Align to support Long Double */ -} CFE_SB_Buffer_t; - -#ifndef CFE_OMIT_DEPRECATED_6_8 -/** \brief Deperecated type to minimize required changes */ -typedef CFE_SB_Buffer_t CFE_SB_Msg_t; - -/** \brief Deperecated type to minimize required changes */ -typedef CFE_MSG_CommandHeader_t CFE_SB_CmdHdr_t; - -/** \brief Deperecated type to minimize required changes */ -typedef CFE_MSG_TelemetryHeader_t CFE_SB_TlmHdr_t; - -#define CFE_SB_CMD_HDR_SIZE (sizeof(CFE_MSG_CommandHeader_t))/**< \brief Size of command header */ -#define CFE_SB_TLM_HDR_SIZE (sizeof(CFE_MSG_TelemetryHeader_t))/**< \brief Size of telemetry header */ -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - -#ifndef CFE_OMIT_DEPRECATED_6_8 -/** \brief Pointer to an SB Message */ -typedef CFE_MSG_Message_t *CFE_SB_MsgPtr_t; - -/** \brief CFE_SB_MsgPayloadPtr_t defined as an opaque pointer to a message Payload portion */ -typedef uint8 *CFE_SB_MsgPayloadPtr_t; -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - -/** \brief CFE_SB_ZeroCopyHandle_t to primitive type definition -** -** Software Zero Copy handle used in many SB APIs -*/ -typedef struct -{ - struct CFE_SB_BufferD* BufDscPtr; /* abstract descriptor reference (internal use) */ -} CFE_SB_ZeroCopyHandle_t; - -/** \brief Quality Of Service Type Definition -** -** Currently an unused parameter in #CFE_SB_SubscribeEx -** Intended to be used for interprocessor communication only -**/ -typedef struct { - uint8 Priority;/**< \brief Specify high(1) or low(0) message priority for off-board routing, currently unused */ - uint8 Reliability;/**< \brief Specify high(1) or low(0) message transfer reliability for off-board routing, currently unused */ -}CFE_SB_Qos_t; - -#define CFE_SB_DEFAULT_QOS ((CFE_SB_Qos_t) {0}) /**< \brief Default Qos macro */ -#ifndef CFE_OMIT_DEPRECATED_6_8 -#define CFE_SB_Default_Qos CFE_SB_DEFAULT_QOS /**< \deprecated use CFE_SB_DEFAULT_QOS */ -#endif /****************** Function Prototypes **********************/ @@ -1460,5 +1317,64 @@ uint32 CFE_SB_GetPktType(CFE_SB_MsgId_t MsgId); /**@}*/ -#endif /* _cfe_sb_ */ + +/* + * The internal APIs prototyped within this block are only intended to be invoked from + * other CFE core apps. They still need to be prototyped in the shared header such that + * they can be called from other core modules, but applications should not call these. + */ +#ifdef _CFE_CORE_ + +/** @defgroup CFEAPISBCoreInternal cFE Internal Software Bus APIs, internal to CFE core + * @{ + */ + +/*****************************************************************************/ +/** +** \brief Entry Point for cFE Core Application +** +** \par Description +** This is the entry point to the cFE SB Core Application. +** +** \par Assumptions, External Events, and Notes: +** None +** +** +******************************************************************************/ +extern void CFE_SB_TaskMain(void); + +/*****************************************************************************/ +/** +** \brief Initializes the cFE core module API Library +** +** \par Description +** Initializes the cFE core module API Library +** +** \par Assumptions, External Events, and Notes: +** -# This function MUST be called before any module API's are called. +** +******************************************************************************/ +extern int32 CFE_SB_EarlyInit(void); + + +/*****************************************************************************/ +/** +** \brief Removes SB resources associated with specified Application +** +** \par Description +** This function is called by cFE Executive Services to cleanup after +** an Application has been terminated. It frees resources +** that have been allocated to the specified Application. +** +******************************************************************************/ +extern int32 CFE_SB_CleanUpApp(CFE_ES_AppId_t AppId); + + +/**@}*/ + +#endif /* _CFE_CORE_ */ + + + +#endif /* CFE_SB_API_H */ /*****************************************************************************/ diff --git a/modules/cfe_app_intf/fsw/inc/cfe_sb_api_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_sb_api_typedefs.h new file mode 100644 index 000000000..942931395 --- /dev/null +++ b/modules/cfe_app_intf/fsw/inc/cfe_sb_api_typedefs.h @@ -0,0 +1,190 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/****************************************************************************** +** File: cfe_sb.h +** +** Purpose: +** This header file contains all definitions for the cFE Software Bus +** Application Programmer's Interface. +** +** Author: R.McGraw/SSI +** +******************************************************************************/ + +#ifndef CFE_SB_API_TYPEDEFS_H +#define CFE_SB_API_TYPEDEFS_H + +/* +** Includes +*/ +#include "common_types.h" +#include "cfe_sb_extern_typedefs.h" +#include "cfe_msg_api_typedefs.h" +#include "cfe_resourceid_api_typedefs.h" +#include "cfe_msg_hdr.h" + +/* +** Defines +*/ +#define CFE_SB_POLL 0 /**< \brief Option used with #CFE_SB_ReceiveBuffer to request immediate pipe status */ +#define CFE_SB_PEND_FOREVER -1 /**< \brief Option used with #CFE_SB_ReceiveBuffer to force a wait for next message */ +#define CFE_SB_SUBSCRIPTION 0 /**< \brief Subtype specifier used in #CFE_SB_SingleSubscriptionTlm_t by SBN App */ +#define CFE_SB_UNSUBSCRIPTION 1 /**< \brief Subtype specified used in #CFE_SB_SingleSubscriptionTlm_t by SBN App */ + +/* ------------------------------------------------------ */ +/* Macro Constants for use with the CFE_SB_MsgId_t type */ +/* ------------------------------------------------------ */ + +/** + * \brief Translation macro to convert from MsgId integer values to opaque/abstract API values + * + * This conversion exists in macro form to allow compile-time evaluation for constants, and + * should not be used directly in application code. + * + * For applications, use the CFE_SB_ValueToMsgId() inline function instead. + * + * \sa CFE_SB_ValueToMsgId() + */ +#define CFE_SB_MSGID_WRAP_VALUE(val) ((CFE_SB_MsgId_t)(val)) + +/** + * \brief Translation macro to convert to MsgId integer values from opaque/abstract API values + * + * This conversion exists in macro form to allow compile-time evaluation for constants, and + * should not be used directly in application code. + * + * For applications, use the CFE_SB_MsgIdToValue() inline function instead. + * + * \sa CFE_SB_MsgIdToValue() + */ +#define CFE_SB_MSGID_UNWRAP_VALUE(mid) ((CFE_SB_MsgId_Atom_t)(mid)) + +/** + * \brief Reserved value for CFE_SB_MsgId_t that will not match any valid MsgId + * + * This rvalue macro can be used for static/compile-time data initialization to ensure that + * the initialized value does not alias to a valid MsgId object. + */ +#define CFE_SB_MSGID_RESERVED CFE_SB_MSGID_WRAP_VALUE(-1) + +/** + * \brief A literal of the CFE_SB_MsgId_t type representing an invalid ID + * + * This value should be used for runtime initialization of CFE_SB_MsgId_t values. + * + * \note This may be a compound literal in a future revision. Per C99, compound + * literals are lvalues, not rvalues, so this value should not be used in + * static/compile-time data initialization. For static data initialization + * purposes (rvalue), #CFE_SB_MSGID_RESERVED should be used instead. + * However, in the current implementation, they are equivalent. + */ +#define CFE_SB_INVALID_MSG_ID CFE_SB_MSGID_RESERVED + +#ifndef CFE_OMIT_DEPRECATED_6_8 +/** + * \defgroup CFESBPktTypeDefs cFE SB Packet Type Defines + * \{ + */ +#define CFE_SB_PKTTYPE_INVALID CFE_MSG_Type_Invalid /**< \brief #CFE_SB_GetPktType response if message type can not be determined */ +#define CFE_SB_PKTTYPE_CMD CFE_MSG_Type_Cmd /**< \brief #CFE_SB_GetPktType response for command packets */ +#define CFE_SB_PKTTYPE_TLM CFE_MSG_Type_Tlm /**< \brief #CFE_SB_GetPktType response for telemetry packets */ +/** \} */ +#endif /* CFE_OMIT_DEPRECATED_6_8 */ + +/** + * \brief Cast/Convert a generic CFE_ResourceId_t to a CFE_SB_PipeId_t + */ +#define CFE_SB_PIPEID_C(val) ((CFE_SB_PipeId_t)CFE_RESOURCEID_WRAP(val)) + + +/** + * \brief A CFE_SB_PipeId_t value which is always invalid + * + * This may be used as a safe initializer for CFE_SB_PipeId_t values + */ +#define CFE_SB_INVALID_PIPE CFE_SB_PIPEID_C(CFE_RESOURCEID_UNDEFINED) + +/* +** Pipe option bit fields. +*/ +#define CFE_SB_PIPEOPTS_IGNOREMINE 0x00000001 /**< \brief Messages sent by the app that owns this pipe will not be sent to this pipe. */ + + +#define CFE_SB_DEFAULT_QOS ((CFE_SB_Qos_t) {0}) /**< \brief Default Qos macro */ + + +/* +** Type Definitions +*/ + +/** \brief Software Bus generic message */ +typedef union CFE_SB_Msg { + CFE_MSG_Message_t Msg; /**< \brief Base message type without enforced alignment */ + long long int LongInt; /**< \brief Align to support Long Integer */ + long double LongDouble; /**< \brief Align to support Long Double */ +} CFE_SB_Buffer_t; + +#ifndef CFE_OMIT_DEPRECATED_6_8 + +/** \brief Deperecated type to minimize required changes */ +typedef CFE_SB_Buffer_t CFE_SB_Msg_t; + +/** \brief Deperecated type to minimize required changes */ +typedef CFE_MSG_CommandHeader_t CFE_SB_CmdHdr_t; + +/** \brief Deperecated type to minimize required changes */ +typedef CFE_MSG_TelemetryHeader_t CFE_SB_TlmHdr_t; + +#define CFE_SB_CMD_HDR_SIZE (sizeof(CFE_MSG_CommandHeader_t))/**< \brief Size of command header */ +#define CFE_SB_TLM_HDR_SIZE (sizeof(CFE_MSG_TelemetryHeader_t))/**< \brief Size of telemetry header */ + +/** \brief Pointer to an SB Message */ +typedef CFE_MSG_Message_t *CFE_SB_MsgPtr_t; + +/** \brief CFE_SB_MsgPayloadPtr_t defined as an opaque pointer to a message Payload portion */ +typedef uint8 *CFE_SB_MsgPayloadPtr_t; + +#endif /* CFE_OMIT_DEPRECATED_6_8 */ + +/** \brief CFE_SB_ZeroCopyHandle_t to primitive type definition +** +** Software Zero Copy handle used in many SB APIs +*/ +typedef struct +{ + struct CFE_SB_BufferD* BufDscPtr; /* abstract descriptor reference (internal use) */ +} CFE_SB_ZeroCopyHandle_t; + + +#ifndef CFE_OMIT_DEPRECATED_6_8 + +#define CFE_SB_Default_Qos CFE_SB_DEFAULT_QOS /**< \deprecated use CFE_SB_DEFAULT_QOS */ + +#define CFE_SB_CMD_HDR_SIZE (sizeof(CFE_MSG_CommandHeader_t))/**< \brief Size of command header */ +#define CFE_SB_TLM_HDR_SIZE (sizeof(CFE_MSG_TelemetryHeader_t))/**< \brief Size of telemetry header */ + +#endif /* CFE_OMIT_DEPRECATED_6_8 */ + + + + +#endif /* CFE_SB_API_TYPEDEFS_H */ +/*****************************************************************************/ diff --git a/fsw/cfe-core/src/inc/cfe_sb_extern_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_sb_extern_typedefs.h similarity index 85% rename from fsw/cfe-core/src/inc/cfe_sb_extern_typedefs.h rename to modules/cfe_app_intf/fsw/inc/cfe_sb_extern_typedefs.h index ae0b7fb3a..9566073ae 100644 --- a/fsw/cfe-core/src/inc/cfe_sb_extern_typedefs.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_sb_extern_typedefs.h @@ -26,7 +26,7 @@ #ifdef CFE_EDS_ENABLED_BUILD /* Use the EDS generated version of these types */ -#include "cfe_sb_eds_typedefs.h" +#include "cfe_sb_eds_api_typedefs.h" #else /* Use the local definitions of these types */ @@ -35,6 +35,9 @@ #include "cfe_mission_cfg.h" #include "cfe_resourceid_typedef.h" + +#define CFE_SB_SUB_ENTRIES_PER_PKT 20 /**< \brief Configuration parameter used by SBN App */ + /** * @brief Label definitions associated with CFE_SB_QosPriority_Enum_t */ @@ -119,6 +122,16 @@ typedef CFE_SB_MsgId_Atom_t CFE_SB_MsgId_t; */ typedef CFE_RESOURCEID_BASE_TYPE CFE_SB_PipeId_t; +/** \brief Quality Of Service Type Definition +** +** Currently an unused parameter in #CFE_SB_SubscribeEx +** Intended to be used for interprocessor communication only +**/ +typedef struct { + uint8 Priority;/**< \brief Specify high(1) or low(0) message priority for off-board routing, currently unused */ + uint8 Reliability;/**< \brief Specify high(1) or low(0) message transfer reliability for off-board routing, currently unused */ +}CFE_SB_Qos_t; + #endif /* CFE_EDS_ENABLED_BUILD */ diff --git a/fsw/cfe-core/src/inc/cfe_tbl.h b/modules/cfe_app_intf/fsw/inc/cfe_tbl.h similarity index 90% rename from fsw/cfe-core/src/inc/cfe_tbl.h rename to modules/cfe_app_intf/fsw/inc/cfe_tbl.h index 653d57be1..0666ee627 100644 --- a/fsw/cfe-core/src/inc/cfe_tbl.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_tbl.h @@ -35,101 +35,15 @@ ** **/ -#ifndef _cfe_tbl_ -#define _cfe_tbl_ +#ifndef CFE_TBL_API_H +#define CFE_TBL_API_H /********************* Include Files ************************/ -#include "cfe_tbl_extern_typedefs.h" -#include "cfe_sb_extern_typedefs.h" -#include "cfe_error.h" #include "common_types.h" /* Basic Data Types */ -#include "cfe_time.h" -#include "osconfig.h" -#include "cfe_msg_typedefs.h" - -/******************* Macro Definitions ***********************/ - -/** @defgroup CFETBLTypeOptions cFE Table Type Defines - * @{ - */ -#define CFE_TBL_OPT_BUFFER_MSK (0x0001) /**< \brief Table buffer mask */ -#define CFE_TBL_OPT_SNGL_BUFFER (0x0000) /**< \brief Single buffer table */ -#define CFE_TBL_OPT_DBL_BUFFER (0x0001) /**< \brief Double buffer table */ - -#define CFE_TBL_OPT_LD_DMP_MSK (0x0002) /**< \brief Table load/dump mask */ -#define CFE_TBL_OPT_LOAD_DUMP (0x0000) /**< \brief Load/Dump table */ -#define CFE_TBL_OPT_DUMP_ONLY (0x0002) /**< \brief Dump only table */ - -#define CFE_TBL_OPT_USR_DEF_MSK (0x0004) /**< \brief Table user defined mask */ -#define CFE_TBL_OPT_NOT_USR_DEF (0x0000) /**< \brief Not user defined table */ -#define CFE_TBL_OPT_USR_DEF_ADDR (0x0006) /**< \brief User Defined table, @note Automatically includes #CFE_TBL_OPT_DUMP_ONLY option */ - -#define CFE_TBL_OPT_CRITICAL_MSK (0x0008) /**< \brief Table critical mask */ -#define CFE_TBL_OPT_NOT_CRITICAL (0x0000) /**< \brief Not critical table */ -#define CFE_TBL_OPT_CRITICAL (0x0008) /**< \brief Critical table */ +#include "cfe_error.h" +#include "cfe_tbl_api_typedefs.h" +#include "cfe_sb_api_typedefs.h" -/** @brief Default table options */ -#define CFE_TBL_OPT_DEFAULT (CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_LOAD_DUMP) -/**@}*/ - -/** - * \brief Table maximum full name length - * - * The full length of table names is defined at the mission scope. - * This is defined here to support applications that depend on cfe_tbl.h - * providing this value. - */ -#define CFE_TBL_MAX_FULL_NAME_LEN (CFE_MISSION_TBL_MAX_FULL_NAME_LEN) - -/** \brief Bad table handle */ -#define CFE_TBL_BAD_TABLE_HANDLE (CFE_TBL_Handle_t) 0xFFFF - - - - -/****************** Data Type Definitions *********************/ - -/** \brief Table Callback Function */ -typedef int32 (*CFE_TBL_CallbackFuncPtr_t)(void *TblPtr); - -/** \brief Table Handle primitive */ -typedef int16 CFE_TBL_Handle_t; - -/** \brief Table Source */ -typedef enum CFE_TBL_SrcEnum -{ - CFE_TBL_SRC_FILE = 0, /**< \brief File source - When this option is selected, the \c SrcDataPtr - will be interpreted as a pointer to a null - terminated character string. The string should - specify the full path and filename of the file - containing the initial data contents of the table. */ - CFE_TBL_SRC_ADDRESS /**< \brief Address source - When this option is selected, the \c SrcDataPtr will - be interpreted as a pointer to a memory location - that is the beginning of the initialization data - for loading the table OR, in the case of a "user defined" - dump only table, the address of the active table itself. - The block of memory is assumed to be of the same size - specified in the #CFE_TBL_Register function Size parameter. */ -} CFE_TBL_SrcEnum_t; - -/** \brief Table Info */ -typedef struct CFE_TBL_Info -{ - size_t Size; /**< \brief Size, in bytes, of Table */ - uint32 NumUsers; /**< \brief Number of Apps with access to the table */ - uint32 FileCreateTimeSecs; /**< \brief File creation time from last file loaded into table */ - uint32 FileCreateTimeSubSecs; /**< \brief File creation time from last file loaded into table */ - uint32 Crc; /**< \brief Most recently calculated CRC by TBL services on table contents */ - CFE_TIME_SysTime_t TimeOfLastUpdate; /**< \brief Time when Table was last updated */ - bool TableLoadedOnce; /**< \brief Flag indicating whether table has been loaded once or not */ - bool DumpOnly; /**< \brief Flag indicating Table is NOT to be loaded */ - bool DoubleBuffered; /**< \brief Flag indicating Table has a dedicated inactive buffer */ - bool UserDefAddr; /**< \brief Flag indicating Table address was defined by Owner Application */ - bool Critical; /**< \brief Flag indicating Table contents are maintained in a CDS */ - char LastFileLoaded[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Filename of last file loaded into table */ -} CFE_TBL_Info_t; /*************************** Function Prototypes ******************************/ @@ -816,4 +730,67 @@ CFE_Status_t CFE_TBL_GetInfo(CFE_TBL_Info_t *TblInfoPtr, const char *TblName); CFE_Status_t CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId, CFE_MSG_FcnCode_t CommandCode, uint32 Parameter); /**@}*/ -#endif /* _cfe_tbl_ */ + +/* + * The internal APIs prototyped within this block are only intended to be invoked from + * other CFE core apps. They still need to be prototyped in the shared header such that + * they can be called from other core modules, but applications should not call these. + */ +#ifdef _CFE_CORE_ + +/** @defgroup CFEAPITBLCoreInternal cFE Internal Table Service APIs, internal to CFE core + * @{ + */ + +/*****************************************************************************/ +/** +** \brief Entry Point for cFE Table Services Core Application +** +** \par Description +** This is the entry point to the cFE Table Services Core Application. +** This Application provides the ground interface to the cFE Table +** Services. +** +** \par Assumptions, External Events, and Notes: +** None +** +** +******************************************************************************/ +extern void CFE_TBL_TaskMain(void); + +/*****************************************************************************/ +/** +** \brief Initializes the Table Services API Library +** +** \par Description +** Initializes the Table Services API Library +** +** \par Assumptions, External Events, and Notes: +** -# This function MUST be called before any TBL API's are called. +** +******************************************************************************/ +extern int32 CFE_TBL_EarlyInit(void); + +/*****************************************************************************/ +/** +** \brief Removes TBL resources associated with specified Application +** +** \par Description +** This function is called by cFE Executive Services to cleanup after +** an Application has been terminated. It frees TBL services resources +** that have been allocated to the specified Application. +** +** \par Assumptions, External Events, and Notes: +** -# This function DOES NOT remove any critical tables associated with +** the specified application from the Critical Data Store. +** +******************************************************************************/ +extern int32 CFE_TBL_CleanUpApp(CFE_ES_AppId_t AppId); + + +/**@}*/ + +#endif /* _CFE_CORE_ */ + + +#endif /* CFE_TBL_API_H */ diff --git a/modules/cfe_app_intf/fsw/inc/cfe_tbl_api_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_tbl_api_typedefs.h new file mode 100644 index 000000000..6707c6791 --- /dev/null +++ b/modules/cfe_app_intf/fsw/inc/cfe_tbl_api_typedefs.h @@ -0,0 +1,127 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/* +** File: cfe_tbl.h +** +** Title: Table Services API Application Library Header File +** +** Purpose: +** Unit specification for Table services library functions and macros. +** +** Design Notes: +** +** References: +** Flight Software Branch C Coding Standard Version 1.0a +** +** Notes: +** +**/ + +#ifndef CFE_TBL_ABSTRACT_TYPES_H +#define CFE_TBL_ABSTRACT_TYPES_H + +/********************* Include Files ************************/ +#include "common_types.h" /* Basic Data Types */ +#include "cfe_tbl_extern_typedefs.h" +#include "cfe_time_extern_typedefs.h" + +/** @defgroup CFETBLTypeOptions cFE Table Type Defines + * @{ + */ +#define CFE_TBL_OPT_BUFFER_MSK (0x0001) /**< \brief Table buffer mask */ +#define CFE_TBL_OPT_SNGL_BUFFER (0x0000) /**< \brief Single buffer table */ +#define CFE_TBL_OPT_DBL_BUFFER (0x0001) /**< \brief Double buffer table */ + +#define CFE_TBL_OPT_LD_DMP_MSK (0x0002) /**< \brief Table load/dump mask */ +#define CFE_TBL_OPT_LOAD_DUMP (0x0000) /**< \brief Load/Dump table */ +#define CFE_TBL_OPT_DUMP_ONLY (0x0002) /**< \brief Dump only table */ + +#define CFE_TBL_OPT_USR_DEF_MSK (0x0004) /**< \brief Table user defined mask */ +#define CFE_TBL_OPT_NOT_USR_DEF (0x0000) /**< \brief Not user defined table */ +#define CFE_TBL_OPT_USR_DEF_ADDR (0x0006) /**< \brief User Defined table, @note Automatically includes #CFE_TBL_OPT_DUMP_ONLY option */ + +#define CFE_TBL_OPT_CRITICAL_MSK (0x0008) /**< \brief Table critical mask */ +#define CFE_TBL_OPT_NOT_CRITICAL (0x0000) /**< \brief Not critical table */ +#define CFE_TBL_OPT_CRITICAL (0x0008) /**< \brief Critical table */ + +/** @brief Default table options */ +#define CFE_TBL_OPT_DEFAULT (CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_LOAD_DUMP) +/**@}*/ + +/** + * \brief Table maximum full name length + * + * The full length of table names is defined at the mission scope. + * This is defined here to support applications that depend on cfe_tbl.h + * providing this value. + */ +#define CFE_TBL_MAX_FULL_NAME_LEN (CFE_MISSION_TBL_MAX_FULL_NAME_LEN) + +/** \brief Bad table handle */ +#define CFE_TBL_BAD_TABLE_HANDLE (CFE_TBL_Handle_t) 0xFFFF + + +/****************** Data Type Definitions *********************/ + +/** \brief Table Callback Function */ +typedef int32 (*CFE_TBL_CallbackFuncPtr_t)(void *TblPtr); + +/** \brief Table Handle primitive */ +typedef int16 CFE_TBL_Handle_t; + +/** \brief Table Source */ +typedef enum CFE_TBL_SrcEnum +{ + CFE_TBL_SRC_FILE = 0, /**< \brief File source + When this option is selected, the \c SrcDataPtr + will be interpreted as a pointer to a null + terminated character string. The string should + specify the full path and filename of the file + containing the initial data contents of the table. */ + CFE_TBL_SRC_ADDRESS /**< \brief Address source + When this option is selected, the \c SrcDataPtr will + be interpreted as a pointer to a memory location + that is the beginning of the initialization data + for loading the table OR, in the case of a "user defined" + dump only table, the address of the active table itself. + The block of memory is assumed to be of the same size + specified in the #CFE_TBL_Register function Size parameter. */ +} CFE_TBL_SrcEnum_t; + +/** \brief Table Info */ +typedef struct CFE_TBL_Info +{ + size_t Size; /**< \brief Size, in bytes, of Table */ + uint32 NumUsers; /**< \brief Number of Apps with access to the table */ + uint32 FileCreateTimeSecs; /**< \brief File creation time from last file loaded into table */ + uint32 FileCreateTimeSubSecs; /**< \brief File creation time from last file loaded into table */ + uint32 Crc; /**< \brief Most recently calculated CRC by TBL services on table contents */ + CFE_TIME_SysTime_t TimeOfLastUpdate; /**< \brief Time when Table was last updated */ + bool TableLoadedOnce; /**< \brief Flag indicating whether table has been loaded once or not */ + bool DumpOnly; /**< \brief Flag indicating Table is NOT to be loaded */ + bool DoubleBuffered; /**< \brief Flag indicating Table has a dedicated inactive buffer */ + bool UserDefAddr; /**< \brief Flag indicating Table address was defined by Owner Application */ + bool Critical; /**< \brief Flag indicating Table contents are maintained in a CDS */ + char LastFileLoaded[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Filename of last file loaded into table */ +} CFE_TBL_Info_t; + + +#endif /* CFE_TBL_ABSTRACT_TYPES_H */ diff --git a/fsw/cfe-core/src/inc/cfe_tbl_extern_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_tbl_extern_typedefs.h similarity index 96% rename from fsw/cfe-core/src/inc/cfe_tbl_extern_typedefs.h rename to modules/cfe_app_intf/fsw/inc/cfe_tbl_extern_typedefs.h index 10c05fa7b..bf3204de3 100644 --- a/fsw/cfe-core/src/inc/cfe_tbl_extern_typedefs.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_tbl_extern_typedefs.h @@ -26,14 +26,14 @@ #ifdef CFE_EDS_ENABLED_BUILD /* Use the EDS generated version of these types */ -#include "cfe_tbl_eds_typedefs.h" +#include "cfe_tbl_eds_api_typedefs.h" #else /* Use the local definitions of these types */ #include "common_types.h" #include "cfe_es_extern_typedefs.h" -#include /* for CFE_MISSION_TBL_MAX_FULL_NAME_LEN */ +#include "cfe_mission_cfg.h" /* for CFE_MISSION_TBL_MAX_FULL_NAME_LEN */ /** * @brief Label definitions associated with CFE_TBL_BufferSelect_Enum_t diff --git a/fsw/cfe-core/src/inc/cfe_tbl_filedef.h b/modules/cfe_app_intf/fsw/inc/cfe_tbl_filedef.h similarity index 100% rename from fsw/cfe-core/src/inc/cfe_tbl_filedef.h rename to modules/cfe_app_intf/fsw/inc/cfe_tbl_filedef.h diff --git a/fsw/cfe-core/src/inc/cfe_time.h b/modules/cfe_app_intf/fsw/inc/cfe_time.h similarity index 91% rename from fsw/cfe-core/src/inc/cfe_time.h rename to modules/cfe_app_intf/fsw/inc/cfe_time.h index 71ddc162f..a74f66d67 100644 --- a/fsw/cfe-core/src/inc/cfe_time.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_time.h @@ -39,39 +39,11 @@ /* ** Includes */ -#include "cfe_time_extern_typedefs.h" -#include "cfe_error.h" #include "common_types.h" +#include "cfe_error.h" +#include "cfe_time_api_typedefs.h" +#include "cfe_es_api_typedefs.h" -/*****************************************************************************/ -/* -** Macro Definitions -*/ - -#define CFE_TIME_PRINTED_STRING_SIZE 24 /**< \brief Required size of buffer to be passed into #CFE_TIME_Print (includes null terminator) */ - - -/*****************************************************************************/ -/* -** Type Definitions -*/ - -/** -** \brief Data structure used to hold system time values -** -** \par Description -** The #CFE_TIME_SysTime_t data structure is used to hold time -** values. Time is referred to as the elapsed time (in seconds -** and subseconds) since a specified epoch time. The subseconds -** field contains the number of 2^(-32) second intervals that have -** elapsed since the epoch. -** -*/ -typedef struct CFE_TIME_SysTime -{ - uint32 Seconds; /**< \brief Number of seconds since epoch */ - uint32 Subseconds; /**< \brief Number of subseconds since epoch (LSB = 2^(-32) seconds) */ -} CFE_TIME_SysTime_t; /** ** \brief Time Copy @@ -82,49 +54,6 @@ typedef struct CFE_TIME_SysTime */ #define CFE_TIME_Copy(m,t) { (m)->Seconds = (t)->Seconds; (m)->Subseconds = (t)->Subseconds; } -/** -** \brief Enumerated types identifying the relative relationships of two times -** -** \par Description -** Since time fields contain numbers that are relative to an epoch time, then it is possible for a time value -** to be "negative". This can lead to some confusion about what relationship exists between two time values. -** To resolve this confusion, the cFE provides the API #CFE_TIME_Compare which returns these enumerated values. -*/ -typedef enum CFE_TIME_Compare -{ - CFE_TIME_A_LT_B = -1, /**< \brief The first specified time is considered to be before the second specified time */ - CFE_TIME_EQUAL = 0, /**< \brief The two specified times are considered to be equal */ - CFE_TIME_A_GT_B = 1 /**< \brief The first specified time is considered to be after the second specified time */ -} CFE_TIME_Compare_t; - -/** -** \brief Time related variables that are maintained through a Processor Reset -** -** \par Description -** The #CFE_TIME_ResetVars_t data structure contains those variables that are maintained -** in an area of memory that is not cleared during a Processor Reset. This allows the -** cFE Time Service to maintain time to the best of its ability after a Processor Reset. -*/ -typedef struct CFE_TIME_ResetVars -{ - uint32 Signature; /**< \brief Data validation signature used to verify data structure contents*/ - int16 LeapSeconds; /**< \brief Leap seconds value */ - uint16 ClockSignal; /**< \brief Current clock signal selection */ - CFE_TIME_SysTime_t CurrentMET; /**< \brief Current Mission Elapsed Time (MET) */ - CFE_TIME_SysTime_t CurrentSTCF; /**< \brief Current Spacecraft Time Correlation Factor (STCF) */ - CFE_TIME_SysTime_t CurrentDelay; /**< \brief Current time client delay value */ - -} CFE_TIME_ResetVars_t; - -/** -** \brief Time Synchronization Callback Function Ptr Type -** -** \par Description -** Applications that wish to get direct notification of the receipt of the cFE Time Synchronization signal -** (typically a 1 Hz signal), must register a callback function with the following prototype via the -** #CFE_TIME_RegisterSynchCallback API. -*/ -typedef int32 (*CFE_TIME_SynchCallbackPtr_t)(void); /*****************************************************************************/ /* @@ -795,6 +724,63 @@ void CFE_TIME_Print(char *PrintBuffer, CFE_TIME_SysTime_t TimeToPrint); void CFE_TIME_Local1HzISR(void); /**@}*/ + +/* + * The internal APIs prototyped within this block are only intended to be invoked from + * other CFE core apps. They still need to be prototyped in the shared header such that + * they can be called from other core modules, but applications should not call these. + */ +#ifdef _CFE_CORE_ + +/** @defgroup CFEAPITIMECoreInternal cFE Internal Time APIs, internal to CFE core + * @{ + */ + +/*****************************************************************************/ +/** +** \brief Entry Point for cFE Core Application +** +** \par Description +** This is the entry point to the cFE TIME Core Application. +** +** \par Assumptions, External Events, and Notes: +** None +** +** +******************************************************************************/ +extern void CFE_TIME_TaskMain(void); + +/*****************************************************************************/ +/** +** \brief Initializes the cFE core module API Library +** +** \par Description +** Initializes the cFE core module API Library +** +** \par Assumptions, External Events, and Notes: +** -# This function MUST be called before any module API's are called. +** +******************************************************************************/ +extern int32 CFE_TIME_EarlyInit(void); + +/*****************************************************************************/ +/** +** \brief Removes TIME resources associated with specified Application +** +** \par Description +** This function is called by cFE Executive Services to cleanup after +** an Application has been terminated. It frees resources +** that have been allocated to the specified Application. +** +******************************************************************************/ +extern int32 CFE_TIME_CleanUpApp(CFE_ES_AppId_t AppId); + + +/**@}*/ + +#endif /* _CFE_CORE_ */ + + #endif /* _cfe_time_ */ /************************/ diff --git a/modules/cfe_app_intf/fsw/inc/cfe_time_api_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_time_api_typedefs.h new file mode 100644 index 000000000..dafe8f511 --- /dev/null +++ b/modules/cfe_app_intf/fsw/inc/cfe_time_api_typedefs.h @@ -0,0 +1,88 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/* +** File: cfe_time.h +** +** Purpose: cFE Time Services (TIME) library API header file +** +** Author: S.Walling/Microtel +** +** Notes: +** +*/ + +/* +** Ensure that header is included only once... +*/ +#ifndef CFE_TIME_API_TYPES_H +#define CFE_TIME_API_TYPES_H + + +/* +** Includes +*/ +#include "common_types.h" +#include "cfe_time_extern_typedefs.h" + +/*****************************************************************************/ +/* +** Macro Definitions +*/ + +#define CFE_TIME_PRINTED_STRING_SIZE 24 /**< \brief Required size of buffer to be passed into #CFE_TIME_Print (includes null terminator) */ + + +/*****************************************************************************/ +/* +** Type Definitions +*/ + +/** +** \brief Enumerated types identifying the relative relationships of two times +** +** \par Description +** Since time fields contain numbers that are relative to an epoch time, then it is possible for a time value +** to be "negative". This can lead to some confusion about what relationship exists between two time values. +** To resolve this confusion, the cFE provides the API #CFE_TIME_Compare which returns these enumerated values. +*/ +typedef enum CFE_TIME_Compare +{ + CFE_TIME_A_LT_B = -1, /**< \brief The first specified time is considered to be before the second specified time */ + CFE_TIME_EQUAL = 0, /**< \brief The two specified times are considered to be equal */ + CFE_TIME_A_GT_B = 1 /**< \brief The first specified time is considered to be after the second specified time */ +} CFE_TIME_Compare_t; + +/** +** \brief Time Synchronization Callback Function Ptr Type +** +** \par Description +** Applications that wish to get direct notification of the receipt of the cFE Time Synchronization signal +** (typically a 1 Hz signal), must register a callback function with the following prototype via the +** #CFE_TIME_RegisterSynchCallback API. +*/ +typedef int32 (*CFE_TIME_SynchCallbackPtr_t)(void); + + +#endif /* CFE_TIME_API_TYPES_H */ + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/cfe-core/src/inc/cfe_time_extern_typedefs.h b/modules/cfe_app_intf/fsw/inc/cfe_time_extern_typedefs.h similarity index 91% rename from fsw/cfe-core/src/inc/cfe_time_extern_typedefs.h rename to modules/cfe_app_intf/fsw/inc/cfe_time_extern_typedefs.h index cd8feff4d..c4a2fb570 100644 --- a/fsw/cfe-core/src/inc/cfe_time_extern_typedefs.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_time_extern_typedefs.h @@ -26,13 +26,30 @@ #ifdef CFE_EDS_ENABLED_BUILD /* Use the EDS generated version of these types */ -#include "cfe_time_eds_typedefs.h" +#include "cfe_time_eds_api_typedefs.h" #else /* Use the local definitions of these types */ #include "common_types.h" +/** +** \brief Data structure used to hold system time values +** +** \par Description +** The #CFE_TIME_SysTime_t data structure is used to hold time +** values. Time is referred to as the elapsed time (in seconds +** and subseconds) since a specified epoch time. The subseconds +** field contains the number of 2^(-32) second intervals that have +** elapsed since the epoch. +** +*/ +typedef struct CFE_TIME_SysTime +{ + uint32 Seconds; /**< \brief Number of seconds since epoch */ + uint32 Subseconds; /**< \brief Number of subseconds since epoch (LSB = 2^(-32) seconds) */ +} CFE_TIME_SysTime_t; + /** * @brief Label definitions associated with CFE_TIME_FlagBit_Enum_t */ diff --git a/fsw/cfe-core/src/inc/cfe_version.h b/modules/cfe_app_intf/fsw/inc/cfe_version.h similarity index 81% rename from fsw/cfe-core/src/inc/cfe_version.h rename to modules/cfe_app_intf/fsw/inc/cfe_version.h index 94cb45b7c..bc0852284 100644 --- a/fsw/cfe-core/src/inc/cfe_version.h +++ b/modules/cfe_app_intf/fsw/inc/cfe_version.h @@ -30,8 +30,6 @@ * git to determine the most recent tag and commit id. * */ -#include - /* Development Build Macro Definitions */ @@ -63,23 +61,4 @@ ", Last Official Release: cfe v6.7.0" /* For full support please use this version */ -/*! @brief OSAL Version Definitions. - * @details Allows for backwards compatibility. @n - * This will be defined by osal in the future - */ -#ifndef OS_VERSION -#define OS_VERSION \ - CFE_STR(OS_MAJOR_VERSION) "." \ - CFE_STR(OS_MINOR_VERSION) "." \ - CFE_STR(OS_REVISION) "." \ - CFE_STR(OS_MISSION_REV) -#endif - -/*! @brief Combined string with formatted combination of all cFS component versions */ -#define CFS_VERSIONS \ -"cFS Versions:" \ - " cfe " CFE_SRC_VERSION \ - ", osal " OS_VERSION \ - ", psp " /* CFE_PSP_VERSION is defined at runtime */ - #endif /* _cfe_version_ */ diff --git a/fsw/cfe-core/mission_build.cmake b/modules/cfe_app_intf/mission_build.cmake similarity index 100% rename from fsw/cfe-core/mission_build.cmake rename to modules/cfe_app_intf/mission_build.cmake diff --git a/modules/cfe_app_intf/ut-stubs/CMakeLists.txt b/modules/cfe_app_intf/ut-stubs/CMakeLists.txt new file mode 100644 index 000000000..727e1116a --- /dev/null +++ b/modules/cfe_app_intf/ut-stubs/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################## +# +# cFE stub function build recipe +# +# This CMake file contains the recipe for building the stub function +# libraries that correlate with the CFE public API. This library supports +# unit testing of OTHER modules, where the test cases for those modules +# are linked with the stubs supplied here, rather than the normal CFE. +# +################################################################## + +# Reference the UT assert include directory +include_directories(${osal_MISSION_DIR}/ut_assert/inc) + +# +# Create the generic stubs library +# +add_library(ut_${DEP}_stubs STATIC + src/ut_es_stubs.c + src/ut_evs_stubs.c + src/ut_msg_stubs.c + src/ut_resourceid_stubs.c + src/ut_sb_stubs.c + src/ut_tbl_stubs.c + src/ut_time_stubs.c + src/ut_fs_stubs.c +) + +# Define _CFE_CORE_ within stubs to also reveal internal APIs in header +target_compile_definitions(ut_${DEP}_stubs PRIVATE _CFE_CORE_) + +# linking with the CFE stubs implies also linking +# with the OSAL and PSP stubs. This is in line with +# how the real application is linked, in that cfe-core +# executable also provides OSAL and PSP functions. +target_link_libraries(ut_${DEP}_stubs + cfe_app_intf + ut_psp-${CFE_SYSTEM_PSPNAME}_stubs + ut_osapi_stubs + ut_assert +) diff --git a/fsw/cfe-core/ut-stubs/ut_es_stubs.c b/modules/cfe_app_intf/ut-stubs/src/ut_es_stubs.c similarity index 98% rename from fsw/cfe-core/ut-stubs/ut_es_stubs.c rename to modules/cfe_app_intf/ut-stubs/src/ut_es_stubs.c index 57b1bd105..122a366d6 100644 --- a/fsw/cfe-core/ut-stubs/ut_es_stubs.c +++ b/modules/cfe_app_intf/ut-stubs/src/ut_es_stubs.c @@ -33,12 +33,27 @@ ** Includes */ #include -#include "cfe.h" -#include "private/cfe_private.h" -#include "private/cfe_core_resourceid_basevalues.h" +#include "cfe_es.h" +#include "cfe_resourceid.h" +#include "cfe_resourceid_basevalue.h" + #include "utstubs.h" #include "utassert.h" +/* + * Assign ID base values for UT + */ +enum +{ + UT_CFE_ES_TASKID_BASE = CFE_RESOURCEID_MAKE_BASE(0x21), + UT_CFE_ES_APPID_BASE = CFE_RESOURCEID_MAKE_BASE(0x22), + UT_CFE_ES_LIBID_BASE = CFE_RESOURCEID_MAKE_BASE(0x23), + UT_CFE_ES_COUNTID_BASE = CFE_RESOURCEID_MAKE_BASE(0x24), + UT_CFE_ES_POOLID_BASE = CFE_RESOURCEID_MAKE_BASE(0x25), + UT_CFE_ES_CDSBLOCKID_BASE = CFE_RESOURCEID_MAKE_BASE(0x26) +}; + + /* * Unit-test stub definitions/limits * @@ -65,19 +80,19 @@ * Default value to return from calls that output an App ID, if the * test case does not provide a value */ -#define CFE_UT_ES_DEFAULT_APPID CFE_ES_APPID_C(CFE_ResourceId_FromInteger(CFE_ES_APPID_BASE + 1)) +#define CFE_UT_ES_DEFAULT_APPID CFE_ES_APPID_C(CFE_ResourceId_FromInteger(UT_CFE_ES_APPID_BASE + 1)) /* * Default value to return from calls that output a Task ID, if the * test case does not provide a value */ -#define CFE_UT_ES_DEFAULT_TASKID CFE_ES_TASKID_C(CFE_ResourceId_FromInteger(CFE_ES_TASKID_BASE + 1)) +#define CFE_UT_ES_DEFAULT_TASKID CFE_ES_TASKID_C(CFE_ResourceId_FromInteger(UT_CFE_ES_TASKID_BASE + 1)) /* * Default value to return from calls that output a CDS ID, if the * test case does not provide a value */ -#define CFE_UT_ES_DEFAULT_CDSID CFE_ES_CDSHANDLE_C(CFE_ResourceId_FromInteger(CFE_ES_CDSBLOCKID_BASE + 1)) +#define CFE_UT_ES_DEFAULT_CDSID CFE_ES_CDSHANDLE_C(CFE_ResourceId_FromInteger(UT_CFE_ES_CDSBLOCKID_BASE + 1)) /* * Invalid value to output from calls as resource ID for the diff --git a/fsw/cfe-core/ut-stubs/ut_evs_stubs.c b/modules/cfe_app_intf/ut-stubs/src/ut_evs_stubs.c similarity index 99% rename from fsw/cfe-core/ut-stubs/ut_evs_stubs.c rename to modules/cfe_app_intf/ut-stubs/src/ut_evs_stubs.c index 737c37b22..5e8b2233e 100644 --- a/fsw/cfe-core/ut-stubs/ut_evs_stubs.c +++ b/modules/cfe_app_intf/ut-stubs/src/ut_evs_stubs.c @@ -33,8 +33,8 @@ ** Includes */ #include -#include "cfe.h" -#include "private/cfe_private.h" +#include "cfe_evs.h" + #include "utstubs.h" #include "uttools.h" diff --git a/fsw/cfe-core/ut-stubs/ut_fs_stubs.c b/modules/cfe_app_intf/ut-stubs/src/ut_fs_stubs.c similarity index 100% rename from fsw/cfe-core/ut-stubs/ut_fs_stubs.c rename to modules/cfe_app_intf/ut-stubs/src/ut_fs_stubs.c diff --git a/fsw/cfe-core/ut-stubs/ut_msg_stubs.c b/modules/cfe_app_intf/ut-stubs/src/ut_msg_stubs.c similarity index 100% rename from fsw/cfe-core/ut-stubs/ut_msg_stubs.c rename to modules/cfe_app_intf/ut-stubs/src/ut_msg_stubs.c diff --git a/fsw/cfe-core/ut-stubs/ut_resourceid_stubs.c b/modules/cfe_app_intf/ut-stubs/src/ut_resourceid_stubs.c similarity index 99% rename from fsw/cfe-core/ut-stubs/ut_resourceid_stubs.c rename to modules/cfe_app_intf/ut-stubs/src/ut_resourceid_stubs.c index 8a540f4fe..403c89735 100644 --- a/fsw/cfe-core/ut-stubs/ut_resourceid_stubs.c +++ b/modules/cfe_app_intf/ut-stubs/src/ut_resourceid_stubs.c @@ -24,7 +24,7 @@ #include "osapi.h" #include "cfe.h" #include "utstubs.h" -#include "cfe_resourceid_api.h" +#include "cfe_resourceid.h" #include "cfe_resourceid_basevalue.h" diff --git a/fsw/cfe-core/ut-stubs/ut_sb_stubs.c b/modules/cfe_app_intf/ut-stubs/src/ut_sb_stubs.c similarity index 99% rename from fsw/cfe-core/ut-stubs/ut_sb_stubs.c rename to modules/cfe_app_intf/ut-stubs/src/ut_sb_stubs.c index 30742c081..7c351f71e 100644 --- a/fsw/cfe-core/ut-stubs/ut_sb_stubs.c +++ b/modules/cfe_app_intf/ut-stubs/src/ut_sb_stubs.c @@ -33,8 +33,9 @@ ** Includes */ #include -#include "cfe.h" -#include "private/cfe_private.h" +#include "cfe_sb.h" +#include "cfe_time_extern_typedefs.h" + #include "utstubs.h" typedef struct diff --git a/fsw/cfe-core/ut-stubs/ut_tbl_stubs.c b/modules/cfe_app_intf/ut-stubs/src/ut_tbl_stubs.c similarity index 99% rename from fsw/cfe-core/ut-stubs/ut_tbl_stubs.c rename to modules/cfe_app_intf/ut-stubs/src/ut_tbl_stubs.c index f75ae4a35..31d4156ab 100644 --- a/fsw/cfe-core/ut-stubs/ut_tbl_stubs.c +++ b/modules/cfe_app_intf/ut-stubs/src/ut_tbl_stubs.c @@ -22,8 +22,8 @@ ** Includes */ #include -#include "cfe.h" -#include "private/cfe_private.h" +#include "cfe_tbl.h" + #include "utstubs.h" /* diff --git a/fsw/cfe-core/ut-stubs/ut_time_stubs.c b/modules/cfe_app_intf/ut-stubs/src/ut_time_stubs.c similarity index 99% rename from fsw/cfe-core/ut-stubs/ut_time_stubs.c rename to modules/cfe_app_intf/ut-stubs/src/ut_time_stubs.c index 6d86b9625..e3a1414dd 100644 --- a/fsw/cfe-core/ut-stubs/ut_time_stubs.c +++ b/modules/cfe_app_intf/ut-stubs/src/ut_time_stubs.c @@ -35,7 +35,7 @@ #include #include #include "cfe_time.h" -#include "private/cfe_private.h" + #include "utstubs.h" /* diff --git a/modules/cfe_internal_intf/CMakeLists.txt b/modules/cfe_internal_intf/CMakeLists.txt new file mode 100644 index 000000000..6367b70bd --- /dev/null +++ b/modules/cfe_internal_intf/CMakeLists.txt @@ -0,0 +1,34 @@ +################################################################## +# +# cFE Inter-module interface +# +################################################################## + + +add_library(cfe_internal_intf INTERFACE) + +# code compiled as CFE core internal will have _CFE_CORE_ macro set +target_compile_definitions(cfe_internal_intf INTERFACE _CFE_CORE_) + +target_include_directories(cfe_internal_intf INTERFACE + fsw/inc # includes shared among CFE core apps, not called/used by apps + ${CFE_SOURCE_DIR}/cmake/target/inc # to get at the "target_config.h" file when needed +) + +# also use all headers/definitions from public intf +target_link_libraries(cfe_internal_intf INTERFACE cfe_app_intf) + +# Add unit test coverage subdirectory +if (ENABLE_UNIT_TESTS) + add_subdirectory(ut-stubs) +endif (ENABLE_UNIT_TESTS) + +cfs_app_check_intf(${DEP} + cfe_es_erlog_typedef.h + cfe_evs_log_typedef.h + cfe_es_resetdata_typedef.h + cfe_sbr.h + cfe_sb_destination_typedef.h + cfe_es_perfdata_typedef.h + cfe_core_resourceid_basevalues.h +) diff --git a/fsw/cfe-core/arch_build.cmake b/modules/cfe_internal_intf/arch_build.cmake similarity index 79% rename from fsw/cfe-core/arch_build.cmake rename to modules/cfe_internal_intf/arch_build.cmake index 2f2f0d5d3..0de378fab 100644 --- a/fsw/cfe-core/arch_build.cmake +++ b/modules/cfe_internal_intf/arch_build.cmake @@ -17,9 +17,3 @@ generate_config_includefile( PREFIXES ${BUILD_CONFIG} ) -generate_config_includefile( - FILE_NAME "cfe_msgids.h" - MATCH_SUFFIX "msgids.h" - PREFIXES ${BUILD_CONFIG} -) - diff --git a/modules/cfe_internal_intf/eds/base_types.xml b/modules/cfe_internal_intf/eds/base_types.xml new file mode 100644 index 000000000..55d7c7679 --- /dev/null +++ b/modules/cfe_internal_intf/eds/base_types.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + single + + + + + + double + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/cfe_internal_intf/eds/config.xml b/modules/cfe_internal_intf/eds/config.xml new file mode 100644 index 000000000..1635b02e4 --- /dev/null +++ b/modules/cfe_internal_intf/eds/config.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fsw/cfe-core/src/inc/private/cfe_core_resourceid_basevalues.h b/modules/cfe_internal_intf/fsw/inc/cfe_core_resourceid_basevalues.h similarity index 100% rename from fsw/cfe-core/src/inc/private/cfe_core_resourceid_basevalues.h rename to modules/cfe_internal_intf/fsw/inc/cfe_core_resourceid_basevalues.h diff --git a/fsw/cfe-core/src/inc/private/cfe_es_erlog_typedef.h b/modules/cfe_internal_intf/fsw/inc/cfe_es_erlog_typedef.h similarity index 95% rename from fsw/cfe-core/src/inc/private/cfe_es_erlog_typedef.h rename to modules/cfe_internal_intf/fsw/inc/cfe_es_erlog_typedef.h index a2193ae5c..76b30a8eb 100644 --- a/fsw/cfe-core/src/inc/private/cfe_es_erlog_typedef.h +++ b/modules/cfe_internal_intf/fsw/inc/cfe_es_erlog_typedef.h @@ -32,7 +32,10 @@ #define CFE_ES_ERLOG_TYPEDEF_H_ #include -#include /* Needed for CFE_TIME_SysTime_t */ +#include + +#include /* Needed for CFE_TIME_SysTime_t */ +#include /* Needed for CFE_ES_AppId_t */ #define CFE_ES_ERLOG_DESCRIPTION_MAX_LENGTH 80 diff --git a/fsw/cfe-core/src/inc/private/cfe_es_perfdata_typedef.h b/modules/cfe_internal_intf/fsw/inc/cfe_es_perfdata_typedef.h similarity index 100% rename from fsw/cfe-core/src/inc/private/cfe_es_perfdata_typedef.h rename to modules/cfe_internal_intf/fsw/inc/cfe_es_perfdata_typedef.h diff --git a/fsw/cfe-core/src/inc/private/cfe_es_resetdata_typedef.h b/modules/cfe_internal_intf/fsw/inc/cfe_es_resetdata_typedef.h similarity index 96% rename from fsw/cfe-core/src/inc/private/cfe_es_resetdata_typedef.h rename to modules/cfe_internal_intf/fsw/inc/cfe_es_resetdata_typedef.h index 2c59613e0..75f17b8bf 100644 --- a/fsw/cfe-core/src/inc/private/cfe_es_resetdata_typedef.h +++ b/modules/cfe_internal_intf/fsw/inc/cfe_es_resetdata_typedef.h @@ -33,7 +33,7 @@ #include -#include /* Required for CFE_TIME_ResetVars_t definition */ +#include "cfe_time_resetvars_typedef.h" /* Required for CFE_TIME_ResetVars_t definition */ #include "cfe_es_erlog_typedef.h" /* Required for CFE_ES_ERLog_t definition */ #include "cfe_es_perfdata_typedef.h" /* Required for CFE_ES_PerfData_t definition */ #include "cfe_evs_log_typedef.h" /* Required for CFE_EVS_Log_t definition */ diff --git a/fsw/cfe-core/src/inc/private/cfe_evs_log_typedef.h b/modules/cfe_internal_intf/fsw/inc/cfe_evs_log_typedef.h similarity index 98% rename from fsw/cfe-core/src/inc/private/cfe_evs_log_typedef.h rename to modules/cfe_internal_intf/fsw/inc/cfe_evs_log_typedef.h index dc9a7303a..a312b6adc 100644 --- a/fsw/cfe-core/src/inc/private/cfe_evs_log_typedef.h +++ b/modules/cfe_internal_intf/fsw/inc/cfe_evs_log_typedef.h @@ -32,6 +32,8 @@ #define CFE_EVS_LOG_TYPEDEF_H_ #include +#include + #include "cfe_evs_msg.h" /* Required for CFE_EVS_LongEventTlm_t definition */ /* diff --git a/fsw/cfe-core/src/inc/private/cfe_sb_destination_typedef.h b/modules/cfe_internal_intf/fsw/inc/cfe_sb_destination_typedef.h similarity index 95% rename from fsw/cfe-core/src/inc/private/cfe_sb_destination_typedef.h rename to modules/cfe_internal_intf/fsw/inc/cfe_sb_destination_typedef.h index 8627b8476..5faf02a32 100644 --- a/fsw/cfe-core/src/inc/private/cfe_sb_destination_typedef.h +++ b/modules/cfe_internal_intf/fsw/inc/cfe_sb_destination_typedef.h @@ -27,7 +27,7 @@ #define CFE_SB_DESTINATION_TYPEDEF_H_ #include "common_types.h" -#include "cfe_sb.h" /* Required for CFE_SB_PipeId_t definition */ +#include "cfe_sb_extern_typedefs.h" /* Required for CFE_SB_PipeId_t definition */ /****************************************************************************** * This structure defines a DESTINATION DESCRIPTOR used to specify diff --git a/fsw/cfe-core/src/inc/private/cfe_sbr.h b/modules/cfe_internal_intf/fsw/inc/cfe_sbr.h similarity index 79% rename from fsw/cfe-core/src/inc/private/cfe_sbr.h rename to modules/cfe_internal_intf/fsw/inc/cfe_sbr.h index 63d00d2ba..0d22a106c 100644 --- a/fsw/cfe-core/src/inc/private/cfe_sbr.h +++ b/modules/cfe_internal_intf/fsw/inc/cfe_sbr.h @@ -26,55 +26,18 @@ * routing internal use. *****************************************************************************/ -#ifndef CFE_SBR_H_ -#define CFE_SBR_H_ +#ifndef CFE_SBR_H +#define CFE_SBR_H /* * Includes */ #include "common_types.h" -#include "private/cfe_sb_destination_typedef.h" -#include "cfe_sb.h" -#include "cfe_msg_typedefs.h" -#include "cfe_platform_cfg.h" - -/* - * Macro Definitions - */ - -/** \brief Invalid route id */ -#define CFE_SBR_INVALID_ROUTE_ID ((CFE_SBR_RouteId_t) {.RouteId = 0}) +#include "cfe_sbr_api_typedefs.h" +#include "cfe_msg_api_typedefs.h" +#include "cfe_sb_destination_typedef.h" -/****************************************************************************** - * Type Definitions - */ - -/** - * \brief Routing table id - * - * This is intended as a form of "strong typedef" where direct assignments should - * be restricted. Software bus uses numeric indexes into multiple tables to perform - * its duties, and it is important that these index values are distinct and separate - * and not mixed together. - * - * Using this holding structure prevents assignment directly into a different index - * or direct usage as numeric value. - */ -typedef struct -{ - CFE_SB_RouteId_Atom_t RouteId; /**< \brief Holding value, do not use directly in code */ -} CFE_SBR_RouteId_t; - -/** \brief Callback throttling structure */ -typedef struct -{ - uint32 StartIndex; /**< /brief 0 based index to start at */ - uint32 MaxLoop; /**< /brief Max number to process */ - uint32 NextIndex; /**< /brief Next start index (output), 0 if completed */ -} CFE_SBR_Throttle_t; - -/** \brief For each id callback function prototype */ -typedef void (*CFE_SBR_CallbackPtr_t)(CFE_SBR_RouteId_t RouteId, void *ArgPtr); +#include "cfe_platform_cfg.h" /****************************************************************************** * Function prototypes @@ -209,4 +172,4 @@ static inline CFE_SB_RouteId_Atom_t CFE_SBR_RouteIdToValue(CFE_SBR_RouteId_t Rou return (RouteId.RouteId - 1); } -#endif /* CFE_SBR_H_ */ +#endif /* CFE_SBR_H */ diff --git a/modules/cfe_internal_intf/fsw/inc/cfe_sbr_api_typedefs.h b/modules/cfe_internal_intf/fsw/inc/cfe_sbr_api_typedefs.h new file mode 100644 index 000000000..25ff71742 --- /dev/null +++ b/modules/cfe_internal_intf/fsw/inc/cfe_sbr_api_typedefs.h @@ -0,0 +1,78 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/****************************************************************************** + * File: cfe_sbr.h + * + * Purpose: + * Prototypes for private functions and type definitions for SB + * routing internal use. + *****************************************************************************/ + +#ifndef CFE_SBR_API_TYPEDEFS_H +#define CFE_SBR_API_TYPEDEFS_H + +/* + * Includes + */ +#include "common_types.h" +#include "cfe_sb_extern_typedefs.h" + +/* + * Macro Definitions + */ + +/** \brief Invalid route id */ +#define CFE_SBR_INVALID_ROUTE_ID ((CFE_SBR_RouteId_t) {.RouteId = 0}) + + +/****************************************************************************** + * Type Definitions + */ + +/** + * \brief Routing table id + * + * This is intended as a form of "strong typedef" where direct assignments should + * be restricted. Software bus uses numeric indexes into multiple tables to perform + * its duties, and it is important that these index values are distinct and separate + * and not mixed together. + * + * Using this holding structure prevents assignment directly into a different index + * or direct usage as numeric value. + */ +typedef struct +{ + CFE_SB_RouteId_Atom_t RouteId; /**< \brief Holding value, do not use directly in code */ +} CFE_SBR_RouteId_t; + +/** \brief Callback throttling structure */ +typedef struct +{ + uint32 StartIndex; /**< /brief 0 based index to start at */ + uint32 MaxLoop; /**< /brief Max number to process */ + uint32 NextIndex; /**< /brief Next start index (output), 0 if completed */ +} CFE_SBR_Throttle_t; + +/** \brief For each id callback function prototype */ +typedef void (*CFE_SBR_CallbackPtr_t)(CFE_SBR_RouteId_t RouteId, void *ArgPtr); + + +#endif /* CFE_SBR_API_TYPEDEFS_H */ diff --git a/modules/cfe_internal_intf/fsw/inc/cfe_time_resetvars_typedef.h b/modules/cfe_internal_intf/fsw/inc/cfe_time_resetvars_typedef.h new file mode 100644 index 000000000..6b231e2b9 --- /dev/null +++ b/modules/cfe_internal_intf/fsw/inc/cfe_time_resetvars_typedef.h @@ -0,0 +1,70 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/* +** File: cfe_time.h +** +** Purpose: cFE Time Services (TIME) library API header file +** +** Author: S.Walling/Microtel +** +** Notes: +** +*/ + +/* +** Ensure that header is included only once... +*/ +#ifndef CFE_TIME_RESETVARS_TYPEDEF_H +#define CFE_TIME_RESETVARS_TYPEDEF_H + + +/* +** Includes +*/ +#include "common_types.h" +#include "cfe_time_extern_typedefs.h" + + +/** +** \brief Time related variables that are maintained through a Processor Reset +** +** \par Description +** The #CFE_TIME_ResetVars_t data structure contains those variables that are maintained +** in an area of memory that is not cleared during a Processor Reset. This allows the +** cFE Time Service to maintain time to the best of its ability after a Processor Reset. +*/ +typedef struct CFE_TIME_ResetVars +{ + uint32 Signature; /**< \brief Data validation signature used to verify data structure contents*/ + int16 LeapSeconds; /**< \brief Leap seconds value */ + uint16 ClockSignal; /**< \brief Current clock signal selection */ + CFE_TIME_SysTime_t CurrentMET; /**< \brief Current Mission Elapsed Time (MET) */ + CFE_TIME_SysTime_t CurrentSTCF; /**< \brief Current Spacecraft Time Correlation Factor (STCF) */ + CFE_TIME_SysTime_t CurrentDelay; /**< \brief Current time client delay value */ + +} CFE_TIME_ResetVars_t; + + +#endif /* CFE_TIME_RESETVARS_TYPEDEF_H */ + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/cfe-core/ut-stubs/CMakeLists.txt b/modules/cfe_internal_intf/ut-stubs/CMakeLists.txt similarity index 69% rename from fsw/cfe-core/ut-stubs/CMakeLists.txt rename to modules/cfe_internal_intf/ut-stubs/CMakeLists.txt index 14e388a7e..4a94bd40f 100644 --- a/fsw/cfe-core/ut-stubs/CMakeLists.txt +++ b/modules/cfe_internal_intf/ut-stubs/CMakeLists.txt @@ -9,27 +9,25 @@ # ################################################################## -# Reference the UT assert include directory -include_directories(${osal_MISSION_DIR}/ut_assert/inc) - # # Create the generic stubs library # -add_library(ut_cfe-core_stubs STATIC - ut_es_stubs.c - ut_evs_stubs.c - ut_msg_stubs.c - ut_resourceid_stubs.c - ut_sb_stubs.c - ut_tbl_stubs.c - ut_time_stubs.c - ut_fs_stubs.c) +add_library(ut_${DEP}_stubs STATIC + src/ut_osprintf_stubs.c + src/ut_support.c +) + +target_include_directories(ut_${DEP}_stubs PUBLIC inc) + # linking with the CFE stubs implies also linking # with the OSAL and PSP stubs. This is in line with # how the real application is linked, in that cfe-core # executable also provides OSAL and PSP functions. -target_link_libraries(ut_cfe-core_stubs +target_link_libraries(ut_${DEP}_stubs + cfe_internal_intf + ut_cfe_app_intf_stubs ut_psp-${CFE_SYSTEM_PSPNAME}_stubs ut_osapi_stubs + ut_assert ) diff --git a/fsw/cfe-core/unit-test/ut_osprintf_stubs.h b/modules/cfe_internal_intf/ut-stubs/inc/ut_osprintf_stubs.h similarity index 100% rename from fsw/cfe-core/unit-test/ut_osprintf_stubs.h rename to modules/cfe_internal_intf/ut-stubs/inc/ut_osprintf_stubs.h diff --git a/fsw/cfe-core/unit-test/ut_support.h b/modules/cfe_internal_intf/ut-stubs/inc/ut_support.h similarity index 99% rename from fsw/cfe-core/unit-test/ut_support.h rename to modules/cfe_internal_intf/ut-stubs/inc/ut_support.h index 5b3e38660..6ff966828 100644 --- a/fsw/cfe-core/unit-test/ut_support.h +++ b/modules/cfe_internal_intf/ut-stubs/inc/ut_support.h @@ -38,14 +38,7 @@ #include #include "cfe.h" -#include "cfe_sb.h" -#include "cfe_es.h" -#include "common_types.h" -#include "cfe_evs_task.h" -#include "cfe_es_global.h" -#include "cfe_es_cds.h" -#include "cfe_es_generic_pool.h" -#include "cfe_time_utils.h" +#include "cfe_es_resetdata_typedef.h" #include "utassert.h" #include "uttest.h" diff --git a/fsw/cfe-core/unit-test/ut_osprintf_stubs.c b/modules/cfe_internal_intf/ut-stubs/src/ut_osprintf_stubs.c similarity index 100% rename from fsw/cfe-core/unit-test/ut_osprintf_stubs.c rename to modules/cfe_internal_intf/ut-stubs/src/ut_osprintf_stubs.c diff --git a/fsw/cfe-core/unit-test/ut_support.c b/modules/cfe_internal_intf/ut-stubs/src/ut_support.c similarity index 100% rename from fsw/cfe-core/unit-test/ut_support.c rename to modules/cfe_internal_intf/ut-stubs/src/ut_support.c diff --git a/modules/es/CMakeLists.txt b/modules/es/CMakeLists.txt new file mode 100644 index 000000000..ab6b47b1b --- /dev/null +++ b/modules/es/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################################## +# +# cFE Executive Services (ES) module CMake build recipe +# +################################################################## + +project(CFE_ES C) + +# Executive services source files +set(es_SOURCES + fsw/src/cfe_es_api.c + fsw/src/cfe_es_apps.c + fsw/src/cfe_es_backgroundtask.c + fsw/src/cfe_es_cds.c + fsw/src/cfe_es_cds_mempool.c + fsw/src/cfe_es_erlog.c + fsw/src/cfe_es_generic_pool.c + fsw/src/cfe_es_mempool.c + fsw/src/cfe_es_objtab.c + fsw/src/cfe_es_perf.c + fsw/src/cfe_es_resource.c + fsw/src/cfe_es_start.c + fsw/src/cfe_es_syslog.c + fsw/src/cfe_es_task.c +) +add_library(es STATIC ${es_SOURCES}) + +target_include_directories(es PUBLIC fsw/inc) +target_link_libraries(es PRIVATE cfe_internal_intf) + +# Add unit test coverage subdirectory +if (ENABLE_UNIT_TESTS) + add_subdirectory(ut-coverage) +endif (ENABLE_UNIT_TESTS) + +cfs_app_check_intf(${DEP} + cfe_es_msg.h + cfe_es_events.h +) diff --git a/fsw/cfe-core/eds/cfe_es.xml b/modules/es/eds/cfe_es.xml similarity index 100% rename from fsw/cfe-core/eds/cfe_es.xml rename to modules/es/eds/cfe_es.xml diff --git a/fsw/cfe-core/src/inc/cfe_es_events.h b/modules/es/fsw/inc/cfe_es_events.h similarity index 100% rename from fsw/cfe-core/src/inc/cfe_es_events.h rename to modules/es/fsw/inc/cfe_es_events.h diff --git a/fsw/cfe-core/src/inc/cfe_es_msg.h b/modules/es/fsw/inc/cfe_es_msg.h similarity index 99% rename from fsw/cfe-core/src/inc/cfe_es_msg.h rename to modules/es/fsw/inc/cfe_es_msg.h index de4bd34e9..06c27b930 100644 --- a/fsw/cfe-core/src/inc/cfe_es_msg.h +++ b/modules/es/fsw/inc/cfe_es_msg.h @@ -38,8 +38,10 @@ /* ** Includes */ +#include "common_types.h" /* Basic data types */ +#include "cfe_msg_hdr.h" /* for header definitions */ #include "cfe_es_extern_typedefs.h" -#include "cfe_sb.h" + /* ** ES task command packet command codes diff --git a/fsw/cfe-core/src/es/cfe_es_api.c b/modules/es/fsw/src/cfe_es_api.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_api.c rename to modules/es/fsw/src/cfe_es_api.c index f2618019b..85f8fdf09 100644 --- a/fsw/cfe-core/src/es/cfe_es_api.c +++ b/modules/es/fsw/src/cfe_es_api.c @@ -36,17 +36,7 @@ /* ** Required header files. */ -#include "private/cfe_private.h" -#include "cfe_es.h" -#include "cfe_es_apps.h" -#include "cfe_es_global.h" -#include "cfe_es_events.h" -#include "cfe_es_cds.h" -#include "cfe_es_cds_mempool.h" -#include "cfe_es_task.h" -#include "cfe_es_resource.h" -#include "cfe_psp.h" -#include "cfe_es_log.h" +#include "cfe_es_internal.h" #include diff --git a/fsw/cfe-core/src/es/cfe_es_apps.c b/modules/es/fsw/src/cfe_es_apps.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_apps.c rename to modules/es/fsw/src/cfe_es_apps.c index 4802ba75e..5c2b493ef 100644 --- a/fsw/cfe-core/src/es/cfe_es_apps.c +++ b/modules/es/fsw/src/cfe_es_apps.c @@ -36,14 +36,7 @@ /* ** Includes */ -#include "private/cfe_private.h" -#include "cfe_es.h" -#include "cfe_psp.h" -#include "cfe_es_global.h" -#include "cfe_es_task.h" -#include "cfe_es_apps.h" -#include "cfe_es_log.h" -#include "cfe_es_resource.h" +#include "cfe_es_internal.h" #include #include /* memset() */ diff --git a/fsw/cfe-core/src/es/cfe_es_apps.h b/modules/es/fsw/src/cfe_es_apps.h similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_apps.h rename to modules/es/fsw/src/cfe_es_apps.h index 2e6bf558d..d776f044d 100644 --- a/fsw/cfe-core/src/es/cfe_es_apps.h +++ b/modules/es/fsw/src/cfe_es_apps.h @@ -40,7 +40,9 @@ ** Include Files */ #include "common_types.h" -#include "osapi.h" + +#include "cfe_es_api_typedefs.h" +#include "cfe_fs_api_typedefs.h" /* ** Macro Definitions diff --git a/fsw/cfe-core/src/es/cfe_es_backgroundtask.c b/modules/es/fsw/src/cfe_es_backgroundtask.c similarity index 98% rename from fsw/cfe-core/src/es/cfe_es_backgroundtask.c rename to modules/es/fsw/src/cfe_es_backgroundtask.c index 93b70867e..3b3508647 100644 --- a/fsw/cfe-core/src/es/cfe_es_backgroundtask.c +++ b/modules/es/fsw/src/cfe_es_backgroundtask.c @@ -35,11 +35,7 @@ #include -#include "osapi.h" -#include "private/cfe_private.h" -#include "cfe_es_perf.h" -#include "cfe_es_global.h" -#include "cfe_es_task.h" +#include "cfe_es_internal.h" #define CFE_ES_BACKGROUND_SEM_NAME "ES_BG_SEM" #define CFE_ES_BACKGROUND_CHILD_NAME "ES_BG_TASK" diff --git a/fsw/cfe-core/src/es/cfe_es_cds.c b/modules/es/fsw/src/cfe_es_cds.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_cds.c rename to modules/es/fsw/src/cfe_es_cds.c index 4efd36cd8..a6872c126 100644 --- a/fsw/cfe-core/src/es/cfe_es_cds.c +++ b/modules/es/fsw/src/cfe_es_cds.c @@ -38,14 +38,7 @@ /* ** Required header files. */ -#include "private/cfe_private.h" -#include "cfe_es_apps.h" -#include "cfe_es_cds.h" -#include "cfe_es_global.h" -#include "cfe_es_resource.h" -#include "cfe_es_log.h" -#include "cfe_psp.h" -#include "cfe_es_cds_mempool.h" +#include "cfe_es_internal.h" #include #include diff --git a/fsw/cfe-core/src/es/cfe_es_cds.h b/modules/es/fsw/src/cfe_es_cds.h similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_cds.h rename to modules/es/fsw/src/cfe_es_cds.h index d4168f448..e57de070e 100644 --- a/fsw/cfe-core/src/es/cfe_es_cds.h +++ b/modules/es/fsw/src/cfe_es_cds.h @@ -42,10 +42,6 @@ ** Include Files */ #include "common_types.h" -#include "osapi.h" -#include "cfe_es_apps.h" -#include "cfe_platform_cfg.h" -#include "cfe_es.h" #include "cfe_es_generic_pool.h" /* diff --git a/fsw/cfe-core/src/es/cfe_es_cds_mempool.c b/modules/es/fsw/src/cfe_es_cds_mempool.c similarity index 98% rename from fsw/cfe-core/src/es/cfe_es_cds_mempool.c rename to modules/es/fsw/src/cfe_es_cds_mempool.c index a3acfc3a9..765195f93 100644 --- a/fsw/cfe-core/src/es/cfe_es_cds_mempool.c +++ b/modules/es/fsw/src/cfe_es_cds_mempool.c @@ -38,13 +38,7 @@ #include #include -#include "private/cfe_private.h" -#include "cfe_es.h" -#include "cfe_psp.h" -#include "cfe_es_generic_pool.h" -#include "cfe_es_cds_mempool.h" -#include "cfe_es_global.h" -#include "cfe_es_log.h" +#include "cfe_es_internal.h" /*****************************************************************************/ /* diff --git a/fsw/cfe-core/src/es/cfe_es_cds_mempool.h b/modules/es/fsw/src/cfe_es_cds_mempool.h similarity index 98% rename from fsw/cfe-core/src/es/cfe_es_cds_mempool.h rename to modules/es/fsw/src/cfe_es_cds_mempool.h index abacf5a7e..53e07ac3e 100644 --- a/fsw/cfe-core/src/es/cfe_es_cds_mempool.h +++ b/modules/es/fsw/src/cfe_es_cds_mempool.h @@ -41,7 +41,6 @@ /* ** Include Files */ -#include "private/cfe_private.h" #include "cfe_es_cds.h" /* diff --git a/fsw/cfe-core/src/es/cfe_es_erlog.c b/modules/es/fsw/src/cfe_es_erlog.c similarity index 98% rename from fsw/cfe-core/src/es/cfe_es_erlog.c rename to modules/es/fsw/src/cfe_es_erlog.c index 1ebd390ef..d3d7a7689 100644 --- a/fsw/cfe-core/src/es/cfe_es_erlog.c +++ b/modules/es/fsw/src/cfe_es_erlog.c @@ -38,14 +38,7 @@ /* ** Required header files. */ -#include "private/cfe_private.h" -#include "cfe_es.h" -#include "cfe_es_apps.h" -#include "cfe_es_global.h" -#include "cfe_es_resource.h" -#include "cfe_es_log.h" -#include "cfe_es_task.h" -#include "cfe_psp.h" +#include "cfe_es_internal.h" #include #include diff --git a/fsw/cfe-core/src/es/cfe_es_generic_pool.c b/modules/es/fsw/src/cfe_es_generic_pool.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_generic_pool.c rename to modules/es/fsw/src/cfe_es_generic_pool.c index d8b76bcb1..1d13e50de 100644 --- a/fsw/cfe-core/src/es/cfe_es_generic_pool.c +++ b/modules/es/fsw/src/cfe_es_generic_pool.c @@ -34,17 +34,12 @@ /* ** Includes */ +#include "cfe_es_internal.h" + #include #include #include -#include "common_types.h" -#include "osapi.h" -#include "cfe_es.h" -#include "cfe_es_generic_pool.h" -#include "cfe_es_global.h" -#include "cfe_platform_cfg.h" - /*****************************************************************************/ /* diff --git a/fsw/cfe-core/src/es/cfe_es_generic_pool.h b/modules/es/fsw/src/cfe_es_generic_pool.h similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_generic_pool.h rename to modules/es/fsw/src/cfe_es_generic_pool.h index 2796ed1eb..fb1947e78 100644 --- a/fsw/cfe-core/src/es/cfe_es_generic_pool.h +++ b/modules/es/fsw/src/cfe_es_generic_pool.h @@ -42,7 +42,6 @@ ** Include Files */ #include "common_types.h" -#include "private/cfe_private.h" /* ** Macro Definitions diff --git a/fsw/cfe-core/src/es/cfe_es_global.h b/modules/es/fsw/src/cfe_es_global.h similarity index 91% rename from fsw/cfe-core/src/es/cfe_es_global.h rename to modules/es/fsw/src/cfe_es_global.h index 0965ef9ea..369f0eec6 100644 --- a/fsw/cfe-core/src/es/cfe_es_global.h +++ b/modules/es/fsw/src/cfe_es_global.h @@ -35,24 +35,16 @@ #define _cfe_es_global_ /* -** Includes: +** Includes */ -#include "osapi.h" -#include "private/cfe_private.h" -#include "private/cfe_es_resetdata_typedef.h" -#include "cfe_es.h" -#include "cfe_es_apps.h" +#include "common_types.h" +#include "cfe_es_api_typedefs.h" + +#include "cfe_es_erlog_typedef.h" +#include "cfe_es_resetdata_typedef.h" #include "cfe_es_cds.h" -#include "cfe_es_perf.h" -#include "cfe_es_generic_pool.h" -#include "cfe_es_mempool.h" -#include "cfe_es_cds_mempool.h" -#include "cfe_time.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs.h" -#include "cfe_psp.h" - -#include + +#include /* for sig_atomic_t */ /* diff --git a/modules/es/fsw/src/cfe_es_internal.h b/modules/es/fsw/src/cfe_es_internal.h new file mode 100644 index 000000000..1449fc0dc --- /dev/null +++ b/modules/es/fsw/src/cfe_es_internal.h @@ -0,0 +1,60 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/* +** File: +** cfe_es_global.h +** +** Purpose: +** This file contains the ES global data definitions. +** +** References: +** Flight Software Branch C Coding Standard Version 1.0a +** cFE Flight Software Application Developers Guide +** +*/ + +#ifndef CFE_ES_INTERNAL_H +#define CFE_ES_INTERNAL_H + +/* +** Includes +*/ +#include "cfe.h" +#include "cfe_platform_cfg.h" + +#include "cfe_msgids.h" +#include "cfe_perfids.h" + +#include "cfe_es_apps.h" +#include "cfe_es_cds.h" +#include "cfe_es_perf.h" +#include "cfe_es_generic_pool.h" +#include "cfe_es_mempool.h" +#include "cfe_es_global.h" +#include "cfe_es_cds_mempool.h" +#include "cfe_es_events.h" +#include "cfe_es_start.h" +#include "cfe_es_task.h" +#include "cfe_es_resource.h" +#include "cfe_es_log.h" + + +#endif diff --git a/fsw/cfe-core/src/es/cfe_es_log.h b/modules/es/fsw/src/cfe_es_log.h similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_log.h rename to modules/es/fsw/src/cfe_es_log.h index e52ae1c0a..4c168274e 100644 --- a/fsw/cfe-core/src/es/cfe_es_log.h +++ b/modules/es/fsw/src/cfe_es_log.h @@ -41,9 +41,9 @@ /* ** Include Files */ -#include "cfe.h" -#include "cfe_es.h" -#include "cfe_es_global.h" +#include "common_types.h" +#include "cfe_es_api_typedefs.h" +#include "cfe_time_api_typedefs.h" #include /* required for "va_list" */ diff --git a/fsw/cfe-core/src/es/cfe_es_mempool.c b/modules/es/fsw/src/cfe_es_mempool.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_mempool.c rename to modules/es/fsw/src/cfe_es_mempool.c index 66a833a42..c9f426e50 100644 --- a/fsw/cfe-core/src/es/cfe_es_mempool.c +++ b/modules/es/fsw/src/cfe_es_mempool.c @@ -34,17 +34,12 @@ /* ** Includes */ +#include "cfe_es_internal.h" + #include #include #include -#include "private/cfe_private.h" -#include "cfe_es_generic_pool.h" -#include "cfe_es.h" -#include "cfe_es_task.h" -#include "cfe_es_log.h" -#include "cfe_es_resource.h" - /** * Macro that determines the native alignment requirement of a specific type * diff --git a/fsw/cfe-core/src/es/cfe_es_mempool.h b/modules/es/fsw/src/cfe_es_mempool.h similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_mempool.h rename to modules/es/fsw/src/cfe_es_mempool.h index d94724faa..c8627925d 100644 --- a/fsw/cfe-core/src/es/cfe_es_mempool.h +++ b/modules/es/fsw/src/cfe_es_mempool.h @@ -34,6 +34,7 @@ ** Include Files */ #include "common_types.h" +#include "cfe_resourceid.h" #include "cfe_es_generic_pool.h" typedef struct diff --git a/fsw/cfe-core/src/es/cfe_es_objtab.c b/modules/es/fsw/src/cfe_es_objtab.c similarity index 98% rename from fsw/cfe-core/src/es/cfe_es_objtab.c rename to modules/es/fsw/src/cfe_es_objtab.c index 18c4c3287..97e831176 100644 --- a/fsw/cfe-core/src/es/cfe_es_objtab.c +++ b/modules/es/fsw/src/cfe_es_objtab.c @@ -36,9 +36,7 @@ /* ** Include files */ -#include "private/cfe_private.h" -#include "cfe_es_global.h" -#include "cfe_es_start.h" +#include "cfe_es_internal.h" /* ** diff --git a/fsw/cfe-core/src/es/cfe_es_perf.c b/modules/es/fsw/src/cfe_es_perf.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_perf.c rename to modules/es/fsw/src/cfe_es_perf.c index bb957a35e..7d8c79204 100644 --- a/fsw/cfe-core/src/es/cfe_es_perf.c +++ b/modules/es/fsw/src/cfe_es_perf.c @@ -29,17 +29,8 @@ /* ** Include Section */ +#include "cfe_es_internal.h" -#include "osapi.h" -#include "private/cfe_private.h" -#include "cfe_es_perf.h" -#include "cfe_es_log.h" -#include "cfe_es_global.h" -#include "cfe_es_start.h" -#include "cfe_es_events.h" -#include "cfe_es_task.h" -#include "cfe_fs.h" -#include "cfe_psp.h" #include diff --git a/fsw/cfe-core/src/es/cfe_es_perf.h b/modules/es/fsw/src/cfe_es_perf.h similarity index 96% rename from fsw/cfe-core/src/es/cfe_es_perf.h rename to modules/es/fsw/src/cfe_es_perf.h index 74cd370e6..ce2b2ac76 100644 --- a/fsw/cfe-core/src/es/cfe_es_perf.h +++ b/modules/es/fsw/src/cfe_es_perf.h @@ -37,14 +37,8 @@ ** Include Files */ #include "common_types.h" -#include "osapi.h" -#include "cfe_es.h" -#include "cfe_es_msg.h" -#include "cfe_es_events.h" -#include "cfe_sb.h" -#include "cfe_evs.h" -#include "cfe_perfids.h" -#include "cfe_psp.h" +#include "osconfig.h" +#include "cfe_es_api_typedefs.h" /* ** Defines diff --git a/fsw/cfe-core/src/es/cfe_es_resource.c b/modules/es/fsw/src/cfe_es_resource.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_resource.c rename to modules/es/fsw/src/cfe_es_resource.c index 4af1cacea..24a566342 100644 --- a/fsw/cfe-core/src/es/cfe_es_resource.c +++ b/modules/es/fsw/src/cfe_es_resource.c @@ -33,13 +33,12 @@ /* ** Includes */ +#include "cfe_es_internal.h" + #include #include #include -#include "cfe_platform_cfg.h" -#include "cfe_es_resource.h" - /*********************************************************************/ /* diff --git a/fsw/cfe-core/src/es/cfe_es_resource.h b/modules/es/fsw/src/cfe_es_resource.h similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_resource.h rename to modules/es/fsw/src/cfe_es_resource.h index efdb8280a..ad30b13a9 100644 --- a/fsw/cfe-core/src/es/cfe_es_resource.h +++ b/modules/es/fsw/src/cfe_es_resource.h @@ -34,8 +34,8 @@ /* ** Include Files */ -#include "cfe_resourceid_api.h" -#include "private/cfe_core_resourceid_basevalues.h" +#include "cfe_resourceid.h" +#include "cfe_core_resourceid_basevalues.h" #include "cfe_es_global.h" diff --git a/fsw/cfe-core/src/es/cfe_es_start.c b/modules/es/fsw/src/cfe_es_start.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_start.c rename to modules/es/fsw/src/cfe_es_start.c index da0538c4c..9e545415a 100644 --- a/fsw/cfe-core/src/es/cfe_es_start.c +++ b/modules/es/fsw/src/cfe_es_start.c @@ -37,14 +37,7 @@ ** Includes */ -#include "private/cfe_private.h" -#include "cfe_es.h" -#include "cfe_es_global.h" -#include "cfe_es_resource.h" -#include "cfe_es_start.h" -#include "cfe_es_apps.h" -#include "cfe_es_log.h" -#include "cfe_psp.h" +#include "cfe_es_internal.h" #include #include diff --git a/fsw/cfe-core/src/es/cfe_es_start.h b/modules/es/fsw/src/cfe_es_start.h similarity index 98% rename from fsw/cfe-core/src/es/cfe_es_start.h rename to modules/es/fsw/src/cfe_es_start.h index 119df0a5a..0fa233a78 100644 --- a/fsw/cfe-core/src/es/cfe_es_start.h +++ b/modules/es/fsw/src/cfe_es_start.h @@ -41,7 +41,7 @@ ** Include Files */ -#include "cfe.h" +#include "cfe_es_api_typedefs.h" /* ** Macro Definitions diff --git a/fsw/cfe-core/src/es/cfe_es_syslog.c b/modules/es/fsw/src/cfe_es_syslog.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_syslog.c rename to modules/es/fsw/src/cfe_es_syslog.c index 1da1738af..9c0012627 100644 --- a/fsw/cfe-core/src/es/cfe_es_syslog.c +++ b/modules/es/fsw/src/cfe_es_syslog.c @@ -51,11 +51,7 @@ /* ** Required header files. */ -#include "cfe.h" -#include "cfe_es.h" -#include "cfe_es_global.h" -#include "cfe_es_task.h" -#include "cfe_es_log.h" +#include "cfe_es_internal.h" #include #include diff --git a/fsw/cfe-core/src/es/cfe_es_task.c b/modules/es/fsw/src/cfe_es_task.c similarity index 99% rename from fsw/cfe-core/src/es/cfe_es_task.c rename to modules/es/fsw/src/cfe_es_task.c index 5182a21f9..2b1be9362 100644 --- a/fsw/cfe-core/src/es/cfe_es_task.c +++ b/modules/es/fsw/src/cfe_es_task.c @@ -36,20 +36,10 @@ /* ** Includes */ -#include "private/cfe_private.h" -#include "cfe_platform_cfg.h" +#include "cfe_es_internal.h" + #include "cfe_version.h" -#include "cfe_es_global.h" -#include "cfe_es_apps.h" -#include "cfe_es_resource.h" -#include "cfe_es_events.h" -#include "cfe_es_verify.h" -#include "cfe_es_task.h" -#include "cfe_es_log.h" -#include "cfe_es_cds.h" -#include "cfe_fs.h" -#include "cfe_psp.h" -#include "cfe_msgids.h" +#include "target_config.h" #include diff --git a/fsw/cfe-core/src/es/cfe_es_task.h b/modules/es/fsw/src/cfe_es_task.h similarity index 97% rename from fsw/cfe-core/src/es/cfe_es_task.h rename to modules/es/fsw/src/cfe_es_task.h index fb8d69cf6..1854943cf 100644 --- a/fsw/cfe-core/src/es/cfe_es_task.h +++ b/modules/es/fsw/src/cfe_es_task.h @@ -38,13 +38,11 @@ /* ** Includes */ -#include "cfe.h" -#include "cfe_es.h" -#include "cfe_es_apps.h" -#include "cfe_es_events.h" -#include "cfe_es_msg.h" -#include "cfe_es_perf.h" -#include "private/cfe_es_erlog_typedef.h" +#include "cfe_es_api_typedefs.h" +#include "cfe_fs_api_typedefs.h" +#include "cfe_sb_api_typedefs.h" + +#include "cfe_es_erlog_typedef.h" /*************************************************************************/ diff --git a/fsw/cfe-core/src/es/cfe_es_verify.h b/modules/es/fsw/src/cfe_es_verify.h similarity index 100% rename from fsw/cfe-core/src/es/cfe_es_verify.h rename to modules/es/fsw/src/cfe_es_verify.h diff --git a/modules/es/ut-coverage/CMakeLists.txt b/modules/es/ut-coverage/CMakeLists.txt new file mode 100644 index 000000000..11e674c02 --- /dev/null +++ b/modules/es/ut-coverage/CMakeLists.txt @@ -0,0 +1,7 @@ +################################################################## +# +# cFE unit test CMake build recipe +# +################################################################## + +# Nothing yet - placeholder for future use diff --git a/fsw/cfe-core/unit-test/es_UT.c b/modules/es/ut-coverage/es_UT.c similarity index 100% rename from fsw/cfe-core/unit-test/es_UT.c rename to modules/es/ut-coverage/es_UT.c diff --git a/fsw/cfe-core/unit-test/es_UT.h b/modules/es/ut-coverage/es_UT.h similarity index 100% rename from fsw/cfe-core/unit-test/es_UT.h rename to modules/es/ut-coverage/es_UT.h diff --git a/modules/evs/CMakeLists.txt b/modules/evs/CMakeLists.txt new file mode 100644 index 000000000..849583a6c --- /dev/null +++ b/modules/evs/CMakeLists.txt @@ -0,0 +1,33 @@ +################################################################## +# +# cFE Event Services (EVS) module CMake build recipe +# +################################################################## + +project(CFE_EVS C) + +# Event services source files +set(evs_SOURCES + fsw/src/cfe_evs.c + fsw/src/cfe_evs_log.c + fsw/src/cfe_evs_task.c + fsw/src/cfe_evs_utils.c + fsw/src/cfe_evs.c + fsw/src/cfe_evs_log.c + fsw/src/cfe_evs_task.c + fsw/src/cfe_evs_utils.c +) +add_library(evs STATIC ${evs_SOURCES}) + +target_include_directories(evs PUBLIC fsw/inc) +target_link_libraries(evs PRIVATE cfe_internal_intf) + +# Add unit test coverage subdirectory +if(ENABLE_UNIT_TESTS) + add_subdirectory(ut-coverage) +endif(ENABLE_UNIT_TESTS) + +cfs_app_check_intf(${DEP} + cfe_evs_msg.h + cfe_evs_events.h +) diff --git a/fsw/cfe-core/eds/cfe_evs.xml b/modules/evs/eds/cfe_evs.xml similarity index 100% rename from fsw/cfe-core/eds/cfe_evs.xml rename to modules/evs/eds/cfe_evs.xml diff --git a/fsw/cfe-core/src/inc/cfe_evs_events.h b/modules/evs/fsw/inc/cfe_evs_events.h similarity index 100% rename from fsw/cfe-core/src/inc/cfe_evs_events.h rename to modules/evs/fsw/inc/cfe_evs_events.h diff --git a/fsw/cfe-core/src/inc/cfe_evs_msg.h b/modules/evs/fsw/inc/cfe_evs_msg.h similarity index 99% rename from fsw/cfe-core/src/inc/cfe_evs_msg.h rename to modules/evs/fsw/inc/cfe_evs_msg.h index cfefb1514..c5434ea70 100644 --- a/fsw/cfe-core/src/inc/cfe_evs_msg.h +++ b/modules/evs/fsw/inc/cfe_evs_msg.h @@ -37,10 +37,9 @@ /********************************** Include Files ************************************/ #include "common_types.h" /* Basic data types */ +#include "cfe_msg_hdr.h" /* for header definitions */ #include "cfe_evs_extern_typedefs.h" /* for EVS-specific types such as CFE_EVS_LogMode_Enum_t */ -#include "cfe_time.h" /* Time library function definitions */ -#include "cfe_sb.h" -#include "cfe_es.h" +#include "cfe_es_extern_typedefs.h" /* for CFE_ES_AppId_t type */ /** \name Event Services Command Codes */ diff --git a/fsw/cfe-core/src/evs/cfe_evs.c b/modules/evs/fsw/src/cfe_evs.c similarity index 98% rename from fsw/cfe-core/src/evs/cfe_evs.c rename to modules/evs/fsw/src/cfe_evs.c index ac6c32318..3ece6ef62 100644 --- a/fsw/cfe-core/src/evs/cfe_evs.c +++ b/modules/evs/fsw/src/cfe_evs.c @@ -30,12 +30,14 @@ */ /* Include Files */ -#include "cfe_evs.h" /* EVS library function definitions */ -#include "cfe_evs_task.h" /* EVS internal definitions */ -#include "cfe_evs_utils.h" /* EVS utility function definitions */ #include "common_types.h" /* Basic data types */ -#include "cfe_es.h" /* Executive Service definitions */ #include "cfe_error.h" /* cFE error code definitions */ +#include "cfe_evs.h" /* EVS library function definitions */ +#include "cfe_evs_task.h" /* EVS internal definitions */ +#include "cfe_evs_utils.h" /* EVS utility function definitions */ + +#include "cfe_es.h" +#include "cfe_time.h" #include #include diff --git a/fsw/cfe-core/src/evs/cfe_evs_log.c b/modules/evs/fsw/src/cfe_evs_log.c similarity index 98% rename from fsw/cfe-core/src/evs/cfe_evs_log.c rename to modules/evs/fsw/src/cfe_evs_log.c index bcb59955a..126b0a9d1 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_log.c +++ b/modules/evs/fsw/src/cfe_evs_log.c @@ -29,14 +29,15 @@ */ /* Include Files */ +#include "cfe_evs.h" /* EVS API definitions */ +#include "cfe_evs_events.h" /* EVS event IDs */ #include "cfe_evs_task.h" /* EVS internal definitions */ #include "cfe_evs_log.h" /* EVS log file definitions */ -#include "cfe_evs.h" /* EVS API definitions */ #include "cfe_evs_utils.h" /* EVS utility function definitions */ -#include "cfe_fs.h" /* File Service definitions */ #include "cfe_error.h" /* cFE error code definitions */ #include "cfe_psp.h" /* Get reset area function prototype */ +#include "cfe_fs.h" /* File Service definitions */ #include diff --git a/fsw/cfe-core/src/evs/cfe_evs_log.h b/modules/evs/fsw/src/cfe_evs_log.h similarity index 100% rename from fsw/cfe-core/src/evs/cfe_evs_log.h rename to modules/evs/fsw/src/cfe_evs_log.h diff --git a/fsw/cfe-core/src/evs/cfe_evs_task.c b/modules/evs/fsw/src/cfe_evs_task.c similarity index 99% rename from fsw/cfe-core/src/evs/cfe_evs_task.c rename to modules/evs/fsw/src/cfe_evs_task.c index 928e529a5..852cc1f96 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_task.c +++ b/modules/evs/fsw/src/cfe_evs_task.c @@ -30,21 +30,28 @@ */ /* Include Files */ +#include "cfe_evs.h" /* EVS API definitions */ #include "cfe_evs_task.h" /* EVS internal definitions */ #include "cfe_evs_log.h" /* EVS log file definitions */ #include "cfe_evs_utils.h" /* EVS utility function definitions */ -#include "cfe_evs.h" /* EVS API definitions */ + +#include "cfe_msgids.h" +#include "cfe_perfids.h" #include #include "cfe_version.h" /* cFE version definitions */ #include "cfe_error.h" /* cFE error code definitions */ -#include "cfe_es.h" /* Executive Service definitions */ -#include "cfe_fs.h" /* File Service definitions */ #include "cfe_psp.h" /* cFE Platform Support Package definitions */ #include "osapi.h" /* OS API file system definitions */ -#include "private/cfe_es_resetdata_typedef.h" /* Definition of CFE_ES_ResetData_t */ +#include "cfe_es_resetdata_typedef.h" /* Definition of CFE_ES_ResetData_t */ + +#include "cfe_es.h" /* Executive Service definitions */ +#include "cfe_fs.h" /* File Service definitions */ +#include "cfe_msg.h" /* Message definitions */ +#include "cfe_sb.h" /* Software Bus definitions */ + /* Global Data */ CFE_EVS_Global_t CFE_EVS_Global; diff --git a/fsw/cfe-core/src/evs/cfe_evs_task.h b/modules/evs/fsw/src/cfe_evs_task.h similarity index 93% rename from fsw/cfe-core/src/evs/cfe_evs_task.h rename to modules/evs/fsw/src/cfe_evs_task.h index 079e1118f..f9dbf7c87 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_task.h +++ b/modules/evs/fsw/src/cfe_evs_task.h @@ -42,15 +42,13 @@ #define _cfe_evs_task_ /********************************** Include Files ************************************/ -#include "private/cfe_private.h" -#include "private/cfe_evs_log_typedef.h" -#include "cfe_sb.h" /* Software Bus library function definitions */ -#include "cfe_msgids.h" /* Software Bus Message ID definitions */ -#include "cfe_es.h" /* Memory Pool definitions */ -#include "osapi.h" /* OS definitions */ -#include "cfe_evs_msg.h" /* EVS message definitions */ -#include "cfe_evs_verify.h" -#include "cfe_evs.h" +#include "common_types.h" +#include "cfe_platform_cfg.h" +#include "cfe_mission_cfg.h" +#include "osconfig.h" +#include "cfe_evs_api_typedefs.h" +#include "cfe_evs_log_typedef.h" +#include "cfe_sb_api_typedefs.h" #include "cfe_evs_events.h" /********************* Macro and Constant Type Definitions ***************************/ diff --git a/fsw/cfe-core/src/evs/cfe_evs_utils.c b/modules/evs/fsw/src/cfe_evs_utils.c similarity index 99% rename from fsw/cfe-core/src/evs/cfe_evs_utils.c rename to modules/evs/fsw/src/cfe_evs_utils.c index ad80eb88a..6eb645b14 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_utils.c +++ b/modules/evs/fsw/src/cfe_evs_utils.c @@ -29,11 +29,14 @@ */ /* Include Files */ -#include "cfe_evs.h" /* EVS library function definitions */ +#include "cfe_evs.h" /* EVS library function definitions */ #include "cfe_evs_log.h" /* EVS local event log definitions */ #include "cfe_evs_task.h" /* EVS internal definitions */ #include "cfe_evs_utils.h" /* EVS utility function definitions */ +#include "cfe_msgids.h" +#include "cfe_perfids.h" + #include #include @@ -41,8 +44,11 @@ #include "common_types.h" /* Basic data types */ #include "osapi.h" /* OS API interface definitions */ #include "cfe_psp.h" /* cFE PSP glue functions */ -#include "cfe_sb.h" /* Software Bus library function definitions */ + #include "cfe_es.h" +#include "cfe_sb.h" +#include "cfe_msg.h" +#include "cfe_time.h" /* Local Function Prototypes */ void EVS_SendViaPorts (CFE_EVS_LongEventTlm_t *EVS_PktPtr); diff --git a/fsw/cfe-core/src/evs/cfe_evs_utils.h b/modules/evs/fsw/src/cfe_evs_utils.h similarity index 98% rename from fsw/cfe-core/src/evs/cfe_evs_utils.h rename to modules/evs/fsw/src/cfe_evs_utils.h index b2ee70d84..eb82998c1 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_utils.h +++ b/modules/evs/fsw/src/cfe_evs_utils.h @@ -44,6 +44,9 @@ /********************* Include Files ************************/ #include "cfe_evs_task.h" /* EVS internal definitions */ +#include "cfe_resourceid.h" +#include "cfe_es_api_typedefs.h" +#include "cfe_time_api_typedefs.h" /* ============== Section I: Macro and Constant Type Definitions =========== */ diff --git a/fsw/cfe-core/src/evs/cfe_evs_verify.h b/modules/evs/fsw/src/cfe_evs_verify.h similarity index 100% rename from fsw/cfe-core/src/evs/cfe_evs_verify.h rename to modules/evs/fsw/src/cfe_evs_verify.h diff --git a/modules/evs/ut-coverage/CMakeLists.txt b/modules/evs/ut-coverage/CMakeLists.txt new file mode 100644 index 000000000..11e674c02 --- /dev/null +++ b/modules/evs/ut-coverage/CMakeLists.txt @@ -0,0 +1,7 @@ +################################################################## +# +# cFE unit test CMake build recipe +# +################################################################## + +# Nothing yet - placeholder for future use diff --git a/fsw/cfe-core/unit-test/evs_UT.c b/modules/evs/ut-coverage/evs_UT.c similarity index 100% rename from fsw/cfe-core/unit-test/evs_UT.c rename to modules/evs/ut-coverage/evs_UT.c diff --git a/fsw/cfe-core/unit-test/evs_UT.h b/modules/evs/ut-coverage/evs_UT.h similarity index 100% rename from fsw/cfe-core/unit-test/evs_UT.h rename to modules/evs/ut-coverage/evs_UT.h diff --git a/modules/fs/CMakeLists.txt b/modules/fs/CMakeLists.txt new file mode 100644 index 000000000..3259f2be0 --- /dev/null +++ b/modules/fs/CMakeLists.txt @@ -0,0 +1,25 @@ +################################################################## +# +# cFE File Services (FS) module CMake build recipe +# +################################################################## + +project(CFE_FS C) + +# File services source files +set(fs_SOURCES + fsw/src/cfe_fs_api.c + fsw/src/cfe_fs_priv.c + fsw/src/cfe_fs_api.c + fsw/src/cfe_fs_priv.c +) +add_library(fs STATIC ${fs_SOURCES}) + +target_include_directories(fs PUBLIC fsw/inc) +target_link_libraries(fs PRIVATE cfe_internal_intf) + +# Add unit test coverage subdirectory +if(ENABLE_UNIT_TESTS) + add_subdirectory(ut-coverage) +endif(ENABLE_UNIT_TESTS) + diff --git a/fsw/cfe-core/src/fs/cfe_fs_api.c b/modules/fs/fsw/src/cfe_fs_api.c similarity index 99% rename from fsw/cfe-core/src/fs/cfe_fs_api.c rename to modules/fs/fsw/src/cfe_fs_api.c index fd2e9ef5f..648c40702 100644 --- a/fsw/cfe-core/src/fs/cfe_fs_api.c +++ b/modules/fs/fsw/src/cfe_fs_api.c @@ -33,19 +33,13 @@ /* ** Required header files... */ -#include "private/cfe_private.h" -#include "cfe_fs_priv.h" -#include "cfe_fs.h" -#include "cfe_time.h" -#include "osapi.h" -#include "cfe_psp.h" -#include "cfe_es.h" +#include "cfe_fs_internal.h" + #include /* The target config allows refs into global CONFIGDATA object(s) */ #include "target_config.h" - /* * Fixed default file system extensions (not platform dependent) */ diff --git a/modules/fs/fsw/src/cfe_fs_internal.h b/modules/fs/fsw/src/cfe_fs_internal.h new file mode 100644 index 000000000..a04a53b68 --- /dev/null +++ b/modules/fs/fsw/src/cfe_fs_internal.h @@ -0,0 +1,44 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/****************************************************************************** +** File: cfe_fs_priv.h +** +** Purpose: +** This header file contains prototypes for private functions and type +** definitions for FS internal use. +** +** Author: A. Cudmore/NASA GSFC +** +** +******************************************************************************/ + +#ifndef CFE_FS_INTERNAL_H +#define CFE_FS_INTERNAL_H + +/* +** Includes +*/ +#include "cfe.h" +#include "cfe_fs_priv.h" + + +#endif /* CFE_FS_INTERNAL_H */ +/*****************************************************************************/ diff --git a/fsw/cfe-core/src/fs/cfe_fs_priv.c b/modules/fs/fsw/src/cfe_fs_priv.c similarity index 96% rename from fsw/cfe-core/src/fs/cfe_fs_priv.c rename to modules/fs/fsw/src/cfe_fs_priv.c index b0d0785f8..db426f9b8 100644 --- a/fsw/cfe-core/src/fs/cfe_fs_priv.c +++ b/modules/fs/fsw/src/cfe_fs_priv.c @@ -33,14 +33,11 @@ /* ** Required header files */ -#include "osapi.h" -#include "private/cfe_private.h" -#include "cfe_es.h" -#include "cfe_fs.h" -#include "cfe_fs_priv.h" +#include "cfe_fs_internal.h" #include + /* ** Global data ** diff --git a/fsw/cfe-core/src/fs/cfe_fs_priv.h b/modules/fs/fsw/src/cfe_fs_priv.h similarity index 98% rename from fsw/cfe-core/src/fs/cfe_fs_priv.h rename to modules/fs/fsw/src/cfe_fs_priv.h index c2826b466..0c26cafb7 100644 --- a/fsw/cfe-core/src/fs/cfe_fs_priv.h +++ b/modules/fs/fsw/src/cfe_fs_priv.h @@ -37,8 +37,8 @@ ** Includes */ #include "common_types.h" -#include "cfe_fs.h" -#include "cfe_es.h" +#include "cfe_fs_api_typedefs.h" +#include "cfe_es_api_typedefs.h" /* ** Macro Definitions diff --git a/modules/fs/ut-coverage/CMakeLists.txt b/modules/fs/ut-coverage/CMakeLists.txt new file mode 100644 index 000000000..11e674c02 --- /dev/null +++ b/modules/fs/ut-coverage/CMakeLists.txt @@ -0,0 +1,7 @@ +################################################################## +# +# cFE unit test CMake build recipe +# +################################################################## + +# Nothing yet - placeholder for future use diff --git a/fsw/cfe-core/unit-test/fs_UT.c b/modules/fs/ut-coverage/fs_UT.c similarity index 100% rename from fsw/cfe-core/unit-test/fs_UT.c rename to modules/fs/ut-coverage/fs_UT.c diff --git a/fsw/cfe-core/unit-test/fs_UT.h b/modules/fs/ut-coverage/fs_UT.h similarity index 100% rename from fsw/cfe-core/unit-test/fs_UT.h rename to modules/fs/ut-coverage/fs_UT.h diff --git a/modules/msg/CMakeLists.txt b/modules/msg/CMakeLists.txt index d1abfb5eb..5f177d291 100644 --- a/modules/msg/CMakeLists.txt +++ b/modules/msg/CMakeLists.txt @@ -16,35 +16,35 @@ # Add the basic set of files which are always built # Defined as absolute so this list can also be used to build unit tests set(${DEP}_SRC - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_ccsdspri.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_init.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_msgid_shared.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_sechdr_checksum.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_sechdr_fc.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_sechdr_time.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_ccsdspri.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_init.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_msgid_shared.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_sechdr_checksum.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_sechdr_fc.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_sechdr_time.c ) # Source selection for if CCSDS extended header is included, and MsgId version use if (MISSION_INCLUDE_CCSDSEXT_HEADER) message(STATUS "CCSDS primary and extended header included in message header") list(APPEND ${DEP}_SRC - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_ccsdsext.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_initdefaulthdr_priext.c) + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_ccsdsext.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_initdefaulthdr_priext.c) if (MISSION_MSGID_V2) # MsgId v2 or v1 can be used with extended headers message(STATUS "Message Id version 2 in use (MsgId V2)") list(APPEND ${DEP}_SRC - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_msgid_v2.c) + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_msgid_v2.c) else (MISSION_MSGID_V2) message(STATUS "Message Id version 1 in use (MsgId V1)") list(APPEND ${DEP}_SRC - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_msgid_v1.c) + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_msgid_v1.c) endif (MISSION_MSGID_V2) else (MISSION_INCLUDE_CCSDSEXT_HEADER) message(STATUS "CCSDS primary header included in message header (not including CCSDS extended header)") message(STATUS "Message Id version 1 in use (MsgId V1)") list(APPEND ${DEP}_SRC - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_initdefaulthdr_pri.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_msg_msgid_v1.c) + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_initdefaulthdr_pri.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_msg_msgid_v1.c) if (MISSION_MSGID_V2) message(FATAL_ERROR "Message Id (MsgId) version 2 can only be used if MISSION_INCLUDE_CCSDSEXT_HEADER is set") endif (MISSION_MSGID_V2) @@ -53,10 +53,16 @@ endif (MISSION_INCLUDE_CCSDSEXT_HEADER) # Module library add_library(${DEP} STATIC ${${DEP}_SRC}) -# Add private include -target_include_directories(${DEP} PRIVATE private_inc) +target_include_directories(${DEP} PUBLIC fsw/inc) + +target_link_libraries(${DEP} PRIVATE cfe_internal_intf) # Add unit test coverage subdirectory if(ENABLE_UNIT_TESTS) - add_subdirectory(unit-test-coverage) + add_subdirectory(ut-coverage) endif(ENABLE_UNIT_TESTS) + +cfs_app_check_intf(${DEP} + ccsds_hdr.h + cfe_msg_api_typedefs.h +) diff --git a/fsw/cfe-core/src/inc/ccsds_hdr.h b/modules/msg/fsw/inc/ccsds_hdr.h similarity index 99% rename from fsw/cfe-core/src/inc/ccsds_hdr.h rename to modules/msg/fsw/inc/ccsds_hdr.h index ec523dce1..efcbc5eb8 100644 --- a/fsw/cfe-core/src/inc/ccsds_hdr.h +++ b/modules/msg/fsw/inc/ccsds_hdr.h @@ -32,7 +32,6 @@ */ #include "common_types.h" -#include "cfe_mission_cfg.h" /* * Type Definitions diff --git a/modules/msg/src/cfe_msg_ccsdsext.c b/modules/msg/fsw/src/cfe_msg_ccsdsext.c similarity index 99% rename from modules/msg/src/cfe_msg_ccsdsext.c rename to modules/msg/fsw/src/cfe_msg_ccsdsext.c index 658e9ac7d..e8b91684b 100644 --- a/modules/msg/src/cfe_msg_ccsdsext.c +++ b/modules/msg/fsw/src/cfe_msg_ccsdsext.c @@ -21,7 +21,7 @@ /****************************************************************************** * Message CCSDS extended header implementations */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "cfe_msg_priv.h" #include "cfe_msg_defaults.h" #include "cfe_error.h" diff --git a/modules/msg/src/cfe_msg_ccsdspri.c b/modules/msg/fsw/src/cfe_msg_ccsdspri.c similarity index 99% rename from modules/msg/src/cfe_msg_ccsdspri.c rename to modules/msg/fsw/src/cfe_msg_ccsdspri.c index 1d1f9698a..780b93d23 100644 --- a/modules/msg/src/cfe_msg_ccsdspri.c +++ b/modules/msg/fsw/src/cfe_msg_ccsdspri.c @@ -21,7 +21,7 @@ /****************************************************************************** * Message CCSDS Primary header implementations */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "cfe_msg_priv.h" #include "cfe_msg_defaults.h" #include "cfe_error.h" diff --git a/modules/msg/private_inc/cfe_msg_defaults.h b/modules/msg/fsw/src/cfe_msg_defaults.h similarity index 98% rename from modules/msg/private_inc/cfe_msg_defaults.h rename to modules/msg/fsw/src/cfe_msg_defaults.h index b93b0a1ae..cd25862ba 100644 --- a/modules/msg/private_inc/cfe_msg_defaults.h +++ b/modules/msg/fsw/src/cfe_msg_defaults.h @@ -31,6 +31,7 @@ */ #include "cfe_platform_cfg.h" #include "cfe_mission_cfg.h" +#include "cfe_msg_api_typedefs.h" /* * Defines diff --git a/modules/msg/src/cfe_msg_init.c b/modules/msg/fsw/src/cfe_msg_init.c similarity index 98% rename from modules/msg/src/cfe_msg_init.c rename to modules/msg/fsw/src/cfe_msg_init.c index 664b8c3dc..b116601d3 100644 --- a/modules/msg/src/cfe_msg_init.c +++ b/modules/msg/fsw/src/cfe_msg_init.c @@ -21,7 +21,7 @@ /****************************************************************************** * Message initialization */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "cfe_msg_priv.h" #include "cfe_msg_defaults.h" #include "string.h" diff --git a/modules/msg/src/cfe_msg_initdefaulthdr_pri.c b/modules/msg/fsw/src/cfe_msg_initdefaulthdr_pri.c similarity index 100% rename from modules/msg/src/cfe_msg_initdefaulthdr_pri.c rename to modules/msg/fsw/src/cfe_msg_initdefaulthdr_pri.c diff --git a/modules/msg/src/cfe_msg_initdefaulthdr_priext.c b/modules/msg/fsw/src/cfe_msg_initdefaulthdr_priext.c similarity index 100% rename from modules/msg/src/cfe_msg_initdefaulthdr_priext.c rename to modules/msg/fsw/src/cfe_msg_initdefaulthdr_priext.c diff --git a/modules/msg/src/cfe_msg_msgid_shared.c b/modules/msg/fsw/src/cfe_msg_msgid_shared.c similarity index 98% rename from modules/msg/src/cfe_msg_msgid_shared.c rename to modules/msg/fsw/src/cfe_msg_msgid_shared.c index 79caaac7f..8cb31a322 100644 --- a/modules/msg/src/cfe_msg_msgid_shared.c +++ b/modules/msg/fsw/src/cfe_msg_msgid_shared.c @@ -21,7 +21,7 @@ /****************************************************************************** * Message id access functions, shared cFS implementation */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "cfe_msg_priv.h" #include "cfe_error.h" diff --git a/modules/msg/src/cfe_msg_msgid_v1.c b/modules/msg/fsw/src/cfe_msg_msgid_v1.c similarity index 98% rename from modules/msg/src/cfe_msg_msgid_v1.c rename to modules/msg/fsw/src/cfe_msg_msgid_v1.c index 8b79ec3d3..47c002a0c 100644 --- a/modules/msg/src/cfe_msg_msgid_v1.c +++ b/modules/msg/fsw/src/cfe_msg_msgid_v1.c @@ -21,10 +21,11 @@ /****************************************************************************** * Message id access functions, cFS version 1 implementation */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "cfe_msg_priv.h" #include "cfe_error.h" #include "cfe_platform_cfg.h" +#include "cfe_sb.h" /****************************************************************************** * Get message id - See API and header file for details diff --git a/modules/msg/src/cfe_msg_msgid_v2.c b/modules/msg/fsw/src/cfe_msg_msgid_v2.c similarity index 99% rename from modules/msg/src/cfe_msg_msgid_v2.c rename to modules/msg/fsw/src/cfe_msg_msgid_v2.c index 6845f9755..4e2c3b3fc 100644 --- a/modules/msg/src/cfe_msg_msgid_v2.c +++ b/modules/msg/fsw/src/cfe_msg_msgid_v2.c @@ -37,7 +37,7 @@ * | APID Qualifier |C/T flg | Pri Hdr APID | * +-+-+-+-+-+-+-+-+|--------|+-+-+-+-+-+-+-+ */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "cfe_msg_priv.h" #include "cfe_error.h" #include "cfe_platform_cfg.h" diff --git a/modules/msg/private_inc/cfe_msg_priv.h b/modules/msg/fsw/src/cfe_msg_priv.h similarity index 99% rename from modules/msg/private_inc/cfe_msg_priv.h rename to modules/msg/fsw/src/cfe_msg_priv.h index 32d785715..ddd2c3d14 100644 --- a/modules/msg/private_inc/cfe_msg_priv.h +++ b/modules/msg/fsw/src/cfe_msg_priv.h @@ -30,6 +30,7 @@ * Includes */ #include "common_types.h" +#include "cfe_msg_hdr.h" /*****************************************************************************/ /** diff --git a/modules/msg/src/cfe_msg_sechdr_checksum.c b/modules/msg/fsw/src/cfe_msg_sechdr_checksum.c similarity index 99% rename from modules/msg/src/cfe_msg_sechdr_checksum.c rename to modules/msg/fsw/src/cfe_msg_sechdr_checksum.c index a958250ab..4a40d8ad5 100644 --- a/modules/msg/src/cfe_msg_sechdr_checksum.c +++ b/modules/msg/fsw/src/cfe_msg_sechdr_checksum.c @@ -21,7 +21,7 @@ /****************************************************************************** * Checksum field access functions */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "cfe_msg_priv.h" /******************************************************************************/ diff --git a/modules/msg/src/cfe_msg_sechdr_fc.c b/modules/msg/fsw/src/cfe_msg_sechdr_fc.c similarity index 99% rename from modules/msg/src/cfe_msg_sechdr_fc.c rename to modules/msg/fsw/src/cfe_msg_sechdr_fc.c index aa1c5abc9..34cd53c21 100644 --- a/modules/msg/src/cfe_msg_sechdr_fc.c +++ b/modules/msg/fsw/src/cfe_msg_sechdr_fc.c @@ -21,7 +21,7 @@ /****************************************************************************** * Function code field access functions */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "cfe_msg_priv.h" #define CFE_MSG_FC_MASK 0x7F /**< \brief Function code mask */ diff --git a/modules/msg/src/cfe_msg_sechdr_time.c b/modules/msg/fsw/src/cfe_msg_sechdr_time.c similarity index 99% rename from modules/msg/src/cfe_msg_sechdr_time.c rename to modules/msg/fsw/src/cfe_msg_sechdr_time.c index 71d8d7a84..314676709 100644 --- a/modules/msg/src/cfe_msg_sechdr_time.c +++ b/modules/msg/fsw/src/cfe_msg_sechdr_time.c @@ -22,7 +22,7 @@ * Time field access functions - cFS default 32 bit seconds, 16 bit subseconds * in big endian format */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "cfe_msg_priv.h" #include "cfe_error.h" #include diff --git a/modules/msg/mission_build.cmake b/modules/msg/mission_build.cmake index b34a3f6e5..2ff86e581 100644 --- a/modules/msg/mission_build.cmake +++ b/modules/msg/mission_build.cmake @@ -18,10 +18,10 @@ endif (MISSION_INCLUDE_CCSDSEXT_HEADER) # Generate the header definition files, use local default for this module) generate_config_includefile( FILE_NAME "cfe_msg_hdr.h" - FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/mission_inc/${MSG_HDR_FILE}" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/option_inc/${MSG_HDR_FILE}" ) generate_config_includefile( FILE_NAME "cfe_msg_sechdr.h" - FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/mission_inc/default_cfe_msg_sechdr.h" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/option_inc/default_cfe_msg_sechdr.h" ) diff --git a/modules/msg/mission_inc/default_cfe_msg_hdr_pri.h b/modules/msg/option_inc/default_cfe_msg_hdr_pri.h similarity index 88% rename from modules/msg/mission_inc/default_cfe_msg_hdr_pri.h rename to modules/msg/option_inc/default_cfe_msg_hdr_pri.h index 4ff9880bf..f51260b4a 100644 --- a/modules/msg/mission_inc/default_cfe_msg_hdr_pri.h +++ b/modules/msg/option_inc/default_cfe_msg_hdr_pri.h @@ -34,6 +34,7 @@ #include "common_types.h" #include "ccsds_hdr.h" #include "cfe_msg_sechdr.h" +#include "cfe_msg_api_typedefs.h" /* * Type Definitions @@ -56,34 +57,36 @@ typedef struct /** * \brief cFS generic base message + * + * This provides the definition of CFE_MSG_Message_t */ -typedef union +union CFE_MSG_Message { CCSDS_SpacePacket_t CCSDS; /**< \brief CCSDS Header (Pri or Pri + Ext) */ uint8 Byte[sizeof(CCSDS_SpacePacket_t)]; /**< \brief Byte level access */ -} CFE_MSG_Message_t; +}; /** * \brief cFS command header + * + * This provides the definition of CFE_MSG_CommandHeader_t */ -typedef struct +struct CFE_MSG_CommandHeader { - CFE_MSG_Message_t Msg; /**< \brief Base message */ CFE_MSG_CommandSecondaryHeader_t Sec; /**< \brief Secondary header */ - -} CFE_MSG_CommandHeader_t; +}; /** * \brief cFS telemetry header + * + * This provides the definition of CFE_MSG_TelemetryHeader_t */ -typedef struct +struct CFE_MSG_TelemetryHeader { - CFE_MSG_Message_t Msg; /**< \brief Base message */ CFE_MSG_TelemetrySecondaryHeader_t Sec; /**< \brief Secondary header */ uint8 Spare[4]; /**< \brief Padding to end on 64 bit boundary */ - -} CFE_MSG_TelemetryHeader_t; +}; #endif /* _cfe_msg_hdr_ */ diff --git a/modules/msg/mission_inc/default_cfe_msg_hdr_priext.h b/modules/msg/option_inc/default_cfe_msg_hdr_priext.h similarity index 100% rename from modules/msg/mission_inc/default_cfe_msg_hdr_priext.h rename to modules/msg/option_inc/default_cfe_msg_hdr_priext.h diff --git a/modules/msg/mission_inc/default_cfe_msg_sechdr.h b/modules/msg/option_inc/default_cfe_msg_sechdr.h similarity index 100% rename from modules/msg/mission_inc/default_cfe_msg_sechdr.h rename to modules/msg/option_inc/default_cfe_msg_sechdr.h diff --git a/modules/msg/unit-test-coverage/CMakeLists.txt b/modules/msg/ut-coverage/CMakeLists.txt similarity index 94% rename from modules/msg/unit-test-coverage/CMakeLists.txt rename to modules/msg/ut-coverage/CMakeLists.txt index dd06ff924..a0b12cb8a 100644 --- a/modules/msg/unit-test-coverage/CMakeLists.txt +++ b/modules/msg/ut-coverage/CMakeLists.txt @@ -48,14 +48,14 @@ endif (MISSION_MSGID_V2) add_executable(${DEP}_UT ${ut_${DEP}_tests}) # Add include to get private defaults -target_include_directories(${DEP}_UT PRIVATE ../private_inc) +target_include_directories(${DEP}_UT PRIVATE ../fsw/src) # Also add the UT_COVERAGE_LINK_FLAGS to the link command # This should enable coverage analysis on platforms that support this target_link_libraries(${DEP}_UT ${UT_COVERAGE_LINK_FLAGS} - ut_cfe-core_support - ut_cfe-core_stubs + ut_cfe_internal_intf_stubs + ut_cfe_app_intf_stubs ut_assert) add_test(${DEP}_UT ${DEP}_UT) diff --git a/modules/msg/unit-test-coverage/msg_UT.c b/modules/msg/ut-coverage/msg_UT.c similarity index 100% rename from modules/msg/unit-test-coverage/msg_UT.c rename to modules/msg/ut-coverage/msg_UT.c diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_ccsdsext.c b/modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c similarity index 99% rename from modules/msg/unit-test-coverage/test_cfe_msg_ccsdsext.c rename to modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c index 07c2decac..f7eaed5b4 100644 --- a/modules/msg/unit-test-coverage/test_cfe_msg_ccsdsext.c +++ b/modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c @@ -27,7 +27,7 @@ */ #include "utassert.h" #include "ut_support.h" -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_msg_not.h" #include "test_msg_utils.h" #include "test_cfe_msg_ccsdsext.h" diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_ccsdsext.h b/modules/msg/ut-coverage/test_cfe_msg_ccsdsext.h similarity index 100% rename from modules/msg/unit-test-coverage/test_cfe_msg_ccsdsext.h rename to modules/msg/ut-coverage/test_cfe_msg_ccsdsext.h diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_ccsdspri.c b/modules/msg/ut-coverage/test_cfe_msg_ccsdspri.c similarity index 99% rename from modules/msg/unit-test-coverage/test_cfe_msg_ccsdspri.c rename to modules/msg/ut-coverage/test_cfe_msg_ccsdspri.c index daffa4947..816ed4f83 100644 --- a/modules/msg/unit-test-coverage/test_cfe_msg_ccsdspri.c +++ b/modules/msg/ut-coverage/test_cfe_msg_ccsdspri.c @@ -27,7 +27,7 @@ */ #include "utassert.h" #include "ut_support.h" -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_msg_not.h" #include "test_msg_utils.h" #include "test_cfe_msg_ccsdspri.h" diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_ccsdspri.h b/modules/msg/ut-coverage/test_cfe_msg_ccsdspri.h similarity index 100% rename from modules/msg/unit-test-coverage/test_cfe_msg_ccsdspri.h rename to modules/msg/ut-coverage/test_cfe_msg_ccsdspri.h diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_checksum.c b/modules/msg/ut-coverage/test_cfe_msg_checksum.c similarity index 99% rename from modules/msg/unit-test-coverage/test_cfe_msg_checksum.c rename to modules/msg/ut-coverage/test_cfe_msg_checksum.c index ba2b8b7a2..c1b3b98eb 100644 --- a/modules/msg/unit-test-coverage/test_cfe_msg_checksum.c +++ b/modules/msg/ut-coverage/test_cfe_msg_checksum.c @@ -29,7 +29,7 @@ #include "ut_support.h" #include "test_msg_not.h" #include "test_msg_utils.h" -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_cfe_msg_checksum.h" #include "cfe_error.h" #include diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_checksum.h b/modules/msg/ut-coverage/test_cfe_msg_checksum.h similarity index 100% rename from modules/msg/unit-test-coverage/test_cfe_msg_checksum.h rename to modules/msg/ut-coverage/test_cfe_msg_checksum.h diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_fc.c b/modules/msg/ut-coverage/test_cfe_msg_fc.c similarity index 99% rename from modules/msg/unit-test-coverage/test_cfe_msg_fc.c rename to modules/msg/ut-coverage/test_cfe_msg_fc.c index 41828a2a0..88a907a68 100644 --- a/modules/msg/unit-test-coverage/test_cfe_msg_fc.c +++ b/modules/msg/ut-coverage/test_cfe_msg_fc.c @@ -29,7 +29,7 @@ #include "ut_support.h" #include "test_msg_not.h" #include "test_msg_utils.h" -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_cfe_msg_fc.h" #include "cfe_error.h" #include diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_fc.h b/modules/msg/ut-coverage/test_cfe_msg_fc.h similarity index 100% rename from modules/msg/unit-test-coverage/test_cfe_msg_fc.h rename to modules/msg/ut-coverage/test_cfe_msg_fc.h diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_init.c b/modules/msg/ut-coverage/test_cfe_msg_init.c similarity index 99% rename from modules/msg/unit-test-coverage/test_cfe_msg_init.c rename to modules/msg/ut-coverage/test_cfe_msg_init.c index 4c2cb4a5d..ef2353017 100644 --- a/modules/msg/unit-test-coverage/test_cfe_msg_init.c +++ b/modules/msg/ut-coverage/test_cfe_msg_init.c @@ -29,7 +29,7 @@ #include "ut_support.h" #include "test_msg_not.h" #include "test_msg_utils.h" -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_cfe_msg_init.h" #include "cfe_error.h" #include "cfe_msg_defaults.h" diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_init.h b/modules/msg/ut-coverage/test_cfe_msg_init.h similarity index 100% rename from modules/msg/unit-test-coverage/test_cfe_msg_init.h rename to modules/msg/ut-coverage/test_cfe_msg_init.h diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_msgid.h b/modules/msg/ut-coverage/test_cfe_msg_msgid.h similarity index 100% rename from modules/msg/unit-test-coverage/test_cfe_msg_msgid.h rename to modules/msg/ut-coverage/test_cfe_msg_msgid.h diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_msgid_shared.c b/modules/msg/ut-coverage/test_cfe_msg_msgid_shared.c similarity index 99% rename from modules/msg/unit-test-coverage/test_cfe_msg_msgid_shared.c rename to modules/msg/ut-coverage/test_cfe_msg_msgid_shared.c index 16e4bcc9e..817308ff0 100644 --- a/modules/msg/unit-test-coverage/test_cfe_msg_msgid_shared.c +++ b/modules/msg/ut-coverage/test_cfe_msg_msgid_shared.c @@ -27,7 +27,7 @@ */ #include "utassert.h" #include "ut_support.h" -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_msg_not.h" #include "test_msg_utils.h" #include "test_cfe_msg_msgid_shared.h" diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_msgid_shared.h b/modules/msg/ut-coverage/test_cfe_msg_msgid_shared.h similarity index 100% rename from modules/msg/unit-test-coverage/test_cfe_msg_msgid_shared.h rename to modules/msg/ut-coverage/test_cfe_msg_msgid_shared.h diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_msgid_v1.c b/modules/msg/ut-coverage/test_cfe_msg_msgid_v1.c similarity index 99% rename from modules/msg/unit-test-coverage/test_cfe_msg_msgid_v1.c rename to modules/msg/ut-coverage/test_cfe_msg_msgid_v1.c index 3afce7943..3f7ddd646 100644 --- a/modules/msg/unit-test-coverage/test_cfe_msg_msgid_v1.c +++ b/modules/msg/ut-coverage/test_cfe_msg_msgid_v1.c @@ -24,7 +24,7 @@ #include "utassert.h" #include "ut_support.h" -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_msg_not.h" #include "test_msg_utils.h" #include "test_cfe_msg_msgid.h" diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_msgid_v2.c b/modules/msg/ut-coverage/test_cfe_msg_msgid_v2.c similarity index 99% rename from modules/msg/unit-test-coverage/test_cfe_msg_msgid_v2.c rename to modules/msg/ut-coverage/test_cfe_msg_msgid_v2.c index a64664f73..ff0ef54fc 100644 --- a/modules/msg/unit-test-coverage/test_cfe_msg_msgid_v2.c +++ b/modules/msg/ut-coverage/test_cfe_msg_msgid_v2.c @@ -27,7 +27,7 @@ */ #include "utassert.h" #include "ut_support.h" -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_msg_not.h" #include "test_msg_utils.h" #include "test_cfe_msg_msgid.h" diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_time.c b/modules/msg/ut-coverage/test_cfe_msg_time.c similarity index 99% rename from modules/msg/unit-test-coverage/test_cfe_msg_time.c rename to modules/msg/ut-coverage/test_cfe_msg_time.c index 657dbe227..c72eab80c 100644 --- a/modules/msg/unit-test-coverage/test_cfe_msg_time.c +++ b/modules/msg/ut-coverage/test_cfe_msg_time.c @@ -29,7 +29,7 @@ #include "ut_support.h" #include "test_msg_not.h" #include "test_msg_utils.h" -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_cfe_msg_time.h" #include "cfe_error.h" #include diff --git a/modules/msg/unit-test-coverage/test_cfe_msg_time.h b/modules/msg/ut-coverage/test_cfe_msg_time.h similarity index 100% rename from modules/msg/unit-test-coverage/test_cfe_msg_time.h rename to modules/msg/ut-coverage/test_cfe_msg_time.h diff --git a/modules/msg/unit-test-coverage/test_msg_ext_not.c b/modules/msg/ut-coverage/test_msg_ext_not.c similarity index 99% rename from modules/msg/unit-test-coverage/test_msg_ext_not.c rename to modules/msg/ut-coverage/test_msg_ext_not.c index d764bfabd..7bda6257a 100644 --- a/modules/msg/unit-test-coverage/test_msg_ext_not.c +++ b/modules/msg/ut-coverage/test_msg_ext_not.c @@ -25,7 +25,7 @@ /* * Includes */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_msg_not.h" unsigned int Test_MSG_Ext_NotZero(const CFE_MSG_Message_t *MsgPtr) diff --git a/modules/msg/unit-test-coverage/test_msg_not.c b/modules/msg/ut-coverage/test_msg_not.c similarity index 98% rename from modules/msg/unit-test-coverage/test_msg_not.c rename to modules/msg/ut-coverage/test_msg_not.c index 8d7d60e86..39595129b 100644 --- a/modules/msg/unit-test-coverage/test_msg_not.c +++ b/modules/msg/ut-coverage/test_msg_not.c @@ -25,7 +25,7 @@ /* * Includes */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_msg_not.h" unsigned int Test_MSG_NotZero(const CFE_MSG_Message_t *MsgPtr) diff --git a/modules/msg/unit-test-coverage/test_msg_not.h b/modules/msg/ut-coverage/test_msg_not.h similarity index 100% rename from modules/msg/unit-test-coverage/test_msg_not.h rename to modules/msg/ut-coverage/test_msg_not.h diff --git a/modules/msg/unit-test-coverage/test_msg_pri_not.c b/modules/msg/ut-coverage/test_msg_pri_not.c similarity index 99% rename from modules/msg/unit-test-coverage/test_msg_pri_not.c rename to modules/msg/ut-coverage/test_msg_pri_not.c index 3f35cf3b0..4c8e81afd 100644 --- a/modules/msg/unit-test-coverage/test_msg_pri_not.c +++ b/modules/msg/ut-coverage/test_msg_pri_not.c @@ -26,7 +26,7 @@ * Includes */ #include "test_cfe_msg_ccsdspri.h" /* For TEST_MSG_SIZE_OFFSET */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_msg_not.h" unsigned int Test_MSG_Pri_NotZero(const CFE_MSG_Message_t *MsgPtr) diff --git a/modules/msg/unit-test-coverage/test_msg_prionly.c b/modules/msg/ut-coverage/test_msg_prionly.c similarity index 97% rename from modules/msg/unit-test-coverage/test_msg_prionly.c rename to modules/msg/ut-coverage/test_msg_prionly.c index 6df77d970..c85f95e5b 100644 --- a/modules/msg/unit-test-coverage/test_msg_prionly.c +++ b/modules/msg/ut-coverage/test_msg_prionly.c @@ -25,7 +25,7 @@ /* * Includes */ -#include "cfe_msg_api.h" +#include "cfe_msg.h" #include "test_msg_not.h" #include "test_cfe_msg_ccsdsext.h" diff --git a/modules/msg/unit-test-coverage/test_msg_utils.h b/modules/msg/ut-coverage/test_msg_utils.h similarity index 96% rename from modules/msg/unit-test-coverage/test_msg_utils.h rename to modules/msg/ut-coverage/test_msg_utils.h index e79eeda90..f95a9c017 100644 --- a/modules/msg/unit-test-coverage/test_msg_utils.h +++ b/modules/msg/ut-coverage/test_msg_utils.h @@ -27,7 +27,7 @@ /* * Includes */ -#include "cfe_msg_typedefs.h" +#include "cfe_msg_api_typedefs.h" /* * Defines diff --git a/modules/resourceid/CMakeLists.txt b/modules/resourceid/CMakeLists.txt index 5550cb33d..3bebdd1a7 100644 --- a/modules/resourceid/CMakeLists.txt +++ b/modules/resourceid/CMakeLists.txt @@ -7,12 +7,14 @@ project(CFE_RESOURCEID C) # Module library -set(resourceid_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_resourceid_api.c) +set(resourceid_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_resourceid_api.c +) add_library(resourceid STATIC ${resourceid_SOURCES}) -target_include_directories(resourceid PUBLIC inc) +target_link_libraries(resourceid PRIVATE cfe_internal_intf) # Add unit test coverage subdirectory if(ENABLE_UNIT_TESTS) - add_subdirectory(unit-test-coverage) + add_subdirectory(ut-coverage) endif(ENABLE_UNIT_TESTS) diff --git a/modules/resourceid/arch_build.cmake b/modules/resourceid/arch_build.cmake deleted file mode 100644 index 9d77078a7..000000000 --- a/modules/resourceid/arch_build.cmake +++ /dev/null @@ -1,13 +0,0 @@ -########################################################### -# -# Resource ID arch build setup -# -# This file is evaluated as part of the "prepare" stage -# and can be used to set up prerequisites for the build, -# such as generating header files -# -########################################################### - -# allow all other code to refer to the public API in the "inc" dir -# ideally this should use an interface library instead -include_directories(${CMAKE_CURRENT_LIST_DIR}/inc) diff --git a/modules/resourceid/src/cfe_resourceid_api.c b/modules/resourceid/fsw/src/cfe_resourceid_api.c similarity index 99% rename from modules/resourceid/src/cfe_resourceid_api.c rename to modules/resourceid/fsw/src/cfe_resourceid_api.c index fd7a16718..531976151 100644 --- a/modules/resourceid/src/cfe_resourceid_api.c +++ b/modules/resourceid/fsw/src/cfe_resourceid_api.c @@ -38,7 +38,7 @@ #include #include "cfe.h" -#include "cfe_resourceid_api.h" +#include "cfe_resourceid.h" #include "cfe_resourceid_basevalue.h" diff --git a/modules/resourceid/mission_build.cmake b/modules/resourceid/mission_build.cmake index 31bd3e9d0..0b9a02189 100644 --- a/modules/resourceid/mission_build.cmake +++ b/modules/resourceid/mission_build.cmake @@ -18,7 +18,7 @@ endif () # Generate the header definition files, use local default for this module) generate_config_includefile( FILE_NAME "cfe_resourceid_typedef.h" - FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/option/${RESOURCEID_HDR_FILE}" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/option_inc/${RESOURCEID_HDR_FILE}" ) # Resource ID base value header @@ -26,7 +26,7 @@ generate_config_includefile( # but missions can provide their own if desired to override this. generate_config_includefile( FILE_NAME "cfe_resourceid_basevalue.h" - FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/option/cfe_resourceid_osal_compatible.h" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/option_inc/cfe_resourceid_osal_compatible.h" ) include_directories(${CMAKE_CURRENT_LIST_DIR}/inc) diff --git a/modules/resourceid/option/cfe_resourceid_osal_compatible.h b/modules/resourceid/option_inc/cfe_resourceid_osal_compatible.h similarity index 100% rename from modules/resourceid/option/cfe_resourceid_osal_compatible.h rename to modules/resourceid/option_inc/cfe_resourceid_osal_compatible.h diff --git a/modules/resourceid/option/cfe_resourceid_simple.h b/modules/resourceid/option_inc/cfe_resourceid_simple.h similarity index 100% rename from modules/resourceid/option/cfe_resourceid_simple.h rename to modules/resourceid/option_inc/cfe_resourceid_simple.h diff --git a/modules/resourceid/option/cfe_resourceid_strict.h b/modules/resourceid/option_inc/cfe_resourceid_strict.h similarity index 100% rename from modules/resourceid/option/cfe_resourceid_strict.h rename to modules/resourceid/option_inc/cfe_resourceid_strict.h diff --git a/modules/resourceid/unit-test-coverage/CMakeLists.txt b/modules/resourceid/ut-coverage/CMakeLists.txt similarity index 82% rename from modules/resourceid/unit-test-coverage/CMakeLists.txt rename to modules/resourceid/ut-coverage/CMakeLists.txt index 42ca3bde8..a8eae2d53 100644 --- a/modules/resourceid/unit-test-coverage/CMakeLists.txt +++ b/modules/resourceid/ut-coverage/CMakeLists.txt @@ -9,7 +9,12 @@ # Unit test object library sources, options, and includes add_library(ut_resourceid_OBJS OBJECT ${resourceid_SOURCES}) -target_compile_options(ut_resourceid_OBJS PRIVATE ${UT_COVERAGE_COMPILE_FLAGS}) +target_compile_options(ut_resourceid_OBJS PRIVATE + ${UT_COVERAGE_COMPILE_FLAGS} +) +target_include_directories(ut_resourceid_OBJS PRIVATE + $ +) # Add executable add_executable(resourceid_UT test_cfe_resourceid.c $) @@ -21,6 +26,7 @@ target_include_directories(resourceid_UT PRIVATE ${CFE_RESOURCEID_SOURCE_DIR}/op # This should enable coverage analysis on platforms that support this target_link_libraries(resourceid_UT ${UT_COVERAGE_LINK_FLAGS} + ut_cfe_internal_intf_stubs ut_assert) add_test(resourceid_UT resourceid_UT) diff --git a/modules/resourceid/unit-test-coverage/test_cfe_resourceid.c b/modules/resourceid/ut-coverage/test_cfe_resourceid.c similarity index 99% rename from modules/resourceid/unit-test-coverage/test_cfe_resourceid.c rename to modules/resourceid/ut-coverage/test_cfe_resourceid.c index df59ffeaa..16b562dab 100644 --- a/modules/resourceid/unit-test-coverage/test_cfe_resourceid.c +++ b/modules/resourceid/ut-coverage/test_cfe_resourceid.c @@ -22,7 +22,7 @@ * Includes */ #include "cfe.h" -#include "cfe_resourceid_api.h" +#include "cfe_resourceid.h" #include "cfe_resourceid_basevalue.h" #include "utassert.h" #include "utstubs.h" diff --git a/modules/sb/CMakeLists.txt b/modules/sb/CMakeLists.txt new file mode 100644 index 000000000..b72cabbc9 --- /dev/null +++ b/modules/sb/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################################## +# +# cFE Software Bus (SB) module CMake build recipe +# +################################################################## + +project(CFE_SB C) + +# Software Bus source files +set(sb_SOURCES + fsw/src/cfe_sb_api.c + fsw/src/cfe_sb_buf.c + fsw/src/cfe_sb_init.c + fsw/src/cfe_sb_msg_id_util.c + fsw/src/cfe_sb_priv.c + fsw/src/cfe_sb_task.c + fsw/src/cfe_sb_util.c + fsw/src/cfe_sb_api.c + fsw/src/cfe_sb_buf.c + fsw/src/cfe_sb_init.c + fsw/src/cfe_sb_msg_id_util.c + fsw/src/cfe_sb_priv.c + fsw/src/cfe_sb_task.c + fsw/src/cfe_sb_util.c +) +add_library(sb STATIC ${sb_SOURCES}) + +target_include_directories(sb PUBLIC fsw/inc) +target_link_libraries(sb PRIVATE cfe_internal_intf) + +# Add unit test coverage subdirectory +if(ENABLE_UNIT_TESTS) + add_subdirectory(ut-coverage) +endif(ENABLE_UNIT_TESTS) + +cfs_app_check_intf(${DEP} + cfe_sb_msg.h + cfe_sb_events.h +) diff --git a/fsw/cfe-core/eds/cfe_sb.xml b/modules/sb/eds/cfe_sb.xml similarity index 100% rename from fsw/cfe-core/eds/cfe_sb.xml rename to modules/sb/eds/cfe_sb.xml diff --git a/fsw/cfe-core/src/inc/cfe_sb_events.h b/modules/sb/fsw/inc/cfe_sb_events.h similarity index 100% rename from fsw/cfe-core/src/inc/cfe_sb_events.h rename to modules/sb/fsw/inc/cfe_sb_events.h diff --git a/fsw/cfe-core/src/inc/cfe_sb_msg.h b/modules/sb/fsw/inc/cfe_sb_msg.h similarity index 99% rename from fsw/cfe-core/src/inc/cfe_sb_msg.h rename to modules/sb/fsw/inc/cfe_sb_msg.h index e504f4b37..4912ea7e4 100644 --- a/fsw/cfe-core/src/inc/cfe_sb_msg.h +++ b/modules/sb/fsw/inc/cfe_sb_msg.h @@ -35,9 +35,10 @@ /* ** Includes */ -#include "common_types.h" -#include "cfe_sb.h" -#include "cfe_es.h" +#include "common_types.h" /* Basic data types */ +#include "cfe_msg_hdr.h" /* for header definitions */ +#include "cfe_sb_extern_typedefs.h" +#include "cfe_es_extern_typedefs.h" /**************************************** diff --git a/fsw/cfe-core/src/sb/cfe_sb_api.c b/modules/sb/fsw/src/cfe_sb_api.c similarity index 99% rename from fsw/cfe-core/src/sb/cfe_sb_api.c rename to modules/sb/fsw/src/cfe_sb_api.c index ba2eff5af..80099dd72 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_api.c +++ b/modules/sb/fsw/src/cfe_sb_api.c @@ -58,17 +58,9 @@ /* ** Include Files */ -#include "common_types.h" -#include "private/cfe_private.h" -#include "cfe_sb_events.h" -#include "cfe_sb_priv.h" -#include "cfe_sb.h" -#include "osapi.h" -#include "cfe_es.h" -#include "cfe_psp.h" -#include "cfe_error.h" +#include "cfe_sb_internal.h" + #include -#include "private/cfe_core_resourceid_basevalues.h" /* * Macro to reflect size of PipeDepthStats Telemetry array - diff --git a/fsw/cfe-core/src/sb/cfe_sb_buf.c b/modules/sb/fsw/src/cfe_sb_buf.c similarity index 98% rename from fsw/cfe-core/src/sb/cfe_sb_buf.c rename to modules/sb/fsw/src/cfe_sb_buf.c index ab87523e9..43f19339b 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_buf.c +++ b/modules/sb/fsw/src/cfe_sb_buf.c @@ -33,11 +33,7 @@ ** Include Files */ -#include "cfe_sb_priv.h" -#include "cfe_sb_events.h" -#include "osapi.h" -#include "cfe_es.h" -#include "cfe_error.h" +#include "cfe_sb_internal.h" /* * The actual message content of a SB Buffer Descriptor is the diff --git a/fsw/cfe-core/src/sb/cfe_sb_init.c b/modules/sb/fsw/src/cfe_sb_init.c similarity index 95% rename from fsw/cfe-core/src/sb/cfe_sb_init.c rename to modules/sb/fsw/src/cfe_sb_init.c index 561f88b48..745ad1dc7 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_init.c +++ b/modules/sb/fsw/src/cfe_sb_init.c @@ -32,15 +32,7 @@ ** Include Files */ -#include "cfe_sb_priv.h" -#include "cfe_sb.h" -#include "osapi.h" -#include "cfe_msgids.h" -#include "cfe_es.h" -#include "cfe_psp.h" -#include "cfe_error.h" -#include "cfe_sb_events.h" -#include "private/cfe_core_resourceid_basevalues.h" +#include "cfe_sb_internal.h" #include diff --git a/modules/sb/fsw/src/cfe_sb_internal.h b/modules/sb/fsw/src/cfe_sb_internal.h new file mode 100644 index 000000000..8cad7f4ee --- /dev/null +++ b/modules/sb/fsw/src/cfe_sb_internal.h @@ -0,0 +1,51 @@ +/* +** GSC-18128-1, "Core Flight Executive Version 6.7" +** +** Copyright (c) 2006-2019 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. +*/ + +/****************************************************************************** +** File: cfe_sb_priv.h +** +** Purpose: +** This header file contains prototypes for private functions and type +** definitions for SB internal use. +** +** Author: R.McGraw/SSI +** +******************************************************************************/ + +#ifndef CFE_SB_INTERNAL_H +#define CFE_SB_INTERNAL_H + +/* +** Includes +*/ +#include "cfe.h" +#include "cfe_platform_cfg.h" +#include "cfe_msgids.h" +#include "cfe_perfids.h" +#include "cfe_sb_priv.h" +#include "cfe_sb_events.h" +#include "cfe_sb_destination_typedef.h" +#include "cfe_sb_msg.h" +#include "cfe_sbr.h" +#include "cfe_core_resourceid_basevalues.h" + + +#endif /* CFE_SB_INTERNAL_H */ +/*****************************************************************************/ diff --git a/fsw/cfe-core/src/sb/cfe_sb_msg_id_util.c b/modules/sb/fsw/src/cfe_sb_msg_id_util.c similarity index 93% rename from fsw/cfe-core/src/sb/cfe_sb_msg_id_util.c rename to modules/sb/fsw/src/cfe_sb_msg_id_util.c index 299dc931e..d30a51781 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_msg_id_util.c +++ b/modules/sb/fsw/src/cfe_sb_msg_id_util.c @@ -26,13 +26,8 @@ /* ** Include Files */ -#include "cfe_mission_cfg.h" -#include "ccsds.h" -#include "cfe_sb.h" -#include "osapi.h" -#include "cfe_error.h" -#include "cfe_sb_priv.h" -#include "cfe_msg_api.h" +#include "cfe_sb_internal.h" + #ifndef CFE_OMIT_DEPRECATED_6_8 /* diff --git a/fsw/cfe-core/src/sb/cfe_sb_priv.c b/modules/sb/fsw/src/cfe_sb_priv.c similarity index 98% rename from fsw/cfe-core/src/sb/cfe_sb_priv.c rename to modules/sb/fsw/src/cfe_sb_priv.c index fa478e631..6d620303b 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_priv.c +++ b/modules/sb/fsw/src/cfe_sb_priv.c @@ -76,16 +76,8 @@ ** Include Files */ -#include "common_types.h" -#include "osapi.h" -#include "private/cfe_private.h" -#include "cfe_sb_priv.h" -#include "cfe_sb.h" -#include "ccsds.h" -#include "cfe_error.h" -#include "cfe_es.h" -#include "cfe_msg_api.h" -#include "cfe_msgids.h" +#include "cfe_sb_internal.h" + #include /****************************************************************************** diff --git a/fsw/cfe-core/src/sb/cfe_sb_priv.h b/modules/sb/fsw/src/cfe_sb_priv.h similarity index 98% rename from fsw/cfe-core/src/sb/cfe_sb_priv.h rename to modules/sb/fsw/src/cfe_sb_priv.h index de6e5096f..08d8cafaf 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_priv.h +++ b/modules/sb/fsw/src/cfe_sb_priv.h @@ -35,14 +35,16 @@ /* ** Includes */ +#include "cfe_platform_cfg.h" #include "common_types.h" -#include "private/cfe_private.h" -#include "private/cfe_sb_destination_typedef.h" -#include "cfe_sb.h" +#include "cfe_sb_api_typedefs.h" +#include "cfe_es_api_typedefs.h" +#include "cfe_sbr_api_typedefs.h" +#include "cfe_msg_api_typedefs.h" +#include "cfe_fs_api_typedefs.h" +#include "cfe_resourceid_api_typedefs.h" +#include "cfe_sb_destination_typedef.h" #include "cfe_sb_msg.h" -#include "cfe_time.h" -#include "cfe_es.h" -#include "private/cfe_sbr.h" /* ** Macro Definitions diff --git a/fsw/cfe-core/src/sb/cfe_sb_task.c b/modules/sb/fsw/src/cfe_sb_task.c similarity index 99% rename from fsw/cfe-core/src/sb/cfe_sb_task.c rename to modules/sb/fsw/src/cfe_sb_task.c index 69451816c..25dcf01db 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_task.c +++ b/modules/sb/fsw/src/cfe_sb_task.c @@ -30,18 +30,9 @@ /* Include Files */ -#include "cfe_sb.h" -#include "cfe_sb_events.h" -#include "cfe_evs.h" -#include "cfe_sb_priv.h" -#include "osapi.h" +#include "cfe_sb_internal.h" #include "cfe_version.h" -#include "cfe_msgids.h" -#include "cfe_error.h" -#include "cfe_es.h" -#include "cfe_psp.h" -#include "cfe_es_msg.h" -#include "cfe_sb_verify.h" + #include /* Task Globals */ diff --git a/fsw/cfe-core/src/sb/cfe_sb_util.c b/modules/sb/fsw/src/cfe_sb_util.c similarity index 98% rename from fsw/cfe-core/src/sb/cfe_sb_util.c rename to modules/sb/fsw/src/cfe_sb_util.c index e8501a49b..e1581445a 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_util.c +++ b/modules/sb/fsw/src/cfe_sb_util.c @@ -34,12 +34,7 @@ ** Include Files */ -#include "cfe_sb.h" -#include "ccsds.h" -#include "osapi.h" -#include "cfe_error.h" -#include "cfe_msg_api.h" -#include "cfe_es.h" +#include "cfe_sb_internal.h" #include diff --git a/fsw/cfe-core/src/sb/cfe_sb_verify.h b/modules/sb/fsw/src/cfe_sb_verify.h similarity index 100% rename from fsw/cfe-core/src/sb/cfe_sb_verify.h rename to modules/sb/fsw/src/cfe_sb_verify.h diff --git a/modules/sb/ut-coverage/CMakeLists.txt b/modules/sb/ut-coverage/CMakeLists.txt new file mode 100644 index 000000000..11e674c02 --- /dev/null +++ b/modules/sb/ut-coverage/CMakeLists.txt @@ -0,0 +1,7 @@ +################################################################## +# +# cFE unit test CMake build recipe +# +################################################################## + +# Nothing yet - placeholder for future use diff --git a/fsw/cfe-core/unit-test/sb_UT.c b/modules/sb/ut-coverage/sb_UT.c similarity index 99% rename from fsw/cfe-core/unit-test/sb_UT.c rename to modules/sb/ut-coverage/sb_UT.c index 535b4d215..0e0f26f7f 100644 --- a/fsw/cfe-core/unit-test/sb_UT.c +++ b/modules/sb/ut-coverage/sb_UT.c @@ -39,8 +39,8 @@ ** Includes */ #include "sb_UT.h" -#include "cfe_msg_api.h" -#include "private/cfe_core_resourceid_basevalues.h" +#include "cfe_msg.h" +#include "cfe_core_resourceid_basevalues.h" /* * A method to add an SB "Subtest" diff --git a/fsw/cfe-core/unit-test/sb_UT.h b/modules/sb/ut-coverage/sb_UT.h similarity index 100% rename from fsw/cfe-core/unit-test/sb_UT.h rename to modules/sb/ut-coverage/sb_UT.h diff --git a/modules/sbr/CMakeLists.txt b/modules/sbr/CMakeLists.txt index 615589ca3..a5d3c6be7 100644 --- a/modules/sbr/CMakeLists.txt +++ b/modules/sbr/CMakeLists.txt @@ -13,6 +13,8 @@ # ################################################################## +project(CFE_SBR C) + if (NOT MISSION_MSGMAP_IMPLEMENTATION) set(MISSION_MSGMAP_IMPLEMENTATION "DIRECT") endif (NOT MISSION_MSGMAP_IMPLEMENTATION) @@ -20,13 +22,13 @@ endif (NOT MISSION_MSGMAP_IMPLEMENTATION) if (MISSION_MSGMAP_IMPLEMENTATION STREQUAL "DIRECT") message(STATUS "Using direct map software bus routing implementation") set(${DEP}_SRC - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_sbr_map_direct.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_sbr_route_unsorted.c) + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_sbr_map_direct.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_sbr_route_unsorted.c) elseif (MISSION_MSGMAP_IMPLEMENTATION STREQUAL "HASH") message(STATUS "Using hashed map software bus routing implementation") set(${DEP}_SRC - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_sbr_map_hash.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/cfe_sbr_route_unsorted.c) + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_sbr_map_hash.c + ${CMAKE_CURRENT_SOURCE_DIR}/fsw/src/cfe_sbr_route_unsorted.c) else() message(ERROR "Invalid software bush routing implementation selected:" MISSION_MSGMAP_IMPLEMENTATION) endif() @@ -36,8 +38,10 @@ add_library(${DEP} STATIC ${${DEP}_SRC}) # Add private include target_include_directories(${DEP} PRIVATE private_inc) +target_link_libraries(sbr PRIVATE cfe_internal_intf) # Add unit test coverage subdirectory if(ENABLE_UNIT_TESTS) - add_subdirectory(unit-test-coverage) + add_subdirectory(ut-coverage) endif(ENABLE_UNIT_TESTS) + diff --git a/modules/sbr/src/cfe_sbr_map_direct.c b/modules/sbr/fsw/src/cfe_sbr_map_direct.c similarity index 98% rename from modules/sbr/src/cfe_sbr_map_direct.c rename to modules/sbr/fsw/src/cfe_sbr_map_direct.c index 1545bf4ef..8aab2d0fa 100644 --- a/modules/sbr/src/cfe_sbr_map_direct.c +++ b/modules/sbr/fsw/src/cfe_sbr_map_direct.c @@ -32,10 +32,12 @@ */ #include "common_types.h" -#include "private/cfe_sbr.h" +#include "cfe_sbr.h" #include "cfe_sbr_priv.h" #include +#include "cfe_sb.h" + /* * Macro Definitions */ diff --git a/modules/sbr/src/cfe_sbr_map_hash.c b/modules/sbr/fsw/src/cfe_sbr_map_hash.c similarity index 99% rename from modules/sbr/src/cfe_sbr_map_hash.c rename to modules/sbr/fsw/src/cfe_sbr_map_hash.c index dd9b8bd5c..44a85dc8e 100644 --- a/modules/sbr/src/cfe_sbr_map_hash.c +++ b/modules/sbr/fsw/src/cfe_sbr_map_hash.c @@ -32,8 +32,10 @@ */ #include "common_types.h" -#include "private/cfe_sbr.h" +#include "cfe_sbr.h" #include "cfe_sbr_priv.h" +#include "cfe_sb.h" + #include #include diff --git a/modules/sbr/private_inc/cfe_sbr_priv.h b/modules/sbr/fsw/src/cfe_sbr_priv.h similarity index 98% rename from modules/sbr/private_inc/cfe_sbr_priv.h rename to modules/sbr/fsw/src/cfe_sbr_priv.h index ecabbb6bb..308185a05 100644 --- a/modules/sbr/private_inc/cfe_sbr_priv.h +++ b/modules/sbr/fsw/src/cfe_sbr_priv.h @@ -29,7 +29,7 @@ /* * Includes */ -#include "private/cfe_sbr.h" +#include "cfe_sbr.h" /****************************************************************************** diff --git a/modules/sbr/src/cfe_sbr_route_unsorted.c b/modules/sbr/fsw/src/cfe_sbr_route_unsorted.c similarity index 99% rename from modules/sbr/src/cfe_sbr_route_unsorted.c rename to modules/sbr/fsw/src/cfe_sbr_route_unsorted.c index d47aa4eb1..40404fc53 100644 --- a/modules/sbr/src/cfe_sbr_route_unsorted.c +++ b/modules/sbr/fsw/src/cfe_sbr_route_unsorted.c @@ -33,10 +33,12 @@ */ #include "common_types.h" -#include "private/cfe_sbr.h" +#include "cfe_sbr.h" #include "cfe_sbr_priv.h" #include +#include "cfe_sb.h" + /****************************************************************************** * Type Definitions */ diff --git a/modules/sbr/unit-test-coverage/CMakeLists.txt b/modules/sbr/ut-coverage/CMakeLists.txt similarity index 78% rename from modules/sbr/unit-test-coverage/CMakeLists.txt rename to modules/sbr/ut-coverage/CMakeLists.txt index 95b22232e..637c098a1 100644 --- a/modules/sbr/unit-test-coverage/CMakeLists.txt +++ b/modules/sbr/ut-coverage/CMakeLists.txt @@ -17,18 +17,18 @@ set(SBR_TEST_SET ${SBR_TEST_MAP_DIRECT} ${SBR_TEST_MAP_HASH} ${SBR_TEST_ROUTE_UN # Add configured map implementation to routing test source if (MISSION_MSGMAP_IMPLEMENTATION STREQUAL "DIRECT") - set(${SBR_TEST_ROUTE_UNSORTED}_SRC ../src/cfe_sbr_map_direct.c) + set(${SBR_TEST_ROUTE_UNSORTED}_SRC ${CFE_SBR_SOURCE_DIR}/fsw/src/cfe_sbr_map_direct.c) elseif (MISSION_MSGMAP_IMPLEMENTATION STREQUAL "HASH") - set(${SBR_TEST_ROUTE_UNSORTED}_SRC ../src/cfe_sbr_map_hash.c) + set(${SBR_TEST_ROUTE_UNSORTED}_SRC ${CFE_SBR_SOURCE_DIR}/fsw/src/cfe_sbr_map_hash.c) endif() # Add route implementation to map hash -set(${SBR_TEST_MAP_HASH}_SRC ../src/cfe_sbr_route_unsorted.c) +set(${SBR_TEST_MAP_HASH}_SRC ${CFE_SBR_SOURCE_DIR}/fsw/src/cfe_sbr_route_unsorted.c) foreach(SBR_TEST ${SBR_TEST_SET}) # Unit test object library sources, options, and includes - add_library(ut_${SBR_TEST}_objs OBJECT ${${SBR_TEST}_SRC} ../src/cfe_${SBR_TEST}.c) + add_library(ut_${SBR_TEST}_objs OBJECT ${${SBR_TEST}_SRC} ${CFE_SBR_SOURCE_DIR}/fsw/src/cfe_${SBR_TEST}.c) target_compile_options(ut_${SBR_TEST}_objs PRIVATE ${UT_COVERAGE_COMPILE_FLAGS}) target_include_directories(ut_${SBR_TEST}_objs PRIVATE $) @@ -41,14 +41,14 @@ foreach(SBR_TEST ${SBR_TEST_SET}) add_executable(${SBR_TEST}_UT ${ut_${SBR_TEST}_tests}) # Add include to get private defaults - target_include_directories(${SBR_TEST}_UT PRIVATE ../private_inc) + target_include_directories(${SBR_TEST}_UT PRIVATE ../fsw/src) # Also add the UT_COVERAGE_LINK_FLAGS to the link command # This should enable coverage analysis on platforms that support this target_link_libraries(${SBR_TEST}_UT ${UT_COVERAGE_LINK_FLAGS} - ut_cfe-core_support - ut_cfe-core_stubs + ut_cfe_internal_intf_stubs + ut_cfe_app_intf_stubs ut_assert) add_test(${SBR_TEST}_UT ${SBR_TEST}_UT) diff --git a/modules/sbr/unit-test-coverage/test_cfe_sbr_map_direct.c b/modules/sbr/ut-coverage/test_cfe_sbr_map_direct.c similarity index 99% rename from modules/sbr/unit-test-coverage/test_cfe_sbr_map_direct.c rename to modules/sbr/ut-coverage/test_cfe_sbr_map_direct.c index c78c41e2a..f0ed6c102 100644 --- a/modules/sbr/unit-test-coverage/test_cfe_sbr_map_direct.c +++ b/modules/sbr/ut-coverage/test_cfe_sbr_map_direct.c @@ -27,7 +27,7 @@ */ #include "utassert.h" #include "ut_support.h" -#include "private/cfe_sbr.h" +#include "cfe_sbr.h" #include "cfe_sbr_priv.h" #include diff --git a/modules/sbr/unit-test-coverage/test_cfe_sbr_map_hash.c b/modules/sbr/ut-coverage/test_cfe_sbr_map_hash.c similarity index 99% rename from modules/sbr/unit-test-coverage/test_cfe_sbr_map_hash.c rename to modules/sbr/ut-coverage/test_cfe_sbr_map_hash.c index 1ba6c0db2..0b7586ad4 100644 --- a/modules/sbr/unit-test-coverage/test_cfe_sbr_map_hash.c +++ b/modules/sbr/ut-coverage/test_cfe_sbr_map_hash.c @@ -27,7 +27,7 @@ */ #include "utassert.h" #include "ut_support.h" -#include "private/cfe_sbr.h" +#include "cfe_sbr.h" #include "cfe_sbr_priv.h" /* diff --git a/modules/sbr/unit-test-coverage/test_cfe_sbr_route_unsorted.c b/modules/sbr/ut-coverage/test_cfe_sbr_route_unsorted.c similarity index 99% rename from modules/sbr/unit-test-coverage/test_cfe_sbr_route_unsorted.c rename to modules/sbr/ut-coverage/test_cfe_sbr_route_unsorted.c index 2c202d6e0..22f436664 100644 --- a/modules/sbr/unit-test-coverage/test_cfe_sbr_route_unsorted.c +++ b/modules/sbr/ut-coverage/test_cfe_sbr_route_unsorted.c @@ -27,7 +27,7 @@ */ #include "utassert.h" #include "ut_support.h" -#include "private/cfe_sbr.h" +#include "cfe_sbr.h" #include "cfe_sbr_priv.h" /* Callback function for testing */ diff --git a/modules/tbl/CMakeLists.txt b/modules/tbl/CMakeLists.txt new file mode 100644 index 000000000..1c5ffbf70 --- /dev/null +++ b/modules/tbl/CMakeLists.txt @@ -0,0 +1,33 @@ +################################################################## +# +# cFE Table Services (TBL) module CMake build recipe +# +################################################################## + +project(CFE_TBL C) + +# Table Services source files +set(tbl_SOURCES + fsw/src/cfe_tbl_api.c + fsw/src/cfe_tbl_internal.c + fsw/src/cfe_tbl_task.c + fsw/src/cfe_tbl_task_cmds.c + fsw/src/cfe_tbl_api.c + fsw/src/cfe_tbl_internal.c + fsw/src/cfe_tbl_task.c + fsw/src/cfe_tbl_task_cmds.c +) +add_library(tbl STATIC ${tbl_SOURCES}) + +target_include_directories(tbl PUBLIC fsw/inc) +target_link_libraries(tbl PRIVATE cfe_internal_intf) + +# Add unit test coverage subdirectory +if(ENABLE_UNIT_TESTS) + add_subdirectory(ut-coverage) +endif(ENABLE_UNIT_TESTS) + +cfs_app_check_intf(${DEP} + cfe_tbl_msg.h + cfe_tbl_events.h +) diff --git a/fsw/cfe-core/eds/cfe_tbl.xml b/modules/tbl/eds/cfe_tbl.xml similarity index 100% rename from fsw/cfe-core/eds/cfe_tbl.xml rename to modules/tbl/eds/cfe_tbl.xml diff --git a/fsw/cfe-core/src/inc/cfe_tbl_events.h b/modules/tbl/fsw/inc/cfe_tbl_events.h similarity index 100% rename from fsw/cfe-core/src/inc/cfe_tbl_events.h rename to modules/tbl/fsw/inc/cfe_tbl_events.h diff --git a/fsw/cfe-core/src/inc/cfe_tbl_msg.h b/modules/tbl/fsw/inc/cfe_tbl_msg.h similarity index 99% rename from fsw/cfe-core/src/inc/cfe_tbl_msg.h rename to modules/tbl/fsw/inc/cfe_tbl_msg.h index e4d83d211..54a9ad1a5 100644 --- a/fsw/cfe-core/src/inc/cfe_tbl_msg.h +++ b/modules/tbl/fsw/inc/cfe_tbl_msg.h @@ -38,7 +38,10 @@ /* ** Required header files... */ -#include "cfe.h" +#include "common_types.h" /* Basic data types */ +#include "cfe_msg_hdr.h" /* for header definitions */ +#include "cfe_tbl_extern_typedefs.h" +#include "cfe_time_extern_typedefs.h" /*************************************************************************/ diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_api.c b/modules/tbl/fsw/src/cfe_tbl_api.c similarity index 99% rename from fsw/cfe-core/src/tbl/cfe_tbl_api.c rename to modules/tbl/fsw/src/cfe_tbl_api.c index 1b58a2e69..e430b7dc2 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_api.c +++ b/modules/tbl/fsw/src/cfe_tbl_api.c @@ -33,13 +33,9 @@ /* ** Required header files... */ -#include -#include "private/cfe_private.h" -#include "cfe_es.h" -#include "cfe_tbl.h" -#include "cfe_error.h" #include "cfe_tbl_internal.h" -#include "cfe_psp.h" + +#include /* ** Local Macros diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c b/modules/tbl/fsw/src/cfe_tbl_internal.c similarity index 99% rename from fsw/cfe-core/src/tbl/cfe_tbl_internal.c rename to modules/tbl/fsw/src/cfe_tbl_internal.c index c50b6b116..49254d173 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c +++ b/modules/tbl/fsw/src/cfe_tbl_internal.c @@ -33,14 +33,8 @@ /* ** Required header files... */ -#include "cfe_msgids.h" #include "cfe_tbl_internal.h" -#include "cfe_tbl_events.h" -#include "cfe_error.h" -#include "cfe_es.h" -#include "cfe_evs.h" -#include "cfe_fs.h" -#include "cfe_psp.h" + #include #include diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_internal.h b/modules/tbl/fsw/src/cfe_tbl_internal.h similarity index 98% rename from fsw/cfe-core/src/tbl/cfe_tbl_internal.h rename to modules/tbl/fsw/src/cfe_tbl_internal.h index 7fbdb25c3..a94205fa8 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_internal.h +++ b/modules/tbl/fsw/src/cfe_tbl_internal.h @@ -29,15 +29,20 @@ ** */ -#ifndef _cfe_tbl_internal_ -#define _cfe_tbl_internal_ +#ifndef CFE_TBL_INTERNAL_H +#define CFE_TBL_INTERNAL_H /* ** Required header files... */ -#include "cfe_tbl.h" +#include "cfe.h" +#include "cfe_platform_cfg.h" +#include "cfe_msgids.h" +#include "cfe_perfids.h" #include "cfe_tbl_task.h" -#include "cfe_tbl_filedef.h" +#include "cfe_tbl_task_cmds.h" +#include "cfe_tbl_events.h" +#include "cfe_tbl_msg.h" /********************* Macro and Constant Type Definitions ***************************/ @@ -595,4 +600,4 @@ extern CFE_TBL_Global_t CFE_TBL_Global; -#endif /* _cfe_tbl_internal_ */ +#endif /* CFE_TBL_INTERNAL_H */ diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task.c b/modules/tbl/fsw/src/cfe_tbl_task.c similarity index 98% rename from fsw/cfe-core/src/tbl/cfe_tbl_task.c rename to modules/tbl/fsw/src/cfe_tbl_task.c index 3583e8cd3..adfde2280 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task.c +++ b/modules/tbl/fsw/src/cfe_tbl_task.c @@ -33,14 +33,9 @@ /* ** Required header files */ -#include "private/cfe_private.h" -#include "cfe_version.h" #include "cfe_tbl_internal.h" -#include "cfe_tbl_events.h" -#include "cfe_tbl_msg.h" -#include "cfe_tbl_task_cmds.h" -#include "cfe_tbl_verify.h" -#include "cfe_msgids.h" +#include "cfe_version.h" + #include diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task.h b/modules/tbl/fsw/src/cfe_tbl_task.h similarity index 99% rename from fsw/cfe-core/src/tbl/cfe_tbl_task.h rename to modules/tbl/fsw/src/cfe_tbl_task.h index e17ddf804..2c88fb7a1 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task.h +++ b/modules/tbl/fsw/src/cfe_tbl_task.h @@ -39,8 +39,6 @@ /* ** Required header files */ -#include "private/cfe_private.h" -#include "cfe_tbl_events.h" #include "cfe_tbl_msg.h" diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c b/modules/tbl/fsw/src/cfe_tbl_task_cmds.c similarity index 99% rename from fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c rename to modules/tbl/fsw/src/cfe_tbl_task_cmds.c index 23b335760..e70e02e94 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c +++ b/modules/tbl/fsw/src/cfe_tbl_task_cmds.c @@ -33,16 +33,9 @@ /* ** Required header files */ -#include "cfe_version.h" -#include "cfe_evs.h" -#include "cfe_es.h" -#include "cfe_sb.h" -#include "cfe_fs.h" -#include "cfe_psp.h" #include "cfe_tbl_internal.h" -#include "cfe_tbl_events.h" -#include "cfe_tbl_msg.h" -#include "cfe_tbl_task_cmds.h" +#include "cfe_version.h" + #include diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.h b/modules/tbl/fsw/src/cfe_tbl_task_cmds.h similarity index 99% rename from fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.h rename to modules/tbl/fsw/src/cfe_tbl_task_cmds.h index fb04b98af..d77f435e3 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.h +++ b/modules/tbl/fsw/src/cfe_tbl_task_cmds.h @@ -35,7 +35,12 @@ /* ** Required header files */ -#include "cfe.h" +#include "common_types.h" +#include "cfe_tbl_task.h" +#include "cfe_tbl_msg.h" +#include "cfe_error.h" + +#include "cfe_sb_extern_typedefs.h" /********************* Macro and Constant Type Definitions ***************************/ diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_verify.h b/modules/tbl/fsw/src/cfe_tbl_verify.h similarity index 100% rename from fsw/cfe-core/src/tbl/cfe_tbl_verify.h rename to modules/tbl/fsw/src/cfe_tbl_verify.h diff --git a/modules/tbl/ut-coverage/CMakeLists.txt b/modules/tbl/ut-coverage/CMakeLists.txt new file mode 100644 index 000000000..11e674c02 --- /dev/null +++ b/modules/tbl/ut-coverage/CMakeLists.txt @@ -0,0 +1,7 @@ +################################################################## +# +# cFE unit test CMake build recipe +# +################################################################## + +# Nothing yet - placeholder for future use diff --git a/fsw/cfe-core/unit-test/tbl_UT.c b/modules/tbl/ut-coverage/tbl_UT.c similarity index 99% rename from fsw/cfe-core/unit-test/tbl_UT.c rename to modules/tbl/ut-coverage/tbl_UT.c index b05d508b4..6a4e869a7 100644 --- a/fsw/cfe-core/unit-test/tbl_UT.c +++ b/modules/tbl/ut-coverage/tbl_UT.c @@ -39,7 +39,7 @@ ** Includes */ #include "tbl_UT.h" -#include "private/cfe_core_resourceid_basevalues.h" +#include "cfe_core_resourceid_basevalues.h" /* ** External global variables diff --git a/fsw/cfe-core/unit-test/tbl_UT.h b/modules/tbl/ut-coverage/tbl_UT.h similarity index 100% rename from fsw/cfe-core/unit-test/tbl_UT.h rename to modules/tbl/ut-coverage/tbl_UT.h diff --git a/modules/time/CMakeLists.txt b/modules/time/CMakeLists.txt new file mode 100644 index 000000000..3644cce5b --- /dev/null +++ b/modules/time/CMakeLists.txt @@ -0,0 +1,33 @@ +################################################################## +# +# cFE Time Services (TIME) module CMake build recipe +# +################################################################## + +project(CFE_TIME C) + +# Time Services source files +set(time_SOURCES + fsw/src/cfe_time_api.c + fsw/src/cfe_time_task.c + fsw/src/cfe_time_tone.c + fsw/src/cfe_time_utils.c + fsw/src/cfe_time_api.c + fsw/src/cfe_time_task.c + fsw/src/cfe_time_tone.c + fsw/src/cfe_time_utils.c +) +add_library(time STATIC ${time_SOURCES}) + +target_include_directories(time PUBLIC fsw/inc) +target_link_libraries(time PRIVATE cfe_internal_intf) + +# Add unit test coverage subdirectory +if(ENABLE_UNIT_TESTS) + add_subdirectory(ut-coverage) +endif(ENABLE_UNIT_TESTS) + +cfs_app_check_intf(${DEP} + cfe_time_events.h + cfe_time_msg.h +) diff --git a/fsw/cfe-core/eds/cfe_time.xml b/modules/time/eds/cfe_time.xml similarity index 100% rename from fsw/cfe-core/eds/cfe_time.xml rename to modules/time/eds/cfe_time.xml diff --git a/fsw/cfe-core/src/inc/cfe_time_events.h b/modules/time/fsw/inc/cfe_time_events.h similarity index 100% rename from fsw/cfe-core/src/inc/cfe_time_events.h rename to modules/time/fsw/inc/cfe_time_events.h diff --git a/fsw/cfe-core/src/inc/cfe_time_msg.h b/modules/time/fsw/inc/cfe_time_msg.h similarity index 99% rename from fsw/cfe-core/src/inc/cfe_time_msg.h rename to modules/time/fsw/inc/cfe_time_msg.h index 2345a05b8..7d952188b 100644 --- a/fsw/cfe-core/src/inc/cfe_time_msg.h +++ b/modules/time/fsw/inc/cfe_time_msg.h @@ -38,7 +38,9 @@ /* ** Required header files... */ -#include "cfe.h" +#include "common_types.h" /* Basic data types */ +#include "cfe_msg_hdr.h" /* for header definitions */ +#include "cfe_time_extern_typedefs.h" /*************************************************************************/ diff --git a/fsw/cfe-core/src/time/cfe_time_api.c b/modules/time/fsw/src/cfe_time_api.c similarity index 99% rename from fsw/cfe-core/src/time/cfe_time_api.c rename to modules/time/fsw/src/cfe_time_api.c index bab936009..d3a6b6507 100644 --- a/fsw/cfe-core/src/time/cfe_time_api.c +++ b/modules/time/fsw/src/cfe_time_api.c @@ -35,6 +35,8 @@ */ #include "cfe_time_utils.h" +#include "cfe_es.h" + #include /* diff --git a/fsw/cfe-core/src/time/cfe_time_task.c b/modules/time/fsw/src/cfe_time_task.c similarity index 99% rename from fsw/cfe-core/src/time/cfe_time_task.c rename to modules/time/fsw/src/cfe_time_task.c index 66e6bb9f0..3457b4b83 100644 --- a/fsw/cfe-core/src/time/cfe_time_task.c +++ b/modules/time/fsw/src/cfe_time_task.c @@ -36,6 +36,12 @@ #include "cfe_time_utils.h" #include "cfe_version.h" #include "cfe_msgids.h" +#include "cfe_perfids.h" + +#include "cfe_es.h" +#include "cfe_evs.h" +#include "cfe_msg.h" +#include "cfe_sb.h" /* ** Time task global data... diff --git a/fsw/cfe-core/src/time/cfe_time_tone.c b/modules/time/fsw/src/cfe_time_tone.c similarity index 99% rename from fsw/cfe-core/src/time/cfe_time_tone.c rename to modules/time/fsw/src/cfe_time_tone.c index 1505d6a73..77a896a4f 100644 --- a/fsw/cfe-core/src/time/cfe_time_tone.c +++ b/modules/time/fsw/src/cfe_time_tone.c @@ -42,6 +42,14 @@ */ #include "cfe_time_utils.h" +#include "cfe_msgids.h" +#include "cfe_perfids.h" + +#include "cfe_es.h" +#include "cfe_evs.h" +#include "cfe_msg.h" +#include "cfe_sb.h" + #include /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/fsw/cfe-core/src/time/cfe_time_utils.c b/modules/time/fsw/src/cfe_time_utils.c similarity index 99% rename from fsw/cfe-core/src/time/cfe_time_utils.c rename to modules/time/fsw/src/cfe_time_utils.c index 9718fbad0..85b1de2fb 100644 --- a/fsw/cfe-core/src/time/cfe_time_utils.c +++ b/modules/time/fsw/src/cfe_time_utils.c @@ -34,7 +34,11 @@ */ #include "cfe_time_utils.h" #include "cfe_msgids.h" -#include "private/cfe_es_resetdata_typedef.h" +#include "cfe_es_resetdata_typedef.h" + +#include "cfe_es.h" +#include "cfe_msg.h" +#include "cfe_sb.h" #include diff --git a/fsw/cfe-core/src/time/cfe_time_utils.h b/modules/time/fsw/src/cfe_time_utils.h similarity index 99% rename from fsw/cfe-core/src/time/cfe_time_utils.h rename to modules/time/fsw/src/cfe_time_utils.h index 2e52298bd..a367528e2 100644 --- a/fsw/cfe-core/src/time/cfe_time_utils.h +++ b/modules/time/fsw/src/cfe_time_utils.h @@ -38,13 +38,16 @@ /* ** Required header files... */ +#include "cfe_time.h" #include "cfe_platform_cfg.h" -#include "cfe.h" #include "cfe_time_verify.h" #include "cfe_time_msg.h" #include "cfe_time_events.h" #include "cfe_psp.h" +#include "cfe_sb_api_typedefs.h" +#include "cfe_es_api_typedefs.h" + /*************************************************************************/ #define CFE_TIME_NEGATIVE 0x80000000 /* ~ 68 * 31,536,000 seconds */ diff --git a/fsw/cfe-core/src/time/cfe_time_verify.h b/modules/time/fsw/src/cfe_time_verify.h similarity index 99% rename from fsw/cfe-core/src/time/cfe_time_verify.h rename to modules/time/fsw/src/cfe_time_verify.h index c754d37ff..539805df0 100644 --- a/fsw/cfe-core/src/time/cfe_time_verify.h +++ b/modules/time/fsw/src/cfe_time_verify.h @@ -36,6 +36,9 @@ #ifndef _cfe_time_verify_ #define _cfe_time_verify_ +#include "cfe_mission_cfg.h" +#include "cfe_platform_cfg.h" + /*************************************************************************/ /* diff --git a/modules/time/ut-coverage/CMakeLists.txt b/modules/time/ut-coverage/CMakeLists.txt new file mode 100644 index 000000000..11e674c02 --- /dev/null +++ b/modules/time/ut-coverage/CMakeLists.txt @@ -0,0 +1,7 @@ +################################################################## +# +# cFE unit test CMake build recipe +# +################################################################## + +# Nothing yet - placeholder for future use diff --git a/fsw/cfe-core/unit-test/time_UT.c b/modules/time/ut-coverage/time_UT.c similarity index 100% rename from fsw/cfe-core/unit-test/time_UT.c rename to modules/time/ut-coverage/time_UT.c diff --git a/fsw/cfe-core/unit-test/time_UT.h b/modules/time/ut-coverage/time_UT.h similarity index 100% rename from fsw/cfe-core/unit-test/time_UT.h rename to modules/time/ut-coverage/time_UT.h