-
Notifications
You must be signed in to change notification settings - Fork 1
/
Trajectories.jar
77 lines (65 loc) · 3.19 KB
/
Trajectories.jar
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
package krpc.client.services;
import com.google.protobuf.ByteString;
import krpc.client.Connection;
import krpc.client.Encoder;
import krpc.client.RemoteEnum;
import krpc.client.RemoteObject;
import krpc.client.RPCInfo;
import krpc.client.RPCException;
import krpc.client.Types;
public class Trajectories {
public static Trajectories newInstance(Connection connection) {
return new Trajectories(connection);
}
private Connection connection;
private Trajectories(Connection connection) {
this.connection = connection;
}
private void addExceptionTypes(Connection connection) {
}
@SuppressWarnings({ "unchecked" })
@RPCInfo(service = "Trajectories", procedure = "GetImpactTime", types = _Types.class)
public double getImpactTime() throws RPCException {
ByteString _data = this.connection.invoke("Trajectories", "GetImpactTime");
return (double) Encoder.decode(_data, krpc.client.Types.createValue(krpc.schema.KRPC.Type.TypeCode.DOUBLE), this.connection);
}
@SuppressWarnings({ "unchecked" })
@RPCInfo(service = "Trajectories", procedure = "HasImpact", types = _Types.class)
public boolean hasImpact() throws RPCException {
ByteString _data = this.connection.invoke("Trajectories", "HasImpact");
return (boolean) Encoder.decode(_data, krpc.client.Types.createValue(krpc.schema.KRPC.Type.TypeCode.BOOL), this.connection);
}
@SuppressWarnings({ "unchecked" })
@RPCInfo(service = "Trajectories", procedure = "ImpactPos", types = _Types.class)
public org.javatuples.Pair<Double,Double> impactPos() throws RPCException {
ByteString _data = this.connection.invoke("Trajectories", "ImpactPos");
return (org.javatuples.Pair<Double,Double>) Encoder.decode(_data, krpc.client.Types.createTuple(krpc.client.Types.createValue(krpc.schema.KRPC.Type.TypeCode.DOUBLE),krpc.client.Types.createValue(krpc.schema.KRPC.Type.TypeCode.DOUBLE)), this.connection);
}
public static class _Types {
public static krpc.schema.KRPC.Type getReturnType(String procedure) {
switch (procedure) {
case "GetImpactTime":
return krpc.client.Types.createValue(krpc.schema.KRPC.Type.TypeCode.DOUBLE);
case "HasImpact":
return krpc.client.Types.createValue(krpc.schema.KRPC.Type.TypeCode.BOOL);
case "ImpactPos":
return krpc.client.Types.createTuple(krpc.client.Types.createValue(krpc.schema.KRPC.Type.TypeCode.DOUBLE),krpc.client.Types.createValue(krpc.schema.KRPC.Type.TypeCode.DOUBLE));
}
throw new IllegalArgumentException("Procedure '" + procedure +"' not found");
}
public static krpc.schema.KRPC.Type[] getParameterTypes(String procedure) {
switch (procedure) {
case "GetImpactTime":
return new krpc.schema.KRPC.Type[] {
};
case "HasImpact":
return new krpc.schema.KRPC.Type[] {
};
case "ImpactPos":
return new krpc.schema.KRPC.Type[] {
};
}
throw new IllegalArgumentException("Procedure '" + procedure +"' not found");
}
}
}