1 package net.sf.tourviewer.lib.ciclo;
2
3
4
5 public class HAC4Info2Block extends AbstractBlock {
6
7 private Object countDown1;
8 private Object countDown2;
9 private int altitudeErrorCorrection;
10 private int totalDistance;
11 private int nextFreeOffset;
12 private int year;
13 private int month;
14 private int day;
15
16 public HAC4Info2Block(int[] data) {
17 super(data);
18
19 this.countDown1 = getDecH(0) * 60 + getDecL(0);
20 this.countDown2 = getDecH(1) * 60 + getDecL(1);
21 this.altitudeErrorCorrection = getHex(2);
22 this.totalDistance = getHex(3) << 16 + getHex(4);
23 this.nextFreeOffset = getHex(5);
24 this.year = getDec(6);
25 this.month = getDecH(7);
26 this.day = getDecL(7);
27 }
28
29 public String toString()
30 {
31 return getDataString();
32 }
33
34
35 public int getAltitudeErrorCorrection()
36 {
37 return altitudeErrorCorrection;
38 }
39
40
41 public Object getCountDown1()
42 {
43 return countDown1;
44 }
45
46
47 public Object getCountDown2()
48 {
49 return countDown2;
50 }
51
52
53 public int getDay()
54 {
55 return day;
56 }
57
58
59 public int getMonth()
60 {
61 return month;
62 }
63
64
65 public int getNextFreeOffset()
66 {
67 return nextFreeOffset;
68 }
69
70
71 public int getTotalDistance()
72 {
73 return totalDistance;
74 }
75
76
77 public int getYear()
78 {
79 return year;
80 }
81
82
83 public void setAltitudeErrorCorrection(int altitudeErrorCorrection)
84 {
85 this.altitudeErrorCorrection = altitudeErrorCorrection;
86 }
87
88
89 public void setCountDown1(Object countDown1)
90 {
91 this.countDown1 = countDown1;
92 }
93
94
95 public void setCountDown2(Object countDown2)
96 {
97 this.countDown2 = countDown2;
98 }
99
100
101 public void setDay(int day)
102 {
103 this.day = day;
104 }
105
106
107 public void setMonth(int month)
108 {
109 this.month = month;
110 }
111
112
113 public void setNextFreeOffset(int nextFreeOffset)
114 {
115 this.nextFreeOffset = nextFreeOffset;
116 }
117
118
119 public void setTotalDistance(int totalDistance)
120 {
121 this.totalDistance = totalDistance;
122 }
123
124
125 public void setYear(int year)
126 {
127 this.year = year;
128 }
129
130 }