PxSysInfoGetPeInfo()

Function to get Pe info.

APPLIES TO

1.0.0

SYNOPSIS
PxError_t PxSysInfoGetPeInfo (PxInfoPe_t *PeInfo, PxPe_t peId);
ARGUMENTS
PeInfo

Pointer to data area to store periodic event object information to

peId

Id of periodic event object

RETURN VALUES
  • PXROS error code

ERROR CODES

PXERR_PE_ILLPE

The given object is no periodic event object

PXERR_PROT_PERMISSION

The task has no write permission on the PeInfo object

DESCRIPTION

PxSysInfoGetPeInfo stores the contents of the periodiec event handler peId into the info structure PeInfo.

The structure PeInfo has the following format:

typedef struct
{
	PxTask_t PxInfoPe_Task; // task to receive periodic event
	PxEvents_t  PxInfoPe_Event; // periodic event
	PxULong_t  PxInfoPe_Period; // period
	PxULong_t  PxInfoPe_RestTicks; // rest ticks
	PxTask_t   PxInfoPe_RequestingTask; // task which requested the pe object
} PxInfoPe_t;

There is a union available containing all sysinfo types:

typedef union
{
	PxInfoMC_t  McInfo; // memory class information struct
	PxInfoOpool_t  OpoolInfo; // Opool information struct
	PxInfoMsg_t  MsgInfo; // message information struct
	PxInfoMbx_t  MbxInfo; // mailbox information struct
	PxInfoDelay_t  DelayInfo; // delay object information struct
	PxInfoPe_t  PeInfo; // periodic event information struct
	PxInfoTo_t  ToInfo; // timeout object information struct
	PxInfoInterrupt_t  InterruptInfo; // interrupt object information struct
} PxObjInfo_T;
IMPLEMENTATION GUIDELINES
Before call
  • PeInfo must be a pointer to a valid data area.

  • peId must be a valid PXROS-HR periodic event handler object created with a PxPeRequest call (V). The validity of peId may also be checked by the PxPeIsValid macro (F).

After call
  • The function returns PXERR_NOERROR if the system information could be delivered. 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 = PxSysInfoGetPeInfo(&PeInfo, peId);

if (err == PXERR_NOERROR) {
    // Handle info
}
else {
    // Report error
}