Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_lab Integration Candidate: Caelum+dev1 #112

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ To send telemetry to the "ground" or UDP/IP port, edit the subscription table in

## Version History

### Development Build: v2.5.0-rc4+dev4

- Use CFE_MSG_PTR conversion macro
- Set new baseline for cFS-Caelum-rc4: v2.5.0-rc4
- See <https://github.com/nasa/to_lab/pull/112> and <https://github.com/nasa/cFS/pull/390>

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

- Apply CFE_SB_ValueToMsgId where required
Expand Down
12 changes: 6 additions & 6 deletions fsw/src/to_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ int32 TO_LAB_init(void)
/*
** Initialize housekeeping packet (clear user data area)...
*/
CFE_MSG_Init(&TO_LAB_Global.HkTlm.TlmHeader.Msg, CFE_SB_ValueToMsgId(TO_LAB_HK_TLM_MID),
CFE_MSG_Init(CFE_MSG_PTR(TO_LAB_Global.HkTlm.TelemetryHeader), 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 @@ -396,10 +396,10 @@ 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, CFE_SB_ValueToMsgId(TO_LAB_DATA_TYPES_MID),
CFE_MSG_Init(CFE_MSG_PTR(TO_LAB_Global.DataTypesTlm.TelemetryHeader), CFE_SB_ValueToMsgId(TO_LAB_DATA_TYPES_MID),
sizeof(TO_LAB_Global.DataTypesTlm));

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

/* initialize the packet data */
TO_LAB_Global.DataTypesTlm.Payload.synch = 0x6969;
Expand Down Expand Up @@ -430,7 +430,7 @@ int32 TO_LAB_SendDataTypes(const TO_LAB_SendDataTypesCmd_t *data)
for (i = 0; i < 10; i++)
TO_LAB_Global.DataTypesTlm.Payload.str[i] = string_variable[i];

CFE_SB_TransmitMsg(&TO_LAB_Global.DataTypesTlm.TlmHeader.Msg, true);
CFE_SB_TransmitMsg(CFE_MSG_PTR(TO_LAB_Global.DataTypesTlm.TelemetryHeader), true);

++TO_LAB_Global.HkTlm.Payload.CommandCounter;
return CFE_SUCCESS;
Expand All @@ -443,8 +443,8 @@ int32 TO_LAB_SendDataTypes(const TO_LAB_SendDataTypesCmd_t *data)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 TO_LAB_SendHousekeeping(const CFE_MSG_CommandHeader_t *data)
{
CFE_SB_TimeStampMsg(&TO_LAB_Global.HkTlm.TlmHeader.Msg);
CFE_SB_TransmitMsg(&TO_LAB_Global.HkTlm.TlmHeader.Msg, true);
CFE_SB_TimeStampMsg(CFE_MSG_PTR(TO_LAB_Global.HkTlm.TelemetryHeader));
CFE_SB_TransmitMsg(CFE_MSG_PTR(TO_LAB_Global.HkTlm.TelemetryHeader), true);
return CFE_SUCCESS;
}

Expand Down
8 changes: 4 additions & 4 deletions fsw/src/to_lab_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ typedef struct

typedef struct
{
CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief Telemetry header */
TO_LAB_HkTlm_Payload_t Payload; /**< \brief Telemetry payload */
CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */
TO_LAB_HkTlm_Payload_t Payload; /**< \brief Telemetry payload */
} TO_LAB_HkTlm_t;

/******************************************************************************/
Expand Down Expand Up @@ -78,8 +78,8 @@ typedef struct

typedef struct
{
CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief Telemetry header */
TO_LAB_DataTypes_Payload_t Payload; /**< \brief Telemetry payload */
CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */
TO_LAB_DataTypes_Payload_t Payload; /**< \brief Telemetry payload */
} TO_LAB_DataTypesTlm_t;

/******************************************************************************/
Expand Down
22 changes: 15 additions & 7 deletions fsw/src/to_lab_version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/************************************************************************
**
** GSC-18128-1, "Core Flight Executive Version 6.7"
** GSC-18128-1, "Core Flight Executive Versi5n 4.7"
**
** Copyright (c) 2006-2019 United States Government as represented by
** the Administrator of the National Aeronautics and Space Administration.
Expand All @@ -19,6 +19,7 @@
** limitations under the License.
**
*************************************************************************/

#ifndef TO_LAB_VERSION_H
#define TO_LAB_VERSION_H

Expand All @@ -30,16 +31,23 @@
*/

/* Development Build Macro Definitions */
#define TO_LAB_BUILD_NUMBER 58 /*!< Development Build: Number of commits since baseline */
#define TO_LAB_BUILD_NUMBER 4 /*!< 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 */
"v2.5.0-rc4" /*!< Development Build: git tag that is the base for the current development */

/* Version Macro Definitions */

#define TO_LAB_MAJOR_VERSION 2 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define TO_LAB_MINOR_VERSION 3 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define TO_LAB_REVISION 99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */
#define TO_LAB_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */
#define TO_LAB_MAJOR_VERSION 2 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define TO_LAB_MINOR_VERSION 3 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define TO_LAB_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */

/*!
* @brief Mission revision.
*
* Set to 0 on OFFICIAL releases, and set to 255 (0xFF) on development versions.
* Values 1-254 are reserved for mission use to denote patches/customizations as needed.
*/
#define TO_LAB_MISSION_REV 0xFF

#define TO_LAB_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */
#define TO_LAB_STR(x) TO_LAB_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer macros */
Expand Down