-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspi_command_t.java
287 lines (237 loc) · 8.43 KB
/
spi_command_t.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/* LCM type definition class file
* This file was automatically generated by lcm-gen
* DO NOT MODIFY BY HAND!!!!
*/
package lcmtypes;
import java.io.*;
import java.util.*;
import lcm.lcm.*;
public final class spi_command_t implements lcm.lcm.LCMEncodable
{
public float q_des_abad[];
public float q_des_hip[];
public float q_des_knee[];
public float qd_des_abad[];
public float qd_des_hip[];
public float qd_des_knee[];
public float kp_abad[];
public float kp_hip[];
public float kp_knee[];
public float kd_abad[];
public float kd_hip[];
public float kd_knee[];
public float tau_abad_ff[];
public float tau_hip_ff[];
public float tau_knee_ff[];
public int flags[];
public spi_command_t()
{
q_des_abad = new float[4];
q_des_hip = new float[4];
q_des_knee = new float[4];
qd_des_abad = new float[4];
qd_des_hip = new float[4];
qd_des_knee = new float[4];
kp_abad = new float[4];
kp_hip = new float[4];
kp_knee = new float[4];
kd_abad = new float[4];
kd_hip = new float[4];
kd_knee = new float[4];
tau_abad_ff = new float[4];
tau_hip_ff = new float[4];
tau_knee_ff = new float[4];
flags = new int[4];
}
public static final long LCM_FINGERPRINT;
public static final long LCM_FINGERPRINT_BASE = 0xecc8eaa6369bc167L;
static {
LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class<?>>());
}
public static long _hashRecursive(ArrayList<Class<?>> classes)
{
if (classes.contains(lcmtypes.spi_command_t.class))
return 0L;
classes.add(lcmtypes.spi_command_t.class);
long hash = LCM_FINGERPRINT_BASE
;
classes.remove(classes.size() - 1);
return (hash<<1) + ((hash>>63)&1);
}
public void encode(DataOutput outs) throws IOException
{
outs.writeLong(LCM_FINGERPRINT);
_encodeRecursive(outs);
}
public void _encodeRecursive(DataOutput outs) throws IOException
{
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.q_des_abad[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.q_des_hip[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.q_des_knee[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.qd_des_abad[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.qd_des_hip[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.qd_des_knee[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.kp_abad[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.kp_hip[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.kp_knee[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.kd_abad[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.kd_hip[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.kd_knee[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.tau_abad_ff[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.tau_hip_ff[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeFloat(this.tau_knee_ff[a]);
}
for (int a = 0; a < 4; a++) {
outs.writeInt(this.flags[a]);
}
}
public spi_command_t(byte[] data) throws IOException
{
this(new LCMDataInputStream(data));
}
public spi_command_t(DataInput ins) throws IOException
{
if (ins.readLong() != LCM_FINGERPRINT)
throw new IOException("LCM Decode error: bad fingerprint");
_decodeRecursive(ins);
}
public static lcmtypes.spi_command_t _decodeRecursiveFactory(DataInput ins) throws IOException
{
lcmtypes.spi_command_t o = new lcmtypes.spi_command_t();
o._decodeRecursive(ins);
return o;
}
public void _decodeRecursive(DataInput ins) throws IOException
{
this.q_des_abad = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.q_des_abad[a] = ins.readFloat();
}
this.q_des_hip = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.q_des_hip[a] = ins.readFloat();
}
this.q_des_knee = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.q_des_knee[a] = ins.readFloat();
}
this.qd_des_abad = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.qd_des_abad[a] = ins.readFloat();
}
this.qd_des_hip = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.qd_des_hip[a] = ins.readFloat();
}
this.qd_des_knee = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.qd_des_knee[a] = ins.readFloat();
}
this.kp_abad = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.kp_abad[a] = ins.readFloat();
}
this.kp_hip = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.kp_hip[a] = ins.readFloat();
}
this.kp_knee = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.kp_knee[a] = ins.readFloat();
}
this.kd_abad = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.kd_abad[a] = ins.readFloat();
}
this.kd_hip = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.kd_hip[a] = ins.readFloat();
}
this.kd_knee = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.kd_knee[a] = ins.readFloat();
}
this.tau_abad_ff = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.tau_abad_ff[a] = ins.readFloat();
}
this.tau_hip_ff = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.tau_hip_ff[a] = ins.readFloat();
}
this.tau_knee_ff = new float[(int) 4];
for (int a = 0; a < 4; a++) {
this.tau_knee_ff[a] = ins.readFloat();
}
this.flags = new int[(int) 4];
for (int a = 0; a < 4; a++) {
this.flags[a] = ins.readInt();
}
}
public lcmtypes.spi_command_t copy()
{
lcmtypes.spi_command_t outobj = new lcmtypes.spi_command_t();
outobj.q_des_abad = new float[(int) 4];
System.arraycopy(this.q_des_abad, 0, outobj.q_des_abad, 0, 4);
outobj.q_des_hip = new float[(int) 4];
System.arraycopy(this.q_des_hip, 0, outobj.q_des_hip, 0, 4);
outobj.q_des_knee = new float[(int) 4];
System.arraycopy(this.q_des_knee, 0, outobj.q_des_knee, 0, 4);
outobj.qd_des_abad = new float[(int) 4];
System.arraycopy(this.qd_des_abad, 0, outobj.qd_des_abad, 0, 4);
outobj.qd_des_hip = new float[(int) 4];
System.arraycopy(this.qd_des_hip, 0, outobj.qd_des_hip, 0, 4);
outobj.qd_des_knee = new float[(int) 4];
System.arraycopy(this.qd_des_knee, 0, outobj.qd_des_knee, 0, 4);
outobj.kp_abad = new float[(int) 4];
System.arraycopy(this.kp_abad, 0, outobj.kp_abad, 0, 4);
outobj.kp_hip = new float[(int) 4];
System.arraycopy(this.kp_hip, 0, outobj.kp_hip, 0, 4);
outobj.kp_knee = new float[(int) 4];
System.arraycopy(this.kp_knee, 0, outobj.kp_knee, 0, 4);
outobj.kd_abad = new float[(int) 4];
System.arraycopy(this.kd_abad, 0, outobj.kd_abad, 0, 4);
outobj.kd_hip = new float[(int) 4];
System.arraycopy(this.kd_hip, 0, outobj.kd_hip, 0, 4);
outobj.kd_knee = new float[(int) 4];
System.arraycopy(this.kd_knee, 0, outobj.kd_knee, 0, 4);
outobj.tau_abad_ff = new float[(int) 4];
System.arraycopy(this.tau_abad_ff, 0, outobj.tau_abad_ff, 0, 4);
outobj.tau_hip_ff = new float[(int) 4];
System.arraycopy(this.tau_hip_ff, 0, outobj.tau_hip_ff, 0, 4);
outobj.tau_knee_ff = new float[(int) 4];
System.arraycopy(this.tau_knee_ff, 0, outobj.tau_knee_ff, 0, 4);
outobj.flags = new int[(int) 4];
System.arraycopy(this.flags, 0, outobj.flags, 0, 4);
return outobj;
}
}