PxMsgGetMetadata()
Get the metadata of the message.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxMsgMetadata_t PxMsgGetMetadata (PxMsg_t msgid);
- ARGUMENTS
|
- RETURN VALUES
-
-
Message metadata
-
- ERROR CODES
-
PXERR_MSG_ILLMSG
msgid
is not a valid message objectPXERR_MSG_ILLUSER
The calling task is not user of this message
PXERR_MSG_NOT_IMPLEMENTED
The function is called by a system interrupt handler
- DESCRIPTION
-
The PxMsgGetMetadata function returns the metadata of the message. The size of the metadata is 8 byte. This function should only be called from task (not from handler).
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
msgid
must be a valid message object, requested viaPxMsgRequest…
orPxMsgEnvelop…
or received by aPxMsgReceive…
call (V). This message object 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
-
-
PxMsgGetMetadata
returns a null value on failure (C). In this case the task must callPxGetError
to check which error has occurred (F).
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxMsgMetadata_t MetaData = PxMsgGetMetaData(msgid);