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_CORE
The requested object is not on the same core
PXERR_NAME_BUFOVERFLOW
The name has been truncated
PXERR_OBJ_ILLOBJ
The passed object handle is not valid
PXERR_PROT_PERMISSION
The name is not readable for the calling task
PXERR_SERVICE_NOT_CONFIGURED
Service has not been configured
PXERR_ILLEGAL_ACCESS
Access through parameter pointer in size is illegal
- DESCRIPTION
-
PxObjSetName assigns the name to the object with handle objid.
- 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).
-
-
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
PxObjCoreId
and the own core id withPxGetCoreId
(C).name
must be a null terminated string.
-
- After call
-
-
The function returns
PXERR_NOERROR
if 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 }