LRAUV  revA
AsyncComponent.h
Go to the documentation of this file.
1 
9 #ifndef ASYNCCOMPONENT_H_
10 #define ASYNCCOMPONENT_H_
11 
12 #include "Component.h"
13 
21 {
22 
23 public:
24 
26  {
27  return idlePriority_;
28  }
29 
30 protected:
31 
33  AsyncComponent( const Str& name, const Module* module, const Timespan period, bool idlePriority = false )
34  : Component( name, COMPONENT_ASYNC, module ),
35  idlePriority_( idlePriority )
36  {
38  setPeriod( period );
39  }
40 
42  AsyncComponent( const Str& name, const Module* module, bool idlePriority = false )
43  : Component( name, COMPONENT_ASYNC, module ),
44  idlePriority_( idlePriority )
45  {
47  }
48 
50 
51 };
52 
53 #endif /* ASYNCCOMPONENT_H_ */
void setPeriod(const Timespan &period)
Set the period of this component... used if it is periodic.
Definition: Component.h:325
Contains the Component class definition.
Timespan class, represents a delta of time.
Definition: Timestamp.h:248
runs continuously in its own thread.
Definition: Component.h:95
bool isIdlePriority()
Definition: AsyncComponent.h:25
Module is the abstract base class for a collection of Component objects that can be contained in a lo...
Definition: Module.h:45
bool idlePriority_
Definition: AsyncComponent.h:49
Replacement for standard template class string.
Definition: Str.h:12
Abstract Base class for software components.
Definition: Component.h:53
Abstract Base class for software components that run independently from the computation cycle...
Definition: AsyncComponent.h:20
AsyncComponent(const Str &name, const Module *module, bool idlePriority=false)
Protected constructor for components that run in continuous asynchronous threads. ...
Definition: AsyncComponent.h:42
Definition: Component.h:109
void setState(ComponentState state)
Definition: Component.h:175
AsyncComponent(const Str &name, const Module *module, const Timespan period, bool idlePriority=false)
Protected constructor for components that run in periodic asynchronous threads.
Definition: AsyncComponent.h:33
runs periodically – likely in its own thread.
Definition: Component.h:97