Skip to content

Commit

Permalink
Merge pull request #194 from jphickey:fix-193-eds-namechange
Browse files Browse the repository at this point in the history
Fix #193, apply name changes to EDS dispatcher
  • Loading branch information
dzbaker committed Mar 11, 2024
2 parents 276eaf3 + 21bacbb commit 4dcb1cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 deletions fsw/src/to_lab_eds_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
{
Expand Down
14 changes: 8 additions & 6 deletions fsw/src/to_lab_eds_encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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);

Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 4dcb1cb

Please sign in to comment.