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.
 
size_t getPoolSize () const
 
VirtualRobot::RobotPtr getRobot (int inflation=0)
 getRobot
 
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.

Constructor & Destructor Documentation

◆ RobotPool()

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

Member Function Documentation

◆ clean()

size_t clean ( )

Removes unused robots from the pool.

Returns
number of cleaned up robots

◆ getPoolSize()

size_t getPoolSize ( ) const

◆ getRobot()

VirtualRobot::RobotPtr getRobot ( int inflation = 0)

getRobot

Parameters
inflationinflation of collision model in mm
Returns

◆ getRobotsInUseCount()

size_t getRobotsInUseCount ( ) const

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