LRAUV  revA
VemcoVR2C.h
Go to the documentation of this file.
1 
12 #ifndef VemcoVR2C_H
13 #define VemcoVR2C_H
14 
15 #include "VemcoVR2CIF.h"
16 
18 #include "io/LoadControl.h"
19 #include "io/UartStream.h"
20 #include "logger/Logger.h"
21 
23 
31 {
32 public:
33 
34  VemcoVR2C( const Module* module );
35 
36  virtual ~VemcoVR2C();
37 
38  virtual void run();
39 
42  virtual RunState start();
43 
45  virtual RunState starting();
46 
48  virtual RunState pause();
49 
51  virtual RunState paused();
52 
54  virtual RunState resume();
55 
57  virtual RunState resuming();
58 
60  virtual RunState runnable();
61 
63  virtual RunState resetting()
64  {
65  return start();
66  }
67 
69  virtual RunState stop();
70 
71  virtual RunState stopping();
72 
74  virtual RunState stopped();
75 
76  void uninitialize( void );
77 
79  virtual ConfigURI getConfigURI( ConfigOption configOption ) const;
80 
81 private:
82  // Note that the copy constructor below is private and not given a body.
83  // Any attempt to call it will return a compiler error.
84  VemcoVR2C( const VemcoVR2C& old ); // disallow copy constructor
85 
89 
90  // Really? It reads and parses responses from the Vemco.
91  void readAndParseResponses( void );
92 
93  // returns true if data is requested from one of the readers
94  bool isDataRequested();
95 
96  // Queries the LCBs for status
97  bool logVoltageAndCurrent();
98 
99  // Stores the current response from the device
100  char deviceResponse_[396];
101 
104 
107 
108  // Outputs to slate
110 
112  bool debug_;
113 
115 
116 };
117 #endif /*VemcoVR2C_H*/
Contains the SyncComponent class definition.
virtual RunState start()
Do what needs to be done to run Similar to initialize, in old init/run/uninit sequence.
Definition: VemcoVR2C.cpp:75
Contains the LoadControl class declaration.
virtual void run()
The actual "payload" of the component.
Definition: VemcoVR2C.cpp:68
virtual RunState starting()
Might follow a STOP...START sequence.
Definition: VemcoVR2C.cpp:115
virtual RunState stopped()
Initial state – can be later followed by START.
Definition: VemcoVR2C.cpp:249
Abstract Base class for components that collect data for use later in the computation cycle...
Definition: SyncComponent.h:172
virtual ConfigURI getConfigURI(ConfigOption configOption) const
Should return [myNamespace]::SIMULATE_HARDWARE, or [myNamespace]::POWER, etc.
Definition: VemcoVR2C.cpp:307
bool debug_
Debugging outputs.
Definition: VemcoVR2C.h:112
void uninitialize(void)
Provide a space for uninitialization.
Definition: VemcoVR2C.cpp:293
UartStream uart_
Holds the communications device.
Definition: VemcoVR2C.h:103
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: UniversalDataWriter.h:24
DataWriter * tagIDWriter_
Definition: VemcoVR2C.h:87
RunState
Definition: Component.h:115
Contains the UartStream class declaration.
VemcoVR2C(const Module *module)
Definition: VemcoVR2C.cpp:42
int ADCount_
Definition: VemcoVR2C.h:114
int tagID_
Definition: VemcoVR2C.h:114
Implements both InStream and OutStream for the LPC3XXX Standard UART.
Definition: UartStream.h:26
char deviceResponse_[396]
Definition: VemcoVR2C.h:100
virtual RunState pause()
Pause for a short period (indicated by pauseTime)
Definition: VemcoVR2C.cpp:135
virtual RunState resume()
Resume from PAUSE.
Definition: VemcoVR2C.cpp:152
DataWriter * adCountWriter_
Definition: VemcoVR2C.h:88
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
Definition: BlobWriter.h:227
DataWriter * samplingActiveWriter_
Definition: VemcoVR2C.h:109
Definition: ElementURI.h:166
bool isDataRequested()
Definition: VemcoVR2C.cpp:286
virtual RunState runnable()
Should eventually follow a START request or RESETTING.
Definition: VemcoVR2C.cpp:168
void readAndParseResponses(void)
Definition: VemcoVR2C.cpp:321
bool logVoltageAndCurrent()
Definition: VemcoVR2C.cpp:260
virtual RunState stop()
Initial state – can be later followed by START.
Definition: VemcoVR2C.cpp:212
Module is the abstract base class for a collection of Component objects that can be contained in a lo...
Definition: Module.h:45
virtual RunState resuming()
Might follow a PAUSE...RESUME sequence.
Definition: VemcoVR2C.cpp:160
Provides software interface to the VemcoVR2C sensor.
Definition: VemcoVR2C.h:30
LoadControl loadControl_
Power and comms in this case.
Definition: VemcoVR2C.h:106
This class allows one to control loads on a load controller channel.
Definition: LoadControl.h:24
virtual RunState paused()
Should eventually follow a PAUSE request: should set continueTime.
Definition: VemcoVR2C.cpp:144
Contains the Logger class definition.
virtual RunState stopping()
Might follow a STOP request.
Definition: VemcoVR2C.cpp:232
virtual RunState resetting()
Might occur in case of Error.
Definition: VemcoVR2C.h:63
Specifies the interface details for the VemcoVR2C component in the ScienceModule. ...
ConfigOption
Definition: Component.h:456
virtual ~VemcoVR2C()
Definition: VemcoVR2C.cpp:64
BlobWriter * responseStringWriter_
Definition: VemcoVR2C.h:86