java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/security/SecuredDomainType.java
... ...
@@ -96,6 +96,9 @@ public class SecuredDomainType extends HasPermissionsImpl {
96 96
public static final HasPermissions EXPEDITION_DEVICE_CONFIGURATION = new SecuredDomainType(
97 97
"EXPEDITION_DEVICE_CONFIGURATION");
98 98
public static final HasPermissions IGTIMI_ACCOUNT = new SecuredDomainType("IGTIMI_ACCOUNT");
99
+ public static final HasPermissions IGTIMI_DEVICE = new SecuredDomainType("IGTIMI_DEVICE");
100
+ public static final HasPermissions IGTIMI_RESOURCE = new SecuredDomainType("IGTIMI_RESOURCE");
101
+ public static final HasPermissions IGTIMI_DATA_ACCESS_WINDOW = new SecuredDomainType("IGTIMI_DATA_ACCESS_WINDOW");
99 102
public static final HasPermissions SWISS_TIMING_ACCOUNT = new SecuredDomainType("SWISS_TIMING_ACCOUNT");
100 103
public static final HasPermissions SWISS_TIMING_ARCHIVE_ACCOUNT = new SecuredDomainType(
101 104
"SWISS_TIMING_ARCHIVE_ACCOUNT");
java/com.sap.sailing.domain.igtimiadapter/.project
... ...
@@ -6,6 +6,11 @@
6 6
</projects>
7 7
<buildSpec>
8 8
<buildCommand>
9
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
9 14
<name>org.eclipse.jdt.core.javabuilder</name>
10 15
<arguments>
11 16
</arguments>
... ...
@@ -24,5 +29,6 @@
24 29
<natures>
25 30
<nature>org.eclipse.pde.PluginNature</nature>
26 31
<nature>org.eclipse.jdt.core.javanature</nature>
32
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
27 33
</natures>
28 34
</projectDescription>
java/com.sap.sailing.domain.igtimiadapter/proto/com/igtimi/README.md
... ...
@@ -1,2 +1,65 @@
1 1
# igtimi riot protocol
2
-Telemetry protocol for igtimi devices based on the [protobuf](https://developers.google.com/protocol-buffers) serialization format.
... ...
\ No newline at end of file
0
+Telemetry protocol for igtimi devices based on the [protobuf](https://developers.google.com/protocol-buffers) serialization format.
1
+
2
+Here goes a description shared by Igtimi on 2024-11-28:
3
+
4
+```
5
+ 1 | pos | {"description": "GNSS Position", "dimension": "longitude, latitude, altitude msl", "unit": "degree, degree, meter", "precision": "double, double, double, double", "notes": "Altitude optional"}
6
+ 2 | satq | {"description": "GNSS Quality", "dimension": "-", "unit": "number", "precision": "integer"}
7
+ 3 | satc | {"description": "GNSS SV Count", "dimension": "-", "unit": "number", "precision": "integer"}
8
+ 4 | len | {"description": "Length", "dimensions": "length", "unit": "meter", "precision": "double"}
9
+ 5 | ang | {"description": "Angle", "dimensions": "angle", "unit": "radian", "precision": "double"}
10
+ 6 | cog | {"description": "Course Over Ground", "dimensions": "angle", "unit": "degree", "precision": "double"}
11
+ 7 | hdgm | {"description": "Heading Magnetic", "dimensions": "angle", "unit": "degree", "precision": "double"}
12
+ 8 | hdg | {"description": "Heading", "dimensions": "angle", "unit": "degree", "precision": "double"}
13
+ 9 | sog | {"description": "Speed Over Ground", "dimensions": "speed", "unit": "Km/h", "precision": "double"}
14
+ 10 | stw | {"description": "Speed Through Water", "dimensions": "speed", "unit": "Km/h", "precision": "double"}
15
+ 11 | awa | {"description": "Apparent Wind Angle", "dimensions": "angle", "unit": "degree", "precision": "double"}
16
+ 12 | aws | {"description": "Apparent Wind Speed", "dimensions": "speed", "unit": "Km/h", "precision": "double"}
17
+ 13 | hr | {"description": "Heart Rate", "dimensions": "event time, HB count, HR", "unit": "milliseconds, number, cpm", "precision": "integer, integer, integer", "notes":"HR minimum"}
18
+ 14 | freq | {"description": "Frequency", "dimensions": "frequency", "unit": "Hz/cpm", "precision": "double/double"}
19
+ 15 | temp | {"description": "Temperature", "dimensions": "temperature", "unit": "&deg;C", "precision": "double"}
20
+ 16 | file | {"description": "File", "dimensions": "filename, md5, content type, size", "unit": "text, text, text, bytes", "precision": "char(255), char(255), char(255), integer", "notes":"All fields required"}
21
+ 17 | ori | {"description": "Orientation", "dimensions": "X,Y,Z,W", "unit": "rad, rad, rad, rad", "precision": "double, double, double, double", "notes": "Any of XYZ or XYZW"}
22
+ 18 | acc | {"description": "Acceleration", "dimensions": "X,Y,Z", "unit": "[m/s/s, m/s/s, m/s/s] or [rad/s/s, rad/s/s, rad/s/s] or [g, g, g]", "precision": "double, double, double", "notes": "Any one field minimum"}
23
+ 19 | spd | {"description": "Speed", "dimensions": "X,Y,Z", "unit": "[m/s, m/s, m/s] or [rad/s, rad/s, rad/s]", "precision": "double,double,double", "notes": "Any one field minimum"}
24
+ 20 | for | {"description": "Force", "dimensions": "X,Y,Z", "unit": "N,N,N", "precision": "double, double, double", "notes": "Any one field minimum"}
25
+ 21 | torq | {"description": "Torque", "dimensions": "torque", "unit": "Nm", "precision": "double"}
26
+ 22 | twd | {"description": "True Wind Direction (grid north)", "dimensions": "Angle", "unit": "degree", "precision": "double"}
27
+ 23 | tws | {"description": "True Wind Speed", "dimensions": "speed", "unit": "Km/h", "precision": "double"}
28
+ 24 | press | {"description": "Pressure", "dimensions": "pressure", "unit": "Pa", "precision": "double"}
29
+ 25 | pwr | {"description": "Power", "dimensions": "power", "unit": "W", "precision": "double"}
30
+ 26 | volt | {"description": "Electrical Potential", "dimensions": "electrical potential", "unit": "V", "precision": "double"}
31
+ 27 | amp | {"description": "Electrical Current", "dimensions": "electrical current", "unit": "A", "precision": "double"}
32
+ 28 | time | {"description": "Time Interval", "dimensions": "time", "unit": "second", "precision": "double"}
33
+ 50 | num | {"description": "Number", "dimensions": "-", "precision": "double"}
34
+ 51 | int | {"description": "Integer", "dimensions": "-", "precision": "Integer"}
35
+ 52 | txt | {"description": "Text", "dimensions": "-", "precision": "char"}
36
+ 53 | bool | {"description": "Boolean", "dimensions": "-", "precision": "boolean"}
37
+ 54 | json | {"description": "JSON", "dimensions": "-", "precision": "JSON"}
38
+ 55 | event | {"description": "Event", "dimensions": "-", "precision": "char"}
39
+ 56 | log | {"description": "Logging", "dimensions": "Log message, Priority", "precision": "char, integer"}
40
+ 57 | cmd | {"description": "Command", "precision":"Text(c)"}
41
+ 100 | session_log | {"description": "Session Log","dimension":"-"}
42
+```
43
+
44
+It seems there once was a change regarding how battery status/level/strength was encoded, formerly using field 54 as a JSON document, now sending the state of charge as a percent number using message type 50. Igtimi / Riedel suggest that message type 50 (Number) is used only for battery charge.
45
+
46
+```
47
+166- if (message["54"]) { // Battery
48
+167: if(message["54"]["1"].length > 0 && ("battery_level" in message["54"]["1"][0]) ) {
49
+168: // this.setBatteryStrength(message["54"]["1"][0].battery_level * 4);
50
+169: var strength = message["54"]["1"][0].battery_level * 4;
51
+170: this.$(".battery-status").attr("class", "battery-status state-" + strength);
52
+171- }
53
+172- }
54
+173-
55
+174: if (message["50"]) { // Number (battery %)
56
+175- if(message["50"]["1"].length > 0) {
57
+176- var percentage = message["50"]["1"][0];
58
+177- var strength = Math.round(percentage / 25);
59
+178-
60
+179: this.$(".battery-status").attr("class", "battery-status state-" + strength);
61
+180- }
62
+181- }
63
+```
... ...
\ No newline at end of file
java/com.sap.sailing.domain.igtimiadapter/src/com/sap/sailing/domain/igtimiadapter/DataAccessWindow.java
... ...
@@ -1,5 +1,7 @@
1 1
package com.sap.sailing.domain.igtimiadapter;
2 2
3
+import com.sap.sse.security.shared.WithQualifiedObjectIdentifier;
4
+
3 5
/**
4 6
* When a device is shared to you, all that happens is that a DAW (Data Access Window) is being created for the time
5 7
* interval that the device owner wants you to have access to the data from the device.<p>
... ...
@@ -15,7 +17,7 @@ package com.sap.sailing.domain.igtimiadapter;
15 17
* @author Axel Uhl (D043530)
16 18
*
17 19
*/
18
-public interface DataAccessWindow extends HasId, HasStartAndEndTime, HasPermissions {
20
+public interface DataAccessWindow extends HasId, HasStartAndEndTime, HasPermissions, WithQualifiedObjectIdentifier {
19 21
String getDeviceSerialNumber();
20 22
21 23
SecurityEntity getRecipient();
java/com.sap.sailing.domain.igtimiadapter/src/com/sap/sailing/domain/igtimiadapter/Device.java
... ...
@@ -5,7 +5,9 @@ import java.io.IOException;
5 5
import org.apache.http.client.ClientProtocolException;
6 6
import org.json.simple.parser.ParseException;
7 7
8
-public interface Device extends HasId {
8
+import com.sap.sse.security.shared.WithQualifiedObjectIdentifier;
9
+
10
+public interface Device extends HasId, WithQualifiedObjectIdentifier {
9 11
/**
10 12
* @return a string identifying the device, such as "AA-AA-AAAA"
11 13
*/
... ...
@@ -23,7 +25,5 @@ public interface Device extends HasId {
23 25
24 26
Boolean getBlob();
25 27
26
- String getName();
27
-
28 28
User getOwner() throws IllegalStateException, ClientProtocolException, IOException, ParseException;
29 29
}
java/com.sap.sailing.domain.igtimiadapter/src/com/sap/sailing/domain/igtimiadapter/Resource.java
... ...
@@ -1,6 +1,7 @@
1 1
package com.sap.sailing.domain.igtimiadapter;
2 2
3 3
import com.sap.sailing.domain.igtimiadapter.datatypes.Type;
4
+import com.sap.sse.security.shared.WithQualifiedObjectIdentifier;
4 5
5 6
6 7
/**
... ...
@@ -12,7 +13,7 @@ import com.sap.sailing.domain.igtimiadapter.datatypes.Type;
12 13
* @author Axel Uhl (d043530)
13 14
*
14 15
*/
15
-public interface Resource extends HasId, HasPermissions, HasStartAndEndTime {
16
+public interface Resource extends HasId, HasPermissions, HasStartAndEndTime, WithQualifiedObjectIdentifier {
16 17
17 18
boolean isBlob();
18 19
java/com.sap.sailing.domain.igtimiadapter/src/com/sap/sailing/domain/igtimiadapter/impl/DataAccessWindowImpl.java
... ...
@@ -1,11 +1,16 @@
1 1
package com.sap.sailing.domain.igtimiadapter.impl;
2 2
3
+import com.sap.sailing.domain.common.security.SecuredDomainType;
3 4
import com.sap.sailing.domain.igtimiadapter.DataAccessWindow;
4 5
import com.sap.sailing.domain.igtimiadapter.Permission;
5 6
import com.sap.sailing.domain.igtimiadapter.SecurityEntity;
6 7
import com.sap.sse.common.TimePoint;
8
+import com.sap.sse.security.shared.HasPermissions;
9
+import com.sap.sse.security.shared.QualifiedObjectIdentifier;
10
+import com.sap.sse.security.shared.TypeRelativeObjectIdentifier;
7 11
8 12
public class DataAccessWindowImpl extends HasIdImpl implements DataAccessWindow {
13
+ private static final long serialVersionUID = -7076166985273850220L;
9 14
private final TimePoint startTime;
10 15
private final TimePoint endTime;
11 16
private final String deviceSerialNumber;
... ...
@@ -51,4 +56,19 @@ public class DataAccessWindowImpl extends HasIdImpl implements DataAccessWindow
51 56
public String toString() {
52 57
return "DAW "+getId()+" for device "+getDeviceSerialNumber()+" from "+getStartTime()+" to "+getEndTime()+", permissions "+getPermissions();
53 58
}
59
+
60
+ @Override
61
+ public QualifiedObjectIdentifier getIdentifier() {
62
+ return getPermissionType().getQualifiedObjectIdentifier(new TypeRelativeObjectIdentifier(getDeviceSerialNumber(), ""+getStartTime().asMillis(), ""+getEndTime().asMillis()));
63
+ }
64
+
65
+ @Override
66
+ public HasPermissions getPermissionType() {
67
+ return SecuredDomainType.IGTIMI_DATA_ACCESS_WINDOW;
68
+ }
69
+
70
+ @Override
71
+ public String getName() {
72
+ return "Data Access Window for device "+getDeviceSerialNumber()+" from "+getStartTime().asMillis()+" to "+getEndTime().asMillis();
73
+ }
54 74
}
java/com.sap.sailing.domain.igtimiadapter/src/com/sap/sailing/domain/igtimiadapter/impl/DeviceImpl.java
... ...
@@ -5,12 +5,17 @@ import java.io.IOException;
5 5
import org.apache.http.client.ClientProtocolException;
6 6
import org.json.simple.parser.ParseException;
7 7
8
+import com.sap.sailing.domain.common.security.SecuredDomainType;
8 9
import com.sap.sailing.domain.igtimiadapter.Device;
9 10
import com.sap.sailing.domain.igtimiadapter.IgtimiConnection;
10 11
import com.sap.sailing.domain.igtimiadapter.Permission;
11 12
import com.sap.sailing.domain.igtimiadapter.User;
13
+import com.sap.sse.security.shared.HasPermissions;
14
+import com.sap.sse.security.shared.QualifiedObjectIdentifier;
15
+import com.sap.sse.security.shared.TypeRelativeObjectIdentifier;
12 16
13 17
public class DeviceImpl extends HasIdImpl implements Device {
18
+ private static final long serialVersionUID = 7224992550721569935L;
14 19
private final String serialNumber;
15 20
private final String name;
16 21
private String serviceTag;
... ...
@@ -85,4 +90,13 @@ public class DeviceImpl extends HasIdImpl implements Device {
85 90
return name;
86 91
}
87 92
93
+ @Override
94
+ public QualifiedObjectIdentifier getIdentifier() {
95
+ return getPermissionType().getQualifiedObjectIdentifier(new TypeRelativeObjectIdentifier(getSerialNumber()));
96
+ }
97
+
98
+ @Override
99
+ public HasPermissions getPermissionType() {
100
+ return SecuredDomainType.IGTIMI_DEVICE;
101
+ }
88 102
}
java/com.sap.sailing.domain.igtimiadapter/src/com/sap/sailing/domain/igtimiadapter/impl/ResourceImpl.java
... ...
@@ -3,13 +3,18 @@ package com.sap.sailing.domain.igtimiadapter.impl;
3 3
import java.util.ArrayList;
4 4
import java.util.List;
5 5
6
+import com.sap.sailing.domain.common.security.SecuredDomainType;
6 7
import com.sap.sailing.domain.igtimiadapter.IgtimiConnection;
7 8
import com.sap.sailing.domain.igtimiadapter.Permission;
8 9
import com.sap.sailing.domain.igtimiadapter.Resource;
9 10
import com.sap.sailing.domain.igtimiadapter.datatypes.Type;
10 11
import com.sap.sse.common.TimePoint;
12
+import com.sap.sse.security.shared.HasPermissions;
13
+import com.sap.sse.security.shared.QualifiedObjectIdentifier;
14
+import com.sap.sse.security.shared.TypeRelativeObjectIdentifier;
11 15
12 16
public class ResourceImpl implements Resource {
17
+ private static final long serialVersionUID = -8944469021862963744L;
13 18
private final long id;
14 19
private final TimePoint startTime;
15 20
private final TimePoint endTime;
... ...
@@ -68,4 +73,19 @@ public class ResourceImpl implements Resource {
68 73
public boolean isBlob() {
69 74
return blob;
70 75
}
76
+
77
+ @Override
78
+ public QualifiedObjectIdentifier getIdentifier() {
79
+ return getPermissionType().getQualifiedObjectIdentifier(new TypeRelativeObjectIdentifier(""+getId()));
80
+ }
81
+
82
+ @Override
83
+ public HasPermissions getPermissionType() {
84
+ return SecuredDomainType.IGTIMI_RESOURCE;
85
+ }
86
+
87
+ @Override
88
+ public String getName() {
89
+ return "Igtimi Resource "+getId();
90
+ }
71 91
}
wiki/howto/onboarding.md
... ...
@@ -45,7 +45,7 @@ For a Gollum Wiki account send a request to Axel Uhl or Simon Marcel Pamies that
45 45
### Installations
46 46
47 47
1. JDK >= 11. No longer required by Eclipse because new Eclipse releases bring their own JDK bundled with the installer. Still, if you want to use Java 11 or Java 17, install any such JDK and set the `JAVA_HOME` variable to it.
48
-2. Eclipse IDE for Eclipse Committers, version 4.29.0 ["2023-09"](https://www.eclipse.org/downloads/packages/release/2023-09/r)
48
+2. Eclipse IDE for Eclipse Committers, version 4.33.0 ["2024-09"](https://www.eclipse.org/downloads/packages/release/2024-09/r)
49 49
3. JDK 1.8 (Java SE 8), ideal is the SAPJVM 1.8: Go to [https://tools.eu1.hana.ondemand.com/#cloud](https://tools.eu1.hana.ondemand.com/#cloud), scroll down to `SAP JVM` select your operating System, extract the downloaded .zip into desired location (e.g. Windows `C:\Program Files\Java`. If you want to make this your default JDK, set the `JAVA_HOME` variable to it. In any case, set the `JAVA8_HOME` variable to it which is required by a few build scripts where certain steps currently are not yet compatible with newer JDK releases, such as our Android build process, keeping us on Gradle 6.0.1 for the time being which isn't Java 17-compatible.
50 50
4. Git (e.g. Git for Windows v2.18), [http://git-scm.com](http://git-scm.com) / [https://git-for-windows.github.io](https://git-for-windows.github.io)still
51 51
5. Configure git (see [Git repository configuration essentials](#onboarding-information_sap-sailing-analytics-development-setup_git-repository-configuration-essentials))
... ...
@@ -129,8 +129,7 @@ Out of the box, multiple settings in Eclipse need to be changed. Go to Window
129 129
- In "Web ⇒ HTML Files ⇒ Editor" activate indent using Spaces
130 130
- In "XML(Wild Web Developer) ⇒ Validation & Resolution ⇒ Enable Validation" Disable the Checkbox
131 131
- For Eclipse-based debugging of GWT web applications with SDBG, make sure that Chrome is set as your default browser: "General ⇒ Web Browser". If missing, add a profile for Chrome and specify "%URL%" as the parameter.
132
-- Install Eclipse eGit (optional)
133
-
132
+- Consider installing [https://marketplace.eclipse.org/content/protocol-buffer-editor](https://marketplace.eclipse.org/content/protocol-buffer-editor) for a Protocol Buffers (protobuf) editor
134 133
135 134
### Steps to build and run the Race Analysis Suite
136 135