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 #219, #93, Add EVS port timestamp and simplify port selection #2295

Merged
merged 2 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Fix #219, Remove option to exclude port output timestamp
  • Loading branch information
skliper committed Apr 27, 2023
commit 43270f5bcdb3ba39de1d5e41ef485f316dc72243
11 changes: 0 additions & 11 deletions cmake/sample_defs/cpu1_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1462,17 +1462,6 @@
*/
#define CFE_PLATFORM_EVS_DEFAULT_MSG_FORMAT_MODE CFE_EVS_MsgFormat_LONG

/**
** \cfeevscfg Include time in port send
**
** \par Description:
** Includes the time when sending events out a port
**
** \par Limits
** Set as true or false
*/
#define CFE_PLATFORM_EVS_INCLUDE_TIME_IN_PORT_SEND false

/* Platform Configuration Parameters for Table Service (TBL) */

/**
Expand Down
3 changes: 1 addition & 2 deletions modules/evs/fsw/src/cfe_evs_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ int32 CFE_EVS_EarlyInit(void)
CFE_EVS_Global.EVS_TlmPkt.Payload.OutputPort = CFE_PLATFORM_EVS_PORT_DEFAULT;
CFE_EVS_Global.EVS_TlmPkt.Payload.LogMode = CFE_PLATFORM_EVS_DEFAULT_LOG_MODE;

CFE_EVS_Global.EVS_EventBurstMax = CFE_PLATFORM_EVS_MAX_APP_EVENT_BURST;
CFE_EVS_Global.IncludeTimeInPortSend = CFE_PLATFORM_EVS_INCLUDE_TIME_IN_PORT_SEND;
CFE_EVS_Global.EVS_EventBurstMax = CFE_PLATFORM_EVS_MAX_APP_EVENT_BURST;

/* Get a pointer to the CFE reset area from the BSP */
PspStatus = CFE_PSP_GetResetArea(&resetAreaAddr, &resetAreaSize);
Expand Down
1 change: 0 additions & 1 deletion modules/evs/fsw/src/cfe_evs_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ typedef struct
osal_id_t EVS_SharedDataMutexID;
CFE_ES_AppId_t EVS_AppID;
uint32 EVS_EventBurstMax;
bool IncludeTimeInPortSend; /* Includes time in message sent out ports */
} CFE_EVS_Global_t;

/*
Expand Down
13 changes: 4 additions & 9 deletions modules/evs/fsw/src/cfe_evs_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,18 +539,13 @@ void EVS_GenerateEventTelemetry(EVS_AppData_t *AppDataPtr, uint16 EventID, uint1
void EVS_SendViaPorts(CFE_EVS_LongEventTlm_t *EVS_PktPtr)
{
char PortMessage[CFE_EVS_MAX_PORT_MSG_LENGTH];
char TimeBuffer[CFE_TIME_PRINTED_STRING_SIZE] = "";
char Separator[2] = "";
char TimeBuffer[CFE_TIME_PRINTED_STRING_SIZE];
CFE_TIME_SysTime_t PktTime;

if (CFE_EVS_Global.IncludeTimeInPortSend)
{
CFE_MSG_GetMsgTime(CFE_MSG_PTR(EVS_PktPtr->TelemetryHeader), &PktTime);
CFE_TIME_Print(TimeBuffer, PktTime);
snprintf(Separator, sizeof(Separator), " ");
}
CFE_MSG_GetMsgTime(CFE_MSG_PTR(EVS_PktPtr->TelemetryHeader), &PktTime);
CFE_TIME_Print(TimeBuffer, PktTime);

snprintf(PortMessage, sizeof(PortMessage), "%s%s%u/%u/%s %u: %s", TimeBuffer, Separator,
snprintf(PortMessage, sizeof(PortMessage), "%s %u/%u/%s %u: %s", TimeBuffer,
(unsigned int)EVS_PktPtr->Payload.PacketID.SpacecraftID,
(unsigned int)EVS_PktPtr->Payload.PacketID.ProcessorID, EVS_PktPtr->Payload.PacketID.AppName,
(unsigned int)EVS_PktPtr->Payload.PacketID.EventID, EVS_PktPtr->Payload.Message);
Expand Down
4 changes: 0 additions & 4 deletions modules/evs/fsw/src/cfe_evs_verify.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
#error CFE_PLATFORM_EVS_DEFAULT_LOG_MODE can only be 0 (Overwrite) or 1 (Discard)!
#endif

#if (CFE_PLATFORM_EVS_INCLUDE_TIME_IN_PORT_SEND != true) && (CFE_PLATFORM_EVS_INCLUDE_TIME_IN_PORT_SEND != false)
#error CFE_PLATFORM_EVS_INCLUDE_TIME_IN_PORT_SEND must be true or false
#endif

#if (CFE_PLATFORM_EVS_DEFAULT_MSG_FORMAT_MODE != CFE_EVS_MsgFormat_LONG) && \
(CFE_PLATFORM_EVS_DEFAULT_MSG_FORMAT_MODE != CFE_EVS_MsgFormat_SHORT)
#error CFE_EVS_DEFAULT_MSG_FORMAT can only be CFE_EVS_MsgFormat_LONG or CFE_EVS_MsgFormat_SHORT !
Expand Down
Loading