CARMA C++
CryoTemperatures.h
Go to the documentation of this file.
1 
10 #ifndef CARMA_ANTENNA_OVRO_CRYOTEMPERATURES_H
11 #define CARMA_ANTENNA_OVRO_CRYOTEMPERATURES_H
12 
13 // Carma includes
15 #include "carma/canbus/Types.h"
16 #include "carma/monitor/OvroSubsystem.h"
17 
18 namespace log4cpp {
19  // Forward declaration
20  class Category;
21 } // End namespace log4cpp
22 
23 namespace carma {
24 namespace antenna {
25 namespace ovro {
26 
33 {
34 public:
35 
44  carma::monitor::OvroSubsystem & ovroSubsys );
45 
50 
56  std::map<carma::canbus::msgType, std::string> getHalfSecMonitors() const;
57 
63  std::map<carma::canbus::msgType, std::string> getSlowMonitors() const;
64 
74  std::vector<carma::canbus::byteType> &data,
75  bool sim);
76 
86 
90  void updateFrameData();
91 
92 private:
93 
94  // API Id for this device.
95  static const carma::canbus::apiType API_ID = 160;
96 
97  // API version this class was implemented from
98  static const char API_VERSION = 'F';
99 
100  // Late packet timeout in ms
101  static const double PACKET_LATE_THRESHOLD = 150.0;
102 
103  // There are no unique control commands for this device.
104 
105  // Blanking frame message ids.
106  static const carma::canbus::msgType BLANKING_FRAME_PACKET_1 = 0x0E0;
107  static const carma::canbus::msgType BLANKING_FRAME_PACKET_2 = 0x0E1;
108  static const carma::canbus::msgType BLANKING_FRAME_PACKET_3 = 0x0E2;
109 
110  // Disallow assignment and copy construction
112  CryoTemperatures &operator=(const CryoTemperatures &);
113 
114  // Routines to process individual blanking frame CAN packets
115  // These routines are called internally by processMsg.
116  void processBlankingFramePacket1(
117  std::vector<carma::canbus::byteType> &data);
118  void processBlankingFramePacket2(
119  std::vector<carma::canbus::byteType> &data);
120  void processBlankingFramePacket3(
121  std::vector<carma::canbus::byteType> &data);
122 
123  // Routines to produce simulated blanking frame CAN packets.
124  // These routines are called internally by simulateMsg.
125  carma::canbus::Message simBlankingFramePacket1();
126  carma::canbus::Message simBlankingFramePacket2();
127  carma::canbus::Message simBlankingFramePacket3();
128 
129  // Member variables
130  log4cpp::Category &log_; // Reference to the system logger.
131  carma::monitor::OvroSubsystem::Dewar & mon_;
132  carma::monitor::AntennaCommon & comMon_;
133 
134 }; // End class CryoTemperatures
135 }}} // End namespace carma::antenna::ovro
136 #endif
std::map< carma::canbus::msgType, std::string > getHalfSecMonitors() const
Retrieve a map of this devices half second monitor points.
Declarations of carma::canbus types.
Class to encapsulate a CAN message.
Definition: Message.h:21
void updateFrameData()
Update Frame Data.
XacDevice canbus::device class implementation.
Definition: XacDevice.h:37
std::map< carma::canbus::msgType, std::string > getSlowMonitors() const
Return a map of this devices slow monitor points.
unsigned short apiType
Carma API id type.
Definition: Types.h:64
Cryo Temperature device class.
unsigned short nodeType
Carma Node Type id type.
Definition: Types.h:66
carma::canbus::Message simulateMsg(carma::canbus::msgType mid)
Produce a simulated CAN message for a given msgType.
void processMsg(carma::canbus::msgType mid, std::vector< carma::canbus::byteType > &data, bool sim)
Process a CAN message.
carma::canbus::devices::XacDevice class declaration.
CryoTemperatures(carma::canbus::nodeType node, carma::canbus::CanOutput &io, carma::monitor::OvroSubsystem &ovroSubsys)
Constructor.
unsigned short msgType
Carma Message id type.
Definition: Types.h:69
CanOutput interface.
Definition: CanOutput.h:26