PxObjGetName()
Return the name of an object.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxError_t PxObjGetName (PxObjId_t objid, PxChar_t *buffer, PxUInt_t bufsize); - ARGUMENTS
|
|
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_NAME_BUFOVERFLOWThe data area is too short to store the objects name
PXERR_OBJ_ILLOBJobjidis not a valid object idPXERR_PROT_PERMISSIONThe data area is not writable for the calling task
PXERR_GLOBAL_ILLEGAL_COREThe requested object is not on the same core
PXERR_SERVICE_NOT_CONFIGUREDService has not been configured
- DESCRIPTION
-
PxObjGetNamecopies the name ofobjidinto thebufferbuffer of lengthbufsize. The result is zero-terminated.
- 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).
-
-
bufferpoints to a valid memory area ofbufsizebytes length, where the object’s name is stored.
-
- After call
-
-
The function returns
PXERR_NOERRORif the object’s name could be copied. 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 = PxObjGetName(objid, buffer, bufsize); if (err != PXERR_NOERROR) { // Report error }