00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #include <OPENR/OPower.h>
00023 #include <time.h>
00024 
00025 OPowerStatus::OPowerStatus() {
00026         
00027 }
00028 
00029 OPowerStatus::OPowerStatus(longword rs, word bs, word rc, word tmpr, word fc, word vlt, word crnt, sbyte td, byte vlm)
00030 {
00031         robotStatus          = rs;
00032         batteryStatus        = bs;
00033         remainingCapacity    = rc;
00034         temperature          = tmpr;
00035         fullyChargedCapacity = fc;
00036         voltage              = vlt;
00037         current              = crnt;
00038         timeDif              = td;
00039         volume               = vlm;
00040 }
00041 
00042 OPowerStatus::OPowerStatus(const OPowerStatus& ps)
00043 {
00044         *this = ps;
00045 }
00046 
00047 void OPowerStatus::Set(longword rs, word bs, word rc, word tmpr, sbyte td, byte vlm)
00048 {
00049         robotStatus          = rs;
00050         batteryStatus        = bs;
00051         remainingCapacity    = rc;
00052         temperature          = tmpr;
00053         timeDif              = td;
00054         volume               = vlm;
00055 }
00056 
00057 OPowerStatus& OPowerStatus::operator=(const OPowerStatus& ps)
00058 {
00059         robotStatus          = ps.robotStatus;
00060         batteryStatus        = ps.batteryStatus;
00061         remainingCapacity    = ps.remainingCapacity;
00062         temperature          = ps.temperature;
00063         fullyChargedCapacity = ps.fullyChargedCapacity;
00064         voltage              = ps.voltage;
00065         current              = ps.current;
00066         timeDif              = ps.timeDif;
00067         volume               = ps.volume;
00068 
00069         return *this;
00070 }
00071 
00072 void OPowerStatus::Print() const
00073 {
00074         
00075 }
00076 
00077 void OPowerStatus::PrintDetail() const
00078 {
00079         
00080 }
00081 
00082 
00083 
00084 OBootCondition::OBootCondition()
00085 {
00086         
00087 }
00088 
00089 OBootCondition::OBootCondition(word bm)
00090 {
00091         bitmap = bm;
00092 }
00093 
00094 OBootCondition::OBootCondition(word bm, time_t bt, longword btt)
00095 {
00096         bitmap = bm;
00097         bootTime = bt;
00098         bootTimeType = btt;
00099 }
00100 
00101 OBootCondition::OBootCondition(word bm, time_t bt, longword btt, byte vl)
00102 {
00103         bitmap = bm;
00104         bootTime = bt;
00105         bootTimeType = btt;
00106         vibrationLevel = vl;
00107 }
00108 
00109 OBootCondition::OBootCondition(const OBootCondition& bc)
00110 {
00111         *this = bc;
00112 }
00113 
00114 OBootCondition& OBootCondition::operator=(const OBootCondition& bc)
00115 {
00116         bitmap = bc.bitmap;
00117         bootTime = bc.bootTime;
00118         bootTimeType = bc.bootTimeType;
00119         vibrationLevel = bc.vibrationLevel;
00120 
00121         return *this;
00122 }