LRAUV  revA
ValueDetect.h
Go to the documentation of this file.
1 
12 #ifndef VALUEDETECT_H_
13 #define VALUEDETECT_H_
14 
15 #include "component/Behavior.h"
16 
18 
32 class ValueDetect : public Behavior
33 {
34 public:
35 
36  ValueDetect( const Str& prefix, const Module* module );
37 
38  virtual ~ValueDetect();
39 
41  void initialize( void );
42 
44  bool readParams( float& param );
45 
47  bool calcSatisfied( const float param );
48 
50  void run();
51 
53  bool isSatisfied();
54 
56  bool runIfUnsatisfied();
57 
59  void uninitialize( void );
60 
62  static Behavior* CreateBehavior( const Str& prefix, const Module* module );
63 
64 protected:
65 
66  // Slate input setting variables
67 
70 
73 
76 
79 
80  // Actual values from settings
81 
84 
87 
89  float lastValue_;
90 
91  const Unit* baseUnit_;
92 
93  // Slate input measurements
95 
102 
103  // Argument output variables
110 
111 private:
112  // Note that the copy constructor below is private and not given a body.
113  // Any attempt to call it will return a compiler error.
114  ValueDetect( const ValueDetect& old ); // disallow copy constructor
115 
116 };
117 
118 #endif /*VALUEDETECT_H_*/
void initialize(void)
Initialize function.
Definition: ValueDetect.cpp:68
SettingReader * detectSettingReader_
Surrogate variable to use instead of depth.
Definition: ValueDetect.h:69
UniversalDataReader * pitchReader_
Definition: ValueDetect.h:100
UniversalDataReader * latitudeReader_
Definition: ValueDetect.h:98
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
DataWriter * depthWriter_
Definition: ValueDetect.h:104
UniversalDataReader * headingReader_
Definition: ValueDetect.h:101
bool calcSatisfied(const float param)
Perform the satisfied: return true if envelope "satisfied".
Definition: ValueDetect.cpp:194
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: DataReader.h:30
bool runIfUnsatisfied()
Do the run, and return true if envelope "satisfied".
Definition: ValueDetect.cpp:238
ValueDetect(const Str &prefix, const Module *module)
Definition: ValueDetect.cpp:20
SettingReader * valueSettingReader_
Desired value.
Definition: ValueDetect.h:75
DataWriter * outputValueWriter_
Definition: ValueDetect.h:109
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
DataWriter * pitchWriter_
Definition: ValueDetect.h:107
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
DataWriter * latitudeWriter_
Definition: ValueDetect.h:105
SettingReader * outputSettingReader_
Variable to output at time of detect.
Definition: ValueDetect.h:72
void uninitialize(void)
Uninit function.
Definition: ValueDetect.cpp:315
Contains the Behavior class definition.
Contains the ValueDetect Behavior/Command.
Definition: ValueDetect.h:32
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 ~ValueDetect()
Definition: ValueDetect.cpp:64
DataWriter * longitudeWriter_
Definition: ValueDetect.h:106
DataReader * outputReader_
Definition: ValueDetect.h:94
bool isSatisfied()
Just do the satisfied: return true if envelope "satisfied".
Definition: ValueDetect.cpp:224
UniversalDataReader * depthReader_
Inputs from slate used for outputs.
Definition: ValueDetect.h:97
float deltaSetting_
Optional delta.
Definition: ValueDetect.h:86
Reads values from mission settings.
Definition: SettingReader.h:26
float valueSetting_
Desired value to read.
Definition: ValueDetect.h:83
SettingReader * deltaSettingReader_
Desired delta around the value (optional)
Definition: ValueDetect.h:78
void run()
Just do the run: ignore the results of the satisfied.
Definition: ValueDetect.cpp:215
DataWriter * headingWriter_
Definition: ValueDetect.h:108
UniversalDataReader * longitudeReader_
Definition: ValueDetect.h:99
Code that represents an engineering unit.
Definition: Unit.h:24
static Behavior * CreateBehavior(const Str &prefix, const Module *module)
Mission Component factory interface.
Definition: ValueDetect.cpp:321
float lastValue_
Previous reading.
Definition: ValueDetect.h:89
const Unit * baseUnit_
Definition: ValueDetect.h:91
bool readParams(float &param)
Read in the parameters for satisfied or runIfUnsatisfied: return true if OK.
Definition: ValueDetect.cpp:182