PxTaskGetName()
Return the name of a task.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxTaskGetName(PxTask_t task, PxChar_t *buffer, PxUInt_t bufsize); - ARGUMENTS
|
|
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_NAME_BUFOVERFLOWdata area is too short to store the task’s name
PXERR_OBJ_ILLOBJtask is not a valid task id
PXERR_PROT_PERMISSIONdata area is not writable for the calling task
- DESCRIPTION
-
PxTaskGetNamecopies the name of task into thebufferbuffer of lengthbufsize. The result is zero-terminated.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
The parameter
taskmust be a valid task object id. -
This id may be:
-
the calling task’s own id read by calling
PxGetId()(V) -
the return value of a
PxTaskCreate()call (V) -
the result of a
nameserverquery (V) -
part of a message sent by another task (V)
-
-
Additionally the task id may be checked with
PxTaskCheck()(F). -
buffershould point to a valid memory area, where the task’s name is stored. -
bufsizeshould be a constant or asizeof()operator (V).
-
- After call
-
-
The function returns
PXERR_NOERRORif the task’s name could be stored. Any other return value describes an error, which has to be interpreted (C).
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" if (PxTaskGetName(task, buffer, bufsize) == Err) { // Report error }