RobotPool Class Reference

This class holds a pool of local VirtualRobots for multi threaded applications that can be requested by the user. More...

#include <RobotAPI/libraries/core/RobotPool.h>

Public Member Functions

size_t clean ()
 Removes unused robots from the pool. More...
 
size_t getPoolSize () const
 
VirtualRobot::RobotPtr getRobot (int inflation=0)
 getRobot More...
 
size_t getRobotsInUseCount () const
 
 RobotPool (VirtualRobot::RobotPtr robot, size_t defaultSize=1)
 

Detailed Description

This class holds a pool of local VirtualRobots for multi threaded applications that can be requested by the user.

When calling getRobot() it is guaranteed that that robot is not requested by any other user/thread. When the return shared ptr goes out of the, the robot is available again.

Definition at line 39 of file RobotPool.h.

Constructor & Destructor Documentation

◆ RobotPool()

RobotPool ( VirtualRobot::RobotPtr  robot,
size_t  defaultSize = 1 
)

Definition at line 34 of file RobotPool.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ clean()

size_t clean ( )

Removes unused robots from the pool.

Returns
number of cleaned up robots

Definition at line 92 of file RobotPool.cpp.

◆ getPoolSize()

size_t getPoolSize ( ) const

Definition at line 64 of file RobotPool.cpp.

◆ getRobot()

VirtualRobot::RobotPtr getRobot ( int  inflation = 0)

getRobot

Parameters
inflationinflation of collision model in mm
Returns

Definition at line 44 of file RobotPool.cpp.

+ Here is the caller graph for this function:

◆ getRobotsInUseCount()

size_t getRobotsInUseCount ( ) const

Definition at line 75 of file RobotPool.cpp.


The documentation for this class was generated from the following files: