PxSysInfoGetPeInfo()
Function to get Pe info.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxSysInfoGetPeInfo (PxInfoPe_t *PeInfo, PxPe_t PeId); - ARGUMENTS
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_PE_ILLPEThe given object is no periodic event object
PXERR_PROT_PERMISSIONThe task has no write permission on the
PeInfoobject - DESCRIPTION
-
PxSysInfoGetPeInfostores the contents of the periodic event handlerPeIdinto the info structurePeInfo.The structure
PeInfohas 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
sysinfotypes: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
-
-
PeInfomust be a pointer to a valid data area. -
PeIdmust be a valid PXROS-HR periodic event handler object created with aPxPeRequestcall (V). The validity ofPeIdmay also be checked by thePxPeIsValidmacro (F).
-
- After call
-
-
The function returns
PXERR_NOERRORif 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 }