LocalGuidance
A library that generates velocity references to follow a path.
any_worker::WorkerOptions Struct Reference

#include <WorkerOptions.hpp>

Inheritance diagram for any_worker::WorkerOptions:
Inheritance graph

Public Member Functions

 WorkerOptions ()
 
 WorkerOptions (const std::string &name, const double timestep, const WorkerCallback &callback, const int priority=0)
 
 WorkerOptions (const std::string &name, const double timestep, const WorkerCallback &callback, const WorkerCallbackFailureReaction &callbackFailureReaction, const int priority=0)
 
 WorkerOptions (const WorkerOptions &other)
 
 WorkerOptions (WorkerOptions &&other)
 
- Public Member Functions inherited from any_worker::RateOptions
 RateOptions (const std::string &name="", const double timeStep=0.0, const double maxTimeStepFactorWarning=1.0, const double maxTimeStepFactorError=10.0, const bool enforceRate=true, const clockid_t clockId=CLOCK_MONOTONIC)
 
 RateOptions (const RateOptions &other)
 
 RateOptions (RateOptions &&other)
 
RateOptionsoperator= (const RateOptions &other)
 
virtual ~RateOptions ()
 
virtual bool isValid () const
 

Public Attributes

WorkerCallback callback_
 
WorkerCallbackFailureReaction callbackFailureReaction_
 
int defaultPriority_
 
bool destructWhenDone_
 
- Public Attributes inherited from any_worker::RateOptions
std::string name_
 Name for printing. More...
 
std::atomic< double > timeStep_
 Time step in seconds. More...
 
std::atomic< double > maxTimeStepFactorWarning_
 If the awake time is bigger than the time step multiplied by this factor, it counts as an warning. More...
 
std::atomic< double > maxTimeStepFactorError_
 If the awake time is bigger than the time step multiplied by this factor, it counts as an error. More...
 
std::atomic< bool > enforceRate_
 Boolean indicating whether the rate should be enforced. More...
 
std::atomic< clockid_t > clockId_
 Linux clock ID. More...
 

Constructor & Destructor Documentation

any_worker::WorkerOptions::WorkerOptions ( )
inline
any_worker::WorkerOptions::WorkerOptions ( const std::string &  name,
const double  timestep,
const WorkerCallback callback,
const int  priority = 0 
)
inline
any_worker::WorkerOptions::WorkerOptions ( const std::string &  name,
const double  timestep,
const WorkerCallback callback,
const WorkerCallbackFailureReaction callbackFailureReaction,
const int  priority = 0 
)
inline
any_worker::WorkerOptions::WorkerOptions ( const WorkerOptions other)
inline
any_worker::WorkerOptions::WorkerOptions ( WorkerOptions &&  other)
inline

Member Data Documentation

WorkerCallback any_worker::WorkerOptions::callback_

The primary worker callback to be called

WorkerCallbackFailureReaction any_worker::WorkerOptions::callbackFailureReaction_

The reaction callback to be called when the primary indicates error (returns false)

int any_worker::WorkerOptions::defaultPriority_

priority of the underlying thread, integer between 0 and 99 with 0 beeing the lowest priority.

bool any_worker::WorkerOptions::destructWhenDone_

if set to true and timestep=0 (run callback only once), the worker will be destructed by the WorkerManager


The documentation for this struct was generated from the following file: