CARMA C++
LOReferenceMonitor.h
Go to the documentation of this file.
1 
9 #ifndef CARMA_ANTENNA_COMMON_LOREFERENCEMONITOR_H
10 #define CARMA_ANTENNA_COMMON_LOREFERENCEMONITOR_H
11 
12 // Carma includes
14 #include "carma/canbus/Types.h"
15 
16 namespace log4cpp {
17  // Forward dec
18  class Category;
19 } // End namespace log4cpp
20 
21 namespace carma {
22 
23 namespace monitor {
24  class LoReference;
25  class StateMonitorPointEnum;
26  class Xac;
27 } // End namespace monitor
28 
29 namespace antenna {
30 namespace common {
31 
38 public:
39 
49  carma::monitor::StateMonitorPointEnum & state,
50  carma::monitor::LoReference& lorefMon,
51  carma::monitor::Xac& xac);
52 
57 
66 
75 
86  bool sim);
87 
98 
102  void updateFrameData();
103 
104  // Public control commands
109  void setLOTerminatorAttenuation(unsigned char atten);
110 
114  void setPowerLevelToPreset( );
115 
120  void setPowerLevel( double power );
121 
122 protected:
123 
124  // There are no protected methods
125 
126 private:
127 
128  // Disallow assignment and copy construction.
130  LOReferenceMonitor &operator=(const LOReferenceMonitor &);
131 
132  // Routines to process individual blanking frame CAN packets.
133  // These routines are called by processMsg.
134  void processBlankingFramePacket1( carma::canbus::DataVector & data );
135  void processBlankingFramePacket2( carma::canbus::DataVector & data );
136  void processBlankingFramePacket3( carma::canbus::DataVector & data );
137  void processBlankingFramePacket4( carma::canbus::DataVector & data );
138  void processBlankingFramePacket5( carma::canbus::DataVector & data );
139 
140  // Routines to produce individual simulated blanking frame
141  // CAN packets. These routines are called by simulateMsg.
142  carma::canbus::Message simBlankingFramePacket1();
143  carma::canbus::Message simBlankingFramePacket2();
144  carma::canbus::Message simBlankingFramePacket3();
145  carma::canbus::Message simBlankingFramePacket4();
146  carma::canbus::Message simBlankingFramePacket5();
147 
148  // Member variables
149  log4cpp::Category &log_; // Reference to the system logger.
150  carma::monitor::StateMonitorPointEnum & state_;
151  carma::monitor::LoReference& mon_;
152  carma::monitor::Xac& xacMon_;
153 
154 }; // End class LOReferenceMonitor
155 }}} // End namespace carma::antenna::common
156 #endif
Declarations of carma::canbus types.
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.
void setPowerLevelToPreset()
Set power level to preset value.
XacDevice canbus::device class implementation.
Definition: XacDevice.h:37
CAN Device class implementation for LO Reference Monitor Module.
void setPowerLevel(double power)
Set power level to requested level.
unsigned short nodeType
Carma Node Type id type.
Definition: Types.h:66
void updateFrameData()
Update Frame Data.
::std::map< ::carma::canbus::msgType,::std::string > MsgBriefMap
Alias for message descriptions keyed by message id.
Definition: Types.h:74
LOReferenceMonitor(carma::canbus::nodeType node, carma::canbus::CanOutput &io, carma::monitor::StateMonitorPointEnum &state, carma::monitor::LoReference &lorefMon, carma::monitor::Xac &xac)
Constructor.
::std::vector< ::carma::canbus::byteType > DataVector
Alias for CAN data.
Definition: Types.h:72
carma::canbus::devices::XacDevice class declaration.
carma::canbus::MsgBriefMap getSlowMonitors() const
Return a map of this devices slow monitor points.
unsigned short msgType
Carma Message id type.
Definition: Types.h:69
void setLOTerminatorAttenuation(unsigned char atten)
Set the LO Terminator Attenuation.
CanOutput interface.
Definition: CanOutput.h:26
carma::canbus::MsgBriefMap getHalfSecMonitors() const
Retrieve a map of this devices half second monitor points.