7#ifndef __BMSBATTERY_H__
8#define __BMSBATTERY_H__
11#include <yarp/os/PeriodicThread.h>
12#include <yarp/dev/IBattery.h>
13#include <yarp/dev/PolyDriver.h>
14#include <yarp/dev/ISerialDevice.h>
15#include <yarp/os/ResourceFinder.h>
16#include <yarp/sig/Vector.h>
18using namespace yarp::os;
21class BmsBattery :
public PeriodicThread,
public yarp::dev::IBattery,
public DeviceDriver
49 BmsBattery(
int period = 20) : PeriodicThread((double)period/1000.0)
57 virtual bool open(yarp::os::Searchable& config);
72 virtual bool verify_checksum(
int& raw_battery_current,
int& raw_battery_voltage,
int& raw_battery_charge,
int& raw_battery_checksum);
virtual bool getBatteryVoltage(double &voltage)
virtual bool getBatteryTemperature(double &temperature)
virtual bool getBatteryStatus(Battery_status &status)
virtual void threadRelease()
virtual bool open(yarp::os::Searchable &config)
virtual bool getBatteryInfo(std::string &info)
virtual bool threadInit()
virtual bool getBatteryCharge(double &charge)
BmsBattery(int period=20)
unsigned char backpack_status
double battery_temperature
virtual bool getBatteryCurrent(double ¤t)