View Javadoc

1   package net.sf.tourviewer.lib.ciclo;
2   
3   
4   /***
5    * The record at offset 645 containing information about the HAC4 settings. 
6    * @author Steffen Pingel
7    */
8   public class CM414MInfo1Block extends AbstractBlock {
9   
10  	private int deviceSignature;
11  	private int wheelPerimeter1;
12  	private int wheelPerimeter2;
13  	private int homeAltitude;
14  	private int weight;
15  	private int month;
16  	private int day;
17  	private int year;
18  
19  	public CM414MInfo1Block(int[] data) {
20  		super(data);
21  		
22  		this.deviceSignature = getHex(0);
23  		this.wheelPerimeter1 = getHex(1);
24  		this.wheelPerimeter2 = getHex(2);
25  
26  		this.homeAltitude = getHex(4);
27  		this.weight = getHex(5);
28  		this.month = getDecH(6);
29  		this.day = getDecL(6);
30  		this.year = getDec(7);
31  	}
32  	
33  	public String toString()
34  	{
35  		return getDataString();
36  	}
37  
38  	
39  	public int getDay()
40  	{
41  		return day;
42  	}
43  
44  	
45  	public int getDeviceSignature()
46  	{
47  		return deviceSignature;
48  	}
49  
50  	
51  	public int getHomeAltitude()
52  	{
53  		return homeAltitude;
54  	}
55  
56  	
57  	public int getMonth()
58  	{
59  		return month;
60  	}
61  
62  	
63  	public int getWeight()
64  	{
65  		return weight;
66  	}
67  
68  	
69  	public int getWheelPerimeter1()
70  	{
71  		return wheelPerimeter1;
72  	}
73  
74  	
75  	public int getWheelPerimeter2()
76  	{
77  		return wheelPerimeter2;
78  	}
79  
80  	
81  	public int getYear()
82  	{
83  		return year;
84  	}
85  	
86  }