PxOpoolGetCurrentCapacity()
Return the current capacity of an object pool.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxUInt_t PxOpoolGetCurrentCapacity (PxOpool_t OpoolId); - ARGUMENTS
|
- RETURN VALUES
-
-
The current capacity of the given object pool
-
- ERROR CODES
-
PXERR_OPOOL_ILLOPOOLOpoolId is not a valid object pool id
PXERR_GLOBAL_ILLEGAL_COREThe requested object pool is not on the same core
- DESCRIPTION
-
PxOpoolGetCurrentCapacity returns the current capacity in opool. This is the actual number of available objects only for real object pools. For virtual objects pools, it describes the number of objects that can be obtained from the object pool, provided that its source has sufficient capacity. If PxOpoolGetCurrentCapacity returns 0, either the object pool is empty or an error has occurred. Call PxGetError to see if an error occurred.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
OpoolIdmust be a valid PXROS-HR object pool. The validity ofOpoolIdmay be checked by the following macros:-
PxOpoolIdIsValid()must be true. -
PxOpoolIdGet()must not be_PXIllegalObjId. -
PxOpoolIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
-
- After call
-
-
The function returns 0 if the given object pool is invalid. In this case
PxGetErrormust be called to check which error has occurred. (F)
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxUInt_t Cap = PxOpoolGetCurrentCapacity(OpoolId);