From 79e0f58ee3fe97e3133c00d8325df24eb6131a7c Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Wed, 17 Mar 2021 16:28:02 -0400 Subject: [PATCH] Fix #1002, Remove deprecated elements --- modules/core_api/fsw/inc/cfe_error.h | 10 - modules/core_api/fsw/inc/cfe_sb.h | 468 ------------------ .../core_api/fsw/inc/cfe_sb_api_typedefs.h | 43 -- modules/core_api/ut-stubs/src/ut_sb_stubs.c | 440 ---------------- modules/sb/fsw/src/cfe_sb_api.c | 63 --- modules/sb/fsw/src/cfe_sb_msg_id_util.c | 42 -- modules/sb/fsw/src/cfe_sb_priv.c | 23 - modules/sb/fsw/src/cfe_sb_util.c | 133 ----- 8 files changed, 1222 deletions(-) diff --git a/modules/core_api/fsw/inc/cfe_error.h b/modules/core_api/fsw/inc/cfe_error.h index 2e9331e0a..6b0675043 100644 --- a/modules/core_api/fsw/inc/cfe_error.h +++ b/modules/core_api/fsw/inc/cfe_error.h @@ -1371,14 +1371,4 @@ typedef int32 CFE_Status_t; #define CFE_TIME_BAD_ARGUMENT ((CFE_Status_t)0xce000005) /**@}*/ -/* Compatibility for error names which have been updated */ -#ifndef CFE_OMIT_DEPRECATED_6_8 -#define CFE_ES_ERR_TASKID CFE_ES_ERR_RESOURCEID_NOT_VALID -#define CFE_ES_ERR_APPID CFE_ES_ERR_RESOURCEID_NOT_VALID -#define CFE_ES_ERR_MEM_HANDLE CFE_ES_ERR_RESOURCEID_NOT_VALID -#define CFE_ES_ERR_APPNAME CFE_ES_ERR_NAME_NOT_FOUND -#define CFE_ES_CDS_NOT_FOUND_ERR CFE_ES_ERR_NAME_NOT_FOUND -#define CFE_ES_CDS_REGISTRY_FULL CFE_ES_NO_RESOURCE_IDS_AVAILABLE -#endif - #endif /* _cfe_error_ */ diff --git a/modules/core_api/fsw/inc/cfe_sb.h b/modules/core_api/fsw/inc/cfe_sb.h index c673e5329..3cf9aa620 100644 --- a/modules/core_api/fsw/inc/cfe_sb.h +++ b/modules/core_api/fsw/inc/cfe_sb.h @@ -40,11 +40,6 @@ #include "cfe_sb_api_typedefs.h" #include "cfe_es_api_typedefs.h" -#ifndef CFE_OMIT_DEPRECATED_6_8 -/* only deprecated functions depend on TIME types */ -#include "cfe_time_api_typedefs.h" -#endif - /* ** Macro Definitions */ @@ -428,68 +423,6 @@ CFE_Status_t CFE_SB_UnsubscribeLocal(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeI **/ CFE_Status_t CFE_SB_TransmitMsg(CFE_MSG_Message_t *MsgPtr, bool IncrementSequenceCount); -#ifndef CFE_OMIT_DEPRECATED_6_8 -/*****************************************************************************/ -/** -** \brief DEPRECATED: Send a software bus message -** \deprecated Use CFE_SB_TransmitMsg -** -** \par Description -** This routine sends the specified message to all subscribers. The -** software bus will read the message ID from the message header to -** determine which pipes should receive the message. -** -** \par Assumptions, External Events, and Notes: -** - This routine will not normally wait for the receiver tasks to -** process the message before returning control to the caller's task. -** - However, if a higher priority task is pending and subscribed to -** this message, that task may get to run before returning -** control to the caller. -** - This function tracks and increments the source sequence counter -** of a telemetry message. -** -** \param[in] MsgPtr A pointer to the message to be sent. This must point -** to the first byte of the message header. -** -** \return Execution status, see \ref CFEReturnCodes -** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS -** \retval #CFE_SB_BAD_ARGUMENT \copybrief CFE_SB_BAD_ARGUMENT -** \retval #CFE_SB_MSG_TOO_BIG \copybrief CFE_SB_MSG_TOO_BIG -** \retval #CFE_SB_BUF_ALOC_ERR \copybrief CFE_SB_BUF_ALOC_ERR -**/ -CFE_Status_t CFE_SB_SendMsg(CFE_MSG_Message_t *MsgPtr); - -/*****************************************************************************/ -/** -** \brief DEPRECATED: Passes a software bus message -** \deprecated Use CFE_SB_TransmitMsg -** -** \par Description -** This routine sends the specified message to all subscribers. The -** software bus will read the message ID from the message header to -** determine which pipes should receive the message. This routine is -** intended to pass messages not generated by the sending application. -** -** \par Assumptions, External Events, and Notes: -** - This routine will not normally wait for the receiver tasks to -** process the message before returning control to the caller's task. -** - However, if a higher priority task is pending and subscribed to -** this message, that task may get to run before #CFE_SB_PassMsg -** returns control to the caller. -** - This routine will not modify the sequence counter in the message. -** -** \param[in] MsgPtr A pointer to the message to be sent. This must point -** to the first byte of the message header. -** -** \return Execution status, see \ref CFEReturnCodes -** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS -** \retval #CFE_SB_BAD_ARGUMENT \copybrief CFE_SB_BAD_ARGUMENT -** \retval #CFE_SB_MSG_TOO_BIG \copybrief CFE_SB_MSG_TOO_BIG -** \retval #CFE_SB_BUF_ALOC_ERR \copybrief CFE_SB_BUF_ALOC_ERR -**/ -CFE_Status_t CFE_SB_PassMsg(CFE_MSG_Message_t *MsgPtr); -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /*****************************************************************************/ /** ** \brief Receive a message from a software bus pipe @@ -530,14 +463,6 @@ CFE_Status_t CFE_SB_PassMsg(CFE_MSG_Message_t *MsgPtr); ** \retval #CFE_SB_NO_MESSAGE \copybrief CFE_SB_NO_MESSAGE **/ CFE_Status_t CFE_SB_ReceiveBuffer(CFE_SB_Buffer_t **BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut); - -#ifndef CFE_OMIT_DEPRECATED_6_8 -/** - * \brief DEPRECATED: receive buffer - * \deprecated use CFE_SB_ReceiveBuffer - */ -CFE_Status_t CFE_SB_RcvMsg(CFE_SB_Buffer_t **BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut); -#endif /* CFE_OMIT_DEPRECATED_6_8 */ /**@}*/ /** @defgroup CFEAPISBZeroCopy cFE Zero Copy APIs @@ -649,143 +574,12 @@ CFE_Status_t CFE_SB_ZeroCopyReleasePtr(CFE_SB_Buffer_t *Ptr2Release, CFE_SB_Zero **/ CFE_Status_t CFE_SB_TransmitBuffer(CFE_SB_Buffer_t *BufPtr, CFE_SB_ZeroCopyHandle_t ZeroCopyHandle, bool IncrementSequenceCount); - -#ifndef CFE_OMIT_DEPRECATED_6_8 -/*****************************************************************************/ -/** -** \brief DEPRECATED: Send an SB message in "zero copy" mode. -** \deprecated use CFE_SB_TransmitBuffer -** -** \par Description -** This routine sends a message that has been created directly in an -** internal SB message buffer by an application (after a call to -** #CFE_SB_ZeroCopyGetPtr). This interface is more complicated than -** the normal #CFE_SB_TransmitMsg interface, but it avoids an extra copy of -** the message from the user's memory buffer to the software bus -** internal buffer. The "zero copy" interface can be used to improve -** performance in high-rate, high-volume software bus traffic. -** -** \par Assumptions, External Events, and Notes: -** -# The pointer returned by #CFE_SB_ZeroCopyGetPtr is only good for -** one call to #CFE_SB_TransmitBuffer. -** -# Callers must not use the same SB message buffer for multiple sends. -** -# Applications should be written as if #CFE_SB_ZeroCopyGetPtr is -** equivalent to a \c malloc() and #CFE_SB_TransmitBuffer is equivalent -** to a \c free(). -** -# Applications must not de-reference the message pointer (for reading -** or writing) after the call to #CFE_SB_TransmitBuffer. -** -# This function tracks and increments the source sequence counter -** of a telemetry message. -** -** \param[in] BufPtr A pointer to the SB buffer to be sent. -** -** \param[in] BufferHandle The handle supplied with the #CFE_SB_ZeroCopyGetPtr call. -** -** \return Execution status, see \ref CFEReturnCodes -** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS -** \retval #CFE_SB_BAD_ARGUMENT \copybrief CFE_SB_BAD_ARGUMENT -** \retval #CFE_SB_MSG_TOO_BIG \copybrief CFE_SB_MSG_TOO_BIG -** \retval #CFE_SB_BUF_ALOC_ERR \copybrief CFE_SB_BUF_ALOC_ERR -** \retval #CFE_SB_BUFFER_INVALID \copybrief CFE_SB_BUFFER_INVALID -**/ -CFE_Status_t CFE_SB_ZeroCopySend(CFE_SB_Buffer_t *BufPtr, CFE_SB_ZeroCopyHandle_t BufferHandle); - -/*****************************************************************************/ -/** -** \brief DEPRECATED: Pass an SB message in "zero copy" mode. -** \deprecated use CFE_SB_TransmitBuffer -** -** \par Description -** This routine sends a message that has been created directly in an -** internal SB message buffer by an application (after a call to -** #CFE_SB_ZeroCopyGetPtr). This interface is more complicated than -** the normal #CFE_SB_TransmitMsg interface, but it avoids an extra copy of -** the message from the user's memory buffer to the software bus -** internal buffer. The "zero copy" interface can be used to improve -** performance in high-rate, high-volume software bus traffic. This -** version is intended to pass messages not generated by the caller -** (to preserve the source sequence count). -** -** \par Assumptions, External Events, and Notes: -** -# The pointer returned by #CFE_SB_ZeroCopyGetPtr is only good for -** one call to #CFE_SB_TransmitBuffer or #CFE_SB_ZeroCopyPass. -** -# Callers must not use the same SB message buffer for multiple sends. -** -# Applications should be written as if #CFE_SB_ZeroCopyGetPtr is -** equivalent to a \c malloc() and #CFE_SB_ZeroCopyPass is equivalent -** to a \c free(). -** -# Applications must not de-reference the message pointer (for reading -** or writing) after the call to #CFE_SB_ZeroCopyPass. -** -# This routine will not modify the sequence counter in a telemetry -** message -** -** \param[in] BufPtr A pointer to the SB buffer to be sent. -** -** \param[in] BufferHandle The handle supplied with the #CFE_SB_ZeroCopyGetPtr call. -** -** \return Execution status, see \ref CFEReturnCodes -** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS -** \retval #CFE_SB_BAD_ARGUMENT \copybrief CFE_SB_BAD_ARGUMENT -** \retval #CFE_SB_MSG_TOO_BIG \copybrief CFE_SB_MSG_TOO_BIG -** \retval #CFE_SB_BUF_ALOC_ERR \copybrief CFE_SB_BUF_ALOC_ERR -** \retval #CFE_SB_BUFFER_INVALID \copybrief CFE_SB_BUFFER_INVALID -**/ -CFE_Status_t CFE_SB_ZeroCopyPass(CFE_SB_Buffer_t *BufPtr, CFE_SB_ZeroCopyHandle_t BufferHandle); /**@}*/ -#endif /** @defgroup CFEAPISBSetMessage cFE Setting Message Characteristics APIs * @{ */ -#ifndef CFE_OMIT_DEPRECATED_6_8 - -/*****************************************************************************/ -/** -** \brief DEPRECATED - Initialize a buffer for a software bus message. -** \deprecated Use CFE_MSG_Init -** -** \par Description -** This routine fills in the header information needed to create a -** valid software bus message. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param[in] MsgPtr A pointer to the buffer that will contain the message. -** This will point to the first byte of the message header. -** The \c void* data type allows the calling routine to use -** any data type when declaring its message buffer. -** -** \param[in] MsgId The message ID to put in the message header. -** -** \param[in] Length The total number of bytes of message data, including the SB -** message header . -** -** \param[in] Clear A flag indicating whether to clear the rest of the message: -** \arg true - fill sequence count and packet data with zeroes. -** \arg false - leave sequence count and packet data unchanged. -**/ -void CFE_SB_InitMsg(void *MsgPtr, CFE_SB_MsgId_t MsgId, size_t Length, bool Clear); - -/*****************************************************************************/ -/** -** \brief DEPRECATED - Sets the message ID of a software bus message. -** \deprecated Use CFE_MSG_SetMsgId -** -** \par Description -** This routine sets the Message ID in a software bus message header. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -** -** \param[in] MsgId The message ID to put into the message header. -**/ -void CFE_SB_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId); -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /*****************************************************************************/ /** ** \brief Sets the length of user data in a software bus message. @@ -808,61 +602,6 @@ void CFE_SB_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId); **/ void CFE_SB_SetUserDataLength(CFE_MSG_Message_t *MsgPtr, size_t DataLength); -#ifndef CFE_OMIT_DEPRECATED_6_8 -/*****************************************************************************/ -/** -** \brief DEPRECATED: Sets the total length of a software bus message. -** \deprecated Use CFE_MSG_SetSize -** -** \par Description -** This routine sets the field in the SB message header that determines -** the total length of the message. SB message header formats can be -** different for each deployment of the cFE. So, applications should -** use this function rather than trying to poke a length value directly -** into their SB message buffers. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -** -** \param[in] TotalLength The length to set (total size of the message, in bytes, -** including headers). -**/ -void CFE_SB_SetTotalMsgLength(CFE_MSG_Message_t *MsgPtr, size_t TotalLength); - -/*****************************************************************************/ -/** -** \brief Sets the time field in a software bus message. -** \deprecated Use CFE_MSG_SetMsgTime -** -** \par Description -** This routine sets the time of a software bus message. Most applications -** will want to use #CFE_SB_TimeStampMsg instead of this function. But, -** when needed, this API can be used to send a group of SB messages -** with identical time stamps. -** -** \par Assumptions, External Events, and Notes: -** - If the underlying implementation of software bus messages does not include -** a time field, then this routine will do nothing to the message contents -** and will return #CFE_SB_WRONG_MSG_TYPE. -** - Note default implementation of command messages do not have a time field -** and will trigger the #CFE_SB_WRONG_MSG_TYPE error -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -** -** \param[in] Time The time to include in the message. This will usually be a time -** returned by the function #CFE_TIME_GetTime. -** -** \return Execution status, see \ref CFEReturnCodes -** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS -** \retval #CFE_SB_WRONG_MSG_TYPE \copybrief CFE_SB_WRONG_MSG_TYPE -**/ -CFE_Status_t CFE_SB_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t Time); -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /*****************************************************************************/ /** ** \brief Sets the time field in a software bus message with the current spacecraft time. @@ -881,33 +620,6 @@ CFE_Status_t CFE_SB_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t Tim **/ void CFE_SB_TimeStampMsg(CFE_MSG_Message_t *MsgPtr); -#ifndef CFE_OMIT_DEPRECATED_6_8 -/*****************************************************************************/ -/** -** \brief DEPRECATED:Sets the command code field in a software bus message. -** \deprecated Use CFE_MSG_SetFcnCode -** -** \par Description -** This routine sets the command code of a software bus message (if SB -** messages are implemented as CCSDS packets, this will be the function code). -** -** \par Assumptions, External Events, and Notes: -** - If the underlying implementation of software bus messages does not -** include a command code field, then this routine will do nothing to -** the message contents and will return #CFE_SB_WRONG_MSG_TYPE. -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -** -** \param[in] CmdCode The command code to include in the message. -** -** \return Execution status, see \ref CFEReturnCodes -** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS -** \retval #CFE_SB_WRONG_MSG_TYPE \copybrief CFE_SB_WRONG_MSG_TYPE -**/ -CFE_Status_t CFE_SB_SetCmdCode(CFE_MSG_Message_t *MsgPtr, uint16 CmdCode); -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /******************************************************************************/ /** ** \brief Copies a string into a software bus message @@ -967,26 +679,6 @@ int32 CFE_SB_MessageStringSet(char *DestStringPtr, const char *SourceStringPtr, **/ void *CFE_SB_GetUserData(CFE_MSG_Message_t *MsgPtr); -#ifndef CFE_OMIT_DEPRECATED_6_8 - -/*****************************************************************************/ -/** -** \brief DEPRECATED:Get the message ID of a software bus message. -** \deprecated Use CFE_MSG_GetMsgId -** -** \par Description -** This routine returns the message ID from a software bus message. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** -** \return The software bus Message ID from the message header. -**/ -CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_MSG_Message_t *MsgPtr); -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /*****************************************************************************/ /** ** \brief Gets the length of user data in a software bus message. @@ -1004,71 +696,6 @@ CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_MSG_Message_t *MsgPtr); **/ size_t CFE_SB_GetUserDataLength(const CFE_MSG_Message_t *MsgPtr); -#ifndef CFE_OMIT_DEPRECATED_6_8 - -/*****************************************************************************/ -/** -** \brief DEPRECATED: Gets the total length of a software bus message. -** \deprecated Use CFE_MSG_GetSize -** -** \par Description -** This routine returns the total size of the software bus message. -** -** \par Assumptions, External Events, and Notes: -** - For the CCSDS implementation of this API, the size is derived from -** the message header. -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -** -** \return The total size (in bytes) of the software bus message, including headers. -**/ -size_t CFE_SB_GetTotalMsgLength(const CFE_MSG_Message_t *MsgPtr); - -/*****************************************************************************/ -/** -** \brief DEPRECATED: Gets the command code field from a software bus message. -** \deprecated Use CFE_MSG_GetFcnCode -** -** \par Description -** This routine gets the command code from a software bus message (if -** SB messages are implemented as CCSDS packets, this will be the function -** code). -** -** \par Assumptions, External Events, and Notes: -** - If the underlying implementation of software bus messages does not -** include a command code field, then this routine will return a zero. -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -** -** \return The command code included in the software bus message header (if present). -** Otherwise, returns a command code value of zero. -**/ -uint16 CFE_SB_GetCmdCode(CFE_MSG_Message_t *MsgPtr); - -/*****************************************************************************/ -/** -** \brief DEPRECATED: Gets the time field from a software bus message. -** \deprecated Use CFE_MSG_GetMsgTime -** -** \par Description -** This routine gets the time from a software bus message. -** -** \par Assumptions, External Events, and Notes: -** - If the underlying implementation of software bus messages does not -** include a time field, then this routine will return a zero time. -** - Note default implementation of command messages do not have a time field. -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -** -** \return The system time included in the software bus message header (if present), -** otherwise, returns a time value of zero. -**/ -CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_MSG_Message_t *MsgPtr); -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /******************************************************************************/ /** ** \brief Copies a string out of a software bus message @@ -1112,84 +739,6 @@ int32 CFE_SB_MessageStringGet(char *DestStringPtr, const char *SourceStringPtr, size_t DestMaxSize, size_t SourceMaxSize); /**@}*/ -#ifndef CFE_OMIT_DEPRECATED_6_8 -/** @defgroup CFEAPISBChecksum cFE Checksum Control APIs - * @{ - */ - -/*****************************************************************************/ -/** -** \brief DEPRECATED:Gets the checksum field from a software bus message. -** \deprecated No use case -** -** \par Description -** This routine gets the checksum (or other message integrity check -** value) from a software bus message. The contents and location of -** this field will depend on the underlying implementation of software -** bus messages. It may be a checksum, a CRC, or some other algorithm. -** Users should not call this function as part of a message integrity -** check (call #CFE_SB_ValidateChecksum instead). -** -** \par Assumptions, External Events, and Notes: -** - If the underlying implementation of software bus messages does not -** include a checksum field, then this routine will return a zero. -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -** -** \return The checksum included in the software bus message header (if present), otherwise, -** returns a checksum value of zero. -**/ -uint16 CFE_SB_GetChecksum(CFE_MSG_Message_t *MsgPtr); - -/*****************************************************************************/ -/** -** \brief DEPRECATED:Calculates and sets the checksum of a software bus message -** \deprecated Use CFE_MSG_GenerateChecksum -** -** \par Description -** This routine calculates the checksum of a software bus message according -** to an implementation-defined algorithm. Then, it sets the checksum field -** in the message with the calculated value. The contents and location of -** this field will depend on the underlying implementation of software bus -** messages. It may be a checksum, a CRC, or some other algorithm. -** -** \par Assumptions, External Events, and Notes: -** - If the underlying implementation of software bus messages does not -** include a checksum field, then this routine will do nothing. -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -**/ -void CFE_SB_GenerateChecksum(CFE_MSG_Message_t *MsgPtr); - -/*****************************************************************************/ -/** -** \brief DEPRECATED:Validates the checksum of a software bus message. -** \deprecated Use CFE_MSG_ValidateChecksum -** -** \par Description -** This routine calculates the expected checksum of a software bus message -** according to an implementation-defined algorithm. Then, it checks the -** calculated value against the value in the message's checksum. If the -** checksums do not match, this routine will generate an event message -** reporting the error. -** -** \par Assumptions, External Events, and Notes: -** - If the underlying implementation of software bus messages does not -** include a checksum field this routine will always return false. -** -** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. -** This must point to the first byte of the message header. -** -** \return Boolean checksum result -** \retval true The checksum field in the packet is valid. -** \retval false The checksum field in the packet is not valid or the message type is wrong. -**/ -bool CFE_SB_ValidateChecksum(CFE_MSG_Message_t *MsgPtr); -/**@}*/ -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /** @defgroup CFEAPISBMessageID cFE Message ID APIs * @{ */ @@ -1290,23 +839,6 @@ static inline CFE_SB_MsgId_t CFE_SB_ValueToMsgId(CFE_SB_MsgId_Atom_t MsgIdValue) CFE_SB_MsgId_t Result = CFE_SB_MSGID_WRAP_VALUE(MsgIdValue); return Result; } - -#ifndef CFE_OMIT_DEPRECATED_6_8 -/*****************************************************************************/ -/** - * \brief Identifies packet type given message ID - - * - * Provides the packet type associated with the given message ID - * - * \return Packet type - * \retval #CFE_MSG_Type_Cmd Command packet type - * \retval #CFE_MSG_Type_Tlm Telemetry packet type - * \retval #CFE_MSG_Type_Invalid Invalid/unknown packet type - */ -uint32 CFE_SB_GetPktType(CFE_SB_MsgId_t MsgId); -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /**@}*/ #endif /* CFE_SB_API_H */ diff --git a/modules/core_api/fsw/inc/cfe_sb_api_typedefs.h b/modules/core_api/fsw/inc/cfe_sb_api_typedefs.h index 3aca7caaf..bd914c6a9 100644 --- a/modules/core_api/fsw/inc/cfe_sb_api_typedefs.h +++ b/modules/core_api/fsw/inc/cfe_sb_api_typedefs.h @@ -98,18 +98,6 @@ */ #define CFE_SB_INVALID_MSG_ID CFE_SB_MSGID_RESERVED -#ifndef CFE_OMIT_DEPRECATED_6_8 -/** - * \defgroup CFESBPktTypeDefs cFE SB Packet Type Defines - * \{ - */ -#define CFE_SB_PKTTYPE_INVALID \ - CFE_MSG_Type_Invalid /**< \brief #CFE_SB_GetPktType response if message type can not be determined */ -#define CFE_SB_PKTTYPE_CMD CFE_MSG_Type_Cmd /**< \brief #CFE_SB_GetPktType response for command packets */ -#define CFE_SB_PKTTYPE_TLM CFE_MSG_Type_Tlm /**< \brief #CFE_SB_GetPktType response for telemetry packets */ -/** \} */ -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /** * \brief Cast/Convert a generic CFE_ResourceId_t to a CFE_SB_PipeId_t */ @@ -142,28 +130,6 @@ typedef union CFE_SB_Msg long double LongDouble; /**< \brief Align to support Long Double */ } CFE_SB_Buffer_t; -#ifndef CFE_OMIT_DEPRECATED_6_8 - -/** \brief Deperecated type to minimize required changes */ -typedef CFE_SB_Buffer_t CFE_SB_Msg_t; - -/** \brief Deperecated type to minimize required changes */ -typedef CFE_MSG_CommandHeader_t CFE_SB_CmdHdr_t; - -/** \brief Deperecated type to minimize required changes */ -typedef CFE_MSG_TelemetryHeader_t CFE_SB_TlmHdr_t; - -#define CFE_SB_CMD_HDR_SIZE (sizeof(CFE_MSG_CommandHeader_t)) /**< \brief Size of command header */ -#define CFE_SB_TLM_HDR_SIZE (sizeof(CFE_MSG_TelemetryHeader_t)) /**< \brief Size of telemetry header */ - -/** \brief Pointer to an SB Message */ -typedef CFE_MSG_Message_t *CFE_SB_MsgPtr_t; - -/** \brief CFE_SB_MsgPayloadPtr_t defined as an opaque pointer to a message Payload portion */ -typedef uint8 *CFE_SB_MsgPayloadPtr_t; - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /** \brief CFE_SB_ZeroCopyHandle_t to primitive type definition ** ** Software Zero Copy handle used in many SB APIs @@ -173,14 +139,5 @@ typedef struct struct CFE_SB_BufferD *BufDscPtr; /* abstract descriptor reference (internal use) */ } CFE_SB_ZeroCopyHandle_t; -#ifndef CFE_OMIT_DEPRECATED_6_8 - -#define CFE_SB_Default_Qos CFE_SB_DEFAULT_QOS /**< \deprecated use CFE_SB_DEFAULT_QOS */ - -#define CFE_SB_CMD_HDR_SIZE (sizeof(CFE_MSG_CommandHeader_t)) /**< \brief Size of command header */ -#define CFE_SB_TLM_HDR_SIZE (sizeof(CFE_MSG_TelemetryHeader_t)) /**< \brief Size of telemetry header */ - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - #endif /* CFE_SB_API_TYPEDEFS_H */ /*****************************************************************************/ diff --git a/modules/core_api/ut-stubs/src/ut_sb_stubs.c b/modules/core_api/ut-stubs/src/ut_sb_stubs.c index 296c18ed6..b5438734a 100644 --- a/modules/core_api/ut-stubs/src/ut_sb_stubs.c +++ b/modules/core_api/ut-stubs/src/ut_sb_stubs.c @@ -287,146 +287,6 @@ int32 CFE_SB_GetPipeIdByName(CFE_SB_PipeId_t *PipeIdPtr, const char *PipeName) return status; } -#ifndef CFE_OMIT_DEPRECATED_6_8 -/*****************************************************************************/ -/** -** \brief CFE_SB_GetCmdCode stub function -** -** \par Description -** This function is used to mimic the response of the cFE SB function -** CFE_SB_GetCmdCode. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** Returns either the function code from command secondary header or 0. -** -******************************************************************************/ -uint16 CFE_SB_GetCmdCode(CFE_MSG_Message_t *MsgPtr) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetCmdCode), MsgPtr); - - int32 status; - uint16 cmdcode = 0; - - status = UT_DEFAULT_IMPL(CFE_SB_GetCmdCode); - - if (status != 0) - { - cmdcode = status; - } - else - { - cmdcode = CFE_SB_StubMsg_GetMetaData(MsgPtr)->CommandCode; - } - - return cmdcode; -} - -/*****************************************************************************/ -/** -** \brief CFE_SB_GetMsgId stub function -** -** \par Description -** This function is used to mimic the response of the cFE SB function -** CFE_SB_GetMsgId. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** Returns the entire stream ID from the primary header. -** -******************************************************************************/ -CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_MSG_Message_t *MsgPtr) -{ - UT_Stub_RegisterContext(UT_KEY(CFE_SB_GetMsgId), MsgPtr); - - CFE_SB_MsgId_t Result; - - UT_DEFAULT_IMPL(CFE_SB_GetMsgId); - - if (UT_Stub_CopyToLocal(UT_KEY(CFE_SB_GetMsgId), &Result, sizeof(Result)) < sizeof(Result)) - { - Result = CFE_SB_StubMsg_GetMetaData(MsgPtr)->MsgId; - } - - return Result; -} - -/*****************************************************************************/ -/** -** \brief DEPRECATED - CFE_SB_InitMsg stub function -** \deprecated -** -** \par Description -** This function is used to mimic the response of the cFE SB function -** CFE_SB_InitMsg. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** This function does not return a value. -** -******************************************************************************/ -void CFE_SB_InitMsg(void *MsgPtr, CFE_SB_MsgId_t MsgId, size_t Length, bool Clear) -{ - UT_Stub_RegisterContext(UT_KEY(CFE_SB_InitMsg), MsgPtr); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_InitMsg), MsgId); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_InitMsg), Length); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_InitMsg), Clear); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_InitMsg); - - if (status >= 0) - { - CFE_SB_StubMsg_GetMetaData(MsgPtr)->MsgId = MsgId; - CFE_SB_StubMsg_GetMetaData(MsgPtr)->TotalLength = Length; - - UT_Stub_CopyToLocal(UT_KEY(CFE_SB_InitMsg), (uint8 *)MsgPtr, Length); - } -} - -/*****************************************************************************/ -/** -** \brief CFE_SB_RcvMsg stub function -** -** \par Description -** This function is used to mimic the response of the cFE SB function -** CFE_SB_RcvMsg. By default it will return the TIMEOUT error response, -** unless the test setup sequence has indicated otherwise. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** Returns CFE_SUCCESS or overridden unit test value -** -******************************************************************************/ -int32 CFE_SB_RcvMsg(CFE_SB_Buffer_t **BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut) -{ - UT_Stub_RegisterContext(UT_KEY(CFE_SB_RcvMsg), BufPtr); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_RcvMsg), PipeId); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_RcvMsg), TimeOut); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_RcvMsg); - - if (status >= 0) - { - UT_Stub_CopyToLocal(UT_KEY(CFE_SB_RcvMsg), (uint8 *)BufPtr, sizeof(*BufPtr)); - } - - return status; -} - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /*****************************************************************************/ /** ** \brief CFE_SB_ReceiveBuffer stub function @@ -529,149 +389,6 @@ int32 CFE_SB_TransmitBuffer(CFE_SB_Buffer_t *BufPtr, CFE_SB_ZeroCopyHandle_t Zer return status; } -#ifndef CFE_OMIT_DEPRECATED_6_8 -/*****************************************************************************/ -/** -** \brief CFE_SB_SendMsg stub function -** -** \par Description -** This function is used to mimic the response of the cFE SB function -** CFE_SB_SendMsg. The user can adjust the response by setting -** the values in the SBSendMsgRtn structure prior to this function -** being called. If the value SBSendMsgRtn.count is greater than -** zero then the counter is decremented; if it then equals zero the -** return value is set to the user-defined value SBSendMsgRtn.value. -** CFE_SUCCESS is returned otherwise. Only EVS and TIME messages are -** handled directly by this function; other messages are passed to the -** unit test function, UT_ProcessSBMsg, for any further action. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** Returns either a user-defined status flag or CFE_SUCCESS. -** -******************************************************************************/ -/* Only doing subset of total messages; -** NOTE: Currently does EVS, TIME -*/ -int32 CFE_SB_SendMsg(CFE_MSG_Message_t *MsgPtr) -{ - UT_Stub_RegisterContext(UT_KEY(CFE_SB_SendMsg), MsgPtr); - - int32 status = CFE_SUCCESS; - - /* - * Create a context entry so a hook function - * could do something useful with the message - */ - - status = UT_DEFAULT_IMPL(CFE_SB_SendMsg); - - if (status >= 0) - { - UT_Stub_CopyFromLocal(UT_KEY(CFE_SB_SendMsg), &MsgPtr, sizeof(MsgPtr)); - } - - return status; -} - -/*****************************************************************************/ -/** -** \brief CFE_SB_SetCmdCode stub function -** -** \par Description -** This function is used to mimic the response of the cFE SB function -** CFE_SB_SetCmdCode. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** Returns either CFE_SB_WRONG_MSG_TYPE or CFE_SUCCESS. -** -******************************************************************************/ -int32 CFE_SB_SetCmdCode(CFE_MSG_Message_t *MsgPtr, uint16 CmdCode) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetCmdCode), MsgPtr); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetCmdCode), CmdCode); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_SetCmdCode); - - if (status == 0) - { - CFE_SB_StubMsg_GetMetaData(MsgPtr)->CommandCode = CmdCode; - } - - return status; -} - -/*****************************************************************************/ -/** -** \brief CFE_SB_SetMsgId stub function -** -** \par Description -** This function is used to mimic the response of the cFE SB function -** CFE_SB_SetMsgId. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** This function does not return a value. -** -******************************************************************************/ -void CFE_SB_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetMsgId), MsgPtr); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetMsgId), MsgId); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_SetMsgId); - - if (status == 0) - { - UT_Stub_CopyFromLocal(UT_KEY(CFE_SB_SetMsgId), &MsgId, sizeof(MsgId)); - CFE_SB_StubMsg_GetMetaData(MsgPtr)->MsgId = MsgId; - } -} - -/*****************************************************************************/ -/** -** \brief CFE_SB_SetMsgTime stub function -** -** \par Description -** This function is used to mimic the response of the cFE SB function -** CFE_SB_SetMsgTime. It always returns CFE_SUCCESS. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** Returns CFE_SUCCESS. -** -******************************************************************************/ -int32 CFE_SB_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t Time) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetMsgTime), MsgPtr); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetMsgTime), Time); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_SetMsgTime); - - if (status == 0) - { - CFE_SB_StubMsg_GetMetaData(MsgPtr)->TimeStamp = Time; - } - - return status; -} -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /*****************************************************************************/ /** ** \brief CFE_SB_SubscribeEx stub function @@ -794,44 +511,6 @@ void CFE_SB_TimeStampMsg(CFE_MSG_Message_t *MsgPtr) UT_Stub_CopyFromLocal(UT_KEY(CFE_SB_TimeStampMsg), &MsgPtr, sizeof(MsgPtr)); } -#ifndef CFE_OMIT_DEPRECATED_6_8 -/*****************************************************************************/ -/** -** \brief CFE_SB_GetTotalMsgLength stub function -** -** \par Description -** This function is used as a placeholder for the cFE SB function -** CFE_SB_GetTotalMsgLength. It returns the user-defined value, -** UT_SB_TotalMsgLen. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** Returns a user-defined status value, UT_SB_TotalMsgLen. -** -******************************************************************************/ -size_t CFE_SB_GetTotalMsgLength(const CFE_MSG_Message_t *MsgPtr) -{ - UT_Stub_RegisterContext(UT_KEY(CFE_SB_GetTotalMsgLength), MsgPtr); - - int32 status; - uint16 result; - - status = UT_DEFAULT_IMPL_RC(CFE_SB_GetTotalMsgLength, -1); - - if (status >= 0) - { - result = status; - } - else - { - result = CFE_SB_StubMsg_GetMetaData(MsgPtr)->TotalLength; - } - return result; -} -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /*****************************************************************************/ /** ** \brief CFE_SB_CleanUpApp stub function @@ -958,50 +637,6 @@ int32 CFE_SB_Unsubscribe(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) return status; } -#ifndef CFE_OMIT_DEPRECATED_6_8 -/****************************************************************************** -** Function: CFE_SB_GetMsgTime() -** -** Purpose: -** Get the time field from a message. -** -** Arguments: -** MsgPtr - Pointer to a CFE_MSG_Message_t -** -** Return: -** Time field from message or -** Time value of zero for msgs that do not have a Time field in header -*/ -CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_MSG_Message_t *MsgPtr) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetMsgTime), MsgPtr); - - CFE_TIME_SysTime_t TimeFromMsg; - - UT_DEFAULT_IMPL(CFE_SB_GetMsgTime); - - if (UT_Stub_CopyToLocal(UT_KEY(CFE_SB_GetMsgTime), &TimeFromMsg, sizeof(CFE_TIME_SysTime_t)) != - sizeof(CFE_TIME_SysTime_t)) - { - TimeFromMsg = CFE_SB_StubMsg_GetMetaData(MsgPtr)->TimeStamp; - } - - return TimeFromMsg; - -} /* end CFE_SB_GetMsgTime */ - -bool CFE_SB_ValidateChecksum(CFE_MSG_Message_t *MsgPtr) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_ValidateChecksum), MsgPtr); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_ValidateChecksum); - - return (bool)status; -} -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - void *CFE_SB_GetUserData(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetUserData), MsgPtr); @@ -1030,53 +665,6 @@ void *CFE_SB_GetUserData(CFE_MSG_Message_t *MsgPtr) return Result; } -#ifndef CFE_OMIT_DEPRECATED_6_8 -void CFE_SB_SetTotalMsgLength(CFE_MSG_Message_t *MsgPtr, size_t TotalLength) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetTotalMsgLength), MsgPtr); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetTotalMsgLength), TotalLength); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_SetTotalMsgLength); - - if (status == 0) - { - UT_Stub_CopyFromLocal(UT_KEY(CFE_SB_SetTotalMsgLength), &TotalLength, sizeof(TotalLength)); - CFE_SB_StubMsg_GetMetaData(MsgPtr)->TotalLength = TotalLength; - } -} - -uint32 CFE_SB_GetPktType(CFE_SB_MsgId_t MsgId) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetPktType), MsgId); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_GetPktType); - - return status; -} - -void CFE_SB_GenerateChecksum(CFE_MSG_Message_t *MsgPtr) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GenerateChecksum), MsgPtr); - - UT_DEFAULT_IMPL(CFE_SB_GenerateChecksum); -} - -uint16 CFE_SB_GetChecksum(CFE_MSG_Message_t *MsgPtr) -{ - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetChecksum), MsgPtr); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_GetChecksum); - - return status; -} -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - int32 CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetPipeOpts), PipeId); @@ -1177,20 +765,6 @@ CFE_SB_Buffer_t *CFE_SB_ZeroCopyGetPtr(size_t MsgSize, CFE_SB_ZeroCopyHandle_t * return SBBufPtr; } -#ifndef CFE_OMIT_DEPRECATED_6_8 -int32 CFE_SB_ZeroCopyPass(CFE_SB_Buffer_t *BufPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) -{ - UT_Stub_RegisterContext(UT_KEY(CFE_SB_ZeroCopyPass), BufPtr); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_ZeroCopyPass), BufferHandle); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_ZeroCopyPass); - - return status; -} -#endif - int32 CFE_SB_ZeroCopyReleasePtr(CFE_SB_Buffer_t *Ptr2Release, CFE_SB_ZeroCopyHandle_t BufferHandle) { UT_Stub_RegisterContext(UT_KEY(CFE_SB_ZeroCopyReleasePtr), Ptr2Release); @@ -1202,17 +776,3 @@ int32 CFE_SB_ZeroCopyReleasePtr(CFE_SB_Buffer_t *Ptr2Release, CFE_SB_ZeroCopyHan return status; } - -#ifndef CFE_OMIT_DEPRECATED_6_8 -int32 CFE_SB_ZeroCopySend(CFE_SB_Buffer_t *BufPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) -{ - UT_Stub_RegisterContext(UT_KEY(CFE_SB_ZeroCopySend), BufPtr); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_ZeroCopySend), BufferHandle); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_ZeroCopySend); - - return status; -} -#endif diff --git a/modules/sb/fsw/src/cfe_sb_api.c b/modules/sb/fsw/src/cfe_sb_api.c index f96ba031d..8e5c233d8 100644 --- a/modules/sb/fsw/src/cfe_sb_api.c +++ b/modules/sb/fsw/src/cfe_sb_api.c @@ -1441,34 +1441,6 @@ int32 CFE_SB_TransmitMsg(CFE_MSG_Message_t *MsgPtr, bool IncrementSequenceCount) return Status; } -#ifndef CFE_OMIT_DEPRECATED_6_8 -/* - * Function: CFE_SB_SendMsg - See API and header file for details - */ -int32 CFE_SB_SendMsg(CFE_MSG_Message_t *MsgPtr) -{ - int32 Status = 0; - - Status = CFE_SB_TransmitMsg(MsgPtr, true); - - return Status; - -} /* end CFE_SB_SendMsg */ - -/* - * Function: CFE_SB_PassMsg - See API and header file for details - */ -int32 CFE_SB_PassMsg(CFE_MSG_Message_t *MsgPtr) -{ - int32 Status = 0; - - Status = CFE_SB_TransmitMsg(MsgPtr, false); - - return Status; - -} /* end CFE_SB_PassMsg */ -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /*****************************************************************************/ /** * \brief Internal routine to validate a transmit message before sending @@ -1812,13 +1784,6 @@ void CFE_SB_BroadcastBufferToRoute(CFE_SB_BufferD_t *BufDscPtr, CFE_SBR_RouteId_ } } -#ifndef CFE_OMIT_DEPRECATED_6_8 -int32 CFE_SB_RcvMsg(CFE_SB_Buffer_t **BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut) -{ - return CFE_SB_ReceiveBuffer(BufPtr, PipeId, TimeOut); -} -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /* * Function: CFE_SB_ReceiveBuffer - See API and header file for details */ @@ -2244,31 +2209,3 @@ int32 CFE_SB_TransmitBuffer(CFE_SB_Buffer_t *BufPtr, CFE_SB_ZeroCopyHandle_t Zer return Status; } - -#ifndef CFE_OMIT_DEPRECATED_6_8 -/* - * Function: CFE_SB_ZeroCopySend - See API and header file for details - */ -int32 CFE_SB_ZeroCopySend(CFE_SB_Buffer_t *BufPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) -{ - int32 Status = 0; - - Status = CFE_SB_TransmitBuffer(BufPtr, BufferHandle, true); - - return Status; - -} /* end CFE_SB_ZeroCopySend */ - -/* - * Function: CFE_SB_ZeroCopyPass - See API and header file for details - */ -int32 CFE_SB_ZeroCopyPass(CFE_SB_Buffer_t *BufPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) -{ - int32 Status = 0; - - Status = CFE_SB_TransmitBuffer(BufPtr, BufferHandle, false); - - return Status; - -} /* end CFE_SB_ZeroCopyPass */ -#endif diff --git a/modules/sb/fsw/src/cfe_sb_msg_id_util.c b/modules/sb/fsw/src/cfe_sb_msg_id_util.c index 74efc5d30..9924a7a04 100644 --- a/modules/sb/fsw/src/cfe_sb_msg_id_util.c +++ b/modules/sb/fsw/src/cfe_sb_msg_id_util.c @@ -28,48 +28,6 @@ */ #include "cfe_sb_module_all.h" -#ifndef CFE_OMIT_DEPRECATED_6_8 -/* - * Function: CFE_SB_GetMsgId - See API and header file for details - */ -CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_MSG_Message_t *MsgPtr) -{ - CFE_SB_MsgId_t MsgId; - - /* Ignore return since no alternative action */ - CFE_MSG_GetMsgId(MsgPtr, &MsgId); - - return MsgId; - -} /* end CFE_SB_GetMsgId */ - -/* - * Function: CFE_SB_SetMsgId - See API and header file for details - */ -void CFE_SB_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) -{ - - /* Ignore return, no alternate action */ - CFE_MSG_SetMsgId(MsgPtr, MsgId); - -} /* end CFE_SB_SetMsgId */ - -/* - * Function: CFE_SB_GetPktType - See API and header file for details - */ -uint32 CFE_SB_GetPktType(CFE_SB_MsgId_t MsgId) -{ - - CFE_MSG_Type_t type; - - /* Ignores return, no alternate action */ - CFE_MSG_GetTypeFromMsgId(MsgId, &type); - - return type; - -} /* end CFE_SB_GetPktType */ -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /* * Function: CFE_SB_IsValidMsgId - See API and header file for details */ diff --git a/modules/sb/fsw/src/cfe_sb_priv.c b/modules/sb/fsw/src/cfe_sb_priv.c index 5c4e9a766..0df2d0fb3 100644 --- a/modules/sb/fsw/src/cfe_sb_priv.c +++ b/modules/sb/fsw/src/cfe_sb_priv.c @@ -219,29 +219,6 @@ CFE_SB_DestinationD_t *CFE_SB_GetDestPtr(CFE_SBR_RouteId_t RouteId, CFE_SB_PipeI return destptr; } -#ifndef CFE_OMIT_DEPRECATED_6_8 -/****************************************************************************** -** Function: CFE_SB_SetMsgSeqCnt() -** -** Purpose: -** SB internal function to set the sequence count of a message to a -** particular value. -** -** Arguments: -** MsgPtr : pointer to the message -** Count : sets the sequence count to this value -** -** Return: -** None -*/ -void CFE_SB_SetMsgSeqCnt(CFE_MSG_Message_t *MsgPtr, uint32 Count) -{ - - CFE_MSG_SetSequenceCount(MsgPtr, Count); - -} /* end CFE_SB_SetMsgSeqCnt */ -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /****************************************************************************** ** Function: CFE_SB_ValidateMsgId() ** diff --git a/modules/sb/fsw/src/cfe_sb_util.c b/modules/sb/fsw/src/cfe_sb_util.c index 20de113b3..b394e9ad8 100644 --- a/modules/sb/fsw/src/cfe_sb_util.c +++ b/modules/sb/fsw/src/cfe_sb_util.c @@ -37,18 +37,6 @@ #include -#ifndef CFE_OMIT_DEPRECATED_6_8 -/* - * Function: CFE_SB_InitMsg - See API and header file for details - */ -void CFE_SB_InitMsg(void *MsgPtr, CFE_SB_MsgId_t MsgId, size_t Length, bool Clear) -{ - - CFE_MSG_Init((CFE_MSG_Message_t *)MsgPtr, MsgId, Length); - -} /* end CFE_SB_InitMsg */ -#endif - /****************************************************************************** ** Function: CFE_SB_MsgHdrSize() ** @@ -161,55 +149,6 @@ void CFE_SB_SetUserDataLength(CFE_MSG_Message_t *MsgPtr, size_t DataLength) } } /* end CFE_SB_SetUserDataLength */ -#ifndef CFE_OMIT_DEPRECATED_6_8 -/* - * Function: CFE_SB_GetTotalMsgLength - See API and header file for details - */ -size_t CFE_SB_GetTotalMsgLength(const CFE_MSG_Message_t *MsgPtr) -{ - - CFE_MSG_Size_t size; - - CFE_MSG_GetSize(MsgPtr, &size); - - return size; - -} /* end CFE_SB_GetTotalMsgLength */ - -/* - * Function: CFE_SB_SetTotalMsgLength - See API and header file for details - */ -void CFE_SB_SetTotalMsgLength(CFE_MSG_Message_t *MsgPtr, size_t TotalLength) -{ - - CFE_MSG_SetSize(MsgPtr, TotalLength); - -} /* end CFE_SB_SetTotalMsgLength */ - -/* - * Function: CFE_SB_GetMsgTime - See API and header file for details - */ -CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_MSG_Message_t *MsgPtr) -{ - CFE_TIME_SysTime_t TimeFromMsg = {0}; - - CFE_MSG_GetMsgTime(MsgPtr, &TimeFromMsg); - - return TimeFromMsg; - -} /* end CFE_SB_GetMsgTime */ - -/* - * Function: CFE_SB_SetMsgTime - See API and header file for details - */ -int32 CFE_SB_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t NewTime) -{ - - return CFE_MSG_SetMsgTime(MsgPtr, NewTime); - -} /* end CFE_SB_SetMsgTime */ -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /* * Function: CFE_SB_TimeStampMsg - See API and header file for details */ @@ -219,78 +158,6 @@ void CFE_SB_TimeStampMsg(CFE_MSG_Message_t *MsgPtr) } /* end CFE_SB_TimeStampMsg */ -#ifndef CFE_OMIT_DEPRECATED_6_8 -/* - * Function: CFE_SB_GetCmdCode - See API and header file for details - */ -uint16 CFE_SB_GetCmdCode(CFE_MSG_Message_t *MsgPtr) -{ - - CFE_MSG_FcnCode_t fc; - - CFE_MSG_GetFcnCode(MsgPtr, &fc); - - return fc; - -} /* end CFE_SB_GetCmdCode */ - -/* - * Function: CFE_SB_SetCmdCode - See API and header file for details - */ -int32 CFE_SB_SetCmdCode(CFE_MSG_Message_t *MsgPtr, uint16 CmdCode) -{ - - return CFE_MSG_SetFcnCode(MsgPtr, CmdCode); - -} /* end CFE_SB_SetCmdCode */ - -/* - * Function: CFE_SB_GetChecksum - See API and header file for details - */ -uint16 CFE_SB_GetChecksum(CFE_MSG_Message_t *MsgPtr) -{ - - CFE_MSG_Type_t type = CFE_MSG_Type_Invalid; - bool hassechdr = false; - - CFE_MSG_GetHasSecondaryHeader(MsgPtr, &hassechdr); - CFE_MSG_GetType(MsgPtr, &type); - - /* if msg type is telemetry or there is no secondary hdr... */ - if ((type == CFE_MSG_Type_Tlm) || (!hassechdr)) - { - return 0; - } /* end if */ - - /* Byte access for now to avoid error if secondary doesn't contain checksum */ - return MsgPtr->Byte[sizeof(CCSDS_SpacePacket_t) + 1]; - -} /* end CFE_SB_GetChecksum */ - -/* - * Function: CFE_SB_GenerateChecksum - See API and header file for details - */ -void CFE_SB_GenerateChecksum(CFE_MSG_Message_t *MsgPtr) -{ - - CFE_MSG_GenerateChecksum(MsgPtr); - -} /* end CFE_SB_GenerateChecksum */ - -/* - * Function: CFE_SB_ValidateChecksum - See API and header file for details - */ -bool CFE_SB_ValidateChecksum(CFE_MSG_Message_t *MsgPtr) -{ - bool isvalid = false; - - CFE_MSG_ValidateChecksum(MsgPtr, &isvalid); - - return isvalid; - -} /* end CFE_SB_ValidateChecksum */ -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /* * Function: CFE_SB_MessageStringGet - See API and header file for details */