Skip to content

Commit

Permalink
Merge pull request #105 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
to_lab Integration candidate: 2021-09-21
  • Loading branch information
astrogeco authored Sep 22, 2021
2 parents 64513ac + 6b08d7d commit 0c6d816
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ To send telemetry to the "ground" or UDP/IP port, edit the subscription table in

## Version History

### Development Build: v2.4.0-rc1+dev58

- Apply CFE_SB_ValueToMsgId where required
- See <https://github.com/nasa/to_lab/pull/105> and <https://github.com/nasa/cFS/pull/359>

### Development Build: v2.4.0-rc1+dev49

- Implement Coding Standard in CodeQL workflow
Expand Down
14 changes: 8 additions & 6 deletions fsw/src/to_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ int32 TO_LAB_init(void)
/*
** Initialize housekeeping packet (clear user data area)...
*/
CFE_MSG_Init(&TO_LAB_Global.HkTlm.TlmHeader.Msg, TO_LAB_HK_TLM_MID, sizeof(TO_LAB_Global.HkTlm));
CFE_MSG_Init(&TO_LAB_Global.HkTlm.TlmHeader.Msg, CFE_SB_ValueToMsgId(TO_LAB_HK_TLM_MID),
sizeof(TO_LAB_Global.HkTlm));

status = CFE_TBL_Register(&TO_SubTblHandle, "TO_LAB_Subs", sizeof(*TO_LAB_Subs), CFE_TBL_OPT_DEFAULT, NULL);

Expand Down Expand Up @@ -198,8 +199,8 @@ int32 TO_LAB_init(void)
status = CFE_SB_CreatePipe(&TO_LAB_Global.Cmd_pipe, PipeDepth, PipeName);
if (status == CFE_SUCCESS)
{
CFE_SB_Subscribe(TO_LAB_CMD_MID, TO_LAB_Global.Cmd_pipe);
CFE_SB_Subscribe(TO_LAB_SEND_HK_MID, TO_LAB_Global.Cmd_pipe);
CFE_SB_Subscribe(CFE_SB_ValueToMsgId(TO_LAB_CMD_MID), TO_LAB_Global.Cmd_pipe);
CFE_SB_Subscribe(CFE_SB_ValueToMsgId(TO_LAB_SEND_HK_MID), TO_LAB_Global.Cmd_pipe);
}
else
CFE_EVS_SendEvent(TO_CRCMDPIPE_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't create cmd pipe status %i",
Expand All @@ -216,9 +217,9 @@ int32 TO_LAB_init(void)
/* Subscriptions for TLM pipe*/
for (i = 0; (i < (sizeof(TO_LAB_Subs->Subs) / sizeof(TO_LAB_Subs->Subs[0]))); i++)
{
if (CFE_SB_MsgId_Equal(TO_LAB_Subs->Subs[i].Stream, TO_UNUSED))
if (!CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream))
{
/* Only process until MsgId TO_UNUSED is found*/
/* Only process until invalid MsgId (aka TO_UNUSED) is found*/
break;
}
else if (CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream))
Expand Down Expand Up @@ -395,7 +396,8 @@ int32 TO_LAB_SendDataTypes(const TO_LAB_SendDataTypesCmd_t *data)
char string_variable[10] = "ABCDEFGHIJ";

/* initialize data types packet */
CFE_MSG_Init(&TO_LAB_Global.DataTypesTlm.TlmHeader.Msg, TO_LAB_DATA_TYPES_MID, sizeof(TO_LAB_Global.DataTypesTlm));
CFE_MSG_Init(&TO_LAB_Global.DataTypesTlm.TlmHeader.Msg, CFE_SB_ValueToMsgId(TO_LAB_DATA_TYPES_MID),
sizeof(TO_LAB_Global.DataTypesTlm));

CFE_SB_TimeStampMsg(&TO_LAB_Global.DataTypesTlm.TlmHeader.Msg);

Expand Down
2 changes: 1 addition & 1 deletion fsw/src/to_lab_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/

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

Expand Down

0 comments on commit 0c6d816

Please sign in to comment.