• Welcome to PiBoSo Official Forum. Please login or sign up.
 
March 28, 2024, 08:15:31 PM

News:

World Racing Series beta14 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.
"La perfezione non è il nostro obiettivo, è la nostra tendenza".