Skip to content

Commit

Permalink
Merge pull request #172 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
ci_lab Integration candidate: Equuleus-rc1+dev2
  • Loading branch information
dzbaker authored Jan 18, 2024
2 parents 1e83c77 + 44c28d3 commit 4a3e698
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Development Build: equuleus-rc1+dev51
- Support scheduled uplink check
- updating ci_lab to use new versioning system
- See <https://github.com/nasa/ci_lab/pull/162> and <https://github.com/nasa/ci_lab/pull/171>

## Development Build: v2.5.0-rc4_dev81
- define msgids via topicids
- See <https://github.com/nasa/ci_lab/pull/165>
Expand Down
7 changes: 4 additions & 3 deletions config/default_ci_lab_msgids.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
#include "cfe_core_api_base_msgids.h"
#include "ci_lab_topicids.h"

#define CI_LAB_CMD_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_CMD_TOPICID)
#define CI_LAB_SEND_HK_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_SEND_HK_TOPICID)
#define CI_LAB_HK_TLM_MID CFE_PLATFORM_TLM_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_HK_TLM_TOPICID)
#define CI_LAB_CMD_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_CMD_TOPICID)
#define CI_LAB_SEND_HK_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_SEND_HK_TOPICID)
#define CI_LAB_READ_UPLINK_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_READ_UPLINK_TOPICID)
#define CI_LAB_HK_TLM_MID CFE_PLATFORM_TLM_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_HK_TLM_TOPICID)

#endif
7 changes: 4 additions & 3 deletions config/default_ci_lab_topicids.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
#ifndef CI_LAB_TOPICIDS_H
#define CI_LAB_TOPICIDS_H

#define CFE_MISSION_CI_LAB_CMD_TOPICID 0x84
#define CFE_MISSION_CI_LAB_SEND_HK_TOPICID 0x85
#define CFE_MISSION_CI_LAB_HK_TLM_TOPICID 0x84
#define CFE_MISSION_CI_LAB_CMD_TOPICID 0x84
#define CFE_MISSION_CI_LAB_SEND_HK_TOPICID 0x85
#define CFE_MISSION_CI_LAB_READ_UPLINK_TOPICID 0x86
#define CFE_MISSION_CI_LAB_HK_TLM_TOPICID 0x84

#endif
1 change: 1 addition & 0 deletions fsw/inc/ci_lab_eventids.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#define CI_LAB_CR_PIPE_ERR_EID 11
#define CI_LAB_SB_SUBSCRIBE_CMD_ERR_EID 12
#define CI_LAB_SB_SUBSCRIBE_HK_ERR_EID 13
#define CI_LAB_SB_SUBSCRIBE_UL_ERR_EID 14
#define CI_LAB_CMD_LEN_ERR_EID 16

#endif
17 changes: 14 additions & 3 deletions fsw/src/ci_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ void CI_LAB_AppMain(void)
CI_LAB_TaskPipe(SBBufPtr);
}

/* Regardless of packet vs timeout, always process uplink queue */
if (CI_LAB_Global.SocketConnected)
/* Regardless of packet vs timeout, always process uplink queue if not scheduled */
if (CI_LAB_Global.SocketConnected && !CI_LAB_Global.Scheduled)
{
CI_LAB_ReadUpLink();
}
Expand Down Expand Up @@ -104,6 +104,7 @@ void CI_LAB_TaskInit(void)
{
int32 status;
uint16 DefaultListenPort;
char VersionString[CI_LAB_CFG_MAX_VERSION_STR_LEN];

memset(&CI_LAB_Global, 0, sizeof(CI_LAB_Global));

Expand All @@ -129,6 +130,13 @@ void CI_LAB_TaskInit(void)
CFE_EVS_SendEvent(CI_LAB_SB_SUBSCRIBE_HK_ERR_EID, CFE_EVS_EventType_ERROR,
"Error subscribing to SB HK Request, RC = 0x%08X", (unsigned int)status);
}

status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(CI_LAB_READ_UPLINK_MID), CI_LAB_Global.CommandPipe);
if (status != CFE_SUCCESS)
{
CFE_EVS_SendEvent(CI_LAB_SB_SUBSCRIBE_UL_ERR_EID, CFE_EVS_EventType_ERROR,
"Error subscribing to SB Read Uplink Request, RC = 0x%08X", (unsigned int)status);
}
}
else
{
Expand Down Expand Up @@ -172,8 +180,11 @@ void CI_LAB_TaskInit(void)
CFE_MSG_Init(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader), CFE_SB_ValueToMsgId(CI_LAB_HK_TLM_MID),
sizeof(CI_LAB_Global.HkTlm));

CFE_Config_GetVersionString(VersionString, CI_LAB_CFG_MAX_VERSION_STR_LEN, "CI Lab App",
CI_LAB_VERSION, CI_LAB_BUILD_CODENAME, CI_LAB_LAST_OFFICIAL);

CFE_EVS_SendEvent(CI_LAB_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "CI Lab Initialized.%s",
CI_LAB_VERSION_STRING);
VersionString);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
Expand Down
2 changes: 2 additions & 0 deletions fsw/src/ci_lab_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "common_types.h"
#include "osapi.h"
#include "cfe.h"
#include "cfe_config.h"

#include "ci_lab_mission_cfg.h"
#include "ci_lab_platform_cfg.h"
Expand All @@ -53,6 +54,7 @@
typedef struct
{
bool SocketConnected;
bool Scheduled;
CFE_SB_PipeId_t CommandPipe;
osal_id_t SocketID;
OS_SockAddr_t SocketAddress;
Expand Down
5 changes: 5 additions & 0 deletions fsw/src/ci_lab_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ void CI_LAB_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
CI_LAB_SendHkCmd((const CI_LAB_SendHkCmd_t *)SBBufPtr);
break;

case CI_LAB_READ_UPLINK_MID:
CI_LAB_Global.Scheduled = true;
CI_LAB_ReadUpLink();
break;

default:
CI_LAB_Global.HkTlm.Payload.CommandErrorCounter++;
CFE_EVS_SendEvent(CI_LAB_MID_ERR_EID, CFE_EVS_EventType_ERROR, "CI: invalid command packet,MID = 0x%x",
Expand Down
26 changes: 16 additions & 10 deletions fsw/src/ci_lab_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,22 @@

/* Development Build Macro Definitions */

#define CI_LAB_BUILD_NUMBER 81 /*!< Development Build: Number of commits since baseline */
#define CI_LAB_BUILD_BASELINE \
"v2.5.0-rc4" /*!< Development Build: git tag that is the base for the current development */
#define CI_LAB_BUILD_NUMBER 51 /*!< Development Build: Number of commits since baseline */
#define CI_LAB_BUILD_BASELINE "equuleus-rc1" /*!< Development Build: git tag that is the base for the current development */
#define CI_LAB_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */
#define CI_LAB_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */

/*
* Version Macros, see \ref cfsversions for definitions.
*/
#define CI_LAB_MAJOR_VERSION 2 /*!< @brief Major version number */
#define CI_LAB_MINOR_VERSION 3 /*!< @brief Minor version number */
#define CI_LAB_REVISION 99 /*!< @brief Revision version number. Value of 99 indicates a development version.*/
#define CI_LAB_REVISION 0 /*!< @brief Revision version number. Value of 0 indicates a development version.*/

/**
* @brief Last official release.
*/
#define CI_LAB_LAST_OFFICIAL "v2.3.0"

/*!
* @brief Mission revision.
Expand All @@ -54,12 +60,12 @@
*/
#define CI_LAB_VERSION CI_LAB_BUILD_BASELINE "+dev" CI_LAB_STR(CI_LAB_BUILD_NUMBER)

/*! @brief Development Build Version String.
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest
* official version. @n See @ref cfsversions for format differences between development and release versions.
/**
* @brief Max Version String length.
*
* Maximum length that a CI Lab version string can be.
*
*/
#define CI_LAB_VERSION_STRING \
" CI Lab App DEVELOPMENT BUILD " CI_LAB_VERSION \
", Last Official Release: v2.3.0" /* For full support please use this version */
#define CI_LAB_CFG_MAX_VERSION_STR_LEN 256

#endif

0 comments on commit 4a3e698

Please sign in to comment.