PxTraceAssignBuffer()

Set a new trace buffer.

APPLIES TO

1.0.0

SYNOPSIS
PxError_t PxTraceAssignBuffer (PxAligned_t *trcbuffer, PxULong_t capacity, PxULong_t size);
ARGUMENTS
trcbuffer

The new trace buffer

capacity

Number of trace buffer entries

size

The size of a trace buffer entry in Byte

ERROR CODES

PXERR_ACCESS_RIGHT

The calling task does not have the right to set the trace buffer

PXERR_PROT_PERMISSION

The calling task or kernel has no access to the passed buffer

PXERR_SERVICE_NOT_CONFIGURED

Service has not been configured into your PXROS

PXERR_ILLEGAL_ACCESS

No access permission for protection type

DESCRIPTION

PxTraceAssignBuffer assigns a circular buffer to the PXROS trace mechanism. The buffer size must be a multiple of the size of a PxTrace entry (actual 24 bytes).

IMPLEMENTATION GUIDELINES
Before call
  • trcbuffer must be a pointer to a valid data area.

  • capacity must be a plausible value given as a constant (V) or a variable (C).

After call
  • The function returns PXERR_NOERROR if the trace buffer could be assigned. Any other return value describes an error, which has to be interpreted (C).

Best Practice
  • No restrictions

USAGE
#include "pxdef.h"

PxError_t Err = PxTraceAssignBuffer(trcbuffer, 2, PXV_ENTRY_SIZE);

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