PxTraceGetBuffer()
Return a message object containing the trace buffer.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxMsg_t PxTraceGetBuffer (PxOpool_t OpoolId); - ARGUMENTS
|
- ERROR CODES
-
PXERR_OPOOL_ILLOPOOLIllegal
opoolpassedPXERR_GLOBAL_ILLEGAL_COREThe requested object pool is not on the same core
PXERR_OBJ_ABORTEDThe request was aborted by an event
PXERR_OBJ_ILLOBJThe passed object handle is not valid
PXERR_OBJ_NOOBJNo free object is available
PXERR_MSG_ILLMSGThe passed message handle is invalid
PXERR_SERVICE_NOT_CONFIGUREDService has not been configured into your PXROS
PXERR_INTERNAL_INCONSISTENCYInconsistency of internal structures
- DESCRIPTION
-
PxTraceGetBufferreturns a message containing the circular buffer of the PXROS trace mechanism.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
OpoolIdmust be a valid PXROS-HR object pool and the calling task must have the access right to take objects from this object pool (V). The validity ofOpoolIdmay also be checked by thePxOpoolIsValidmacro (F). The object pool must be created on the same core as the caller runs on. The creator core id can be read with the macroPxOpoolCoreIdand the own core id withPxGetCoreId(C). Typically the task’s default object poolPXOpoolTaskdefaultis used for this purpose.
-
- After call
-
-
The returned value is the id of type
PxMsg_t. This id may be checked with one of the following macros:-
PxMsgIdIsValid()must be true. -
PxMsgIdGet()must not be_PXIllegalObjId. -
PxMsgIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- Best Practice
-
-
No restrictions
-
- USAGE
-
#include "pxdef.h" PxMsg_t Msg = PxTraceGetBuffer(opoolId); if (PxMsgIdError(Msg) != PXERR_NOERROR) { // Report error }