From 2c9e4f20bb56a00b11c1998ce81ff0aa3ba738a6 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Wed, 6 Mar 2024 19:32:09 -0500 Subject: [PATCH 1/2] Fix #176, apply name changes to EDS dispatcher Renames symbols to match recent EdsLib change --- fsw/src/ci_lab_eds_decode.c | 33 +++++++++++++++++---------------- fsw/src/ci_lab_eds_dispatch.c | 5 ++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/fsw/src/ci_lab_eds_decode.c b/fsw/src/ci_lab_eds_decode.c index 3bc589b..72df283 100644 --- a/fsw/src/ci_lab_eds_decode.c +++ b/fsw/src/ci_lab_eds_decode.c @@ -39,6 +39,7 @@ #include "cfe_mission_eds_parameters.h" #include "cfe_mission_eds_interface_parameters.h" +#include "cfe_hdr_eds_datatypes.h" /* * --------------------------------------- @@ -48,10 +49,10 @@ */ CFE_Status_t CI_LAB_GetInputBuffer(void **BufferOut, size_t *SizeOut) { - static CFE_HDR_CommandHeader_PackedBuffer_t InputBuffer; + static EdsPackedBuffer_CFE_HDR_CommandHeader_t InputBuffer; *BufferOut = &InputBuffer; - *SizeOut = sizeof(InputBuffer); + *SizeOut = sizeof(InputBuffer); return CFE_SUCCESS; } @@ -81,8 +82,8 @@ CFE_Status_t CI_LAB_DecodeInputMessage(void *SourceBuffer, size_t SourceSize, CF do { - EdsId = EDSLIB_MAKE_ID(EDS_INDEX(CFE_HDR), CFE_HDR_CommandHeader_DATADICTIONARY); - EdsStatus = EdsLib_DataTypeDB_GetTypeInfo(EDS_DB, EdsId, &CmdHdrInfo); + EdsId = EDSLIB_MAKE_ID(EDS_INDEX(CFE_HDR), CFE_HDR_CommandHeader_DATADICTIONARY); + EdsStatus = EdsLib_DataTypeDB_GetTypeInfo(EDS_DB, EdsId, &CmdHdrInfo); if (EdsStatus != EDSLIB_SUCCESS) { OS_printf("EdsLib_DataTypeDB_GetTypeInfo(): %d\n", (int)EdsStatus); @@ -93,28 +94,28 @@ CFE_Status_t CI_LAB_DecodeInputMessage(void *SourceBuffer, size_t SourceSize, CF BitSize = 8 * SourceSize; if (BitSize < CmdHdrInfo.Size.Bits) { - OS_printf("CI_LAB: Size mismatch, BitSize=%lu (packet) / %lu (min)\n", - (unsigned long)BitSize, (unsigned long)CmdHdrInfo.Size.Bits); + OS_printf("CI_LAB: Size mismatch, BitSize=%lu (packet) / %lu (min)\n", (unsigned long)BitSize, + (unsigned long)CmdHdrInfo.Size.Bits); ResultStatus = CFE_STATUS_WRONG_MSG_LENGTH; break; } /* Now get a SB Buffer, as a place to put the decoded data */ - IngestBufPtr = CFE_SB_AllocateMessageBuffer(sizeof(CFE_HDR_CommandHeader_Buffer_t)); + IngestBufPtr = CFE_SB_AllocateMessageBuffer(sizeof(EdsNativeBuffer_CFE_HDR_CommandHeader_t)); if (IngestBufPtr == NULL) { CFE_EVS_SendEvent(CI_LAB_INGEST_ALLOC_ERR_EID, CFE_EVS_EventType_ERROR, - "CI_LAB: buffer allocation failed\n"); + "CI_LAB: buffer allocation failed\n"); ResultStatus = CFE_SB_BUF_ALOC_ERR; break; } /* Packet is in external wire-format byte order - unpack it and copy */ - EdsId = EDSLIB_MAKE_ID(EDS_INDEX(CFE_HDR), CFE_HDR_CommandHeader_DATADICTIONARY); + EdsId = EDSLIB_MAKE_ID(EDS_INDEX(CFE_HDR), CFE_HDR_CommandHeader_DATADICTIONARY); EdsStatus = EdsLib_DataTypeDB_UnpackPartialObject(EDS_DB, &EdsId, IngestBufPtr, SourceBuffer, - sizeof(CFE_HDR_CommandHeader_t), BitSize, 0); + sizeof(EdsDataType_CFE_HDR_CommandHeader_t), BitSize, 0); if (EdsStatus != EDSLIB_SUCCESS) { OS_printf("EdsLib_DataTypeDB_UnpackPartialObject(1): %d\n", (int)EdsStatus); @@ -125,8 +126,8 @@ CFE_Status_t CI_LAB_DecodeInputMessage(void *SourceBuffer, size_t SourceSize, CF CFE_MissionLib_Get_PubSub_Parameters(&PubSubParams, &IngestBufPtr->Msg.BaseMsg); CFE_MissionLib_UnmapListenerComponent(&ListenerParams, &PubSubParams); - EdsStatus = CFE_MissionLib_GetArgumentType(&CFE_SOFTWAREBUS_INTERFACE, CFE_SB_Telecommand_Interface_ID, - ListenerParams.Telecommand.TopicId, 1, 1, &EdsId); + EdsStatus = CFE_MissionLib_GetArgumentType(&CFE_SOFTWAREBUS_INTERFACE, EDS_INTERFACE_ID(CFE_SB_Telecommand), + ListenerParams.Telecommand.TopicId, 1, 1, &EdsId); if (EdsStatus != CFE_MISSIONLIB_SUCCESS) { OS_printf("CFE_MissionLib_GetArgumentType(): %d\n", (int)EdsStatus); @@ -134,7 +135,8 @@ CFE_Status_t CI_LAB_DecodeInputMessage(void *SourceBuffer, size_t SourceSize, CF } EdsStatus = EdsLib_DataTypeDB_UnpackPartialObject(EDS_DB, &EdsId, IngestBufPtr, SourceBuffer, - sizeof(CFE_HDR_CommandHeader_Buffer_t), BitSize, sizeof(CFE_HDR_CommandHeader_t)); + sizeof(EdsNativeBuffer_CFE_HDR_CommandHeader_t), BitSize, + sizeof(EdsDataType_CFE_HDR_CommandHeader_t)); if (EdsStatus != EDSLIB_SUCCESS) { OS_printf("EdsLib_DataTypeDB_UnpackPartialObject(2): %d\n", (int)EdsStatus); @@ -143,7 +145,7 @@ CFE_Status_t CI_LAB_DecodeInputMessage(void *SourceBuffer, size_t SourceSize, CF /* Verify that the checksum and basic fields are correct, and recompute the length entry */ EdsStatus = EdsLib_DataTypeDB_VerifyUnpackedObject(EDS_DB, EdsId, IngestBufPtr, SourceBuffer, - EDSLIB_DATATYPEDB_RECOMPUTE_LENGTH); + EDSLIB_DATATYPEDB_RECOMPUTE_LENGTH); if (EdsStatus != EDSLIB_SUCCESS) { OS_printf("EdsLib_DataTypeDB_VerifyUnpackedObject(): %d\n", (int)EdsStatus); @@ -152,8 +154,7 @@ CFE_Status_t CI_LAB_DecodeInputMessage(void *SourceBuffer, size_t SourceSize, CF /* Finally - at this point, we should have a fully decoded buffer */ ResultStatus = CFE_SUCCESS; - } - while(false); + } while (false); if (ResultStatus != CFE_SUCCESS && IngestBufPtr != NULL) { diff --git a/fsw/src/ci_lab_eds_dispatch.c b/fsw/src/ci_lab_eds_dispatch.c index 18c0d67..43e0282 100644 --- a/fsw/src/ci_lab_eds_dispatch.c +++ b/fsw/src/ci_lab_eds_dispatch.c @@ -41,7 +41,7 @@ * Define a lookup table for CI lab command codes */ /* clang-format off */ -static const CI_LAB_Application_Component_Telecommand_DispatchTable_t CI_LAB_TC_DISPATCH_TABLE = +static const EdsDispatchTable_CI_LAB_Application_CFE_SB_Telecommand_t CI_LAB_TC_DISPATCH_TABLE = { .CMD = { @@ -78,8 +78,7 @@ void CI_LAB_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr) CFE_MSG_GetMsgId(&SBBufPtr->Msg, &MsgId); - Status = CI_LAB_Application_Component_Telecommand_Dispatch(CFE_SB_Telecommand_indication_Command_ID, SBBufPtr, - &CI_LAB_TC_DISPATCH_TABLE); + Status = EdsDispatch_CI_LAB_Application_Telecommand(SBBufPtr, &CI_LAB_TC_DISPATCH_TABLE); if (Status != CFE_SUCCESS) { From 48ec3d1006f9f7015ff1bc8a517f718c6afa183d Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 11 Mar 2024 07:48:22 -0400 Subject: [PATCH 2/2] Updating documentation and version numbers for equuleus-rc1+dev61 --- CHANGELOG.md | 4 ++++ fsw/src/ci_lab_version.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11c6900..b9be3a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Development Build: equuleus-rc1+dev61 +- apply name changes to EDS dispatcher +- See + ## Development Build: equuleus-rc1+dev57 - more complete definition of READ_UPLINK - See diff --git a/fsw/src/ci_lab_version.h b/fsw/src/ci_lab_version.h index 9f9c1bf..1381e30 100644 --- a/fsw/src/ci_lab_version.h +++ b/fsw/src/ci_lab_version.h @@ -25,7 +25,7 @@ /* Development Build Macro Definitions */ -#define CI_LAB_BUILD_NUMBER 57 /*!< Development Build: Number of commits since baseline */ +#define CI_LAB_BUILD_NUMBER 61 /*!< 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 */