Coverage details for net.sf.tourviewer.ciclo.AARecord

LineHitsSource
1 package net.sf.tourviewer.ciclo;
2  
3  
4  
5 public class AARecord extends AbstractRecord {
6  
7     enum TourType { BIKE2, BIKE1, JOGGING, SKI, BIKE, SKI_BIKE, UNKNOWN };
8     
9     private TourType tourType;
10     private int ddOffset;
11     private int timeHour;
12     private int timeMinute;
13     private int timeMonth;
14     private int timeDay;
15     private int totalDistance;
16     private int mswDistance;
17     private int initialAltitude;
18     private int initialPulse;
19     
20     public AARecord(int[] data) {
210        super(data);
22         
230        switch (getHexH(0)) {
24             case 0x2E:
250                this.tourType = TourType.BIKE1;
260                break;
27             case 0x3E:
280                this.tourType = TourType.BIKE2;
290                break;
30             case 0x81:
310                this.tourType = TourType.JOGGING;
320                break;
33             case 0x91:
340                this.tourType = TourType.SKI;
350                break;
36             case 0xA1:
370                this.tourType = TourType.BIKE;
380                break;
39             case 0xB1:
400                this.tourType = TourType.SKI_BIKE;
410                break;
42             default:
430                this.tourType = TourType.UNKNOWN;
44         }
45         
460        this.ddOffset = getHex(1);
470        this.timeHour = getDecH(2);
480        this.timeMinute = getDecL(2);
490        this.timeMonth = getDecH(3);
500        this.timeDay = getDecL(3);
510        this.totalDistance = getHex(4);
520        this.mswDistance = getHex(5);
530        this.initialAltitude = getHex(6);
540        this.initialPulse = getHex(7);
550    }
56     
57     @Override
58     public String toString()
59     {
600        StringBuffer sb = new StringBuffer();
610        sb.append(getDataString());
620        sb.append(String.format(" [(AA) Type=%s,DDOffset=%d,Time=%02d-%02d %02d:%02d,TotalDist=%d,MSWDist=%d,InitialAlt=%d,InitalPulse=%d]",
630                tourType, ddOffset, timeMonth, timeDay, timeHour, timeMinute, totalDistance, mswDistance, initialAltitude, initialPulse));
640        return sb.toString();
65     }
66  
67     
68     public int getDdOffset()
69     {
700        return ddOffset;
71     }
72  
73     
74     public int getInitialAltitude()
75     {
760        return initialAltitude;
77     }
78  
79     
80     public int getInitialPulse()
81     {
820        return initialPulse;
83     }
84  
85     
86     public int getMswDistance()
87     {
880        return mswDistance;
89     }
90  
91     
92     public int getTimeDay()
93     {
940        return timeDay;
95     }
96  
97     
98     public int getTimeHour()
99     {
1000        return timeHour;
101     }
102  
103     
104     public int getTimeMinute()
105     {
1060        return timeMinute;
107     }
108  
109     
110     public int getTimeMonth()
111     {
1120        return timeMonth;
113     }
114  
115     
116     public int getTotalDistance()
117     {
1180        return totalDistance;
119     }
120  
121     
122     public TourType getTourType()
123     {
1240        return tourType;
125     }
126     
127 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.