From 21bacbb33045269c21133c19a03b8672efec255c Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Wed, 6 Mar 2024 19:31:45 -0500 Subject: [PATCH] Fix #193, apply name changes to EDS dispatcher Renames symbols to match recent EdsLib change --- fsw/src/to_lab_eds_dispatch.c | 5 ++--- fsw/src/to_lab_eds_encode.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/fsw/src/to_lab_eds_dispatch.c b/fsw/src/to_lab_eds_dispatch.c index 5e955fd..cc0de9c 100644 --- a/fsw/src/to_lab_eds_dispatch.c +++ b/fsw/src/to_lab_eds_dispatch.c @@ -35,7 +35,7 @@ #include "to_lab_eds_dictionary.h" #include "to_lab_eds_dispatcher.h" -static const TO_LAB_Application_Component_Telecommand_DispatchTable_t TO_LAB_TC_DISPATCH_TABLE = { +static const EdsDispatchTable_TO_LAB_Application_CFE_SB_Telecommand_t TO_LAB_TC_DISPATCH_TABLE = { .CMD = {.AddPacketCmd_indication = TO_LAB_AddPacketCmd, .NoopCmd_indication = TO_LAB_NoopCmd, .EnableOutputCmd_indication = TO_LAB_EnableOutputCmd, @@ -57,8 +57,7 @@ void TO_LAB_TaskPipe(const CFE_SB_Buffer_t *SbBufPtr) CFE_MSG_Size_t MsgSize; CFE_MSG_FcnCode_t MsgFc; - status = TO_LAB_Application_Component_Telecommand_Dispatch(CFE_SB_Telecommand_indication_Command_ID, SbBufPtr, - &TO_LAB_TC_DISPATCH_TABLE); + status = EdsDispatch_TO_LAB_Application_Telecommand(SbBufPtr, &TO_LAB_TC_DISPATCH_TABLE); if (status != CFE_SUCCESS) { diff --git a/fsw/src/to_lab_eds_encode.c b/fsw/src/to_lab_eds_encode.c index a5afef7..61c9d84 100644 --- a/fsw/src/to_lab_eds_encode.c +++ b/fsw/src/to_lab_eds_encode.c @@ -35,6 +35,8 @@ #include "cfe_mission_eds_parameters.h" #include "cfe_mission_eds_interface_parameters.h" +#include "cfe_hdr_eds_datatypes.h" + CFE_Status_t TO_LAB_EncodeOutputMessage(const CFE_SB_Buffer_t *SourceBuffer, const void **DestBufferOut, size_t *DestSizeOut) { @@ -47,7 +49,7 @@ CFE_Status_t TO_LAB_EncodeOutputMessage(const CFE_SB_Buffer_t *SourceBuffer, con CFE_Status_t ResultStatus; size_t SourceBufferSize; - static CFE_HDR_TelemetryHeader_PackedBuffer_t NetworkBuffer; + static EdsPackedBuffer_CFE_HDR_TelemetryHeader_t NetworkBuffer; const EdsLib_DatabaseObject_t *EDS_DB = CFE_Config_GetObjPointer(CFE_CONFIGID_MISSION_EDS_DB); @@ -61,15 +63,15 @@ CFE_Status_t TO_LAB_EncodeOutputMessage(const CFE_SB_Buffer_t *SourceBuffer, con CFE_MissionLib_UnmapPublisherComponent(&PublisherParams, &PubSubParams); TopicId = PublisherParams.Telemetry.TopicId; - EdsStatus = CFE_MissionLib_GetArgumentType(&CFE_SOFTWAREBUS_INTERFACE, CFE_SB_Telemetry_Interface_ID, TopicId, 1, 1, - &EdsId); + EdsStatus = CFE_MissionLib_GetArgumentType(&CFE_SOFTWAREBUS_INTERFACE, EDS_INTERFACE_ID(CFE_SB_Telemetry), TopicId, + 1, 1, &EdsId); if (EdsStatus != CFE_MISSIONLIB_SUCCESS) { return CFE_STATUS_UNKNOWN_MSG_ID; } - EdsStatus = EdsLib_DataTypeDB_PackCompleteObject(EDS_DB, &EdsId, NetworkBuffer, SourceBuffer, 8 * sizeof(NetworkBuffer), - SourceBufferSize); + EdsStatus = EdsLib_DataTypeDB_PackCompleteObject(EDS_DB, &EdsId, NetworkBuffer, SourceBuffer, + 8 * sizeof(NetworkBuffer), SourceBufferSize); if (EdsStatus != EDSLIB_SUCCESS) { return CFE_SB_INTERNAL_ERR; @@ -81,7 +83,7 @@ CFE_Status_t TO_LAB_EncodeOutputMessage(const CFE_SB_Buffer_t *SourceBuffer, con return CFE_SB_INTERNAL_ERR; } - *DestSizeOut = (TypeInfo.Size.Bits + 7) / 8; + *DestSizeOut = (TypeInfo.Size.Bits + 7) / 8; *DestBufferOut = NetworkBuffer; return CFE_SUCCESS;