CARMA C++
UmacControl.h
Go to the documentation of this file.
1 #ifndef SZA_ANTENNA_CONTROL_UMACCONTROL_H
2 #define SZA_ANTENNA_CONTROL_UMACCONTROL_H
3 
11 #include <string>
12 #include <list>
13 
16 
19 #include "carma/szautil/TimeVal.h"
20 
21 namespace sza {
22  namespace antenna {
23  namespace control {
24 
29  class AntennaMaster;
30 
36  class UmacControl :
37  public SzaTask,
38  public sza::util::GenericTask<UmacControlMsg> {
39 
40  public:
41 
45  UmacControl(AntennaMaster* parent);
46 
50  virtual ~UmacControl();
51 
52  private:
53 
54  friend class AntennaMaster;
55 
56  AntennaMaster* parent_;
57 
58  sza::util::SerialClient* client_;
59  sza::util::TimeVal timer_;
60  struct timeval* timeOut_;
61 
66  std::list<std::string> sentStrings_;
67  std::list<std::string> rcvdStrings_;
68 
72  std::list<std::string>::iterator sentStringIter_;
73  std::list<std::string>::iterator rcvdStringIter_;
74 
79  void initSerialConnection() ;
80 
84  void initiateCommSequence(unsigned breaker, bool power);
85 
89  void terminateCommSequence();
90 
95  void compileCommandStateMachine(unsigned breaker,
96  bool power);
97 
101  void enableTimeOut(bool enable);
102 
106  void processClientMessage();
107 
111  void registerTimeOut();
112 
116  void serviceMsgQ();
117 
121  void processMsg(UmacControlMsg* msg);
122 
123 
124  }; // End class UmacControl
125 
126  } // End namespace control
127  } // End namespace antenna
128 } // End namespace sza
129 
130 
131 
132 #endif // End #ifndef SZA_ANTENNA_CONTROL_UMACCONTROL_H
UmacControl(AntennaMaster *parent)
Constructor.
Tagged: Mon Jul 19 11:41:59 PDT 2004.
A class for managing timeval/timespec structs.
Definition: TimeVal.h:53
Tagged: Fri Nov 14 12:39:33 UTC 2003.
Tagged: Fri Nov 14 12:39:38 UTC 2003.
All tasks will have the following functionality:
Definition: GenericTask.h:32
AntennaRx class will handle all receiver functions.
Definition: UmacControl.h:36
Tagged: Mon May 10 15:32:08 PDT 2004.
Tagged: Thu Nov 13 16:53:54 UTC 2003.
virtual ~UmacControl()
Destructor.
Define a class to encapsulate the entire Antenna control system.