YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IBattery.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_IBATTERY_H
7#define YARP_DEV_IBATTERY_H
8
9#include <string>
10
11#include <yarp/os/Vocab.h>
12#include <yarp/dev/api.h>
14
16namespace yarp::dev {
17class IBattery;
18}
19
26{
27public:
29 {
30 BATTERY_OK_STANDBY = 0,
31 BATTERY_OK_IN_CHARGE = 1,
32 BATTERY_OK_IN_USE = 2,
33 BATTERY_GENERAL_ERROR = 3,
34 BATTERY_TIMEOUT = 4,
35 BATTERY_LOW_WARNING = 5,
36 BATTERY_CRITICAL_WARNING = 6
37 };
38
39 virtual ~IBattery();
40
46 virtual yarp::dev::ReturnValue getBatteryVoltage(double &voltage) = 0;
47
53 virtual yarp::dev::ReturnValue getBatteryCurrent(double &current) = 0;
54
60 virtual yarp::dev::ReturnValue getBatteryCharge(double &charge) = 0;
61
68
74 virtual yarp::dev::ReturnValue getBatteryTemperature(double &temperature) = 0;
75
81 virtual yarp::dev::ReturnValue getBatteryInfo(std::string &battery_info) = 0;
82};
83
84#endif // YARP_DEV_IBATTERY_H
A generic battery interface.
Definition IBattery.h:26
virtual yarp::dev::ReturnValue getBatteryTemperature(double &temperature)=0
get the battery temperature
virtual yarp::dev::ReturnValue getBatteryInfo(std::string &battery_info)=0
get the battery hardware characteristics (e.g.
virtual yarp::dev::ReturnValue getBatteryCharge(double &charge)=0
get the battery status of charge
virtual yarp::dev::ReturnValue getBatteryStatus(Battery_status &status)=0
get the battery status
virtual yarp::dev::ReturnValue getBatteryCurrent(double &current)=0
Get the instantaneous current measurement.
virtual yarp::dev::ReturnValue getBatteryVoltage(double &voltage)=0
Get the instantaneous voltage measurement.
For streams capable of holding different kinds of content, check what they actually have.
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18