PxMsgSetName()
Assign a name to a message object.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxError_t PxMsgSetName (PxMsg_t msg, const PxChar_t *buffer, PxUInt_t bufsize); - ARGUMENTS
|
|
|
|
|
- RETURN VALUES
-
-
PXROS-HR error code
-
- ERROR CODES
-
PXERR_NAME_BUFOVERFLOWThe name has been truncated
PXERR_PROT_PERMISSIONThe name is not readable for the calling task
PXERR_SERVICE_NOT_CONFIGUREDService has not been configured
PXERR_OBJ_ILLOBJThe passed message handle is not valid
PXERR_GLOBAL_ILLEGAL_COREThe message object is not on the same core
- DESCRIPTION
-
PxMsgSetNameassigns a name to the message objectmsgby copyingbufsizecharacters from memory pointed to bybuffer. If thebufziseis grater than the internal buffer for the object name, the name is truncated. The name is null terminated.
- SEE ALSO
- USAGE
-
#include "pxdef.h" const char msgName[13] = "MESSAGE-NAME"; // 12 characters + null character PxError_t err = PxMsgSetName(msg, msgName, 13); if (err != PXERR_NOERROR) { // Report error } char retMsgName[13]; PxError_t err = PxMsgGetName(msg, retMsgName, 13); if (err != PXERR_NOERROR) { // Report error }