battery.hpp
Go to the documentation of this file.
00001 
00009 /*****************************************************************************
00010 ** Ifdefs
00011 *****************************************************************************/
00012 
00013 #ifndef KOBUKI_BATTERY_HPP_
00014 #define KOBUKI_BATTERY_HPP_
00015 
00016 /*****************************************************************************
00017 ** Includes
00018 *****************************************************************************/
00019 
00020 #include <stdint.h>
00021 #include "../packets/core_sensors.hpp"
00022 #include "../macros.hpp"
00023 
00024 /*****************************************************************************
00025 ** Namespaces
00026 *****************************************************************************/
00027 
00028 namespace kobuki {
00029 
00030 /*****************************************************************************
00031 ** Interfaces
00032 *****************************************************************************/
00033 
00040 class kobuki_PUBLIC Battery {
00041 public:
00042   enum Source {
00043     None,
00044     Adapter,
00045     Dock
00046   };
00047   enum Level {
00048     Dangerous,
00049     Low,
00050     Healthy,
00051     Maximum
00052   };
00053   enum State {
00054     Discharging,
00055     Charged,
00056     Charging
00057   };
00058 
00059   Battery() {} 
00060   Battery (const uint8_t &new_voltage, const uint8_t &charger_flag);
00061   Level level() const;
00062   float percent() const;
00063 
00064   static double capacity;
00065   static double low;
00066   static double dangerous;
00067   double voltage;
00068   State charging_state;
00069   Source charging_source;
00070 };
00071 
00072 } // namespace kobuki
00073 
00074 #endif /* KOBUKI_BATTERY_HPP_ */


kobuki_driver
Author(s): Daniel Stonier , Younghun Ju , Jorge Santos Simon
autogenerated on Thu Aug 27 2015 13:43:57