LRAUV  revA
SetSpeed.h
Go to the documentation of this file.
1 
12 #ifndef SETSPEED_H_
13 #define SETSPEED_H_
14 
15 #include "component/Behavior.h"
16 
18 
28 class SetSpeed : public Behavior
29 {
30 public:
31 
32  SetSpeed( const Str& prefix, const Module* module );
33 
34  virtual ~SetSpeed();
35 
37  void initialize( void );
38 
40  bool readParams( float& speed );
41 
43  bool calcSatisfied( const float speed );
44 
46  void run();
47 
49  bool isSatisfied();
50 
52  bool runIfUnsatisfied();
53 
55  void uninitialize( void );
56 
58  static Behavior* CreateBehavior( const Str& prefix, const Module* module );
59 
60 protected:
61 
62  // Slate input setting variables
63 
66 
69 
70  // Slate input measurements
71 
74 
75  // Slate output variables
76 
79 
82 
85 
88 
89 private:
90  // Note that the copy constructor below is private and not given a body.
91  // Any attempt to call it will return a compiler error.
92  SetSpeed( const SetSpeed& old ); // disallow copy constructor
93 
94 };
95 
96 #endif /*SETSPEED_H_*/
void uninitialize(void)
Uninit function.
Definition: SetSpeed.cpp:124
bool isSatisfied()
Just do the satisfied: return true if envelope "satisfied".
Definition: SetSpeed.cpp:90
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
SettingReader * periodSettingReader_
Desired control loop period.
Definition: SetSpeed.h:68
bool readParams(float &speed)
Read in the parameters for satisfied or runIfUnsatisfied: return true if OK.
Definition: SetSpeed.cpp:56
bool calcSatisfied(const float speed)
Perform the satisfied: return true if envelope "satisfied".
Definition: SetSpeed.cpp:69
float periodSetting_
The current LoopControl Period.
Definition: SetSpeed.h:87
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
void run()
Just do the run: ignore the results of the satisfied.
Definition: SetSpeed.cpp:77
DataWriter * speedCmdWriter_
Sets the speed specification for SpeedControl.
Definition: SetSpeed.h:78
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
Contains the Behavior class definition.
static Behavior * CreateBehavior(const Str &prefix, const Module *module)
Mission Component factory interface.
Definition: SetSpeed.cpp:130
float speedSetting_
The current speed setting.
Definition: SetSpeed.h:84
Module is the abstract base class for a collection of Component objects that can be contained in a lo...
Definition: Module.h:45
Replacement for standard template class string.
Definition: Str.h:12
bool runIfUnsatisfied()
Do the run, and return true if envelope "satisfied".
Definition: SetSpeed.cpp:104
Reads values from mission settings.
Definition: SettingReader.h:26
UniversalDataReader * speedReader_
Current depth or surrogate for depth.
Definition: SetSpeed.h:73
SetSpeed(const Str &prefix, const Module *module)
Definition: SetSpeed.cpp:19
DataWriter * periodCmdWriter_
Sets the period specification for LoopControl.
Definition: SetSpeed.h:81
Contains the SetSpeed Behavior/Command.
Definition: SetSpeed.h:28
virtual ~SetSpeed()
Definition: SetSpeed.cpp:39
SettingReader * speedSettingReader_
Desired speed of the vehicle.
Definition: SetSpeed.h:65
void initialize(void)
Initialize function.
Definition: SetSpeed.cpp:43