Public Member Functions | Public Attributes | List of all members
bota_worker::WorkerOptions Struct Reference

#include <WorkerOptions.hpp>

Inheritance diagram for bota_worker::WorkerOptions:
Inheritance graph
[legend]

Public Member Functions

 WorkerOptions ()
 
 WorkerOptions (const std::string &name, const double timestep, WorkerCallback callback, const int priority=0)
 
 WorkerOptions (const std::string &name, const double timestep, WorkerCallback callback, WorkerCallbackFailureReaction callbackFailureReaction, const int priority=0)
 
 WorkerOptions (const WorkerOptions &other)=default
 
 WorkerOptions (WorkerOptions &&other) noexcept
 
- Public Member Functions inherited from bota_worker::RateOptions
virtual bool isValid () const
 
RateOptionsoperator= (const RateOptions &other)
 
 RateOptions (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) noexcept
 
virtual ~RateOptions ()=default
 

Public Attributes

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

Detailed Description

Definition at line 55 of file WorkerOptions.hpp.

Constructor & Destructor Documentation

bota_worker::WorkerOptions::WorkerOptions ( )
inline

Definition at line 57 of file WorkerOptions.hpp.

bota_worker::WorkerOptions::WorkerOptions ( const std::string &  name,
const double  timestep,
WorkerCallback  callback,
const int  priority = 0 
)
inline

Definition at line 62 of file WorkerOptions.hpp.

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

Definition at line 71 of file WorkerOptions.hpp.

bota_worker::WorkerOptions::WorkerOptions ( const WorkerOptions other)
default
bota_worker::WorkerOptions::WorkerOptions ( WorkerOptions &&  other)
inlinenoexcept

Definition at line 83 of file WorkerOptions.hpp.

Member Data Documentation

WorkerCallback bota_worker::WorkerOptions::callback_

The primary worker callback to be called

Definition at line 95 of file WorkerOptions.hpp.

WorkerCallbackFailureReaction bota_worker::WorkerOptions::callbackFailureReaction_

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

Definition at line 100 of file WorkerOptions.hpp.

int bota_worker::WorkerOptions::defaultPriority_

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

Definition at line 105 of file WorkerOptions.hpp.

bool bota_worker::WorkerOptions::destructWhenDone_

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

Definition at line 110 of file WorkerOptions.hpp.


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


bota_worker
Author(s):
autogenerated on Wed Mar 3 2021 03:09:10