Skip to content

Commit deb5759

Browse files
authored
Merge pull request #175 from nasa/integration-candidate
ci_lab Integration candidate: Equuleus-rc1+dev4
2 parents 4a3e698 + 0f80b88 commit deb5759

8 files changed

+62
-11
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Development Build: equuleus-rc1+dev57
4+
- more complete definition of READ_UPLINK
5+
- See <https://github.com/nasa/ci_lab/pull/174>
6+
37
## Development Build: equuleus-rc1+dev51
48
- Support scheduled uplink check
59
- updating ci_lab to use new versioning system

config/default_ci_lab_msgstruct.h

+5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ typedef struct
6363
CFE_MSG_CommandHeader_t CommandHeader;
6464
} CI_LAB_SendHkCmd_t;
6565

66+
typedef struct
67+
{
68+
CFE_MSG_CommandHeader_t CommandHeader;
69+
} CI_LAB_ReadUplinkCmd_t;
70+
6671
typedef struct
6772
{
6873
CFE_MSG_TelemetryHeader_t TelemetryHeader;

eds/ci_lab.xml

+11-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
<ContainerDataType name="SendHkCmd" baseType="CFE_HDR/CommandHeader">
4646
</ContainerDataType>
4747

48+
<ContainerDataType name="ReadUplinkCmd" baseType="CFE_HDR/CommandHeader">
49+
</ContainerDataType>
50+
4851
<ContainerDataType name="CommandBase" baseType="CFE_HDR/CommandHeader">
4952
</ContainerDataType>
5053

@@ -78,27 +81,34 @@
7881
</GenericTypeMapSet>
7982
</Interface>
8083
<Interface name="SEND_HK" shortDescription="Send telemetry command interface" type="CFE_SB/Telecommand">
81-
<!-- This uses a bare spacepacket with no payload -->
8284
<GenericTypeMapSet>
8385
<GenericTypeMap name="TelecommandDataType" type="SendHkCmd" />
8486
</GenericTypeMapSet>
8587
</Interface>
88+
<Interface name="READ_UPLINK" shortDescription="Read Uplink interface" type="CFE_SB/Telecommand">
89+
<GenericTypeMapSet>
90+
<GenericTypeMap name="TelecommandDataType" type="ReadUplinkCmd" />
91+
</GenericTypeMapSet>
92+
</Interface>
8693
<Interface name="HK_TLM" shortDescription="Software bus housekeeping telemetry interface" type="CFE_SB/Telemetry">
8794
<GenericTypeMapSet>
8895
<GenericTypeMap name="TelemetryDataType" type="HkTlm" />
8996
</GenericTypeMapSet>
9097
</Interface>
98+
9199
</RequiredInterfaceSet>
92100
<Implementation>
93101
<VariableSet>
94102
<Variable type="BASE_TYPES/uint16" readOnly="true" name="CmdTopicId" initialValue="${CFE_MISSION/CI_LAB_CMD_TOPICID}" />
95103
<Variable type="BASE_TYPES/uint16" readOnly="true" name="SendHkTopicId" initialValue="${CFE_MISSION/CI_LAB_SEND_HK_TOPICID}" />
104+
<Variable type="BASE_TYPES/uint16" readOnly="true" name="ReadUplinkTopicId" initialValue="${CFE_MISSION/CI_LAB_READ_UPLINK_TOPICID}" />
96105
<Variable type="BASE_TYPES/uint16" readOnly="true" name="HkTlmTopicId" initialValue="${CFE_MISSION/CI_LAB_HK_TLM_TOPICID}" />
97106
</VariableSet>
98107
<!-- Assign fixed numbers to the "TopicId" parameter of each interface -->
99108
<ParameterMapSet>
100109
<ParameterMap interface="CMD" parameter="TopicId" variableRef="CmdTopicId" />
101110
<ParameterMap interface="SEND_HK" parameter="TopicId" variableRef="SendHkTopicId" />
111+
<ParameterMap interface="READ_UPLINK" parameter="TopicId" variableRef="ReadUplinkTopicId" />
102112
<ParameterMap interface="HK_TLM" parameter="TopicId" variableRef="HkTlmTopicId" />
103113
</ParameterMapSet>
104114
</Implementation>

fsw/src/ci_lab_cmds.c

+8
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,11 @@ CFE_Status_t CI_LAB_SendHkCmd(const CI_LAB_SendHkCmd_t *cmd)
7575
CFE_SB_TransmitMsg(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader), true);
7676
return CFE_SUCCESS;
7777
}
78+
79+
CFE_Status_t CI_LAB_ReadUplinkCmd(const CI_LAB_ReadUplinkCmd_t *cmd)
80+
{
81+
/* Any occurrence of this request will cause CI to read ONLY on this request thereafter */
82+
CI_LAB_Global.Scheduled = true;
83+
CI_LAB_ReadUpLink();
84+
return CFE_SUCCESS;
85+
}

fsw/src/ci_lab_cmds.h

+15
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,19 @@ CFE_Status_t CI_LAB_ResetCountersCmd(const CI_LAB_ResetCountersCmd_t *cmd);
5959
*/
6060
CFE_Status_t CI_LAB_SendHkCmd(const CI_LAB_SendHkCmd_t *cmd);
6161

62+
/**
63+
* @brief Read Uplink command packets
64+
*
65+
* This allows servicing of the CI_LAB uplink to be scheduled in a designated timeslot.
66+
*
67+
* For backward compatibility, CI_LAB will service the uplink periodically by default,
68+
* using a local timeout. However, if this message is sent by the system scheduler,
69+
* CI_LAB will stop servicing based on the timeout and ONLY based on that command.
70+
*
71+
* @param cmd Input message pointer
72+
* @returns CFE Status code
73+
* @retval #CFE_SUCCESS on successful processing
74+
*/
75+
CFE_Status_t CI_LAB_ReadUplinkCmd(const CI_LAB_ReadUplinkCmd_t *cmd);
76+
6277
#endif

fsw/src/ci_lab_dispatch.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ void CI_LAB_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
123123
break;
124124

125125
case CI_LAB_READ_UPLINK_MID:
126-
CI_LAB_Global.Scheduled = true;
127-
CI_LAB_ReadUpLink();
126+
CI_LAB_ReadUplinkCmd((const CI_LAB_ReadUplinkCmd_t *)SBBufPtr);
128127
break;
129128

130129
default:

fsw/src/ci_lab_eds_dispatch.c

+17-7
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,24 @@
4040
/*
4141
* Define a lookup table for CI lab command codes
4242
*/
43-
static const CI_LAB_Application_Component_Telecommand_DispatchTable_t CI_LAB_TC_DISPATCH_TABLE = {
43+
/* clang-format off */
44+
static const CI_LAB_Application_Component_Telecommand_DispatchTable_t CI_LAB_TC_DISPATCH_TABLE =
45+
{
4446
.CMD =
45-
{
46-
.NoopCmd_indication = CI_LAB_NoopCmd,
47-
.ResetCountersCmd_indication = CI_LAB_ResetCountersCmd,
48-
49-
},
50-
.SEND_HK = {.indication = CI_LAB_SendHkCmd}};
47+
{
48+
.NoopCmd_indication = CI_LAB_NoopCmd,
49+
.ResetCountersCmd_indication = CI_LAB_ResetCountersCmd,
50+
},
51+
.SEND_HK =
52+
{
53+
.indication = CI_LAB_SendHkCmd
54+
},
55+
.READ_UPLINK =
56+
{
57+
.indication = CI_LAB_ReadUplinkCmd
58+
}
59+
};
60+
/* clang-format on */
5161

5262
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
5363
/* Name: CI_LAB_TaskPipe */

fsw/src/ci_lab_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
/* Development Build Macro Definitions */
2727

28-
#define CI_LAB_BUILD_NUMBER 51 /*!< Development Build: Number of commits since baseline */
28+
#define CI_LAB_BUILD_NUMBER 57 /*!< Development Build: Number of commits since baseline */
2929
#define CI_LAB_BUILD_BASELINE "equuleus-rc1" /*!< Development Build: git tag that is the base for the current development */
3030
#define CI_LAB_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */
3131
#define CI_LAB_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */

0 commit comments

Comments
 (0)