PxTaskSetName()
Assign a name to a task object.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxError_t PxTaskSetName (PxTask_t task, const PxChar_t *buffer, PxUInt_t bufsize);
- ARGUMENTS
|
|
|
|
|
- RETURN VALUES
-
-
PXROS-HR error code
-
- ERROR CODES
-
PXERR_NAME_BUFOVERFLOW
The name has been truncated
PXERR_PROT_PERMISSION
The name is not readable for the calling task
PXERR_SERVICE_NOT_CONFIGURED
Service has not been configured
PXERR_OBJ_ILLOBJ
The passed task object handle is not valid
PXERR_GLOBAL_ILLEGAL_CORE
The task object is not on the same core
- DESCRIPTION
-
PxTaskSetName assigns a name to the task object
task
by copyingbufsize
characters from memory pointed to bybuffer
. If thebufzise
is 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 taskName[10] = "TASK-NAME"; // 9 characters + null character PxError_t err = PxTaskSetName(task, taskName, 10); if (err != PXERR_NOERROR) { // Report error } char retTaskName[10]; PxError_t err = PxTaskGetName(task, retTaskName, 18); if (err != PXERR_NOERROR) { // Report error }