source: flair-dev/trunk/include/FlairSensorActuator/BatteryMonitor.h@ 61

Last change on this file since 61 was 50, checked in by Sanahuja Guillaume, 5 years ago

doc

File size: 1.5 KB
RevLine 
[4]1// %flair:license{
[13]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[4]4// %flair:license}
5/*!
6 * \file BatteryMonitor.h
7 * \brief Base class for battery monitor
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/01/24
10 * \version 4.0
11 */
12
13#ifndef BATTERYMONITOR_H
14#define BATTERYMONITOR_H
15
16#include <GroupBox.h>
17
[13]18namespace flair {
19namespace gui {
20class LayoutPosition;
21class Label;
22class DoubleSpinBox;
[50]23class SpinBox;
[4]24}
[13]25}
[4]26
[13]27namespace flair {
28namespace sensor {
[4]29
[13]30/*! \class BatteryMonitor
31*
32* \brief Base class for battery monitor
33*/
[4]34
[13]35class BatteryMonitor : public gui::GroupBox {
36public:
37 /*!
38 * \brief Constructor
39 *
40 * Construct a BatteryMonitor at given position.
41 *
42 * \param position position
43 * \param name name
44 */
45 BatteryMonitor(const gui::LayoutPosition *position, std::string name);
[4]46
[13]47 /*!
48 * \brief Destructor
49 *
50 */
51 ~BatteryMonitor();
[4]52
[13]53 /*!
54 * \brief Is batteru low?
55 *
56 * \return true if battery is below threshold
57 *
58 */
[50]59 bool IsBatteryLow(void);
[4]60
[13]61 /*!
62 * \brief Set battery value
63 *
64 * \param battery value
65 *
66 */
67 void SetBatteryValue(float value);
[4]68
[13]69 /*!
70 * \brief Get battery voltage
71 *
72 * \return battery voltage
73 *
74 */
75 float GetVoltage(void) const;
[4]76
[13]77private:
78 float batteryvalue;
79 gui::DoubleSpinBox *battery_thresh;
[50]80 gui::SpinBox *thresholdTime;
[13]81 gui::Label *battery;
[50]82 core::Time underThersholdStartTime;
83 bool isUnderThershold;
[13]84};
[4]85} // end namespace sensor
86} // end namespace flair
87
88#endif // BATTERYMONITOR_H
Note: See TracBrowser for help on using the repository browser.