CARMA C++
SecondaryMirror.h
Go to the documentation of this file.
1 
10 #ifndef CARMA_ANTENNA_OVRO_SECONDARYMIRROR_H
11 #define CARMA_ANTENNA_OVRO_SECONDARYMIRROR_H
12 
13 // Carma includes
15 #include "carma/canbus/Types.h"
16 #include "carma/monitor/OvroSubsystem.h"
17 
18 #include <memory>
19 
20 namespace log4cpp {
21  // Forward declarations.
22  class Category;
23 } // End namespace log4cpp
24 
25 namespace carma {
26 
27 namespace monitor {
28  class AntennaCommon;
29 } // End namespace monitor
30 
31 namespace antenna {
32 namespace ovro {
33 
34 class SharedOpticsSeqNo;
35 
45 public:
46 
55  carma::monitor::OvroSubsystem & ovroSubsys,
56  carma::antenna::ovro::SharedOpticsSeqNo & sharedSeqNo );
57 
62 
71 
80 
92  bool sim );
93 
104 
108  void updateFrameData( );
109 
110  // Public control commands
111 
116  void setXPosition( float posInMM, long seqNo );
117 
122  void setYPosition( float posInMM, long seqNo );
123 
128  void setZPosition( float posInMM, long seqNo );
129 
133  void cycleLvdtPower( );
134 
138  void stopMotion( );
139 
143  void doZTracking( bool ztrack, long seqNo );
144 
145 private:
146 
147  // No copy of assignment allowed
148  SecondaryMirror( const SecondaryMirror & );
149  SecondaryMirror &operator=( const SecondaryMirror & );
150 
151  // Routines to process individual blanking frame CAN packets.
152  void processBlankingFramePacket1( carma::canbus::DataVector & data );
153  void processBlankingFramePacket2( carma::canbus::DataVector & data );
154  void processBlankingFramePacket3( carma::canbus::DataVector & data );
155  void processBlankingFramePacket4( carma::canbus::DataVector & data );
156 
157  // Routines to produce simulated blanking frame CAN packets.
158  carma::canbus::Message simBlankingFramePacket1( );
159  carma::canbus::Message simBlankingFramePacket2( );
160  carma::canbus::Message simBlankingFramePacket3( );
161  carma::canbus::Message simBlankingFramePacket4( );
162 
163  // Member variables
164  carma::monitor::AntennaCommon & comMon_; // Reference to common MPs.
165  carma::monitor::OvroSubsystem::Secondary & mon_; // Reference to secondary.
166 
167  carma::antenna::ovro::SharedOpticsSeqNo & sharedSeqNo_;
168 
169  struct Shared;
170 
171  ::std::auto_ptr< Shared > shared_;
172 
173 }; // End class SecondaryMirror
174 }}} // End namespace carma::antenna::ovro
175 #endif
10-m Secondary Mirror CAN device class.
carma::canbus::MsgBriefMap getSlowMonitors() const
Return a map of this devices slow monitor points.
void updateFrameData()
Update Frame Data.
void setXPosition(float posInMM, long seqNo)
Set position along horizontal axis (relative to horizon).
Declarations of carma::canbus types.
void cycleLvdtPower()
Cycle LVDT 12 V power.
Class to encapsulate a CAN message.
Definition: Message.h:21
carma::canbus::Message simulateMsg(carma::canbus::msgType mid)
Produce a simulated CAN message for a given msgType.
void processMsg(carma::canbus::msgType mid, carma::canbus::DataVector &data, bool sim)
Process a CAN message addressed to the SecondaryMirror module.
XacDevice canbus::device class implementation.
Definition: XacDevice.h:37
SecondaryMirror(carma::canbus::nodeType node, carma::canbus::CanOutput &io, carma::monitor::OvroSubsystem &ovroSubsys, carma::antenna::ovro::SharedOpticsSeqNo &sharedSeqNo)
Constructor.
unsigned short nodeType
Carma Node Type id type.
Definition: Types.h:66
void doZTracking(bool ztrack, long seqNo)
Do Z Tracking.
::std::map< ::carma::canbus::msgType,::std::string > MsgBriefMap
Alias for message descriptions keyed by message id.
Definition: Types.h:74
void setZPosition(float posInMM, long seqNo)
Set position parallel to beam (focus).
::std::vector< ::carma::canbus::byteType > DataVector
Alias for CAN data.
Definition: Types.h:72
void setYPosition(float posInMM, long seqNo)
Set position along vertical axis (relative to horizon).
carma::canbus::devices::XacDevice class declaration.
unsigned short msgType
Carma Message id type.
Definition: Types.h:69
carma::canbus::MsgBriefMap getHalfSecMonitors() const
Retrieve a map of this devices half second monitor points.
CanOutput interface.
Definition: CanOutput.h:26