PxMsgGetOwner()
Return the owner TaskId of the message.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxTask_t PxMsgGetOwner (PxMsg_t msgid); - ARGUMENTS
|
- RETURN VALUES
-
-
Message owner
-
- ERROR CODES
-
PXERR_MSG_ILLMSGmsgidis not a valid object idPXERR_MSG_ILLUSERThe calling task is not user of this message
- DESCRIPTION
-
PxMsgGetOwnerreturns the message’s owner.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
msgidmust 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_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- After call
-
-
The returned value is the id of type
PxTask_t. This id may be checked with one of the following macros:-
PxTaskIdIsValid()must be true. -
PxTaskIdGet()must not be_PXIllegalObjId. -
PxTaskIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
Additionally the task id may be checked with
PxTaskCheck()(F).
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxTask_t Task = PxMsgGetOwner(msgid) if (PxTaskIdGet(task) == _PXIllegalObjId) { // Report error } else { // Handle task }