YARP
Yet Another Robot Platform
TextureBattery.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef YARP_OVRHEADSET_TEXTUREBATTERY_H
20 #define YARP_OVRHEADSET_TEXTUREBATTERY_H
21 
22 #include <GL/glew.h>
23 #include <OVR_CAPI.h>
24 
25 #include <yarp/os/PeriodicThread.h>
26 
27 #include <array>
28 
29 class TextureStatic;
30 namespace yarp { namespace dev { class PolyDriver; } }
31 namespace yarp { namespace dev { class IBattery; } }
32 
34 {
35 public:
50  };
51 
52  TextureBattery(ovrSession session, bool enabled);
54 
55  ovrSession session;
56 
58 
59  virtual void run();
60 
61 private:
62  std::array<TextureStatic*, 13> textures;
63  BatteryStatus currentStatus;
64 
66  yarp::dev::IBattery* ibat;
67 
68  bool initBatteryClient();
69 };
70 
71 #endif // YARP_OVRHEADSET_TEXTUREBATTERY_H
ovrSession session
TextureStatic * currentTexture
@ BatteryStatusChargingCaution
virtual void run()
Loop function.
TextureBattery(ovrSession session, bool enabled)
A generic battery interface.
Definition: IBattery.h:33
A container for a device driver.
Definition: PolyDriver.h:27
An abstraction for a periodic thread.
The main, catch-all namespace for YARP.
Definition: environment.h:18