Skip to content

Commit 5802d22

Browse files
authored
Merge pull request #511 from nasa/ic-20200213
Integration Candidate 20200212
2 parents 3356da6 + 2553055 commit 5802d22

14 files changed

+1003
-201
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ This is a collection of services and associated framework to be located in the `
66

77
## Version Notes
88

9+
- 6.7.7: DEVELOPMENT
10+
- Adds a new function, CFE_SB_GetPipeIdByName, which retrieves the pipe ID given a name of a pipe.
11+
- Improvement in error reporting when using a pipe name that is already in use, or when the queue limit has been reached.
12+
- Added userguide and osalguide to the local target list to avoid makefile warning
13+
- Minor other updates (see https://github.com/nasa/cFE/pull/511)
914
- 6.7.6: DEVELOPMENT
1015
- Adds OMIT_DEPRECATED prep flag
1116
- Adds and enforces strict warnings

cmake/Makefile.sample

+7-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
# doc -- Build all doxygen source documentation. The HTML documentation will be
4545
# generated under the build tree specified by "O".
4646
#
47+
# usersguide -- Build all API/Cmd/Tlm doxygen documentation. The HTML documentation
48+
# will be generated under the build tree specified by "O".
49+
#
50+
# osalguide -- Build OSAL API doxygen documentation. The HTML documentation will
51+
# be generated under the build tree specified by "O".
52+
#
4753
# test -- Run all unit tests defined in the build. Unit tests will typically only
4854
# be executable when building with the "SIMULATION=native" option. Otherwise
4955
# it is up to the user to copy the executables to the target and run them.
@@ -70,7 +76,7 @@ endif
7076

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

7682
# As this makefile does not build any real files, treat everything as a PHONY target

fsw/cfe-core/src/inc/cfe_sb.h

+48-4
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ typedef struct {
193193
** \retcode #CFE_SB_PIPE_CR_ERR \retdesc \copydoc CFE_SB_PIPE_CR_ERR \endcode
194194
** \endreturns
195195
**
196-
** \sa #CFE_SB_DeletePipe #CFE_SB_GetPipeOpts #CFE_SB_SetPipeOpts
196+
** \sa #CFE_SB_DeletePipe #CFE_SB_GetPipeOpts #CFE_SB_SetPipeOpts #CFE_SB_GetPipeIdByName
197197
**/
198198
int32 CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr,
199199
uint16 Depth,
@@ -225,7 +225,7 @@ int32 CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr,
225225
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
226226
** \endreturns
227227
**
228-
** \sa #CFE_SB_CreatePipe #CFE_SB_GetPipeOpts #CFE_SB_SetPipeOpts
228+
** \sa #CFE_SB_CreatePipe #CFE_SB_GetPipeOpts #CFE_SB_SetPipeOpts #CFE_SB_GetPipeIdByName
229229
**/
230230
int32 CFE_SB_DeletePipe(CFE_SB_PipeId_t PipeId);
231231

@@ -246,7 +246,7 @@ int32 CFE_SB_DeletePipe(CFE_SB_PipeId_t PipeId);
246246
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
247247
** \endreturns
248248
**
249-
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_GetPipeOpts #CFE_SB_PIPEOPTS_IGNOREMINE
249+
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_GetPipeOpts #CFE_SB_GetPipeIdByName #CFE_SB_PIPEOPTS_IGNOREMINE
250250
**/
251251
int32 CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId,
252252
uint8 Opts);
@@ -267,11 +267,55 @@ int32 CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId,
267267
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
268268
** \endreturns
269269
**
270-
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_SetPipeOpts #CFE_SB_PIPEOPTS_IGNOREMINE
270+
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_SetPipeOpts #CFE_SB_GetPipeIdByName #CFE_SB_PIPEOPTS_IGNOREMINE
271271
**/
272272
int32 CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId,
273273
uint8 *OptPtr);
274274

275+
/*****************************************************************************/
276+
/**
277+
** \brief Get the pipe name for a given id.
278+
**
279+
** \par Description
280+
** This routine finds the pipe name for a pipe id.
281+
**
282+
** \param[out] PipeNameBuf The buffer to receive the pipe name.
283+
**
284+
** \param[in] PipeNameSize The size (in chars) of the PipeName buffer.
285+
**
286+
** \param[in] PipeId The PipeId for that name.
287+
**
288+
** \returns
289+
** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode
290+
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
291+
** \retcode #CFE_SB_INVALID_PIPE \retdesc \copydoc CFE_SB_INVALID_PIPE \endcode
292+
** \endreturns
293+
**
294+
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_SetPipeOpts #CFE_SB_GetPipeIdByName
295+
**/
296+
int32 CFE_SB_GetPipeName(char *PipeNameBuf, size_t PipeNameSize, CFE_SB_PipeId_t PipeId);
297+
298+
/*****************************************************************************/
299+
/**
300+
** \brief Get pipe id by pipe name.
301+
**
302+
** \par Description
303+
** This routine finds the pipe id for a pipe name.
304+
**
305+
** \param[in] PipeName The name of the pipe.
306+
**
307+
** \param[out] PipeIdPtr The PipeId for that name.
308+
**
309+
** \returns
310+
** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode
311+
** \retcode #CFE_SB_BAD_ARGUMENT \retdesc \copydoc CFE_SB_BAD_ARGUMENT \endcode
312+
** \retcode #CFE_SB_INVALID_PIPE \retdesc \copydoc CFE_SB_INVALID_PIPE \endcode
313+
** \endreturns
314+
**
315+
** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_SetPipeOpts #CFE_SB_PIPEOPTS_IGNOREMINE
316+
**/
317+
int32 CFE_SB_GetPipeIdByName(CFE_SB_PipeId_t *PipeIdPtr, const char *PipeName);
318+
275319
/*****************************************************************************/
276320
/**
277321
** \brief Subscribe to a message on the software bus

fsw/cfe-core/src/inc/cfe_sb_events.h

+92-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
** and when you're done adding, set this to the highest EID you used. It may
4141
** be worthwhile to, on occasion, re-number the EID's to put them back in order.
4242
*/
43-
#define CFE_SB_MAX_EID 61
43+
#define CFE_SB_MAX_EID 67
4444

4545
/*
4646
** SB task event message ID's.
@@ -183,6 +183,73 @@
183183
**/
184184
#define CFE_SB_GETPIPEOPTS_EID 60
185185

186+
/** \brief <tt> 'GetPipeName: Name retrieved. NameOut \%s,Id \%d, app \%s' </tt>
187+
** \event <tt> 'GetPipeName: Name retrieved. NameOut \%s,Id \%d, app \%s' </tt>
188+
**
189+
** \par Type: DEBUG
190+
**
191+
** \par Cause:
192+
**
193+
** This debug event is generated when name is retrieved by id.
194+
**/
195+
#define CFE_SB_GETPIPENAME_EID 62
196+
197+
/** \brief <tt> 'GetPipeName: Null ptr error. Id \%d, app \%s' </tt>
198+
** \event <tt> 'GetPipeName: Null ptr error. Id \%d, app \%s' </tt>
199+
**
200+
** \par Type: ERROR
201+
**
202+
** \par Cause:
203+
**
204+
** This debug event is generated when the name buffer ptr is null.
205+
**/
206+
#define CFE_SB_GETPIPENAME_NULL_PTR_EID 63
207+
208+
/** \brief <tt> 'GetPipeName: Id error. NameOut \%s,Id \%d, app \%s' </tt>
209+
** \event <tt> 'GetPipeName: Id error. NameOut \%s,Id \%d, app \%s' </tt>
210+
**
211+
** \par Type: ERROR
212+
**
213+
** \par Cause:
214+
**
215+
** This debug event is generated when name is retrieved by id.
216+
**/
217+
#define CFE_SB_GETPIPENAME_ID_ERR_EID 64
218+
219+
/** \brief <tt> 'GetPipeIdByName: ID retrieved. Name \%s,IdOut 0x\%x, app \%s' </tt>
220+
** \event <tt> 'GetPipeIdByName: ID retrieved. Name \%s,IdOut 0x\%x, app \%s' </tt>
221+
**
222+
** \par Type: DEBUG
223+
**
224+
** \par Cause:
225+
**
226+
** This debug event is generated when id is retrieved by name.
227+
**/
228+
#define CFE_SB_GETPIPEIDBYNAME_EID 65
229+
230+
/** \brief <tt> 'GetPipeIdByName Err:Bad input argument,Name 0x\%x,IdOut 0x%x,App \%s' </tt>
231+
** \event <tt> 'GetPipeIdByName Err:Bad input argument,Name 0x\%x,IdOut 0x%x,App \%s' </tt>
232+
**
233+
** \par Type: ERROR
234+
**
235+
** \par Cause:
236+
**
237+
** This error event message is issued when the #CFE_SB_GetMsgIdByName API receives an
238+
** invalid (possibly NULL) ptr as an argument.
239+
**/
240+
#define CFE_SB_GETPIPEIDBYNAME_NULL_ERR_EID 66
241+
242+
/** \brief <tt> 'GetPipeIdByName Err:Name not found,Name \%s,IdOut 0x%x,App \%s' </tt>
243+
** \event <tt> 'GetPipeIdByName Err:Name not found,Name \%s,IdOut 0x%x,App \%s' </tt>
244+
**
245+
** \par Type: ERROR
246+
**
247+
** \par Cause:
248+
**
249+
** This error event message is issued when the #CFE_SB_GetMsgIdByName API receives an
250+
** invalid name.
251+
**/
252+
#define CFE_SB_GETPIPEIDBYNAME_NAME_ERR_EID 67
186253

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

914+
/** \brief <tt> 'CreatePipeErr:Name Taken:app=\%s,ptr=0x\%x,depth=\%d,maxdepth=\%d' </tt>
915+
** \event <tt> 'CreatePipeErr:Name Taken:app=\%s,ptr=0x\%x,depth=\%d,maxdepth=\%d' </tt>
916+
**
917+
** \par Type: ERROR
918+
**
919+
** \par Cause:
920+
**
921+
** This error event message is issued when the #CFE_SB_CreatePipe API tries to create
922+
** a pipe with a name that is in use.
923+
**/
924+
#define CFE_SB_CR_PIPE_NAME_TAKEN_EID 62
925+
926+
/** \brief <tt> 'CreatePipeErr:No Free:app=\%s,ptr=0x\%x,depth=\%d,maxdepth=\%d' </tt>
927+
** \event <tt> 'CreatePipeErr:No Free:app=\%s,ptr=0x\%x,depth=\%d,maxdepth=\%d' </tt>
928+
**
929+
** \par Type: ERROR
930+
**
931+
** \par Cause:
932+
**
933+
** This error event message is issued when the #CFE_SB_CreatePipe API is unable to
934+
** create a queue because there are no queues free.
935+
**/
936+
#define CFE_SB_CR_PIPE_NO_FREE_EID 63
937+
847938

848939
#endif /* _cfe_sb_events_ */
849940

fsw/cfe-core/src/inc/cfe_sb_msg.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,9 @@ typedef struct {
561561
\brief Count of errors in set/get pipe options API */
562562
uint8 DuplicateSubscriptionsCounter;/**< \cfetlmmnemonic \SB_DUPSUBCNT
563563
\brief Count of duplicate subscriptions */
564-
uint8 Spare2Align[2];/**< \cfetlmmnemonic \SB_SPARE2ALIGN
564+
uint8 GetPipeIdByNameErrorCounter; /**< \cfetlmmnemonic \SB_GETPIPEIDBYNAMEEC
565+
\brief Count of errors in get pipe id by name API */
566+
uint8 Spare2Align[1];/**< \cfetlmmnemonic \SB_SPARE2ALIGN
565567
\brief Spare bytes to ensure alignment */
566568

567569
uint16 PipeOverflowErrorCounter;/**< \cfetlmmnemonic \SB_PIPEOVREC

fsw/cfe-core/src/inc/cfe_version.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
** which do not break the existin code. It may also be incremented for a release that contains changes deemed
3939
** to be of similar impact, even if there are no actual updates to the API.
4040
**
41-
** The Implementation Revision Version number shall be incremented on changes to software in the master branch,
41+
** The Implementation Revision Version number shall be incremented on changes to software in the master branch,
4242
** or other changes that benefit from unique identification. It is used for identifying open source development
4343
** versions.
4444
**
@@ -74,8 +74,7 @@
7474
*/
7575
#define CFE_MAJOR_VERSION 6
7676
#define CFE_MINOR_VERSION 7
77-
#define CFE_REVISION 6
77+
#define CFE_REVISION 7
7878

7979

8080
#endif /* _cfe_version_ */
81-

0 commit comments

Comments
 (0)