The VisAO Camera
PwrMon.h
Go to the documentation of this file.
1 /************************************************************
2 * PwrMon.h
3 *
4 * Author: Jared R. Males (jrmales@email.arizona.edu)
5 *
6 * Declarations for the PwrMon class, which monitors the VisAOPwrCtrl
7 * application. VisAO power control is managed from the supervisor computer
8 * in the interest of reliability, but the VisAO system needs access to it.
9 *
10 * Developed as part of the Magellan Adaptive Optics system.
11 ************************************************************/
12 
13 /** \file PwrMon.h
14  * \author Jared R. Males
15  * \brief Declarations for the VisAOPwrMon class
16  *
17  * VisAOPwrMon monitors the VisAOPwrCtrl
18  * application. VisAO power control is managed from the supervisor computer
19  * in the interest of reliability, but the VisAO system needs access to it.
20  *
21 */
22 
23 #ifndef __PwrMon_h__
24 #define __PwrMon_h__
25 
26 
27 #include "AOApp.h"
28 #include "VisAOApp_base.h"
29 
30 
31 
32 namespace VisAO
33 {
34 
35 ///A class to monitor the VisAOPwrCtrl via the RTDB.
36 class PwrMon : public AOApp, public VisAOApp_base
37 {
38 public:
39  ///Standard adopt style config file constructor.
40  PwrMon( std::string name, const std::string &conffile) throw (AOException);
41 
42  ///Standard adopt style command line constructor.
43  PwrMon( int argc, char **argv) throw (AOException);
44 
45 protected:
46 
47  ///Basic setup of the class, called by both constructors.
48  void setupVisAOApp();
49 
50  /// Virtual function to setup variables in RTDB
51  void SetupVars();
52 
53  RTDBvar var_outlet1_cur, var_outlet1_req, var_outlet1_name;
54  RTDBvar var_outlet2_cur, var_outlet2_req, var_outlet2_name;
55  RTDBvar var_outlet3_cur, var_outlet3_req, var_outlet3_name;
56  RTDBvar var_outlet4_cur, var_outlet4_req, var_outlet4_name;
57  RTDBvar var_outlet5_cur, var_outlet5_req, var_outlet5_name;
58  RTDBvar var_outlet6_cur, var_outlet6_req, var_outlet6_name;
59  RTDBvar var_outlet7_cur, var_outlet7_req, var_outlet7_name;
60  RTDBvar var_outlet8_cur, var_outlet8_req, var_outlet8_name;
61 public:
62  static int outlet1CurChanged(void *pt, Variable *msgb);
63  static int outlet2CurChanged(void *pt, Variable *msgb);
64  static int outlet3CurChanged(void *pt, Variable *msgb);
65  static int outlet4CurChanged(void *pt, Variable *msgb);
66  static int outlet5CurChanged(void *pt, Variable *msgb);
67  static int outlet6CurChanged(void *pt, Variable *msgb);
68  static int outlet7CurChanged(void *pt, Variable *msgb);
69  static int outlet8CurChanged(void *pt, Variable *msgb);
70 
71 protected:
72  virtual void Run();
73 
74  virtual int init_statusboard();
75 
76  /// Update the status board.
77  /** Calls this as VisAOApp_bas::update_statusboard so the basics are taken care of.
78  * \retval 0 on success
79  * \retval -1 on failure
80  */
81  virtual int update_statusboard();
82 
83 
84 };
85 
86 } //namespace VisAO
87 
88 #endif //__PwrMon_h__
89 
A class to monitor the VisAOPwrCtrl via the RTDB.
Definition: PwrMon.h:36
void SetupVars()
Virtual function to setup variables in RTDB.
Definition: PwrMon.cpp:61
void setupVisAOApp()
Basic setup of the class, called by both constructors.
Definition: PwrMon.cpp:42
PwrMon(std::string name, const std::string &conffile)
Standard adopt style config file constructor.
Definition: PwrMon.cpp:32
The base class for VisAO applications.
Definition: VisAOApp_base.h:48
Declarations for VisAOApp_base.
virtual int update_statusboard()
Update the status board.
Definition: PwrMon.cpp:312
The namespace of VisAO software.