This is an java client which implements all tcp protocols and partly serial protocols used by the Omega ScanOVision Photofinish software, Sirocco anemometer and Omega LapCounter. The ASC2 serial protocol is not yet implemented but reaction data is available via the omega dh protocol in the result packet. Additional this library contains a parser for startlist files generated by the ScanOVision software.
It also implements the Lynx scoreboard protocol to receive running times and results from the FinishLynx software.
Library can be used by adding the jitpack repository to your maven/gradle project and adding the dependency:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository><dependency>
<groupId>com.github.nimarion</groupId>
<artifactId>OmegaDH-Client</artifactId>
<version>ff7c3ac43f</version>
</dependency>Example code for connecting to an Omega ScanOVision instance and handling full result events:
OmegaClient client = new OmegaClient("127.0.0.1", "2021");
client.addEventHandler(new EventHandler() {
@Override
public void handleEvent(Event event) {
if (event instanceof FullResultsEvent) {
FullResultsEvent fullResultsEvent = (FullResultsEvent) event;
List<ResultEvent> results = fullResultsEvent.getResults();
for (ResultEvent result : results) {
System.out.println("Bib: " + result.getBib() + " Time: " + result.getTime());
}
}
}
});
client.start();Reading startlist from file generated by ScanOVision software (example files are included in the data folder):
StartlistParser startlistParser = new OsvStartlistParser("C:\OSV-Star\DH\LSTRslt.txt");
Startlist startlist = startlistParser.getStartlist(fullResultsEvent.getRaceId());Currently implemented Protocols (Omega):
- Gemini (TCP)
- Gemini Wind (TCP)
- Omega (TCP)
- Frontcamera (TCP)
- Sirocco (Serial)
- LapCounter (Serial)
- Startliste File Parser (CSV)
- ASC2 (Serial)
Currently implemented scoreboard messages (Lynx):
- Running time
- Results
- Startliste File Parser (LIF)
tbw
- Scoreboard -> Show placing must be turned on in the scoreboard settings