Skip to content

Commit

Permalink
Merge pull request #42 from chillfig/inc
Browse files Browse the repository at this point in the history
Fix #41, Moves interface definition files to inc
  • Loading branch information
dzbaker authored Dec 23, 2022
2 parents 9081653 + badb96f commit 46d781c
Show file tree
Hide file tree
Showing 20 changed files with 59 additions and 19 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
project(CFS_MD C)

include_directories(fsw/src)
include_directories(fsw/mission_inc)
include_directories(fsw/platform_inc)

set(APP_SRC_FILES
fsw/src/md_dwell_tbl.c
fsw/src/md_utils.c
Expand All @@ -15,6 +11,9 @@ set(APP_SRC_FILES
# Create the app module
add_cfe_app(md ${APP_SRC_FILES})

# This permits direct access to public headers in the fsw/inc directory
target_include_directories(md PUBLIC fsw/inc)

set(APP_TABLE_FILES
fsw/tables/md_dw02.c
fsw/tables/md_dw03.c
Expand Down
File renamed without changes.
42 changes: 42 additions & 0 deletions fsw/inc/md_extern_typedefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/************************************************************************
* NASA Docket No. GSC-18,447-1, and identified as “CFS CFDP (CF)
* Application version 3.0.0”
*
* Copyright (c) 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
*
* Declarations and prototypes for md_extern_typedefs module
*/

#ifndef MD_EXTERN_TYPEDEFS_H
#define MD_EXTERN_TYPEDEFS_H

/************************************************************************
* Type Definitions
************************************************************************/

/**
* \brief MD enum used for representing values for enable state
*/
enum MD_Dwell_States
{
MD_DWELL_STREAM_DISABLED, /**< \brief MD Dwell Stream Disabled */
MD_DWELL_STREAM_ENABLED /**< \brief MD Dwell Stream Enabled */
};

#endif /* MD_EXTERN_TYPEDEFS_H */
File renamed without changes.
3 changes: 2 additions & 1 deletion fsw/src/md_msgdefs.h → fsw/inc/md_msgdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#ifndef MD_MSGDEFS_H
#define MD_MSGDEFS_H

#include "md_platform_cfg.h"

/**
* \defgroup cfsmdcmdcodes CFS Memory Dwell Command Codes
* \{
Expand Down Expand Up @@ -285,7 +287,6 @@
* \par Error Conditions
* This command may fail for the following reason(s):
* - Unexpected command length. (Event message #MD_CMD_LEN_ERR_EID is issued)
* - Signature string argument is not terminated. (Event message #MD_SIGNATURE_TOO_LONG_ERR_EID is issued)
* - Dwell Table ID is invalid. (Event message #MD_INVALID_SIGNATURE_TABLE_ERR_EID is issued)
*
* Any time the command fails, #MD_HkTlm_t.InvalidCmdCntr increments.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions fsw/src/md_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "md_utils.h"
#include "md_perfids.h"
#include "md_version.h"
#include "md_extern_typedefs.h"

/* Constant Data */
const MD_CmdHandlerTblRec_t MD_CmdHandlerTbl[] = {
Expand Down
9 changes: 0 additions & 9 deletions fsw/src/md_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@
* Type Definitions
************************************************************************/

/**
* \brief MD enum used for representing values for enable state
*/
enum MD_Dwell_States
{
MD_DWELL_STREAM_DISABLED, /**< \brief MD Dwell Stream Disabled */
MD_DWELL_STREAM_ENABLED /**< \brief MD Dwell Stream Enabled */
};

/**
* \brief MD structure for specifying individual memory dwell
*/
Expand Down
1 change: 1 addition & 0 deletions fsw/src/md_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "md_app.h"
#include "md_events.h"
#include "md_dwell_tbl.h"
#include "md_extern_typedefs.h"

/* Global Data */
extern MD_AppData_t MD_AppData;
Expand Down
1 change: 1 addition & 0 deletions fsw/src/md_dwell_pkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "md_app.h"
#include "md_events.h"
#include <string.h>
#include "md_extern_typedefs.h"

extern MD_AppData_t MD_AppData;

Expand Down
1 change: 1 addition & 0 deletions fsw/src/md_dwell_tbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "md_events.h"
#include <string.h>
#include "md_tbldefs.h"
#include "md_extern_typedefs.h"

extern MD_AppData_t MD_AppData;

Expand Down
2 changes: 1 addition & 1 deletion fsw/tables/md_dw01.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*************************************************************************/
#include "cfe.h"
#include "md_tbldefs.h"
#include "md_app.h"
#include "md_extern_typedefs.h"
#include "cfe_tbl_filedef.h"
#include "md_platform_cfg.h"

Expand Down
2 changes: 1 addition & 1 deletion fsw/tables/md_dw02.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*************************************************************************/
#include "cfe.h"
#include "md_tbldefs.h"
#include "md_app.h"
#include "md_extern_typedefs.h"
#include "cfe_tbl_filedef.h"
#include "md_platform_cfg.h"

Expand Down
2 changes: 1 addition & 1 deletion fsw/tables/md_dw03.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*************************************************************************/
#include "cfe.h"
#include "md_tbldefs.h"
#include "md_app.h"
#include "md_extern_typedefs.h"
#include "cfe_tbl_filedef.h"
#include "md_platform_cfg.h"

Expand Down
2 changes: 1 addition & 1 deletion fsw/tables/md_dw04.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*************************************************************************/
#include "cfe.h"
#include "md_tbldefs.h"
#include "md_app.h"
#include "md_extern_typedefs.h"
#include "cfe_tbl_filedef.h"
#include "md_platform_cfg.h"

Expand Down
4 changes: 3 additions & 1 deletion unit-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ add_cfe_coverage_stubs(md_internal
# Link with the cfe core stubs and unit test assert libs
target_link_libraries(coverage-md_internal-stubs ut_core_api_stubs ut_assert)

# Include and expose unit test utilities includes
# Include and expose unit test utilities, fsw/inc, and fsw/src includes
target_include_directories(coverage-md_internal-stubs PUBLIC utilities)
target_include_directories(coverage-md_internal-stubs PUBLIC ../fsw/inc)
target_include_directories(coverage-md_internal-stubs PUBLIC ../fsw/src)

# Stub includes needed for all targets
include_directories(stubs)
Expand Down
1 change: 1 addition & 0 deletions unit-test/utilities/md_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "md_platform_cfg.h"
#include "utstubs.h"
#include "cfe_msgids.h"
#include "md_extern_typedefs.h"

extern MD_AppData_t MD_AppData;

Expand Down

0 comments on commit 46d781c

Please sign in to comment.