Skip to content

Commit

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

## Version History

### Development Build: 2.4.0-rc1+dev9

- Update to use MSG module. Replaces deprecated SB APIs with MSG
- See <https://github.com/nasa/sch_lab/pull/58>

### Development Build: 2.4.0-rc1+dev6

- Adds header guard (the other warning on the ticket was already resolved)
Expand Down
21 changes: 7 additions & 14 deletions fsw/src/sch_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,20 @@
/*
** Global Structure
*/
typedef union
{
CFE_SB_Msg_t MsgHdr;
CFE_SB_CmdHdr_t CommandHeader;
} SCH_LAB_MessageBuffer_t;

typedef struct
{
SCH_LAB_MessageBuffer_t MsgBuf;
uint32 PacketRate;
uint32 Counter;
CFE_SB_CmdHdr_t CmdBuf;
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_SB_Msg_t * CmdPipePktPtr;
CFE_SB_PipeId_t CmdPipe;
CFE_MSG_Message_t *CmdPipePktPtr;
CFE_SB_PipeId_t CmdPipe;

} SCH_LAB_GlobalData_t;

Expand Down Expand Up @@ -128,7 +122,7 @@ void SCH_Lab_AppMain(void)
if (LocalStateEntry->Counter >= LocalStateEntry->PacketRate)
{
LocalStateEntry->Counter = 0;
CFE_SB_SendMsg(&LocalStateEntry->MsgBuf.MsgHdr);
CFE_SB_SendMsg(&LocalStateEntry->CmdBuf.BaseMsg);
}
}
++LocalStateEntry;
Expand Down Expand Up @@ -204,8 +198,7 @@ int32 SCH_LAB_AppInit(void)
{
if (ConfigEntry->PacketRate != 0)
{
CFE_SB_InitMsg(&LocalStateEntry->MsgBuf.MsgHdr, ConfigEntry->MessageID, sizeof(LocalStateEntry->MsgBuf),
true);
CFE_MSG_Init(&LocalStateEntry->CmdBuf.BaseMsg, ConfigEntry->MessageID, sizeof(LocalStateEntry->CmdBuf));
LocalStateEntry->PacketRate = ConfigEntry->PacketRate;
}
++ConfigEntry;
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/sch_lab_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/

/* Development Build Macro Definitions */
#define SCH_LAB_BUILD_NUMBER 6 /*!< Development Build: Number of commits since baseline */
#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 */

/* Version Macro Definitions */
Expand Down

0 comments on commit 25e2784

Please sign in to comment.