PxSysInfoGetDelayInfo()
Function to get delay info.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxSysInfoGetDelayInfo (PxInfoDelay_t *DelayInfo, PxDelay_t delayId); - ARGUMENTS
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_DELAY_ILLDELAYThe given object is no delay object
PXERR_PROT_PERMISSIONThe task has no write permission on the
DelayInfoobject - DESCRIPTION
-
PxSysInfoGetDelayInfostores the contents of the delay structuredelayIdinto the info structureDelayInfo. The structureDelayInfohas the following format:typedef struct { PxInfoDelayType_t PxInfoDelay_Type; // delay type void (*PxInfoDelay_Handler) (PxArg_t); // delay handler function PxULong_t PxInfoDelay_Param; // delay handler function’s arguments PxULong_t PxInfoDelay_Ticks; // delay ticks PxULong_t PxInfoDelay_RestTicks; // delay rest ticks PxTask_t PxInfoDelay_RequestingTask; // task which requested the delay object } PxInfoDelay_t;The delay object
delayIdmay have one of the following types:typedef enum { DelayType_InUse, DelayType_NotUsed } PxInfoDelayType_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
-
-
DelayInfomust be a pointer to a valid data area. -
delayIdmust be a valid PXROS-HR delay object created with aPxDelayRequestcall (V). The validity ofdelayIdmay also be checked by thePxDelayIsValidmacro (F). The delay object must be created on the same core as the caller runs on. The creator core id can be read with the macroPxDelayCoreIdand the own core id withPxGetCoreId(C).
-
- 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 = PxSysInfoGetDelayInfo(&DelayInfo, delayId); if (err == PXERR_NOERROR) { // Handle info } else { // Report error }