PxPeSetName()

Assign a name to a periodic object.

APPLIES TO

1.0.0

SYNOPSIS
PxError_t PxPeSetName (PxPe_t pe, const PxChar_t *buffer, PxUInt_t bufsize);
ARGUMENTS
pe

The periodic object to which the name will be set

buffer

Pointer to C string to be copied to the object’s name

bufsize

Length of C string including the null character

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 periodic object handle is not valid

PXERR_GLOBAL_ILLEGAL_CORE

The periodic object is not on the same core

DESCRIPTION

PxPeSetName assigns a name to the periodic object pe by copying bufsize characters from memory pointed to by buffer. If the bufzise 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 peName[18] = "PERIODIC-OBJ-NAME"; // 17 characters + null character

PxError_t err = PxPeSetName(pe, peName, 18);

if (err != PXERR_NOERROR) {
    // Report error
}

char retPeName[18];

PxError_t err = PxPeGetName(pe, retPeName, 18);

if (err != PXERR_NOERROR) {
    // Report error
}