Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #193, apply name changes to EDS dispatcher #194

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading