battery.hpp
Go to the documentation of this file.
1 
9 /*****************************************************************************
10 ** Ifdefs
11 *****************************************************************************/
12 
13 #ifndef KOBUKI_BATTERY_HPP_
14 #define KOBUKI_BATTERY_HPP_
15 
16 /*****************************************************************************
17 ** Includes
18 *****************************************************************************/
19 
20 #include <stdint.h>
21 #include "../packets/core_sensors.hpp"
22 #include "../macros.hpp"
23 
24 /*****************************************************************************
25 ** Namespaces
26 *****************************************************************************/
27 
28 namespace kobuki {
29 
30 /*****************************************************************************
31 ** Interfaces
32 *****************************************************************************/
33 
41 public:
42  enum Source {
45  Dock
46  };
47  enum Level {
49  Low,
51  Maximum
52  };
53  enum State {
56  Charging
57  };
58 
59  Battery() {}
60  Battery (const uint8_t &new_voltage, const uint8_t &charger_flag);
61  Level level() const;
62  float percent() const;
63 
64  static double capacity;
65  static double low;
66  static double dangerous;
67  double voltage;
70 };
71 
72 } // namespace kobuki
73 
74 #endif /* KOBUKI_BATTERY_HPP_ */
static double low
Definition: battery.hpp:65
Source charging_source
Definition: battery.hpp:69
#define kobuki_PUBLIC
Definition: macros.hpp:39
State charging_state
Definition: battery.hpp:68
double voltage
Definition: battery.hpp:67
Battery level module.
Definition: battery.hpp:40
static double capacity
Definition: battery.hpp:64
static double dangerous
Definition: battery.hpp:66


kobuki_driver
Author(s): Daniel Stonier , Younghun Ju , Jorge Santos Simon
autogenerated on Mon Mar 27 2017 01:02:59