PxMsgSetToAwaitRel()

Sets the message to AwaitRelease.

APPLIES TO

1.0.0

SYNOPSIS
PxError_t PxMsgSetToAwaitRel (PxMsg_t Msg);
ARGUMENTS
Msg

The message object to be marked

RETURN VALUES
  • PXROS error code

ERROR CODES

PXERR_MSG_ILLMSG

Msg is not a valid message object

PXERR_MSG_ILLOWNER

The calling task is not the message’s owner

DESCRIPTION

PxMsgSetToAwaitRel sets the message to AwaitRelease. Further calls to PxMsgRelease will only mark this message as released but doesn’t really release it. The owner of this message has to wait for the release and is also responsible for releasing the message. This call is only valid for the message owner.

IMPLEMENTATION GUIDELINES
Before call
  • Msg must be a valid message object, requested via PxMsgRequest…​ or PxMsgEnvelop…​ or received by a PxMsgReceive…​ call (V). This id may be checked with one of the following macros:

    • PxMsgIdIsValid() must be true.

    • PxMsgIdGet() must not be _PXIllegalObjId.

    • PxMsgIdError() must be PXERR_NOERROR otherwise the returned error code has to be interpreted (C).

After call
  • The function returns PXERR_NOERROR if the message is set to AwaitRelease. Any other return value describes an error, which has to be interpreted (C).

Best Practice
  • PxMsgSetToAwaitRel sets the message to AwaitRelease. Further calls to PxMsgRelease will only mark this message as released but don’t really release them. The owner of this message has to wait for the release and is also responsible for releasing the message. This call is only valid for the message owner.

SEE ALSO
USAGE
#include "pxdef.h"

PxError_t Err = PxMsgSetToAwaitRel(Msg);

if (Err != PXERR_NOERROR) {
    // Report error
}