bug5347: updated REST API documentation

This commit is contained in:
Axel Uhl
2020-09-17 18:58:31 +02:00
parent ce0189f4e2
commit 2e5188b5d5
2 changed files with 29 additions and 1 deletions
@@ -230,6 +230,9 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
DynamicSensorFixTrack<Competitor, SensorFix> track = mapper.getTrack(trackedRace, competitor);
if (track != null && trackedRace.isWithinStartAndEndOfTracking(fix.getTimePoint())) {
mapper.addFix(track, (DoubleVectorFix) fix);
if (returnLiveDelay) {
delayToLive.put(trackedRace.getRaceIdentifier(), new MillisecondsDurationImpl(trackedRace.getDelayToLiveInMillis()));
}
}
}
}
@@ -339,6 +342,9 @@ public class FixLoaderAndTracker implements TrackingDataLoader {
}
}
trackedRace.recordFix(mark, (GPSFix) fix, /* only when in tracking interval */ !forceFix);
if (returnLiveDelay) {
delayToLive.put(trackedRace.getRaceIdentifier(), new MillisecondsDurationImpl(trackedRace.getDelayToLiveInMillis()));
}
}
}
});
@@ -34,7 +34,29 @@ These can be mapped to a competitor or a mark via the DeviceMappings in the Race
</tr>
<tr>
<td>Optional parameters:</td>
<td>None</td>
<td>returnManeuverUpdate (boolean, default false): if true, a list of races, identified by regatta name and race name,
will be returned as a response document that shows those races for which the fix(es) was/were mapped to a competitor
for which the maneuver list changed since the last such request. Example output:<pre>
{
"maneuverchanged": [
{
"regattaName": "Ddd",
"raceName": "R3",
"maneuverChanged": false,
"liveDelayInMillis": 5000
},
{
"regattaName": "Ddd",
"raceName": "R1",
"maneuverChanged": false,
"liveDelayInMillis": 5000
}
]
}
</pre><br>
returnLiveDelay (boolean, default false): if true, a list of races, identified by regatta name and race name, will
be returned as a response document, showing for each race to which the fix was mapped what the race's live delay
is in milliseconds. Note that this can be combined with <tt>returnManeuverUpdate</tt>. For example output see above.</td>
</tr>
<tr>
<td>Request method:</td>