ElapsedTime Class Reference

Implementation of ElapsedTimeBase. More...

#include <RobotComponents/components/MotionPlanning/ResourceRequestStrategies/ComputingPowerRequestStrategy.h>

+ Inheritance diagram for ElapsedTime:

Public Types

using Clock = std::chrono::system_clock
 The used clock type. More...
 
using TimePoint = Clock::time_point
 The type of the used time point. More...
 

Public Member Functions

void allocatedComputingPower (const Ice::Current &=Ice::emptyCurrent) override
 Sets the next time to allocate depending on the flag skipping. More...
 
 ElapsedTime (Ice::Long timeDeltaInSeconds, bool skipping)
 Ctor. More...
 
void setCurrentStateAsInitialState (const ::Ice::Current &=Ice::emptyCurrent) override
 Sets the next time to allocate delta seconds from now. More...
 
bool shouldAllocateComputingPower (const ::Ice::Current &=Ice::emptyCurrent) override
 Returns true if the last creation timepoint is more than delta seconds away. More...
 
- Public Member Functions inherited from ComputingPowerRequestStrategy
void allocatedComputingPower (const Ice::Current &=Ice::emptyCurrent) override
 Default implementation. More...
 
void setCurrentStateAsInitialState (const ::Ice::Current &=Ice::emptyCurrent) override
 Default implementation. More...
 
void updateNodeCount (Ice::Long, const Ice::Current &=Ice::emptyCurrent) override
 Default implementation. More...
 
void updateNodeCreations (Ice::Long, Ice::Long, const Ice::Current &=Ice::emptyCurrent) override
 Default implementation. More...
 
void updateTaskStatus (armarx::TaskStatus::Status, const Ice::Current &=Ice::emptyCurrent) override
 Default implementation. More...
 
 ~ComputingPowerRequestStrategy () override=default
 Dtor. More...
 

Protected Member Functions

 ElapsedTime ()=default
 Ctor used for object factories. More...
 

Protected Attributes

TimePoint allocatedLastTime
 The time point when more power should be allocated again. More...
 

Friends

template<class Base , class Derived >
class armarx::GenericFactory
 

Detailed Description

Implementation of ElapsedTimeBase.

See also
ElapsedTimeBase

Definition at line 349 of file ComputingPowerRequestStrategy.h.

Member Typedef Documentation

◆ Clock

using Clock = std::chrono::system_clock

The used clock type.

Definition at line 357 of file ComputingPowerRequestStrategy.h.

◆ TimePoint

using TimePoint = Clock::time_point

The type of the used time point.

Definition at line 361 of file ComputingPowerRequestStrategy.h.

Constructor & Destructor Documentation

◆ ElapsedTime() [1/2]

ElapsedTime ( Ice::Long  timeDeltaInSeconds,
bool  skipping 
)
inline

Ctor.

Parameters
timeDeltaInSecondsThe delta to use.(in seconds)
skippingWhether skipping is activated.

Definition at line 368 of file ComputingPowerRequestStrategy.h.

◆ ElapsedTime() [2/2]

ElapsedTime ( )
protecteddefault

Ctor used for object factories.

Member Function Documentation

◆ allocatedComputingPower()

void allocatedComputingPower ( const Ice::Current &  = Ice::emptyCurrent)
override

Sets the next time to allocate depending on the flag skipping.

skipping == true: now + delta seconds. skipping == false: the current next time point + delta seconds. (may already passed)

Definition at line 39 of file ComputingPowerRequestStrategy.cpp.

+ Here is the call graph for this function:

◆ setCurrentStateAsInitialState()

void setCurrentStateAsInitialState ( const ::Ice::Current &  = Ice::emptyCurrent)
inlineoverride

Sets the next time to allocate delta seconds from now.

Definition at line 377 of file ComputingPowerRequestStrategy.h.

+ Here is the call graph for this function:

◆ shouldAllocateComputingPower()

bool shouldAllocateComputingPower ( const ::Ice::Current &  = Ice::emptyCurrent)
inlineoverridevirtual

Returns true if the last creation timepoint is more than delta seconds away.

Returns
Whether more computing power should be allocated.

Implements ComputingPowerRequestStrategy.

Reimplemented in NoNodeCreated.

Definition at line 393 of file ComputingPowerRequestStrategy.h.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ armarx::GenericFactory

friend class armarx::GenericFactory
friend

Definition at line 404 of file ComputingPowerRequestStrategy.h.

Member Data Documentation

◆ allocatedLastTime

TimePoint allocatedLastTime
protected

The time point when more power should be allocated again.

Definition at line 401 of file ComputingPowerRequestStrategy.h.


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