INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
oceanserversystem.h00001 /* 00002 * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics 00003 * http://gearbox.sf.net/ 00004 * Copyright (c) 2004-2008 Tobias Kaupp 00005 * 00006 * This distribution is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef GBX_OCEANSERVER_SYSTEM_H 00012 #define GBX_OCEANSERVER_SYSTEM_H 00013 00014 #include <map> 00015 #include <gbxsmartbatteryacfr/smartbattery.h> 00016 00017 namespace gbxsmartbatteryacfr 00018 { 00019 00026 class OceanServerSystem 00027 { 00028 public: 00029 00030 OceanServerSystem(); 00031 ~OceanServerSystem() {}; 00032 00034 const std::map<int,SmartBattery>& batteries() const; 00035 00037 SmartBattery& battery( unsigned int batteryNumber ); 00038 00040 const SmartBattery& battery( unsigned int batteryNumber ) const; 00041 00043 void eraseBattery( unsigned int batteryNumber ); 00044 00046 int percentCharge; 00047 int minToEmpty; 00048 std::string messageToSystem; 00049 00052 std::vector<bool> availableBatteries; 00053 std::vector<bool> chargingStates; 00054 std::vector<bool> supplyingPowerStates; 00055 std::vector<bool> chargePowerPresentStates; 00056 std::vector<bool> powerNoGoodStates; 00057 std::vector<bool> chargeInhibitedStates; 00058 00059 private: 00060 00061 // key: slot number, data: a single smart battery module 00062 std::map<int,SmartBattery> batteries_; 00063 }; 00064 00066 std::string toString( const OceanServerSystem &system ); 00067 00069 std::string toLogString( const OceanServerSystem &system ); 00070 00075 void updateWithNewData( const OceanServerSystem &from, 00076 OceanServerSystem &to ); 00077 00078 } // namespace 00079 00080 #endif |