LRAUV  revA
PrepareToDive.h
Go to the documentation of this file.
1 
12 #ifndef PREPARETODIVE_H_
13 #define PREPARETODIVE_H_
14 
15 #include "component/Behavior.h"
16 
17 class ConfigReader;
19 
30 class PrepareToDive : public Behavior
31 {
32 public:
33 
34  PrepareToDive( const Str& prefix, const Module* module );
35 
36  virtual ~PrepareToDive();
37 
39  void initialize( void );
40 
42  bool readParams( float& massPosition );
43 
45  bool calcSatisfied( const float massPosition );
46 
48  void run();
49 
51  bool isSatisfied();
52 
54  bool runIfUnsatisfied();
55 
57  void uninitialize( void );
58 
60  static Behavior* CreateBehavior( const Str& prefix, const Module* module );
61 
62 protected:
63 
64  // Configuration
67 
70 
71  // Slate output variables
72 
75 
78 
82 
83 private:
84  // Note that the copy constructor below is private and not given a body.
85  // Any attempt to call it will return a compiler error.
86  PrepareToDive( const PrepareToDive& old ); // disallow copy constructor
87 
88  // indicates whether things are ok to run
89  bool ok_;
90 
92  float massDefault_;
95 
96  // initialize vehicle config variables
97  bool readConfig( void );
98 
99 };
100 
101 #endif /*PREPARETODIVE_H_*/
DataWriter * massPositionCmdWriter_
Sets the mass position.
Definition: PrepareToDive.h:77
DataWriter * verticalModeWriter_
Sets the vertical mode.
Definition: PrepareToDive.h:74
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
bool isSatisfied()
Just do the satisfied: return true if envelope "satisfied".
Definition: PrepareToDive.cpp:96
float massDeviation_
Definition: PrepareToDive.h:93
UniversalDataReader * massPositionReader_
Current depth (in meter from sea surface – positive down)
Definition: PrepareToDive.h:69
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
bool calcSatisfied(const float massPosition)
Perform the satisfied: return true if envelope "satisfied".
Definition: PrepareToDive.cpp:82
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
bool ok_
Definition: PrepareToDive.h:89
Contains the Behavior class definition.
void uninitialize(void)
Uninit function.
Definition: PrepareToDive.cpp:140
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
virtual ~PrepareToDive()
Definition: PrepareToDive.cpp:44
ConfigReader * massDefaultConfigReader_
Definition: PrepareToDive.h:65
static Behavior * CreateBehavior(const Str &prefix, const Module *module)
Mission Component factory interface.
Definition: PrepareToDive.cpp:147
Definition: ConfigReader.h:13
ConfigReader * massDeviationCfgReader_
Definition: PrepareToDive.h:66
DataWriter * speedCmdWriter_
Resets Dynamic Control variables Default is zero.
Definition: PrepareToDive.h:81
void run()
Just do the run: ignore the results of the satisfied.
Definition: PrepareToDive.cpp:89
bool readConfig(void)
Definition: PrepareToDive.cpp:70
PrepareToDive(const Str &prefix, const Module *module)
Definition: PrepareToDive.cpp:25
bool runIfUnsatisfied()
Do the run, and return true if envelope "satisfied".
Definition: PrepareToDive.cpp:109
bool readParams(float &massPosition)
Read in the parameters for satisfied or runIfUnsatisfied: return true if OK.
Definition: PrepareToDive.cpp:61
void initialize(void)
Initialize function.
Definition: PrepareToDive.cpp:49
Contains the PrepareToDive Behavior/Command.
Definition: PrepareToDive.h:30
float massDefault_
*----------------— vehicle parameters -----------------------—*/
Definition: PrepareToDive.h:92