Skip to content

Commit

Permalink
Fix nasa#1009, Alignment pattern - core updates
Browse files Browse the repository at this point in the history
- Added CFE_SB_TransmitMsg, CFE_SB_TransmitBuffer,
  CFE_SB_ReceiveBuffer (partial nasa#1019 fix)
- Replace CFE_SB_RcvMsg with CFE_SB_ReceiveBuffer
- Deprecated CFE_SB_SendMsg, CFE_SB_PassMsg, CFE_SB_RcvMsg
  CFE_SB_ZeroCopyPass, CFE_SB_ZeroCopySend
- Use CFE_SB_Buffer_t for receiving and casting to command types
- Use CFE_MSG_CommandHeader_t and CFE_MSG_TelemetryHeader_t in
  command and telemetry type definitions
- Use CFE_SB_TransmitMsg to copy the command and telemetry
  into a CFE_SB_Buffer_t and send it where needed
- Avoids need to create send buffers within the app (or union
  the packet types with CFE_SB_Buffer_t)
- Eliminates references to CFE_SB_CmdHdr_t and CFE_SB_TlmHdr_t
  that formerly enforced alignment since these had potential
  to change the actual packet sizes
- No need to cast to CFE_MSG_Message_t anywhere since it's
  available in the CFE_SB_Buffer_t union
- CFE_MSG_Size_t redefined as size_t to simplify future
  transition
- Replaced Syslog with SysLog for consistency
- Added Cmd to all command typedefs
- Replaced CFE_SB_CMD_HDR_SIZE and CFE_SB_TLM_HDR_SIZE
  with sizeof the appropriate type
  • Loading branch information
skliper committed Dec 2, 2020
1 parent fb6b66c commit 54a113a
Show file tree
Hide file tree
Showing 37 changed files with 1,379 additions and 1,165 deletions.
6 changes: 3 additions & 3 deletions fsw/cfe-core/src/es/cfe_es_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
* first significantly decreases the amount of time that the syslog is locked after
* a file dump is requested.
*
* This buffer also reflects the Syslog "burst size" that is guaranteed to be
* This buffer also reflects the SysLog "burst size" that is guaranteed to be
* safe for concurrent writes and reads/dump operations. If applications Log more than
* this amount of data in less time than it takes to write this amount of data to disk,
* then some log messages may be corrupt or lost in the output file.
Expand Down Expand Up @@ -121,7 +121,7 @@
*/

/**
* \brief Buffer structure for reading data out of the Syslog
* \brief Buffer structure for reading data out of the SysLog
*
* Access to the syslog must be synchronized, so it is not possible to
* directly access the contents. This structure keeps the state of
Expand Down Expand Up @@ -309,7 +309,7 @@ void CFE_ES_SysLog_snprintf(char *Buffer, size_t BufferSize, const char *SpecStr
*
* A snapshot of the log indices is taken at the beginning of the writing
* process. Additional log entries added after this (e.g. from applications
* calling CFE_ES_WriteToSyslog() after starting a syslog dump) will not be
* calling CFE_ES_WriteToSysLog() after starting a syslog dump) will not be
* included in the dump file.
*
* Note that preference is given to the realtime application threads over
Expand Down
8 changes: 4 additions & 4 deletions fsw/cfe-core/src/es/cfe_es_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ uint32 CFE_ES_GetPerfLogDumpRemaining(void)
/* CFE_ES_StartPerfDataCmd() -- */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 CFE_ES_StartPerfDataCmd(const CFE_ES_StartPerfData_t *data)
int32 CFE_ES_StartPerfDataCmd(const CFE_ES_StartPerfDataCmd_t *data)
{
const CFE_ES_StartPerfCmd_Payload_t *CmdPtr = &data->Payload;
CFE_ES_PerfDumpGlobal_t *PerfDumpState = &CFE_ES_TaskData.BackgroundPerfDumpState;
Expand Down Expand Up @@ -214,7 +214,7 @@ int32 CFE_ES_StartPerfDataCmd(const CFE_ES_StartPerfData_t *data)
/* CFE_ES_StopPerfDataCmd() -- */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 CFE_ES_StopPerfDataCmd(const CFE_ES_StopPerfData_t *data)
int32 CFE_ES_StopPerfDataCmd(const CFE_ES_StopPerfDataCmd_t *data)
{
const CFE_ES_StopPerfCmd_Payload_t *CmdPtr = &data->Payload;
CFE_ES_PerfDumpGlobal_t *PerfDumpState = &CFE_ES_TaskData.BackgroundPerfDumpState;
Expand Down Expand Up @@ -496,7 +496,7 @@ bool CFE_ES_RunPerfLogDump(uint32 ElapsedTime, void *Arg)
/* CFE_ES_SetPerfFilterMaskCmd() -- */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 CFE_ES_SetPerfFilterMaskCmd(const CFE_ES_SetPerfFilterMask_t *data)
int32 CFE_ES_SetPerfFilterMaskCmd(const CFE_ES_SetPerfFilterMaskCmd_t *data)
{
const CFE_ES_SetPerfFilterMaskCmd_Payload_t *cmd = &data->Payload;

Expand Down Expand Up @@ -526,7 +526,7 @@ int32 CFE_ES_SetPerfFilterMaskCmd(const CFE_ES_SetPerfFilterMask_t *data)
/* CFE_ES_SetPerfTriggerMaskCmd() -- */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 CFE_ES_SetPerfTriggerMaskCmd(const CFE_ES_SetPerfTriggerMask_t *data)
int32 CFE_ES_SetPerfTriggerMaskCmd(const CFE_ES_SetPerfTriggerMaskCmd_t *data)
{
const CFE_ES_SetPerfTrigMaskCmd_Payload_t *cmd = &data->Payload;

Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/es/cfe_es_syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
**
** Some functions have EXTERNAL SYNC REQUIREMENTS
**
** Syslog functions marked with "Unsync" in their name are designated
** SysLog functions marked with "Unsync" in their name are designated
** as functions which are _not_ safe to be called concurrently by multiple
** threads, and also do _not_ implement any locking or protection. These
** functions expect the caller to perform all thread synchronization before
Expand Down
Loading

0 comments on commit 54a113a

Please sign in to comment.