本文整理匯總了C++中CFE_EVS_SendEvent函數的典型用法代碼示例。如果您正苦於以下問題:C++ CFE_EVS_SendEvent函數的具體用法?C++ CFE_EVS_SendEvent怎麽用?C++ CFE_EVS_SendEvent使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了CFE_EVS_SendEvent函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: CFE_ES_PerfSetTriggerMaskCmd
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void CFE_ES_PerfSetTriggerMaskCmd(CFE_SB_MsgPtr_t msg){
uint16 ExpectedLength = sizeof(CFE_ES_PerfSetTrigMaskCmd_t);
CFE_ES_PerfSetTrigMaskCmd_t *cmd = (CFE_ES_PerfSetTrigMaskCmd_t *) msg;
/*
** Verify command packet length.
*/
if (CFE_ES_VerifyCmdLength(msg, ExpectedLength))
{
if(cmd->TriggerMaskNum < CFE_ES_PERF_32BIT_WORDS_IN_MASK ){
Perf->MetaData.TriggerMask[cmd->TriggerMaskNum] = cmd->TriggerMask;
CFE_EVS_SendEvent(CFE_ES_PERF_TRIGMSKCMD_EID, CFE_EVS_DEBUG,
"Set Performance Trigger Mask Cmd rcvd,num %d, val 0x%x",
cmd->TriggerMaskNum,cmd->TriggerMaskNum);
CFE_ES_TaskData.CmdCounter++;
}else{
CFE_EVS_SendEvent(CFE_ES_PERF_TRIGMSKERR_EID, CFE_EVS_ERROR,
"Performance Trigger Mask Cmd Error,Index(%d)out of range(%d)",
cmd->TriggerMaskNum,CFE_ES_PERF_32BIT_WORDS_IN_MASK);
CFE_ES_TaskData.ErrCounter++;
}
}
} /* End of CFE_ES_PerfSetTriggerMaskCmd() */
示例2: TO_RemoveAllPkt
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void TO_RemoveAllPkt(void)
{
int32 status;
int i;
for (i=0; (i < (sizeof(TO_SubTable)/sizeof(TO_subsciption_t))); i++)
{
if (TO_SubTable[i].Stream != TO_UNUSED )
{
status = CFE_SB_Unsubscribe(TO_SubTable[i].Stream, TO_Tlm_pipe);
if(status != CFE_SUCCESS)
CFE_EVS_SendEvent(TO_REMOVEALLPTKS_ERR_EID,CFE_EVS_ERROR, "L%d TO Can't Unsubscribe to stream 0x%x status %i", __LINE__,
TO_SubTable[i].Stream, status);
}
}
/* remove commands as well */
status = CFE_SB_Unsubscribe(TO_LAB_CMD_MID, TO_Cmd_pipe);
if(status != CFE_SUCCESS)
CFE_EVS_SendEvent(TO_REMOVECMDTO_ERR_EID,CFE_EVS_ERROR, "L%d TO Can't Unsubscribe to cmd stream 0x%x status %i", __LINE__,
TO_LAB_CMD_MID, status);
status = CFE_SB_Unsubscribe(TO_LAB_SEND_HK_MID, TO_Cmd_pipe);
if (status != CFE_SUCCESS)
CFE_EVS_SendEvent(TO_REMOVEHKTO_ERR_EID,CFE_EVS_ERROR, "L%d TO Can't Unsubscribe to cmd stream 0x%x status %i", __LINE__,
TO_LAB_CMD_MID, status);
CFE_EVS_SendEvent(TO_REMOVEALLPKTS_INF_EID,CFE_EVS_INFORMATION, "L%d TO Unsubscribed to all Commands and Telemetry", __LINE__);
} /* End of TO_RemoveAllPkt() */
示例3: CI_ProcessGroundCommand
void CI_ProcessGroundCommand(void)
{
uint16 CommandCode;
CommandCode = CFE_SB_GetCmdCode(CIMsgPtr);
/* Process "known" CI task ground commands */
switch (CommandCode)
{
case CI_NO_OPERATION_CC:
CI_HkTelemetryPkt.ci_command_count++;
CFE_EVS_SendEvent(CI_COMMANDNOP_INF_EID,CFE_EVS_INFORMATION, "CI: NOP command");
break;
case CI_RESET_COUNTERS_CC:
CI_ResetCounters();
CFE_EVS_SendEvent(CI_COMMANDRST_INF_EID,CFE_EVS_INFORMATION, "CI: RESET command");
break;
/* default case already found during FC vs length test */
default:
break;
}
return;
} /* End of CI_ProcessGroundCommand() */
示例4: CFE_TIME_1HzAdjCmd
void CFE_TIME_1HzAdjCmd(CFE_SB_MsgPtr_t MessagePtr, int16 Direction)
{
/*
** 1Hz adjustments are only valid for "Time Servers"...
*/
#if (CFE_TIME_CFG_SERVER == TRUE)
CFE_TIME_1HzAdjCmd_t *CommandPtr = (CFE_TIME_1HzAdjCmd_t *) MessagePtr;
CFE_TIME_SysTime_t Adjust;
Adjust.Seconds = CommandPtr->Seconds;
Adjust.Subseconds = CommandPtr->SubSeconds;
CFE_TIME_Set1HzAdj(Adjust, Direction);
CFE_TIME_TaskData.CmdCounter++;
CFE_EVS_SendEvent(CFE_TIME_1HZ_EID, CFE_EVS_INFORMATION,
"STCF 1Hz Adjust -- secs = %d, ssecs = 0x%X, dir[1=Pos, 2=Neg] = %d",
CommandPtr->Seconds, CommandPtr->SubSeconds, Direction);
#else /* not CFE_TIME_CFG_SERVER */
/*
** We want to know if disabled commands are being sent...
*/
CFE_TIME_TaskData.ErrCounter++;
CFE_EVS_SendEvent(CFE_TIME_1HZ_CFG_EID, CFE_EVS_ERROR,
"1Hz Adjust commands invalid without CFE_TIME_CFG_SERVER set to TRUE");
#endif /* CFE_TIME_CFG_SERVER */
return;
} /* End of CFE_TIME_1HzAdjCmd() */
示例5: CFE_TIME_SetLeapsCmd
void CFE_TIME_SetLeapsCmd(CFE_SB_MsgPtr_t MessagePtr)
{
#if (CFE_TIME_CFG_SERVER == TRUE)
CFE_TIME_LeapsCmd_t *CommandPtr = (CFE_TIME_LeapsCmd_t *) MessagePtr;
/*
** No value checking (leaps may be positive or negative)...
*/
CFE_TIME_SetLeaps(CommandPtr->LeapSeconds);
CFE_TIME_TaskData.CmdCounter++;
CFE_EVS_SendEvent(CFE_TIME_LEAPS_EID, CFE_EVS_INFORMATION,
"Set Leap Seconds = %d", CommandPtr->LeapSeconds);
#else /* not CFE_TIME_CFG_SERVER */
/*
** We want to know if disabled commands are being sent...
*/
CFE_TIME_TaskData.ErrCounter++;
CFE_EVS_SendEvent(CFE_TIME_LEAPS_CFG_EID, CFE_EVS_ERROR,
"Set Leaps commands invalid without CFE_TIME_CFG_SERVER set to TRUE");
#endif /* CFE_TIME_CFG_SERVER */
return;
} /* End of CFE_TIME_SetLeapsCmd() */
示例6: CS_DisableNameAppCmd
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void CS_DisableNameAppCmd(CFE_SB_MsgPtr_t MessagePtr)
{
/* command verification variables */
uint16 ExpectedLength = sizeof(CS_AppNameCmd_t);
CS_AppNameCmd_t * CmdPtr;
CS_Res_App_Table_Entry_t * ResultsEntry;
CS_Def_App_Table_Entry_t * DefinitionEntry;
/* Verify command packet length */
if ( CS_VerifyCmdLength (MessagePtr,ExpectedLength) )
{
CmdPtr = (CS_AppNameCmd_t *) MessagePtr;
CmdPtr -> Name[OS_MAX_API_NAME - 1] = '\0';
if ( CS_GetAppResTblEntryByName( &ResultsEntry, CmdPtr -> Name))
{
ResultsEntry -> State = CS_STATE_DISABLED;
ResultsEntry -> TempChecksumValue = 0;
ResultsEntry -> ByteOffset = 0;
CFE_EVS_SendEvent (CS_DISABLE_APP_NAME_INF_EID,
CFE_EVS_INFORMATION,
"Checksumming of app %s is Disabled",
CmdPtr -> Name);
if ( CS_GetAppDefTblEntryByName(&DefinitionEntry, CmdPtr -> Name))
{
DefinitionEntry -> State = CS_STATE_DISABLED;
CS_ResetTablesTblResultEntry(CS_AppData.AppResTablesTblPtr);
CFE_TBL_Modified(CS_AppData.DefAppTableHandle);
}
else
{
CFE_EVS_SendEvent (CS_DISABLE_APP_DEF_NOT_FOUND_DBG_EID,
CFE_EVS_DEBUG,
"CS unable to update apps definition table for entry %s",
CmdPtr -> Name);
}
CS_AppData.CmdCounter++;
}
else
{
CFE_EVS_SendEvent (CS_DISABLE_APP_UNKNOWN_NAME_ERR_EID,
CFE_EVS_ERROR,
"App disable app command failed, app %s not found",
CmdPtr -> Name);
CS_AppData.CmdErrCounter++;
}
}
return;
} /* End of CS_DisableNameAppCmd () */
示例7: TO_RemovePkt
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void TO_RemovePkt(TO_REMOVE_PKT_t * pCmd)
{
int32 status;
status = CFE_SB_Unsubscribe(pCmd->Stream, TO_Tlm_pipe);
if(status != CFE_SUCCESS)
CFE_EVS_SendEvent(TO_REMOVEPKT_ERR_EID,CFE_EVS_ERROR,"L%d TO Can't Unsubscribe to Stream 0x%x on pipe %d, status %i",__LINE__,
pCmd->Stream, TO_Tlm_pipe, status);
else
CFE_EVS_SendEvent(TO_REMOVEPKT_INF_EID,CFE_EVS_INFORMATION,"L%d TO RemovePkt 0x%x",__LINE__, pCmd->Stream);
} /* End of TO_RemovePkt() */
示例8: CI_TaskInit
void CI_TaskInit(void)
{
CFE_ES_RegisterApp() ;
CFE_EVS_Register(CI_EventFilters,
sizeof(CI_EventFilters)/sizeof(CFE_EVS_BinFilter_t),
CFE_EVS_BINARY_FILTER);
CFE_SB_CreatePipe(&CI_CommandPipe, CI_PIPE_DEPTH,"CI_CMD_PIPE");
CFE_SB_Subscribe(CI_CMD_MID, CI_CommandPipe);
CFE_SB_Subscribe(CI_SEND_HK_MID, CI_CommandPipe);
if ( (CI_SocketID = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
{
CFE_EVS_SendEvent(CI_SOCKETCREATE_ERR_EID,CFE_EVS_ERROR,"CI: create socket failed = %d", errno);
}
else
{
bzero((char *) &CI_SocketAddress, sizeof(CI_SocketAddress));
CI_SocketAddress.sin_family = AF_INET;
CI_SocketAddress.sin_addr.s_addr = htonl(INADDR_ANY);
CI_SocketAddress.sin_port = htons(cfgCI_PORT);
if ( (bind(CI_SocketID, (struct sockaddr *) &CI_SocketAddress, sizeof(CI_SocketAddress)) < 0) )
{
CFE_EVS_SendEvent(CI_SOCKETBIND_ERR_EID,CFE_EVS_ERROR,"CI: bind socket failed = %d", errno);
}
else
{
CI_SocketConnected = TRUE;
#ifdef _HAVE_FCNTL_
/*
** Set the socket to non-blocking
** This is not available to vxWorks, so it has to be
** Conditionally compiled in
*/
fcntl(CI_SocketID, F_SETFL, O_NONBLOCK);
#endif
}
}
CI_ResetCounters();
CFE_SB_InitMsg(&CI_HkTelemetryPkt,
CI_HK_TLM_MID,
CI_HK_TLM_LNGTH, TRUE);
/*
** Install the delete handler
*/
OS_TaskInstallDeleteHandler((void*)&CI_delete_callback);
CFE_EVS_SendEvent(CI_STARTUP_INF_EID,CFE_EVS_INFORMATION, "CI App Initialized");
} /* End of CI_TaskInit() */
示例9: TBLMGR_LoadExObjTableCmd
/******************************************************************************
** Function: TBLMGR_LoadExObjTableCmd
**
*/
boolean TBLMGR_LoadExObjTableCmd(const CFE_SB_MsgPtr_t MsgPtr)
{
const TBLMGR_LoadTblCmd *LoadTblCmd = (const TBLMGR_LoadTblCmd *) MsgPtr;
int entry;
/*
** Set all data and flags to zero.
** AttrErrCnt - Incremented by XML parser
*/
CFE_PSP_MemSet(&TblMgr->ExObjTbl, 0, sizeof(TBLMGR_ExObjTbl));
TblMgr->ExObjTbl.LoadActive = TRUE;
TblEntryId = 0;
if (ParseXmlFile(LoadTblCmd->FileName, ExObjTblStartElement, ExObjTblEndElement) &&
TblMgr->ExObjTbl.AttrErrCnt == 0)
{
if (LoadTblCmd->LoadType == TBLMGR_LOAD_TBL_REPLACE)
{
TblMgr->ExObjTbl.LastLoadValid = (EXOBJ_LoadTable(&(TblMgr->ExObjTbl.Local)) == TRUE);
} /* End if replace entire table */
else if (LoadTblCmd->LoadType == TBLMGR_LOAD_TBL_UPDATE)
{
TblMgr->ExObjTbl.LastLoadValid = TRUE;
for (entry=0; entry < EXOBJ_TBL_MAX_ENTRY_ID; entry++)
{
if (TblMgr->ExObjTbl.Modified[entry])
{
if (!EXOBJ_LoadTableEntry(entry, &(TblMgr->ExObjTbl.Local.Entry[entry])))
TblMgr->ExObjTbl.LastLoadValid = FALSE;
}
} /* End pkt loop */
} /* End if update individual records */
else
{
CFE_EVS_SendEvent(TBLMGR_CMD_LOAD_TYPE_ERR_EID,CFE_EVS_ERROR,"TBLMGR: Invalid table command load type %d",LoadTblCmd->LoadType);
}
} /* End if successful parse */
else
{
CFE_EVS_SendEvent(TBLMGR_CMD_LOAD_PARSE_ERR_EID,CFE_EVS_ERROR,"TBLMGR: Table Parsing failure for file %s");
}
return TblMgr->ExObjTbl.LastLoadValid;
} /* End of TBLMGR_LoadExObjTableCmd() */
示例10: TT_AppPipe
void TT_AppPipe(CFE_SB_MsgPtr_t msg)
{
CFE_SB_MsgId_t MessageID;
uint16 CommandCode;
MessageID = CFE_SB_GetMsgId(msg);
switch (MessageID)
{
/*
** Housekeeping telemetry request...
*/
case CFE_TT_SEND_HK_MID:
TT_HousekeepingCmd(msg);
break;
/*
** TT ground commands...
*/
case CFE_TT_CMD_MID:
CommandCode = CFE_SB_GetCmdCode(msg);
switch (CommandCode)
{
case TT_NOOP_CC:
TT_NoopCmd(msg);
break;
case TT_RESET_CC:
TT_ResetCmd(msg);
break;
default:
CFE_EVS_SendEvent(TT_CC1_ERR_EID, CFE_EVS_ERROR,
"Invalid ground command code: ID = 0x%X, CC = %d",
MessageID, CommandCode);
break;
}
break;
default:
CFE_EVS_SendEvent(TT_MID_ERR_EID, CFE_EVS_ERROR,
"Invalid command pipe message ID: 0x%X",
MessageID);
break;
}
return;
} /* End of TT_AppPipe() */
示例11: SC_GetLoadTablePointers
int32 SC_GetLoadTablePointers(void)
{
int i;
int32 Result;
/* Get buffer address for loadable ATS tables */
for (i = 0; i < SC_NUMBER_OF_ATS; i++)
{
Result = CFE_TBL_GetAddress((void **) &SC_OperData.AtsTblAddr[i], SC_OperData.AtsTblHandle[i]);
if ((Result != CFE_TBL_ERR_NEVER_LOADED) && (Result != CFE_TBL_INFO_UPDATED))
{
CFE_EVS_SendEvent(SC_GET_ADDRESS_ATS_ERR_EID, CFE_EVS_ERROR,
"ATS table %d failed Getting Address, returned: 0x%08X", i+1, Result);
return(Result);
}
}
/* Get buffer address for loadable ATS Append table */
Result = CFE_TBL_GetAddress((void **) &SC_OperData.AppendTblAddr, SC_OperData.AppendTblHandle);
if ((Result != CFE_TBL_ERR_NEVER_LOADED) && (Result != CFE_TBL_INFO_UPDATED))
{
CFE_EVS_SendEvent (SC_GET_ADDRESS_APPEND_ERR_EID, CFE_EVS_ERROR,
"Append ATS table failed Getting Address, returned: 0x%08X", Result);
return(Result);
}
/* Get buffer address for loadable RTS tables */
for (i = 0; i < SC_NUMBER_OF_RTS; i++)
{
Result = CFE_TBL_GetAddress((void **) &SC_OperData.RtsTblAddr[i], SC_OperData.RtsTblHandle[i]);
if ((Result != CFE_TBL_ERR_NEVER_LOADED) && (Result != CFE_TBL_INFO_UPDATED))
{
CFE_EVS_SendEvent(SC_GET_ADDRESS_RTS_ERR_EID, CFE_EVS_ERROR,
"RTS table %d failed Getting Address, returned: 0x%08X", i+1, Result);
return(Result);
}
/* Process new RTS table data */
if (Result == CFE_TBL_INFO_UPDATED)
{
SC_LoadRts(i);
}
}
return(CFE_SUCCESS);
} /* end SC_GetLoadTablePointers() */
示例12: DumpTableToFile
/******************************************************************************
** Function: DumpTableToFile
**
*/
static boolean DumpTableToFile(const char* FileName, const char* FileDescr, DumpTableFuncPtr DumpTableFunc)
{
CFE_FS_Header_t CfeStdFileHeader;
int32 FileHandle;
int32 FileStatus;
boolean RetStatus = FALSE;
/* Create a new dump file, overwriting anything that may have existed previously */
FileHandle = OS_creat(FileName, OS_WRITE_ONLY);
if (FileHandle >= OS_FS_SUCCESS)
{
/* Initialize the standard cFE File Header for the Dump File */
CfeStdFileHeader.SubType = 0x74786574;
strcpy(&CfeStdFileHeader.Description[0], FileDescr);
/* Output the Standard cFE File Header to the Dump File */
FileStatus = CFE_FS_WriteHeader(FileHandle, &CfeStdFileHeader);
if (FileStatus == sizeof(CFE_FS_Header_t))
{
(DumpTableFunc)(FileHandle);
RetStatus = TRUE;
} /* End if successfully wrote file header */
else
{
CFE_EVS_SendEvent(TBLMGR_WRITE_CFE_HDR_ERR_EID,
CFE_EVS_ERROR,
"Error writing cFE File Header to '%s', Status=0x%08X",
FileName, FileStatus);
}
} /* End if file create */
else
{
CFE_EVS_SendEvent(TBLMGR_CREATE_MSG_DUMP_ERR_EID,
CFE_EVS_ERROR,
"Error creating CDS dump file '%s', Status=0x%08X",
FileName, FileHandle);
}
OS_close(FileHandle);
return RetStatus;
} /* End of DumpTableToFile() */
示例13: TO_exec_local_command
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void TO_exec_local_command(CFE_SB_MsgPtr_t cmd)
{
uint16 CommandCode;
boolean valid = TRUE;
CommandCode = CFE_SB_GetCmdCode(cmd);
switch (CommandCode)
{
case TO_NOP_CC:
CFE_EVS_SendEvent(TO_NOOP_INF_EID,CFE_EVS_INFORMATION, "No-op command");
break;
case TO_RESET_STATUS_CC:
TO_reset_status();
--to_hk_status.command_counter;
break;
case TO_SEND_DATA_TYPES_CC:
TO_output_data_types_packet();
break;
case TO_ADD_PKT_CC:
TO_AddPkt((TO_ADD_PKT_t *)cmd);
break;
case TO_REMOVE_PKT_CC:
TO_RemovePkt( (TO_REMOVE_PKT_t *)cmd);
break;
case TO_REMOVE_ALL_PKT_CC:
TO_RemoveAllPkt();
break;
case TO_OUTPUT_ENABLE_CC:
TO_StartSending( (TO_OUTPUT_ENABLE_PKT_t *)cmd );
downlink_on = TRUE;
break;
default:
CFE_EVS_SendEvent(TO_FNCODE_ERR_EID,CFE_EVS_ERROR, "L%d TO: Invalid Function Code Rcvd In Ground Command 0x%x",__LINE__,
CommandCode);
valid = FALSE;
}
if (valid)
++to_hk_status.command_counter;
else
++to_hk_status.command_error_counter;
} /* End of TO_exec_local_command() */
示例14: HS_CustomInit
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 HS_CustomInit(void)
{
int32 Status = CFE_SUCCESS;
/*
** Spawn the Idle Task
*/
Status = CFE_ES_CreateChildTask(&HS_CustomData.IdleTaskID,
HS_IDLE_TASK_NAME,
HS_IdleTask,
HS_IDLE_TASK_STACK_PTR,
HS_IDLE_TASK_STACK_SIZE,
HS_IDLE_TASK_PRIORITY,
HS_IDLE_TASK_FLAGS);
if(Status != CFE_SUCCESS)
{
CFE_EVS_SendEvent(HS_CR_CHILD_TASK_ERR_EID, CFE_EVS_ERROR,
"Error Creating Child Task for CPU Utilization Monitoring,RC=0x%08X",
Status);
return (Status);
}
/*
** Connect to CFE TIME's time reference marker (typically 1 Hz) for Idle Task Marking
*/
Status = CFE_TIME_RegisterSynchCallback((CFE_TIME_SynchCallbackPtr_t)&HS_MarkIdleCallback);
if (Status != CFE_SUCCESS)
{
CFE_EVS_SendEvent(HS_CR_SYNC_CALLBACK_ERR_EID, CFE_EVS_ERROR,
"Error Registering Sync Callback for CPU Utilization Monitoring,RC=0x%08X",
Status);
}
HS_CustomData.UtilMult1 = HS_UTIL_CONV_MULT1;
HS_CustomData.UtilMult2 = HS_UTIL_CONV_DIV;
HS_CustomData.UtilDiv = HS_UTIL_CONV_MULT2;
HS_CustomData.UtilMask = HS_UTIL_DIAG_MASK;
HS_CustomData.UtilCycleCounter = 0;
HS_CustomData.UtilMask = HS_UTIL_DIAG_MASK;
HS_CustomData.UtilArrayIndex = 0;
HS_CustomData.UtilArrayMask = HS_UTIL_TIME_DIAG_ARRAY_MASK;
HS_CustomData.ThisIdleTaskExec = 0;
HS_CustomData.LastIdleTaskExec = 0;
HS_CustomData.LastIdleTaskInterval = 0;
return(Status);
} /* end HS_CustomInit */
示例15: CFE_ES_PerfStartDataCmd
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void CFE_ES_PerfStartDataCmd(CFE_SB_MsgPtr_t msg){
uint16 ExpectedLength = sizeof(CFE_ES_PerfStartCmd_t);
CFE_ES_PerfStartCmd_t *CmdPtr = (CFE_ES_PerfStartCmd_t *)msg;
/*
** Verify command packet length.
*/
if (CFE_ES_VerifyCmdLength(msg, ExpectedLength))
{
/* Ensure there is no file write in progress before proceeding */
if(CFE_ES_PerfLogDumpStatus.DataToWrite == 0)
{
/* Make sure Trigger Mode is valid */
if ((CmdPtr->TriggerMode >= CFE_ES_PERF_TRIGGER_START) && (CmdPtr->TriggerMode < CFE_ES_PERF_MAX_MODES))
{
CFE_ES_TaskData.CmdCounter++;
Perf->MetaData.Mode = CmdPtr->TriggerMode;
Perf->MetaData.TriggerCount = 0;
Perf->MetaData.DataStart = 0;
Perf->MetaData.DataEnd = 0;
Perf->MetaData.DataCount = 0;
Perf->MetaData.InvalidMarkerReported = FALSE;
Perf->MetaData.State = CFE_ES_PERF_WAITING_FOR_TRIGGER; /* this must be done last */
CFE_EVS_SendEvent(CFE_ES_PERF_STARTCMD_EID, CFE_EVS_DEBUG,
"Start collecting performance data cmd received, trigger mode = %d",
CmdPtr->TriggerMode);
}
else
{
CFE_ES_TaskData.ErrCounter++;
CFE_EVS_SendEvent(CFE_ES_PERF_STARTCMD_TRIG_ERR_EID, CFE_EVS_ERROR,
"Cannot start collecting performance data, trigger mode (%d) out of range (%d to %d)",
CmdPtr->TriggerMode, CFE_ES_PERF_TRIGGER_START, CFE_ES_PERF_TRIGGER_END);
}/* end if */
}
else
{
CFE_ES_TaskData.ErrCounter++;
CFE_EVS_SendEvent(CFE_ES_PERF_STARTCMD_ERR_EID, CFE_EVS_ERROR,
"Cannot start collecting performance data,perf data write in progress");
} /* end if */
}/* end if */
} /* End of CFE_ES_PerfStartDataCmd() */