PxMsgRelDataAccess()
Release the access to the data area of a message (task service).
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxMsgRelDataAccess (PxMsg_t msgid);
- ARGUMENTS
|
- ERROR CODES
-
PXERR_MSG_ILLMSG
msgid
is not a valid message objectPXERR_MSG_ILLUSER
The calling task is not user of this message
PXERR_PROT_ILL_HANDLE
The associated protection handle is not valid
PXERR_REQUEST_INVALID_PARAMETER
Request with invalid parameter
PXERR_ILL_NULLPOINTER_PARAMETER
Illegal null pointer parameter in the call
PXERR_PROT_ILL_SIZE
The size of the protection region is not valid
PXERR_PROT_ILL_ALIGN
Alignment of protection region is not valid
- DESCRIPTION
-
PxMsgRelDataAccess
releases the access to the data area of the messagemsgid
. It is required that the calling task is the current user ofmsg
. After callingPxMsgRelDataAccess
no access to the data area of the messagemsg
is possible. The access right may be recovered throughPxMsgGetData
.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
msgid
must be a valid message object, requested viaPxMsgRequest…
orPxMsgEnvelop…
or received by aPxMsgReceive…
call (V). This id may be checked with one of the following macros:-
PxMsgIdIsValid()
must be true. -
PxMsgIdGet()
must not be_PXIllegalObjId
. -
PxMsgIdError()
must bePXERR_NOERROR
otherwise the returned error code has to be interpreted (C).
-
-
- After call
-
-
The function returns
PXERR_NOERROR
if the access to the message data could be released. Any other return value describes an error, which has to be interpreted (C).
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxError_t Err = PxMsgRelDataAccess(msgid); if (Err != PXERR_NOERROR) { // Report error }