|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 package com.nokia.carbide.cpp.pi.power; |
|
19 |
|
20 import com.nokia.carbide.cpp.internal.pi.model.GenericSample; |
|
21 |
|
22 /** |
|
23 * A class representing a multimeter reading in amperes |
|
24 */ |
|
25 |
|
26 public class PwrSample extends GenericSample |
|
27 { |
|
28 private static final long serialVersionUID = 3943366134331361386L; |
|
29 public double current; |
|
30 public double capacity; |
|
31 public double voltage; |
|
32 |
|
33 public PwrSample( long time, double ampValue, double voltage, double capacity ) |
|
34 { |
|
35 this.current = ampValue; |
|
36 this.capacity = capacity; |
|
37 this.voltage = voltage; |
|
38 this.sampleSynchTime = time; |
|
39 } |
|
40 |
|
41 public String toString() |
|
42 { |
|
43 return Messages.getString("PwrSample.toString1") + this.sampleSynchTime + Messages.getString("PwrSample.toString2") //$NON-NLS-1$ //$NON-NLS-2$ |
|
44 + this.current + Messages.getString("PwrSample.toString3") + this.voltage + Messages.getString("PwrSample.toString4") //$NON-NLS-1$ //$NON-NLS-2$ |
|
45 + this.capacity +Messages.getString("PwrSample.toString5"); //$NON-NLS-1$ |
|
46 } |
|
47 } |