PxMsgSetMetadata_Hnd()
Set the metadata for the message (handler service).
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxMsgSetMetadata_Hnd (PxMsg_t msgid, PxMsgMetadata_t metadata); - ARGUMENTS
|
|
|
- ERROR CODES
-
PXERR_MSG_ILLMSGmsgidis not a valid message objectPXERR_MSG_ILLUSERThe calling task is not user of this message
PXERR_MSG_NOT_IMPLEMENTEDThe function is called by a system interrupt handler
- DESCRIPTION
-
The
PxMsgSetMetadata_Hndsets the metadata for the message. The size of the metadata is 8 byte. ThePxMsgSetMetadata_Hndshould only be called from handlers running in a task’s context.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
msgidmust 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_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- After call
-
-
The function returns
PXERR_NOERRORif the message’s metadata is set. Any other return value describes an error, which has to be interpreted (C).
-
- Best Practice
-
-
This function should be called from handlers only. (V)
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxError_t Err = PxMsgSetMetadata_Hnd(msgid, metadata); if (Err != PXERR_NOERROR) { // Report error }