• Welcome to PiBoSo Official Forum. Please login or sign up.
 
October 19, 2019, 10:45:42 pm

News:

GP Bikes beta16b available! :)


UDP Proxy

Started by PiBoSo, May 12, 2019, 08:05:46 am

Previous topic - Next topic

PiBoSo

Starting with Beta13, World Racing Series integrates a plugin that allows to receive UDP data from the simulated car in realtime.

To enable it and set the parameters, edit the file "wrs/proxy_udp.ini" in the World Racing Series installation folder:
[params]
enable = 1
port = 30000
ip = 127.0.0.1:30001
delay = 1

port: outbound port
ip: inbound address and, optional, port ( if missing, the outbound port is used )
delay: hundredths of second between packets

The packet format:
"data": null-terminated string
"state": integer. 0: software running; 1: on-track, simulation paused; 2: on-track, simulation running
"time": integer, milliseconds.
The rest of the packet follows the "SPluginsCarData_t" structure of the proxy plugin: http://www.worldracingseries.com/downloads/wrs_proxy.c


In the proxy_udp.ini file, add the line
info = 1
to enable the streaming of the event, session, lap and split data.

Data format of the event packet, sent every second:
"evnt": null-terminated string
The rest of the packet follows the "SPluginsEventData_t" structure of the proxy plugin.

Data format of the session packet, sent every second:
"sesn": null-terminated string
The rest of the packet follows the "SPluginsCarSession_t" structure of the proxy plugin.

Data format of the lap packet, sent five times a second:
"lap ": null-terminated string
The rest of the packet follows the "SPluginsCarLap_t" structure of the proxy plugin.

Data format of the split packet, sent five times a second:
"splt": null-terminated string
"split": integer. 0: the latest line crossed is the start / finish one; 1: the latest line crossed is a split one
The rest of the packet follows the "SPluginsCarSplit_t" structure of the proxy plugin.
"Obviously your ambition outweighs your talent".