Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
laelaps::LaeDescBattery Class Reference

Battery description. More...

#include <laeDesc.h>

Public Member Functions

 LaeDescBattery ()
 Default constructor.
 
virtual ~LaeDescBattery ()
 Destructor.
 
LaeDescBattery operator= (const LaeDescBattery &rhs)
 Assignment operator. More...
 
void clear ()
 Clear description.
 
virtual void print (int indent=0)
 Print out description to stdout. More...
 

Public Attributes

std::string m_strKey
 battery key
 
std::string m_strType
 battery type
 
std::string m_strChemistry
 battery chemistry
 
int m_nNumCells
 number of cells
 
double m_fCapacity
 battery capacity(Ah)
 
double m_fMaxV
 battery maximum high charge (V)
 
double m_fMinV
 battery minimum low at cutoff (V)
 
double m_fNomV
 battery nominal voltage (V)
 

Detailed Description

Battery description.

Definition at line 235 of file laeDesc.h.

Member Function Documentation

LaeDescBattery LaeDescBattery::operator= ( const LaeDescBattery rhs)

Assignment operator.

Parameters
rhsRight hand side object.
Returns
this.

Definition at line 316 of file laeDesc.cxx.

References m_fCapacity, m_fMaxV, m_fMinV, m_fNomV, m_nNumCells, m_strChemistry, m_strKey, and m_strType.

317 {
318  m_strKey = rhs.m_strKey;
319  m_strType = rhs.m_strType;
321  m_nNumCells = rhs.m_nNumCells;
322  m_fCapacity = rhs.m_fCapacity;
323  m_fMaxV = rhs.m_fMaxV;
324  m_fMinV = rhs.m_fMinV;
325  m_fNomV = rhs.m_fNomV;
326 
327  return *this;
328 }
std::string m_strChemistry
battery chemistry
Definition: laeDesc.h:240
double m_fCapacity
battery capacity(Ah)
Definition: laeDesc.h:242
double m_fMinV
battery minimum low at cutoff (V)
Definition: laeDesc.h:244
double m_fMaxV
battery maximum high charge (V)
Definition: laeDesc.h:243
int m_nNumCells
number of cells
Definition: laeDesc.h:241
std::string m_strType
battery type
Definition: laeDesc.h:239
std::string m_strKey
battery key
Definition: laeDesc.h:238
double m_fNomV
battery nominal voltage (V)
Definition: laeDesc.h:245
void LaeDescBattery::print ( int  indent = 0)
virtual

Print out description to stdout.

Parameters
indentLeft indentation.

Definition at line 342 of file laeDesc.cxx.

References m_fCapacity, m_fMaxV, m_fMinV, m_fNomV, m_nNumCells, m_strChemistry, m_strKey, and m_strType.

Referenced by laelaps::LaeDesc::print().

343 {
344  printf("%*sBattery Description =\n", indent, "");
345  printf("%*s{\n", indent, "");
346  printf("%*sKey = %s\n", indent+2, "", m_strKey.c_str());
347  printf("%*sType = %s\n", indent+2, "", m_strType.c_str());
348  printf("%*sChemistry = %s\n", indent+2, "", m_strChemistry.c_str());
349  printf("%*sCapacity Ah = %.2lf\n", indent+2, "", m_fCapacity);
350  printf("%*sCells = %d\n", indent+2, "", m_nNumCells);
351  printf("%*sMax V = %.2lf\n", indent+2, "", m_fMaxV);
352  printf("%*sNominal V = %.2lf\n", indent+2, "", m_fNomV);
353  printf("%*sMin V = %.2lf\n", indent+2, "", m_fMinV);
354  printf("%*s}\n", indent, "");
355 }
std::string m_strChemistry
battery chemistry
Definition: laeDesc.h:240
double m_fCapacity
battery capacity(Ah)
Definition: laeDesc.h:242
double m_fMinV
battery minimum low at cutoff (V)
Definition: laeDesc.h:244
double m_fMaxV
battery maximum high charge (V)
Definition: laeDesc.h:243
int m_nNumCells
number of cells
Definition: laeDesc.h:241
std::string m_strType
battery type
Definition: laeDesc.h:239
std::string m_strKey
battery key
Definition: laeDesc.h:238
double m_fNomV
battery nominal voltage (V)
Definition: laeDesc.h:245

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