Skip to content

Commit

Permalink
Merge pull request nasa#175 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
ci_lab Integration candidate: Equuleus-rc1+dev4
  • Loading branch information
dzbaker authored Feb 2, 2024
2 parents 4a3e698 + 0f80b88 commit deb5759
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Development Build: equuleus-rc1+dev57
- more complete definition of READ_UPLINK
- See <https://github.com/nasa/ci_lab/pull/174>

## Development Build: equuleus-rc1+dev51
- Support scheduled uplink check
- updating ci_lab to use new versioning system
Expand Down
5 changes: 5 additions & 0 deletions config/default_ci_lab_msgstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ typedef struct
CFE_MSG_CommandHeader_t CommandHeader;
} CI_LAB_SendHkCmd_t;

typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader;
} CI_LAB_ReadUplinkCmd_t;

typedef struct
{
CFE_MSG_TelemetryHeader_t TelemetryHeader;
Expand Down
12 changes: 11 additions & 1 deletion eds/ci_lab.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
<ContainerDataType name="SendHkCmd" baseType="CFE_HDR/CommandHeader">
</ContainerDataType>

<ContainerDataType name="ReadUplinkCmd" baseType="CFE_HDR/CommandHeader">
</ContainerDataType>

<ContainerDataType name="CommandBase" baseType="CFE_HDR/CommandHeader">
</ContainerDataType>

Expand Down Expand Up @@ -78,27 +81,34 @@
</GenericTypeMapSet>
</Interface>
<Interface name="SEND_HK" shortDescription="Send telemetry command interface" type="CFE_SB/Telecommand">
<!-- This uses a bare spacepacket with no payload -->
<GenericTypeMapSet>
<GenericTypeMap name="TelecommandDataType" type="SendHkCmd" />
</GenericTypeMapSet>
</Interface>
<Interface name="READ_UPLINK" shortDescription="Read Uplink interface" type="CFE_SB/Telecommand">
<GenericTypeMapSet>
<GenericTypeMap name="TelecommandDataType" type="ReadUplinkCmd" />
</GenericTypeMapSet>
</Interface>
<Interface name="HK_TLM" shortDescription="Software bus housekeeping telemetry interface" type="CFE_SB/Telemetry">
<GenericTypeMapSet>
<GenericTypeMap name="TelemetryDataType" type="HkTlm" />
</GenericTypeMapSet>
</Interface>

</RequiredInterfaceSet>
<Implementation>
<VariableSet>
<Variable type="BASE_TYPES/uint16" readOnly="true" name="CmdTopicId" initialValue="${CFE_MISSION/CI_LAB_CMD_TOPICID}" />
<Variable type="BASE_TYPES/uint16" readOnly="true" name="SendHkTopicId" initialValue="${CFE_MISSION/CI_LAB_SEND_HK_TOPICID}" />
<Variable type="BASE_TYPES/uint16" readOnly="true" name="ReadUplinkTopicId" initialValue="${CFE_MISSION/CI_LAB_READ_UPLINK_TOPICID}" />
<Variable type="BASE_TYPES/uint16" readOnly="true" name="HkTlmTopicId" initialValue="${CFE_MISSION/CI_LAB_HK_TLM_TOPICID}" />
</VariableSet>
<!-- Assign fixed numbers to the "TopicId" parameter of each interface -->
<ParameterMapSet>
<ParameterMap interface="CMD" parameter="TopicId" variableRef="CmdTopicId" />
<ParameterMap interface="SEND_HK" parameter="TopicId" variableRef="SendHkTopicId" />
<ParameterMap interface="READ_UPLINK" parameter="TopicId" variableRef="ReadUplinkTopicId" />
<ParameterMap interface="HK_TLM" parameter="TopicId" variableRef="HkTlmTopicId" />
</ParameterMapSet>
</Implementation>
Expand Down
8 changes: 8 additions & 0 deletions fsw/src/ci_lab_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ CFE_Status_t CI_LAB_SendHkCmd(const CI_LAB_SendHkCmd_t *cmd)
CFE_SB_TransmitMsg(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader), true);
return CFE_SUCCESS;
}

CFE_Status_t CI_LAB_ReadUplinkCmd(const CI_LAB_ReadUplinkCmd_t *cmd)
{
/* Any occurrence of this request will cause CI to read ONLY on this request thereafter */
CI_LAB_Global.Scheduled = true;
CI_LAB_ReadUpLink();
return CFE_SUCCESS;
}
15 changes: 15 additions & 0 deletions fsw/src/ci_lab_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,19 @@ CFE_Status_t CI_LAB_ResetCountersCmd(const CI_LAB_ResetCountersCmd_t *cmd);
*/
CFE_Status_t CI_LAB_SendHkCmd(const CI_LAB_SendHkCmd_t *cmd);

/**
* @brief Read Uplink command packets
*
* This allows servicing of the CI_LAB uplink to be scheduled in a designated timeslot.
*
* For backward compatibility, CI_LAB will service the uplink periodically by default,
* using a local timeout. However, if this message is sent by the system scheduler,
* CI_LAB will stop servicing based on the timeout and ONLY based on that command.
*
* @param cmd Input message pointer
* @returns CFE Status code
* @retval #CFE_SUCCESS on successful processing
*/
CFE_Status_t CI_LAB_ReadUplinkCmd(const CI_LAB_ReadUplinkCmd_t *cmd);

#endif
3 changes: 1 addition & 2 deletions fsw/src/ci_lab_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ void CI_LAB_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
break;

case CI_LAB_READ_UPLINK_MID:
CI_LAB_Global.Scheduled = true;
CI_LAB_ReadUpLink();
CI_LAB_ReadUplinkCmd((const CI_LAB_ReadUplinkCmd_t *)SBBufPtr);
break;

default:
Expand Down
24 changes: 17 additions & 7 deletions fsw/src/ci_lab_eds_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,24 @@
/*
* Define a lookup table for CI lab command codes
*/
static const CI_LAB_Application_Component_Telecommand_DispatchTable_t CI_LAB_TC_DISPATCH_TABLE = {
/* clang-format off */
static const CI_LAB_Application_Component_Telecommand_DispatchTable_t CI_LAB_TC_DISPATCH_TABLE =
{
.CMD =
{
.NoopCmd_indication = CI_LAB_NoopCmd,
.ResetCountersCmd_indication = CI_LAB_ResetCountersCmd,

},
.SEND_HK = {.indication = CI_LAB_SendHkCmd}};
{
.NoopCmd_indication = CI_LAB_NoopCmd,
.ResetCountersCmd_indication = CI_LAB_ResetCountersCmd,
},
.SEND_HK =
{
.indication = CI_LAB_SendHkCmd
},
.READ_UPLINK =
{
.indication = CI_LAB_ReadUplinkCmd
}
};
/* clang-format on */

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

/* Development Build Macro Definitions */

#define CI_LAB_BUILD_NUMBER 51 /*!< Development Build: Number of commits since baseline */
#define CI_LAB_BUILD_NUMBER 57 /*!< 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 */
Expand Down

0 comments on commit deb5759

Please sign in to comment.