PxSysInfoGetOpoolInfo()
Function to get object pool info.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxSysInfoGetOpoolInfo (PxInfoOpool_t *OpoolInfo, PxOpool_t OpoolId); - ARGUMENTS
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_OPOOL_ILLOPOOLThe given object is not a mailbox object
PXERR_PROT_PERMISSIONThe task has no write permission on the
OpoolInfoobjectPXERR_GLOBAL_ILLEGAL_COREThe requested object pool is not on the same core
- DESCRIPTION
-
PxSysInfoGetOpoolInfostores the object pool id (OpoolId) type (real/virtual), its capacity, its minimal capacity, and -if virtual- the superior object pool into the info structureOpoolInfo.The structure of
OpoolInfohas the following format:// object pool info typedef struct { PxInfoOpoolType_t PxInfoOpool_Type; // opool’s type PxOpool_t PxInfoOpool_Superior; // real opool, where virtual opools get their objects PxULong_t PxInfoOpool_Capacity; // opool’s capacity PxULong_t PxInfoOpool_MinCapacity; // opool’s lowest capacity PxTask_t PxInfoOpool_RequestingTask; // task, which requested this opool } PxInfoOpool_t;The object pool
OpoolIdmay be one of the following types:typedef enum { OpoolType_Real, OpoolType_Virtual } PxInfoOpoolType_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
-
-
OpoolInfomust be a pointer to a valid data area. -
OpoolIdmust be:-
a valid PXROS-HR object pool created with a
PxOpoolRequestcall (V). The validity ofOpoolIdmay also be checked by thePxOpoolIsValidmacro (F). -
the symbolic value
PXOpoolSystemdefaultspecifying the system object pool(V) -
the symbolic value
PXOpoolTaskdefaultspecifying the task’s object pool(V)
-
-
- 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 = PxSysInfoGetOpoolInfo(&OpoolInfo, opoolId); if (err == PXERR_NOERROR) { // Handle info } else { // Report error }