CARMA C++
AntennaDrive.h
Go to the documentation of this file.
1 #ifndef DRIVETASK_H
2 #define DRIVETASK_H
3 
12 #include "carma/szautil/SignalTask.h" // SIGNALTASK_HANDLER_FN
13 
18 
19 #define ANTENNADRIVE_TASK_FWD_FN(fn) void (fn)(AntennaDriveMsg* msg)
20 
21 // Create an AntennaDrive class in namespace carma
22 
23 namespace sza {
24  namespace antenna {
25  namespace control {
26 
31  class AntennaMaster;
32 
43  class AntennaDrive :
44  public SzaTask,
45  public sza::util::GenericTask<AntennaDriveMsg> {
46 
47  public:
48 
52  void sendPmacConnectedMsg(bool connected);
53 
57  void sendPmacDoneMsg(unsigned int seq);
58 
62  void sendSourceSetMsg(unsigned int seq);
63 
68  void sendCarmaSeqNoMsg(unsigned long seq,
69  sza::util::GenericTaskMsg::CarmaSeqNoType type,
70  bool success);
71 
72  private:
73 
74  bool simPmac_;
75 
80  friend class AntennaMaster;
81 
85  AntennaMaster* parent_;
86 
93  AntennaDrive(AntennaMaster* parent, bool simPmac=false);
94 
100  ~AntennaDrive();
101 
107  void processMsg(AntennaDriveMsg* taskMsg);
108 
115  void adoptBoards();
116 
117  //------------------------------------------------------------
118  // Thread management functions.
119  //------------------------------------------------------------
120 
124  static THREAD_START(startTracker);
125 
126  //------------------------------------------------------------
127  // Thread cleanup handlers methods
128 
132  static THREAD_CLEAN(cleanTracker);
133 
134  //------------------------------------------------------------
135  // Ping routines for the (pingable) subsystem threads
136 
140  static THREAD_PING(pingTracker);
141 
142  //------------------------------------------------------------
143  // Subsystem resources.
144  //
145  // Pointers to the subsystem resources. These pointers are
146  // initialized by the subsystem threads on startup
147 
151  Tracker* trackertask_;
152 
156  ANTENNADRIVE_TASK_FWD_FN(forwardTrackerMsg);
157 
161  void respondToHeartBeat();
162 
163  }; // End class AntennaDrive
164 
165  }; // End namespace control
166  }; // End namespace antenna
167 }; // End namespace sza
168 
169 #endif
170 
171 
Tagged: Thu Nov 13 16:53:55 UTC 2003.
A container for messages sent to the Drive Task.
void sendCarmaSeqNoMsg(unsigned long seq, sza::util::GenericTaskMsg::CarmaSeqNoType type, bool success)
Send a message to the parent that a CARMA sequence number should be written.
Tagged: Fri Nov 14 12:39:33 UTC 2003.
Tagged: Thu Nov 13 16:53:54 UTC 2003.
All tasks will have the following functionality:
Definition: GenericTask.h:32
void sendPmacDoneMsg(unsigned int seq)
Send a message to the parent that the pmac is disconnected.
void sendPmacConnectedMsg(bool connected)
Send a message that the pmac is dis/connected.
Tagged: Fri Nov 14 12:39:36 UTC 2003.
The AntennaDrive collects together the functionality of the base class Drive and its descendants...
Definition: AntennaDrive.h:43
Tagged: Thu Nov 13 16:53:54 UTC 2003.
Define a class that will handle pointing and tracking for this antenna.
Definition: Tracker.h:51
void sendSourceSetMsg(unsigned int seq)
Send a message to the parent that the source has set.
Tagged: Thu Nov 13 16:53:28 UTC 2003.
Define a class to encapsulate the entire Antenna control system.