PxMsgSetSize()
Set message size.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxMsgSetSize (PxMsg_t msgid, PxSize_t size); - ARGUMENTS
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_MSG_ILLMSGThe passed message handle is invalid
PXERR_MSG_ILLSIZEsizeexceeds the size of the corresponding data areaPXERR_MSG_ILLUSERThe calling task is not the user of the message
- DESCRIPTION
-
PxMsgSetSizesets the size of messagemsgidto size (specified in byte units). The calling task must be the user ofmsgid.
- 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).
-
-
sizemust have a plausible value (V).
-
- After call
-
-
The function returns
PXERR_NOERRORif the message’s size is changed. 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 = PxMsgSetSize(msgid, 10); if (Err != PXERR_NOERROR) { // Report error }