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_BUFOVERFLOW
The data area is too short to store the objects name
PXERR_OBJ_ILLOBJ
objid
is not a valid object idPXERR_PROT_PERMISSION
The data area is not writeable for the calling task
PXERR_GLOBAL_ILLEGAL_CORE
The requested object is not on the same core
PXERR_SERVICE_NOT_CONFIGURED
Service has not been configured
- DESCRIPTION
-
PxObjGetName copies the name of objid into the
buffer
buffer of lengthbufsize
. The result is zero-terminated.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
objid
must 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_NOERROR
otherwise the returned error code has to be interpreted (C).
-
-
buffer
points to a valid memory area ofbufsize
bytes length, where the object’s name is stored.
-
- After call
-
-
The function returns
PXERR_NOERROR
if 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 }