CARMA C++
Configuration.h
Go to the documentation of this file.
1 
15 #ifndef CARMA_ANTENNA_BIMA_CONFIGURATION_H
16 #define CARMA_ANTENNA_BIMA_CONFIGURATION_H
17 
18 // C++
19 #include <vector>
20 #include <string>
21 
22 
23 // CARMA includes
24 #include "carma/util/Program.h"
25 #include "carma/util/Trace.h"
27 #include "carma/services/Table.h"
28 
31 
32 #if 0
33 #define CPTRACE( A, B )
34 #endif
35 
36 #define IPQLEN 2000
37 
38 namespace carma
39 {
40  namespace antenna
41  {
42  namespace bima
43  {
44  class Configuration
45  {
46 
47  public:
48  Configuration( std::string antenna, std::string confDir, bool emulate = false );
49 
50  std::string getAntenna();
51  int getAntennaNo();
52  bool isEmulating();
53  void setEmulate( bool status );
54  std::string getConfDir();
55  std::string getDewarName();
56  std::string getoscADName();
57  std::string getoscADFile();
58  std::string getoscBName();
59  std::string getoscBFile();
60  std::string getDewarTempDir();
61  std::string getDewarConfFile();
62  std::string getTelemConfFile();
63  std::string getDescTableFile();
64  std::string getDrivesConfFile();
65  std::string getPolConfFile();
66  std::string getCalwheelConfFile();
67  std::string getMotorsName();
68  std::string getMotorsConfFile();
69  bool hasModulatorB() { return _modB; }
70  bool hasModulatorD() { return _modD; }
71  bool cmOpticsInstalled() { return _cmOptics; }
72  std::string getCmDewarName();
73  std::string getCmDewarConfFile();
74  std::string getCmFocusConfFile();
75  int getPSIMod() { return _psiMod; }
76 
77  void setTelemConfigHandlerP( TelemetryConfigHandler *tmCfg )
78  { _tmConfig = tmCfg; };
79  TelemetryConfigHandler *getTelemConfigHandlerP()
80  { return _tmConfig; };
81 
82  void setSemOpP( SemaphoreOperator *semOp )
83  { _semOp = semOp; };
84  SemaphoreOperator *getSemOpP()
85  { return _semOp; };
86 
87  char mytoupper( char c );
88 
89  const static std::string _dewarConfSuffix;
90  const static std::string _dewarTempMeat;
91  const static std::string _telemConfSuffix;
92 
93  private:
94  int _antno;
95  std::string _descTableFile;
96  std::string _dewarName;
97  std::string _antenna;
98  std::string _confDir;
99  std::string _oscADname;
100  std::string _oscADfile;
101  std::string _oscBname;
102  std::string _oscBfile;
103  std::string _dewarTempDir;
104  std::string _dewarConfFile;
105  std::string _telemConfFile;
106  std::string _drivesConfFile;
107  std::string _polConfFile;
108  std::string _calwheelConfFile;
109  std::string _motorsName;
110  std::string _motorsConfFile;
111  bool _modB, _modD, _cmOptics;
112  std::string _cmDewarName;
113  std::string _cmDewarConfFile;
114  std::string _cmFocusConfFile;
115  int _psiMod;
116 
117 
118  carma::services::Table* _descTable;
119 
120  bool _emulate;
121 
122  TelemetryConfigHandler *_tmConfig;
123  SemaphoreOperator *_semOp;
124 
125  }; // class Configuration
126 
127  } // namespace bima
128  } // namespace antenna
129 } // namespace carma
130 
131 ::std::ostream& operator<<( ::std::ostream& os,
132  ::carma::antenna::bima::Configuration& config );
133 
134 #endif // CARMA_ANTENNA_BIMA_CONFIGURATION_H
std::ostream & operator<<(::std::ostream &os, const carma::dbms::Table &table)
Exception class for errors.
SAX Handler for parsing BIMA Telemetry configuration file.
Common table functions.
Interface file for the carma::util::Trace class and related macros.
Simple ASCII Table format, fully memory based.
Definition: Table.h:126
Class definition for TelemetryClient on the BIMA antennas.