PxObjSetName()
Assign a name to an object.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxError_t PxObjSetName (PxObjId_t objid, const PxChar_t *name, PxUInt_t namelen); - ARGUMENTS
|
|
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_GLOBAL_ILLEGAL_COREThe requested object is not on the same core
PXERR_NAME_BUFOVERFLOWThe name has been truncated
PXERR_OBJ_ILLOBJThe passed object handle is not valid
PXERR_PROT_PERMISSIONThe name is not readable for the calling task
PXERR_SERVICE_NOT_CONFIGUREDService has not been configured
PXERR_ILLEGAL_ACCESSAccess through parameter pointer in size is illegal
- DESCRIPTION
-
PxObjSetName assigns the name to the object with handle objid.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
objidmust be a valid PXROS-HR object, which may be checked with one of the following macros:-
PxObjIdIsValid()must be true' -
PxObjIdGet()must not be_PXIllegalObjId. -
PxObjIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
The object objid must be created on the same core as the caller runs on. The creator core id can be read with the macro
PxObjCoreIdand the own core id withPxGetCoreId(C).namemust be a null terminated string.
-
- After call
-
-
The function returns
PXERR_NOERRORif the object name could be set. 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 = PxObjSetName(objid, buffer, bufsize); if (err != PXERR_NOERROR) { // Report error }