Kuon  1.1.3
RoadNarrows Robotics Large Outdoor Mobile Robot Project
kuonStatus.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: Kuon
4 //
5 // Library: libkuon
6 //
7 // File: kuonStatus.h
8 //
9 /*! \file
10  *
11  * $LastChangedDate: 2014-04-04 17:05:03 -0600 (Fri, 04 Apr 2014) $
12  * $Rev: 3629 $
13  *
14  * \brief Kuon Robot Status classes interfaces.
15  *
16  * \author Robin Knight (robin.knight@roadnarrows.com)
17  *
18  * \copyright
19  * \h_copy 2014-2017. RoadNarrows LLC.\n
20  * http://www.roadnarrows.com\n
21  * All Rights Reserved
22  */
23 /*
24  * @EulaBegin@
25 // Unless otherwise noted, all materials contained are copyrighted and may not
26 // be used except as provided in these terms and conditions or in the copyright
27 // notice (documents and software ) or other proprietary notice provided with
28 // the relevant materials.
29 //
30 //
31 // IN NO EVENT SHALL THE AUTHOR, ROADNARROWS, OR ANY MEMBERS/EMPLOYEES/
32 // CONTRACTORS OF ROADNARROWS OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY
33 // PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
34 // DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
35 // EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF
36 // THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // THE AUTHORS AND ROADNARROWS SPECIFICALLY DISCLAIM ANY WARRANTIES,
39 // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
40 // FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
41 // "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
42 // PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
43  * @EulaEnd@
44  */
45 ////////////////////////////////////////////////////////////////////////////////
46 
47 #ifndef _KUON_STATUS_H
48 #define _KUON_STATUS_H
49 
50 #include <string>
51 #include <vector>
52 
53 #include "rnr/rnrconfig.h"
54 
55 #include "Kuon/kuon.h"
56 
57 namespace kuon
58 {
59  // ---------------------------------------------------------------------------
60  // Class KuonMotorHealth
61  // ---------------------------------------------------------------------------
62 
63  /*!
64  * \brief Robot motor health.
65  */
67  {
68  public:
69  /*!
70  * \brief Default constructor.
71  */
73 
74  /*!
75  * \brief Copy constructor.
76  */
77  KuonMotorHealth(const KuonMotorHealth &src);
78 
79  /*!
80  * \brief Destructor.
81  */
83  {
84  }
85 
86  /*!
87  * \brief Assignment operator.
88  *
89  * \param rhs Right hand side object.
90  *
91  * \return Returns copy of this.
92  */
94 
95  std::string m_strName; ///< motor name
96  int m_nMotorId; ///< motor id
97  float m_fTemperature; ///< motor temperature (Celsius)
98  float m_fVoltage; ///< motor voltage (volts)
99  uint_t m_uAlarms; ///< motor alarms
100  };
101 
102 
103  // ---------------------------------------------------------------------------
104  // Class KuonRobotStatus
105  // ---------------------------------------------------------------------------
106 
107  /*!
108  * \brief Robot global status.
109  */
111  {
112  public:
113  typedef std::vector<KuonMotorHealth> VecHealth;
114 
115  /*!
116  * \brief Default constructor.
117  */
119  {
120  clear();
121  }
122 
123  /*!
124  * \brief Copy constructor.
125  */
126  KuonRobotStatus(const KuonRobotStatus &src);
127 
128  /*!
129  * \brief Destructor.
130  */
132  {
133  }
134 
135  /*!
136  * \brief Assignment operator.
137  *
138  * \param rhs Right hand side object.
139  *
140  * \return Returns copy of this.
141  */
143 
144  /*!
145  * \brief Clear data.
146  */
147  void clear();
148 
149  KuonRobotMode m_eRobotMode; ///< robot operating mode
150  KuonTriState m_eIsEStopped; ///< robot is [not] emergency stopped
151  KuonTriState m_eAreDrivesPowered; ///< motor are [not] powered
152  KuonTriState m_eIsMotionPossible; ///< motion is [not] possible
153  KuonTriState m_eIsInMotion; ///< robot is [not] moving
154  KuonTriState m_eIsInError; ///< robot is [not] in error condition
155  int m_nErrorCode; ///< kuon error code
156  float m_fGovernor; ///< speed limiting governor (0-1)
157  float m_fBattery; ///< current battery energy (Wh)
158  VecHealth m_vecMotorHealth; ///< motors' health
159  };
160 
161 } // namespace kuon
162 
163 #endif // _KUON_STATUS_H
KuonTriState m_eIsMotionPossible
motion is [not] possible
Definition: kuonStatus.h:152
KuonTriState m_eAreDrivesPowered
motor are [not] powered
Definition: kuonStatus.h:151
~KuonMotorHealth()
Destructor.
Definition: kuonStatus.h:82
uint_t m_uAlarms
motor alarms
Definition: kuonStatus.h:99
~KuonRobotStatus()
Destructor.
Definition: kuonStatus.h:131
float m_fGovernor
speed limiting governor (0-1)
Definition: kuonStatus.h:156
float m_fVoltage
motor voltage (volts)
Definition: kuonStatus.h:98
KuonTriState m_eIsInMotion
robot is [not] moving
Definition: kuonStatus.h:153
KuonMotorHealth()
Default constructor.
Definition: kuonStatus.cxx:68
int m_nMotorId
motor id
Definition: kuonStatus.h:96
KuonTriState
<b><i>Kuon</i></b> tri-state type.
Definition: kuon.h:337
The <b><i>Kuon</i></b> namespace encapsulates all <b><i>Kuon</i></b> related constructs.
Definition: kuon.h:66
float m_fTemperature
motor temperature (Celsius)
Definition: kuonStatus.h:97
int m_nErrorCode
kuon error code
Definition: kuonStatus.h:155
KuonRobotMode
<b><i>Kuon</i></b> mode of operation.
Definition: kuon.h:364
KuonTriState m_eIsEStopped
robot is [not] emergency stopped
Definition: kuonStatus.h:150
RoadNarrows Kuon robot top-level header file.
float m_fBattery
current battery energy (Wh)
Definition: kuonStatus.h:157
VecHealth m_vecMotorHealth
motors&#39; health
Definition: kuonStatus.h:158
KuonRobotStatus()
Default constructor.
Definition: kuonStatus.h:118
KuonMotorHealth operator=(const KuonMotorHealth &rhs)
Assignment operator.
Definition: kuonStatus.cxx:85
Robot global status.
Definition: kuonStatus.h:110
std::string m_strName
motor name
Definition: kuonStatus.h:95
KuonRobotMode m_eRobotMode
robot operating mode
Definition: kuonStatus.h:149
KuonTriState m_eIsInError
robot is [not] in error condition
Definition: kuonStatus.h:154
Robot motor health.
Definition: kuonStatus.h:66