Skip to content

Commit

Permalink
Merge pull request #102 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
Integration Candidate: 2020-11-03
  • Loading branch information
astrogeco committed Nov 4, 2020
2 parents 427cae8 + de7a6ad commit 23fe3c6
Show file tree
Hide file tree
Showing 8 changed files with 268 additions and 258 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ sample_app is an example for how to build and link an application in cFS. See al

## Version History

### Development Build: 1.2.0-rc1+dev18

- No behavior changes. All identifiers now use the prefix `SAMPLE_APP_`. Changes the name of the main function from SAMPLE_AppMain to SAMPLE_APP_Main which affects the CFE startup script.
- Set REVISION to "99" to indicate development version status
- See <https://github.com/nasa/sample_app/pull/102>

### Development Build: 1.2.0-rc1+dev13

- Unit test MID string format now 32bit
Expand Down Expand Up @@ -35,7 +41,7 @@ sample_app is an example for how to build and link an application in cFS. See al
### Development Build: 1.1.10

- Test cases now compare an expected event string with a string derived from the spec string and arguments that were output by the unit under test.
- Replace references to `ccsds.h` types with the `cfe_sb.h`-provided type.
- Replace references to `ccsds.h` types with the `cfe_sb.h`-provided type.
- See <https://github.com/nasa/sample_app/pull/71>

### Development Build: 1.1.9
Expand Down
202 changes: 102 additions & 100 deletions fsw/src/sample_app.c

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions fsw/src/sample_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
#include "sample_app_msg.h"

/***********************************************************************/
#define SAMPLE_PIPE_DEPTH 32 /* Depth of the Command Pipe for Application */
#define SAMPLE_APP_PIPE_DEPTH 32 /* Depth of the Command Pipe for Application */

#define SAMPLE_NUMBER_OF_TABLES 1 /* Number of Table(s) */
#define SAMPLE_APP_NUMBER_OF_TABLES 1 /* Number of Table(s) */

/* Define filenames of default data images for tables */
#define SAMPLE_APP_TABLE_FILE "/cf/sample_app_tbl.tbl"
Expand All @@ -63,9 +63,9 @@
*/
typedef union
{
CFE_SB_Msg_t MsgHdr;
SAMPLE_HkTlm_t HkTlm;
} SAMPLE_HkBuffer_t;
CFE_SB_Msg_t MsgHdr;
SAMPLE_APP_HkTlm_t HkTlm;
} SAMPLE_APP_HkBuffer_t;

/*
** Global Data
Expand All @@ -81,7 +81,7 @@ typedef struct
/*
** Housekeeping telemetry packet...
*/
SAMPLE_HkBuffer_t HkBuf;
SAMPLE_APP_HkBuffer_t HkBuf;

/*
** Run Status variable used in the main processing loop
Expand All @@ -97,33 +97,33 @@ typedef struct
/*
** Initialization data (not reported in housekeeping)...
*/
char PipeName[16];
char PipeName[CFE_MISSION_MAX_API_LEN];
uint16 PipeDepth;

CFE_EVS_BinFilter_t EventFilters[SAMPLE_EVENT_COUNTS];
CFE_TBL_Handle_t TblHandles[SAMPLE_NUMBER_OF_TABLES];
CFE_EVS_BinFilter_t EventFilters[SAMPLE_APP_EVENT_COUNTS];
CFE_TBL_Handle_t TblHandles[SAMPLE_APP_NUMBER_OF_TABLES];

} SAMPLE_AppData_t;
} SAMPLE_APP_Data_t;

/****************************************************************************/
/*
** Local function prototypes.
**
** Note: Except for the entry point (SAMPLE_AppMain), these
** Note: Except for the entry point (SAMPLE_APP_Main), these
** functions are not called from any other source module.
*/
void SAMPLE_AppMain(void);
int32 SAMPLE_AppInit(void);
void SAMPLE_ProcessCommandPacket(CFE_SB_MsgPtr_t Msg);
void SAMPLE_ProcessGroundCommand(CFE_SB_MsgPtr_t Msg);
int32 SAMPLE_ReportHousekeeping(const CFE_SB_CmdHdr_t *Msg);
int32 SAMPLE_ResetCounters(const SAMPLE_ResetCounters_t *Msg);
int32 SAMPLE_Process(const SAMPLE_Process_t *Msg);
int32 SAMPLE_Noop(const SAMPLE_Noop_t *Msg);
void SAMPLE_GetCrc(const char *TableName);

int32 SAMPLE_TblValidationFunc(void *TblData);

bool SAMPLE_VerifyCmdLength(CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength);
void SAMPLE_APP_Main(void);
int32 SAMPLE_APP_Init(void);
void SAMPLE_APP_ProcessCommandPacket(CFE_SB_MsgPtr_t Msg);
void SAMPLE_APP_ProcessGroundCommand(CFE_SB_MsgPtr_t Msg);
int32 SAMPLE_APP_ReportHousekeeping(const CFE_SB_CmdHdr_t *Msg);
int32 SAMPLE_APP_ResetCounters(const SAMPLE_APP_ResetCounters_t *Msg);
int32 SAMPLE_APP_Process(const SAMPLE_APP_Process_t *Msg);
int32 SAMPLE_APP_Noop(const SAMPLE_APP_Noop_t *Msg);
void SAMPLE_APP_GetCrc(const char *TableName);

int32 SAMPLE_APP_TblValidationFunc(void *TblData);

bool SAMPLE_APP_VerifyCmdLength(CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength);

#endif /* _sample_app_h_ */
18 changes: 9 additions & 9 deletions fsw/src/sample_app_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
#ifndef _sample_app_events_h_
#define _sample_app_events_h_

#define SAMPLE_RESERVED_EID 0
#define SAMPLE_STARTUP_INF_EID 1
#define SAMPLE_COMMAND_ERR_EID 2
#define SAMPLE_COMMANDNOP_INF_EID 3
#define SAMPLE_COMMANDRST_INF_EID 4
#define SAMPLE_INVALID_MSGID_ERR_EID 5
#define SAMPLE_LEN_ERR_EID 6
#define SAMPLE_PIPE_ERR_EID 7
#define SAMPLE_APP_RESERVED_EID 0
#define SAMPLE_APP_STARTUP_INF_EID 1
#define SAMPLE_APP_COMMAND_ERR_EID 2
#define SAMPLE_APP_COMMANDNOP_INF_EID 3
#define SAMPLE_APP_COMMANDRST_INF_EID 4
#define SAMPLE_APP_INVALID_MSGID_ERR_EID 5
#define SAMPLE_APP_LEN_ERR_EID 6
#define SAMPLE_APP_PIPE_ERR_EID 7

#define SAMPLE_EVENT_COUNTS 7
#define SAMPLE_APP_EVENT_COUNTS 7

#endif /* _sample_app_events_h_ */

Expand Down
16 changes: 8 additions & 8 deletions fsw/src/sample_app_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef struct
{
uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE];

} SAMPLE_NoArgsCmd_t;
} SAMPLE_APP_NoArgsCmd_t;

/*
** The following commands all share the "NoArgs" format
Expand All @@ -55,9 +55,9 @@ typedef struct
** allows them to change independently in the future without changing the prototype
** of the handler function
*/
typedef SAMPLE_NoArgsCmd_t SAMPLE_Noop_t;
typedef SAMPLE_NoArgsCmd_t SAMPLE_ResetCounters_t;
typedef SAMPLE_NoArgsCmd_t SAMPLE_Process_t;
typedef SAMPLE_APP_NoArgsCmd_t SAMPLE_APP_Noop_t;
typedef SAMPLE_APP_NoArgsCmd_t SAMPLE_APP_ResetCounters_t;
typedef SAMPLE_APP_NoArgsCmd_t SAMPLE_APP_Process_t;

/*************************************************************************/
/*
Expand All @@ -69,14 +69,14 @@ typedef struct
uint8 CommandErrorCounter;
uint8 CommandCounter;
uint8 spare[2];
} SAMPLE_HkTlm_Payload_t;
} SAMPLE_APP_HkTlm_Payload_t;

typedef struct
{
uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE];
SAMPLE_HkTlm_Payload_t Payload;
uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE];
SAMPLE_APP_HkTlm_Payload_t Payload;

} OS_PACK SAMPLE_HkTlm_t;
} OS_PACK SAMPLE_APP_HkTlm_t;

#endif /* _sample_app_msg_h_ */

Expand Down
10 changes: 5 additions & 5 deletions fsw/src/sample_app_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@

/* Development Build Macro Definitions */

#define SAMPLE_APP_BUILD_NUMBER 13 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_APP_BUILD_NUMBER 18 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_APP_BUILD_BASELINE \
"v1.2.0-rc1" /*!< Development Build: git tag that is the base for the current development */

/* Version Macro Definitions */

#define SAMPLE_APP_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define SAMPLE_APP_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define SAMPLE_APP_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */
#define SAMPLE_APP_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */
#define SAMPLE_APP_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define SAMPLE_APP_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define SAMPLE_APP_REVISION 99 /*!< @brief ONLY APPLY for OFFICIAL releases. The value "99" indicates a development version. Revision version number. */
#define SAMPLE_APP_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */

#define SAMPLE_APP_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */
#define SAMPLE_APP_STR(x) \
Expand Down
Loading

0 comments on commit 23fe3c6

Please sign in to comment.