sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.power/src/com/nokia/carbide/cpp/pi/power/PwrSample.java
--- a/sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.power/src/com/nokia/carbide/cpp/pi/power/PwrSample.java Wed Jun 23 14:49:59 2010 +0300
+++ b/sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.power/src/com/nokia/carbide/cpp/pi/power/PwrSample.java Wed Jun 23 15:05:09 2010 +0300
@@ -29,6 +29,7 @@
public double current;
public double capacity;
public double voltage;
+ public int backlight;
public PwrSample( long time, double ampValue, double voltage, double capacity )
{
@@ -37,11 +38,36 @@
this.voltage = voltage;
this.sampleSynchTime = time;
}
+
+ public PwrSample( long time, double ampValue, double voltage, double capacity, int backlight)
+ {
+ this.current = ampValue;
+ this.capacity = capacity;
+ this.voltage = voltage;
+ this.sampleSynchTime = time;
+ this.backlight = backlight;
+ }
public String toString()
{
return Messages.getString("PwrSample.toString1") + this.sampleSynchTime + Messages.getString("PwrSample.toString2") //$NON-NLS-1$ //$NON-NLS-2$
+ this.current + Messages.getString("PwrSample.toString3") + this.voltage + Messages.getString("PwrSample.toString4") //$NON-NLS-1$ //$NON-NLS-2$
- + this.capacity +Messages.getString("PwrSample.toString5"); //$NON-NLS-1$
+ + this.capacity +Messages.getString("PwrSample.toString5")+ PwrSample.getBacklightInformation(backlight) +Messages.getString("PwrSample.toString6"); //$NON-NLS-1$ //$NON-NLS-2$
}
+
+ public static String getBacklightInformation(int code){
+ switch (code) {
+ case 0:
+ return Messages.getString("PwrSample.backlightUnknown"); //$NON-NLS-1$
+ case 1:
+ return Messages.getString("PwrSample.backlightOn"); //$NON-NLS-1$
+ case 2:
+ return Messages.getString("PwrSample.backlightOff"); //$NON-NLS-1$
+ case 3:
+ return Messages.getString("PwrSample.backlightBlink"); //$NON-NLS-1$
+ default:
+ return Messages.getString("PwrSample.backlightUnknown"); //$NON-NLS-1$
+ }
+ }
+
}