1 package cz.cuni.amis.pogamut.usar2004.communication.messages.usarcommands;
2
3 import cz.cuni.amis.pogamut.base.communication.messages.*;
4 import cz.cuni.amis.pogamut.usar2004.communication.messages.datatypes.CustomTypes.*;
5
6
7
8
9
10
11
12
13 public class DriveNautic extends CommandMessage
14 {
15
16 public DriveNautic(double Propeller, double Rudder, double SternPlane, boolean Normalized, boolean Light)
17 {
18 this.Propeller = Propeller;
19 this.Rudder = Rudder;
20 this.SternPlane = SternPlane;
21 this.Normalized = Normalized;
22 this.Light = Light;
23 }
24
25
26
27
28
29 public DriveNautic()
30 {
31 }
32
33
34
35
36
37
38
39
40 protected double Propeller = 0;
41
42 public double getPropeller()
43 {
44 return Propeller;
45 }
46
47 public DriveNautic setPropeller(double Propeller)
48 {
49 this.Propeller = Propeller;
50 return this;
51 }
52
53
54
55
56
57
58 protected double Rudder = 0;
59
60 public double getRudder()
61 {
62 return Rudder;
63 }
64
65 public DriveNautic setRudder(double Rudder)
66 {
67 this.Rudder = Rudder;
68 return this;
69 }
70
71
72
73
74
75
76 protected double SternPlane = 0;
77
78 public double getSternPlane()
79 {
80 return SternPlane;
81 }
82
83 public DriveNautic setSternPlane(double SternPlane)
84 {
85 this.SternPlane = SternPlane;
86 return this;
87 }
88
89
90
91
92
93 protected boolean Normalized = false;
94
95 public boolean isNormalized()
96 {
97 return Normalized;
98 }
99
100 public DriveNautic setNormalized(boolean Normalized)
101 {
102 this.Normalized = Normalized;
103 return this;
104 }
105
106 protected boolean Light = false;
107
108 public boolean isLight()
109 {
110 return Light;
111 }
112
113 public DriveNautic setLight(boolean Light)
114 {
115 this.Light = Light;
116 return this;
117 }
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137 public DriveNautic(DriveNautic original)
138 {
139 this.Normalized = original.Normalized;
140 this.Light = original.Light;
141 this.Propeller = original.Propeller;
142 this.Rudder = original.Rudder;
143 this.SternPlane = original.SternPlane;
144 }
145
146 @Override
147 public String toString()
148 {
149 return toMessage();
150 }
151
152 public String toHtmlString()
153 {
154 return super.toString()
155 + "<b>Normalized</b> : "
156 + String.valueOf(Normalized)
157 + " <br/> "
158 + "<b>Light</b> : "
159 + String.valueOf(Light)
160 + " <br/> "
161 + "<b>Propeller</b> : "
162 + String.valueOf(Propeller)
163 + " <br/> "
164 + "<b>Rudder</b> : "
165 + String.valueOf(Rudder)
166 + " <br/> "
167 + "<b>SternPlane</b> : "
168 + String.valueOf(SternPlane)
169 + " <br/> "
170 + "";
171 }
172
173 public String toMessage()
174 {
175 StringBuilder buf = new StringBuilder();
176 buf.append("DRIVE");
177 buf.append(" {Normalized ").append(Normalized).append("}");
178 buf.append(" {Light ").append(Light).append("}");
179 buf.append(" {Propeller ").append(Propeller).append("}");
180 buf.append(" {Rudder ").append(Rudder).append("}");
181 buf.append(" {SternPlane ").append(SternPlane).append("}");
182
183 return buf.toString();
184 }
185 }