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

Integration Candidate 20200212 #511

Merged
merged 7 commits into from
Feb 18, 2020
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: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ This is a collection of services and associated framework to be located in the `

## Version Notes

- 6.7.7: DEVELOPMENT
- Adds a new function, CFE_SB_GetPipeIdByName, which retrieves the pipe ID given a name of a pipe.
- Improvement in error reporting when using a pipe name that is already in use, or when the queue limit has been reached.
- Added userguide and osalguide to the local target list to avoid makefile warning
- Minor other updates (see https://github.com/nasa/cFE/pull/511)
- 6.7.6: DEVELOPMENT
- Adds OMIT_DEPRECATED prep flag
- Adds and enforces strict warnings
Expand Down
8 changes: 7 additions & 1 deletion cmake/Makefile.sample
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
# doc -- Build all doxygen source documentation. The HTML documentation will be
# generated under the build tree specified by "O".
#
# usersguide -- Build all API/Cmd/Tlm doxygen documentation. The HTML documentation
# will be generated under the build tree specified by "O".
#
# osalguide -- Build OSAL API doxygen documentation. The HTML documentation will
# be generated under the build tree specified by "O".
#
# test -- Run all unit tests defined in the build. Unit tests will typically only
# be executable when building with the "SIMULATION=native" option. Otherwise
# it is up to the user to copy the executables to the target and run them.
Expand All @@ -70,7 +76,7 @@ endif

# The "LOCALTGTS" defines the top-level targets that are implemented in this makefile
# Any other target may also be given, in that case it will simply be passed through.
LOCALTGTS := doc prep all clean install distclean test lcov
LOCALTGTS := doc usersguide osalguide prep all clean install distclean test lcov
OTHERTGTS := $(filter-out $(LOCALTGTS),$(MAKECMDGOALS))

# As this makefile does not build any real files, treat everything as a PHONY target
Expand Down
52 changes: 48 additions & 4 deletions fsw/cfe-core/src/inc/cfe_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ typedef struct {
** \retcode #CFE_SB_PIPE_CR_ERR \retdesc \copydoc CFE_SB_PIPE_CR_ERR \endcode
** \endreturns
**
** \sa #CFE_SB_DeletePipe #CFE_SB_GetPipeOpts #CFE_SB_SetPipeOpts
** \sa #CFE_SB_DeletePipe #CFE_SB_GetPipeOpts #CFE_SB_SetPipeOpts #CFE_SB_GetPipeIdByName
**/
int32 CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr,
uint16 Depth,
Expand Down Expand Up @@ -225,7 +225,7 @@ int32 CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr,
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
** \endreturns
**
** \sa #CFE_SB_CreatePipe #CFE_SB_GetPipeOpts #CFE_SB_SetPipeOpts
** \sa #CFE_SB_CreatePipe #CFE_SB_GetPipeOpts #CFE_SB_SetPipeOpts #CFE_SB_GetPipeIdByName
**/
int32 CFE_SB_DeletePipe(CFE_SB_PipeId_t PipeId);

Expand All @@ -246,7 +246,7 @@ int32 CFE_SB_DeletePipe(CFE_SB_PipeId_t PipeId);
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
** \endreturns
**
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_GetPipeOpts #CFE_SB_PIPEOPTS_IGNOREMINE
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_GetPipeOpts #CFE_SB_GetPipeIdByName #CFE_SB_PIPEOPTS_IGNOREMINE
**/
int32 CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId,
uint8 Opts);
Expand All @@ -267,11 +267,55 @@ int32 CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId,
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
** \endreturns
**
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_SetPipeOpts #CFE_SB_PIPEOPTS_IGNOREMINE
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_SetPipeOpts #CFE_SB_GetPipeIdByName #CFE_SB_PIPEOPTS_IGNOREMINE
**/
int32 CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId,
uint8 *OptPtr);

/*****************************************************************************/
/**
** \brief Get the pipe name for a given id.
**
** \par Description
** This routine finds the pipe name for a pipe id.
**
** \param[out] PipeNameBuf The buffer to receive the pipe name.
**
** \param[in] PipeNameSize The size (in chars) of the PipeName buffer.
**
** \param[in] PipeId The PipeId for that name.
**
** \returns
** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
** \retcode #CFE_SB_INVALID_PIPE \retdesc \copydoc CFE_SB_INVALID_PIPE \endcode
** \endreturns
**
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_SetPipeOpts #CFE_SB_GetPipeIdByName
**/
int32 CFE_SB_GetPipeName(char *PipeNameBuf, size_t PipeNameSize, CFE_SB_PipeId_t PipeId);

/*****************************************************************************/
/**
** \brief Get pipe id by pipe name.
**
** \par Description
** This routine finds the pipe id for a pipe name.
**
** \param[in] PipeName The name of the pipe.
**
** \param[out] PipeIdPtr The PipeId for that name.
**
** \returns
** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
** \retcode #CFE_SB_INVALID_PIPE \retdesc \copydoc CFE_SB_INVALID_PIPE \endcode
** \endreturns
**
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_SetPipeOpts #CFE_SB_PIPEOPTS_IGNOREMINE
**/
int32 CFE_SB_GetPipeIdByName(CFE_SB_PipeId_t *PipeIdPtr, const char *PipeName);

/*****************************************************************************/
/**
** \brief Subscribe to a message on the software bus
Expand Down
93 changes: 92 additions & 1 deletion fsw/cfe-core/src/inc/cfe_sb_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
** and when you're done adding, set this to the highest EID you used. It may
** be worthwhile to, on occasion, re-number the EID's to put them back in order.
*/
#define CFE_SB_MAX_EID 61
#define CFE_SB_MAX_EID 67

/*
** SB task event message ID's.
Expand Down Expand Up @@ -183,6 +183,73 @@
**/
#define CFE_SB_GETPIPEOPTS_EID 60

/** \brief <tt> 'GetPipeName: Name retrieved. NameOut \%s,Id \%d, app \%s' </tt>
** \event <tt> 'GetPipeName: Name retrieved. NameOut \%s,Id \%d, app \%s' </tt>
**
** \par Type: DEBUG
**
** \par Cause:
**
** This debug event is generated when name is retrieved by id.
**/
#define CFE_SB_GETPIPENAME_EID 62

/** \brief <tt> 'GetPipeName: Null ptr error. Id \%d, app \%s' </tt>
** \event <tt> 'GetPipeName: Null ptr error. Id \%d, app \%s' </tt>
**
** \par Type: ERROR
**
** \par Cause:
**
** This debug event is generated when the name buffer ptr is null.
**/
#define CFE_SB_GETPIPENAME_NULL_PTR_EID 63

/** \brief <tt> 'GetPipeName: Id error. NameOut \%s,Id \%d, app \%s' </tt>
** \event <tt> 'GetPipeName: Id error. NameOut \%s,Id \%d, app \%s' </tt>
**
** \par Type: ERROR
**
** \par Cause:
**
** This debug event is generated when name is retrieved by id.
**/
#define CFE_SB_GETPIPENAME_ID_ERR_EID 64

/** \brief <tt> 'GetPipeIdByName: ID retrieved. Name \%s,IdOut 0x\%x, app \%s' </tt>
** \event <tt> 'GetPipeIdByName: ID retrieved. Name \%s,IdOut 0x\%x, app \%s' </tt>
**
** \par Type: DEBUG
**
** \par Cause:
**
** This debug event is generated when id is retrieved by name.
**/
#define CFE_SB_GETPIPEIDBYNAME_EID 65

/** \brief <tt> 'GetPipeIdByName Err:Bad input argument,Name 0x\%x,IdOut 0x%x,App \%s' </tt>
** \event <tt> 'GetPipeIdByName Err:Bad input argument,Name 0x\%x,IdOut 0x%x,App \%s' </tt>
**
** \par Type: ERROR
**
** \par Cause:
**
** This error event message is issued when the #CFE_SB_GetMsgIdByName API receives an
** invalid (possibly NULL) ptr as an argument.
**/
#define CFE_SB_GETPIPEIDBYNAME_NULL_ERR_EID 66

/** \brief <tt> 'GetPipeIdByName Err:Name not found,Name \%s,IdOut 0x%x,App \%s' </tt>
** \event <tt> 'GetPipeIdByName Err:Name not found,Name \%s,IdOut 0x%x,App \%s' </tt>
**
** \par Type: ERROR
**
** \par Cause:
**
** This error event message is issued when the #CFE_SB_GetMsgIdByName API receives an
** invalid name.
**/
#define CFE_SB_GETPIPEIDBYNAME_NAME_ERR_EID 67

/** \brief <tt> 'Subscribe Err:Bad Arg,MsgId 0x\%x,PipeId \%d,app \%s,scope \%d' </tt>
** \event <tt> 'Subscribe Err:Bad Arg,MsgId 0x\%x,PipeId \%d,app \%s,scope \%d' </tt>
Expand Down Expand Up @@ -844,6 +911,30 @@
**/
#define CFE_SB_LEN_ERR_EID 61

/** \brief <tt> 'CreatePipeErr:Name Taken:app=\%s,ptr=0x\%x,depth=\%d,maxdepth=\%d' </tt>
** \event <tt> 'CreatePipeErr:Name Taken:app=\%s,ptr=0x\%x,depth=\%d,maxdepth=\%d' </tt>
**
** \par Type: ERROR
**
** \par Cause:
**
** This error event message is issued when the #CFE_SB_CreatePipe API tries to create
** a pipe with a name that is in use.
**/
#define CFE_SB_CR_PIPE_NAME_TAKEN_EID 62

/** \brief <tt> 'CreatePipeErr:No Free:app=\%s,ptr=0x\%x,depth=\%d,maxdepth=\%d' </tt>
** \event <tt> 'CreatePipeErr:No Free:app=\%s,ptr=0x\%x,depth=\%d,maxdepth=\%d' </tt>
**
** \par Type: ERROR
**
** \par Cause:
**
** This error event message is issued when the #CFE_SB_CreatePipe API is unable to
** create a queue because there are no queues free.
**/
#define CFE_SB_CR_PIPE_NO_FREE_EID 63


#endif /* _cfe_sb_events_ */

Expand Down
4 changes: 3 additions & 1 deletion fsw/cfe-core/src/inc/cfe_sb_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ typedef struct {
\brief Count of errors in set/get pipe options API */
uint8 DuplicateSubscriptionsCounter;/**< \cfetlmmnemonic \SB_DUPSUBCNT
\brief Count of duplicate subscriptions */
uint8 Spare2Align[2];/**< \cfetlmmnemonic \SB_SPARE2ALIGN
uint8 GetPipeIdByNameErrorCounter; /**< \cfetlmmnemonic \SB_GETPIPEIDBYNAMEEC
\brief Count of errors in get pipe id by name API */
uint8 Spare2Align[1];/**< \cfetlmmnemonic \SB_SPARE2ALIGN
\brief Spare bytes to ensure alignment */

uint16 PipeOverflowErrorCounter;/**< \cfetlmmnemonic \SB_PIPEOVREC
Expand Down
5 changes: 2 additions & 3 deletions fsw/cfe-core/src/inc/cfe_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
** which do not break the existin code. It may also be incremented for a release that contains changes deemed
** to be of similar impact, even if there are no actual updates to the API.
**
** The Implementation Revision Version number shall be incremented on changes to software in the master branch,
** The Implementation Revision Version number shall be incremented on changes to software in the master branch,
** or other changes that benefit from unique identification. It is used for identifying open source development
** versions.
**
Expand Down Expand Up @@ -74,8 +74,7 @@
*/
#define CFE_MAJOR_VERSION 6
#define CFE_MINOR_VERSION 7
#define CFE_REVISION 6
#define CFE_REVISION 7


#endif /* _cfe_version_ */

Loading