Skip to content

Commit 8074e8e

Browse files
authored
Merge pull request #102 from astrogeco/integration-candidate
sch_lab Integration candidate: Caelum+dev1
2 parents 8124041 + 5605524 commit 8074e8e

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ To change the list of packets that sch_lab sends out, edit the schedule table lo
1313

1414
## Version History
1515

16+
### Development Build: v2.5.0-rc4+dev6
17+
18+
- Use separate address variable
19+
- Use CFE_MSG_PTR conversion macro
20+
- Update baseline for cFS-Caelum-rc4: v2.5.0-rc4
21+
- See <https://github.com/nasa/sch_lab/pull/102> and <https://github.com/nasa/cFS/pull/390>
22+
1623
### Development Build: v2.4.0-rc1+dev53
1724

1825
- Apply CFE_SB_ValueToMsgId where required

fsw/src/sch_lab_app.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
*/
5252
typedef struct
5353
{
54-
CFE_MSG_CommandHeader_t CmdHeader;
54+
CFE_MSG_CommandHeader_t CommandHeader;
5555
uint32 PacketRate;
5656
uint32 Counter;
5757
} SCH_LAB_StateEntry_t;
@@ -119,7 +119,7 @@ void SCH_Lab_AppMain(void)
119119
if (LocalStateEntry->Counter >= LocalStateEntry->PacketRate)
120120
{
121121
LocalStateEntry->Counter = 0;
122-
CFE_SB_TransmitMsg(&LocalStateEntry->CmdHeader.Msg, true);
122+
CFE_SB_TransmitMsg(CFE_MSG_PTR(LocalStateEntry->CommandHeader), true);
123123
}
124124
}
125125
++LocalStateEntry;
@@ -144,6 +144,7 @@ int32 SCH_LAB_AppInit(void)
144144
SCH_LAB_ScheduleTable_t * ConfigTable;
145145
SCH_LAB_ScheduleTableEntry_t *ConfigEntry;
146146
SCH_LAB_StateEntry_t * LocalStateEntry;
147+
void * TableAddr;
147148

148149
memset(&SCH_LAB_Global, 0, sizeof(SCH_LAB_Global));
149150

@@ -177,7 +178,7 @@ int32 SCH_LAB_AppInit(void)
177178
/*
178179
** Get Table Address
179180
*/
180-
Status = CFE_TBL_GetAddress((void **)&ConfigTable, SCH_LAB_Global.TblHandle);
181+
Status = CFE_TBL_GetAddress(&TableAddr, SCH_LAB_Global.TblHandle);
181182
if (Status != CFE_SUCCESS && Status != CFE_TBL_INFO_UPDATED)
182183
{
183184
CFE_ES_WriteToSysLog("SCH_LAB: Error Getting Table's Address SCH_LAB_SchTbl, RC = 0x%08lX\n",
@@ -189,14 +190,16 @@ int32 SCH_LAB_AppInit(void)
189190
/*
190191
** Initialize the command headers
191192
*/
193+
ConfigTable = TableAddr;
192194
ConfigEntry = ConfigTable->Config;
193195
LocalStateEntry = SCH_LAB_Global.State;
194196
for (i = 0; i < SCH_LAB_MAX_SCHEDULE_ENTRIES; i++)
195197
{
196198
if (ConfigEntry->PacketRate != 0)
197199
{
198-
CFE_MSG_Init(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->MessageID, sizeof(LocalStateEntry->CmdHeader));
199-
CFE_MSG_SetFcnCode(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->FcnCode);
200+
CFE_MSG_Init(CFE_MSG_PTR(LocalStateEntry->CommandHeader), ConfigEntry->MessageID,
201+
sizeof(LocalStateEntry->CommandHeader));
202+
CFE_MSG_SetFcnCode(CFE_MSG_PTR(LocalStateEntry->CommandHeader), ConfigEntry->FcnCode);
200203
LocalStateEntry->PacketRate = ConfigEntry->PacketRate;
201204
}
202205
++ConfigEntry;

fsw/src/sch_lab_version.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,23 @@
3030
*/
3131

3232
/* Development Build Macro Definitions */
33-
#define SCH_LAB_BUILD_NUMBER 53 /*!< Development Build: Number of commits since baseline */
33+
#define SCH_LAB_BUILD_NUMBER 6 /*!< Development Build: Number of commits since baseline */
3434
#define SCH_LAB_BUILD_BASELINE \
35-
"v2.4.0-rc1" /*!< Development Build: git tag that is the base for the current development */
35+
"v2.5.0-rc4" /*!< Development Build: git tag that is the base for the current development */
3636

3737
/* Version Macro Definitions */
3838

3939
#define SCH_LAB_MAJOR_VERSION 2 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
4040
#define SCH_LAB_MINOR_VERSION 3 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
4141
#define SCH_LAB_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */
42-
#define SCH_LAB_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */
42+
43+
/*!
44+
* @brief Mission revision.
45+
*
46+
* Set to 0 on OFFICIAL releases, and set to 255 (0xFF) on development versions.
47+
* Values 1-254 are reserved for mission use to denote patches/customizations as needed.
48+
*/
49+
#define SCH_LAB_MISSION_REV 0xFF
4350

4451
#define SCH_LAB_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */
4552
#define SCH_LAB_STR(x) SCH_LAB_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer macros */

0 commit comments

Comments
 (0)