Skip to content

Commit

Permalink
Merge pull request #59 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
sch_lab Integration Candidate: 2020-12-08
  • Loading branch information
astrogeco committed Dec 9, 2020
2 parents 25e2784 + 2683368 commit f7b0595
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ To change the list of packets that sch_lab sends out, edit the schedule table lo

## Version History


### Development Build: 2.4.0-rc1+dev12

- Aligns messages according to changes in cFE <https://github.com/nasa/cFE/issues/1009>. Uses the "raw" message cmd/tlm types in definition
- See <https://github.com/nasa/sch_lab/pull/59>

### Development Build: 2.4.0-rc1+dev9

- Update to use MSG module. Replaces deprecated SB APIs with MSG
Expand Down
18 changes: 8 additions & 10 deletions fsw/src/sch_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,16 @@
*/
typedef struct
{
CFE_SB_CmdHdr_t CmdBuf;
uint32 PacketRate;
uint32 Counter;
CFE_MSG_CommandHeader_t CmdHeader;
uint32 PacketRate;
uint32 Counter;
} SCH_LAB_StateEntry_t;

typedef struct
{
SCH_LAB_StateEntry_t State[SCH_LAB_MAX_SCHEDULE_ENTRIES];
CFE_TBL_Handle_t TblHandle;

CFE_MSG_Message_t *CmdPipePktPtr;
CFE_SB_PipeId_t CmdPipe;

CFE_SB_PipeId_t CmdPipe;
} SCH_LAB_GlobalData_t;

/*
Expand All @@ -86,6 +83,7 @@ void SCH_Lab_AppMain(void)
uint32 Status = CFE_SUCCESS;
uint32 RunStatus = CFE_ES_RunStatus_APP_RUN;
SCH_LAB_StateEntry_t *LocalStateEntry;
CFE_SB_Buffer_t * SBBufPtr;

CFE_ES_PerfLogEntry(SCH_MAIN_TASK_PERF_ID);

Expand All @@ -103,7 +101,7 @@ void SCH_Lab_AppMain(void)
CFE_ES_PerfLogExit(SCH_MAIN_TASK_PERF_ID);

/* Pend on receipt of 1Hz packet */
Status = CFE_SB_RcvMsg(&SCH_LAB_Global.CmdPipePktPtr, SCH_LAB_Global.CmdPipe, CFE_SB_PEND_FOREVER);
Status = CFE_SB_ReceiveBuffer(&SBBufPtr, SCH_LAB_Global.CmdPipe, CFE_SB_PEND_FOREVER);

CFE_ES_PerfLogEntry(SCH_MAIN_TASK_PERF_ID);

Expand All @@ -122,7 +120,7 @@ void SCH_Lab_AppMain(void)
if (LocalStateEntry->Counter >= LocalStateEntry->PacketRate)
{
LocalStateEntry->Counter = 0;
CFE_SB_SendMsg(&LocalStateEntry->CmdBuf.BaseMsg);
CFE_SB_TransmitMsg(&LocalStateEntry->CmdHeader.Msg, false);
}
}
++LocalStateEntry;
Expand Down Expand Up @@ -198,7 +196,7 @@ int32 SCH_LAB_AppInit(void)
{
if (ConfigEntry->PacketRate != 0)
{
CFE_MSG_Init(&LocalStateEntry->CmdBuf.BaseMsg, ConfigEntry->MessageID, sizeof(LocalStateEntry->CmdBuf));
CFE_MSG_Init(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->MessageID, sizeof(LocalStateEntry->CmdHeader));
LocalStateEntry->PacketRate = ConfigEntry->PacketRate;
}
++ConfigEntry;
Expand Down
5 changes: 3 additions & 2 deletions fsw/src/sch_lab_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
*/

/* Development Build Macro Definitions */
#define SCH_LAB_BUILD_NUMBER 9 /*!< Development Build: Number of commits since baseline */
#define SCH_LAB_BUILD_BASELINE "v2.4.0-rc1" /*!< Development Build: git tag that is the base for the current development */
#define SCH_LAB_BUILD_NUMBER 12 /*!< Development Build: Number of commits since baseline */
#define SCH_LAB_BUILD_BASELINE \
"v2.4.0-rc1" /*!< Development Build: git tag that is the base for the current development */

/* Version Macro Definitions */

Expand Down

0 comments on commit f7b0595

Please sign in to comment.