iCub-main
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
batteryReaderThread Class Reference

#include <bcbBattery.h>

+ Inheritance diagram for batteryReaderThread:

Public Member Functions

 batteryReaderThread (ISerialDevice *_iSerial, double period)
 
void startTransmission ()
 
void stopTransmission ()
 
virtual bool threadInit () override
 
virtual void threadRelease () override
 
virtual void run () override
 

Public Attributes

char debugTextBuffer [debugTextBufferSize]
 
bool verboseEnable = false
 
bool screenEnable = true
 
double timeStamp
 
unsigned char tmp_buff [buff_len]
 
unsigned char packet [packet_len]
 
std::regex r_exp
 
ISerialDevice * iSerial = nullptr
 
std::mutex datamut
 
double battery_charge = 0
 
double battery_voltage = 0
 
double battery_current = 0
 
std::string battery_info = "icub battery system v1.0"
 
int backpack_status = 0
 
IBattery::Battery_status battery_status = IBattery::Battery_status::BATTERY_OK_STANDBY
 

Static Public Attributes

static const int debugTextBufferSize = 10000
 
static const int buff_len = 10000
 
static const int packet_len =10
 

Detailed Description

Definition at line 23 of file bcbBattery.h.

Constructor & Destructor Documentation

◆ batteryReaderThread()

batteryReaderThread::batteryReaderThread ( ISerialDevice *  _iSerial,
double  period 
)
inline

Definition at line 51 of file bcbBattery.h.

Member Function Documentation

◆ run()

void batteryReaderThread::run ( )
overridevirtual

Definition at line 130 of file bcbBattery.cpp.

◆ startTransmission()

void batteryReaderThread::startTransmission ( )

Definition at line 277 of file bcbBattery.cpp.

◆ stopTransmission()

void batteryReaderThread::stopTransmission ( )

Definition at line 294 of file bcbBattery.cpp.

◆ threadInit()

bool batteryReaderThread::threadInit ( )
overridevirtual

Definition at line 109 of file bcbBattery.cpp.

◆ threadRelease()

void batteryReaderThread::threadRelease ( )
overridevirtual

Definition at line 272 of file bcbBattery.cpp.

Member Data Documentation

◆ backpack_status

int batteryReaderThread::backpack_status = 0

Definition at line 48 of file bcbBattery.h.

◆ battery_charge

double batteryReaderThread::battery_charge = 0

Definition at line 44 of file bcbBattery.h.

◆ battery_current

double batteryReaderThread::battery_current = 0

Definition at line 46 of file bcbBattery.h.

◆ battery_info

std::string batteryReaderThread::battery_info = "icub battery system v1.0"

Definition at line 47 of file bcbBattery.h.

◆ battery_status

IBattery::Battery_status batteryReaderThread::battery_status = IBattery::Battery_status::BATTERY_OK_STANDBY

Definition at line 49 of file bcbBattery.h.

◆ battery_voltage

double batteryReaderThread::battery_voltage = 0

Definition at line 45 of file bcbBattery.h.

◆ buff_len

const int batteryReaderThread::buff_len = 10000
static

Definition at line 36 of file bcbBattery.h.

◆ datamut

std::mutex batteryReaderThread::datamut

Definition at line 43 of file bcbBattery.h.

◆ debugTextBuffer

char batteryReaderThread::debugTextBuffer[debugTextBufferSize]

Definition at line 28 of file bcbBattery.h.

◆ debugTextBufferSize

const int batteryReaderThread::debugTextBufferSize = 10000
static

Definition at line 27 of file bcbBattery.h.

◆ iSerial

ISerialDevice* batteryReaderThread::iSerial = nullptr

Definition at line 42 of file bcbBattery.h.

◆ packet

unsigned char batteryReaderThread::packet[packet_len]

Definition at line 39 of file bcbBattery.h.

◆ packet_len

const int batteryReaderThread::packet_len =10
static

Definition at line 38 of file bcbBattery.h.

◆ r_exp

std::regex batteryReaderThread::r_exp

Definition at line 40 of file bcbBattery.h.

◆ screenEnable

bool batteryReaderThread::screenEnable = true

Definition at line 32 of file bcbBattery.h.

◆ timeStamp

double batteryReaderThread::timeStamp

Definition at line 35 of file bcbBattery.h.

◆ tmp_buff

unsigned char batteryReaderThread::tmp_buff[buff_len]

Definition at line 37 of file bcbBattery.h.

◆ verboseEnable

bool batteryReaderThread::verboseEnable = false

Definition at line 31 of file bcbBattery.h.


The documentation for this class was generated from the following files: