INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         
smartbatteryparsing.h
1 /*
2  * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
3  * http://gearbox.sf.net/
4  * Copyright (c) 2004-2010 Tobias Kaupp
5  *
6  * This distribution is licensed to you under the terms described in
7  * the LICENSE file included in this distribution.
8  *
9  */
10 
11 #ifndef GBX_SMARTBATTERY_PARSING_H
12 #define GBX_SMARTBATTERY_PARSING_H
13 
14 #include <stdint.h>
15 
16 #include <vector>
17 #include <map>
18 
19 #include <gbxutilacfr/tracer.h>
20 
21 namespace gbxsmartbatteryacfr
22 {
23 
26 void readFlags( const std::string &str,
27  std::vector<bool> &flags );
28 
31 double readTemperature( const std::string &str );
32 
35 double readCurrent( const std::string &str );
36 
39 double readVoltage( const std::string &str );
40 
43 int readNumBatteries( const std::string &str );
44 
47 int readPercentWord( const std::string &str );
48 
51 int readPercentByte( const std::string &str );
52 
55 int readMinutes( const std::string &str );
56 
59 int readCapacity( const std::string &str );
60 
63 uint16_t read16Flags( const std::string &str );
64 
67 int readCount( const std::string &str );
68 
71 int readNumber( const std::string &str );
72 
75 int readRate( const std::string &str );
76 
79 bool isChecksumValid( const std::string &input,
80  const std::string &expected );
81 
84 void toKeyValuePairs( const std::vector<std::string> &fields,
85  std::map<std::string,std::string> &pairs,
86  gbxutilacfr::Tracer &tracer );
87 
88 }
89 
90 #endif
Local and remote tracing.
Definition: tracer.h:111
SmartBattery library.
Definition: gbxsmartbatteryacfr/exceptions.h:16
 

Generated for GearBox by  doxygen 1.4.5