Line | Hits | Source |
---|---|---|
1 | package net.sf.tourviewer.ciclo; | |
2 | ||
3 | ||
4 | ||
5 | public class CCRecord extends AbstractRecord { | |
6 | ||
7 | private int temperature; | |
8 | private int endMarker; | |
9 | private int cadence; | |
10 | private DataRecord[] dataRecords; | |
11 | ||
12 | public CCRecord(int[] data) { | |
13 | 0 | super(data); |
14 | ||
15 | 0 | this.temperature = getHexH(0); |
16 | 0 | this.endMarker = getHexH(1); |
17 | 0 | this.cadence = getHexL(2); |
18 | ||
19 | 0 | dataRecords = new DataRecord[6]; |
20 | 0 | for (int i = 0; i < dataRecords.length; i++) { |
21 | 0 | dataRecords[i] = new DataRecord(getHex(i + 2)); |
22 | } | |
23 | 0 | } |
24 | ||
25 | @Override | |
26 | public String toString() | |
27 | { | |
28 | 0 | StringBuffer sb = new StringBuffer(); |
29 | 0 | sb.append(getDataString()); |
30 | 0 | sb.append(String.format(" [(CC) Temperature=%d,Marker=%d,Cadence=%d,", |
31 | 0 | temperature, endMarker, cadence)); |
32 | 0 | for (int i = 0; i < dataRecords.length; i++) { |
33 | 0 | sb.append(dataRecords[i].toString()); |
34 | } | |
35 | 0 | sb.append("]"); |
36 | 0 | return sb.toString(); |
37 | } | |
38 | ||
39 | ||
40 | public int getCadence() | |
41 | { | |
42 | 0 | return cadence; |
43 | } | |
44 | ||
45 | ||
46 | public DataRecord[] getDataRecords() | |
47 | { | |
48 | 0 | return dataRecords; |
49 | } | |
50 | ||
51 | ||
52 | public int getEndMarker() | |
53 | { | |
54 | 0 | return endMarker; |
55 | } | |
56 | ||
57 | ||
58 | public int getTemperature() | |
59 | { | |
60 | 0 | return temperature; |
61 | } | |
62 | ||
63 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |