PxSysInfoGetToInfo()
Function to get To info.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxSysInfoGetToInfo (PxInfoTo_t *ToInfo, PxTo_t ToId); - ARGUMENTS
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_PROT_PERMISSIONThe task has no write permission on the
ToInfoobjectPXERR_TO_ILLTOThe given object is no timeout object
- DESCRIPTION
-
PxSysInfoGetToInfostores the contents of the timeout handlerToIdinto the info structureToInfo.The structure
ToInfohas the following format:typedef struct { PxTask_t PxInfoTo_Task; // task to receive timeout event PxEvents_t PxInfoTo_Event; // timeout event PxULong_t PxInfoTo_Timeout; // timeout period PxULong_t PxInfoTo_RestTicks; // rest ticks PxTask_t PxInfoTo_RequestingTask; // task which requested the to object } PxInfoTo_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
-
-
ToInfomust be a pointer to a valid data area. -
ToIdmust be a valid PXROS-HR timeout handler object created with aPxToRequestcall (V). The validity ofToIdmay also be checked by thePxToIsValidmacro (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 = PxSysInfoGetToInfo(&ToInfo, ToId); if (err == PXERR_NOERROR) { // Handle info } else { // Report error }