Author Topic: UDP Proxy  (Read 431 times)

PiBoSo

  • Administrator
  • Sr. Member
  • *****
  • Posts: 971
    • View Profile
UDP Proxy
« on: July 18, 2018, 03:43:59 PM »
Starting with Beta8, MX Bikes integrates a plugin that allows to receive UDP data from the simulated bike in realtime.

To enable it and set the parameters, edit the file "proxy_udp.ini" in the MX Bikes installation folder:
Code: [Select]
[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 "SPluginsBikeData_t" structure of the plugins interface: http://www.mx-bikes.com/downloads/mxb_example.c
« Last Edit: July 18, 2018, 03:55:57 PM by PiBoSo »

PizzaChet

  • Sr. Member
  • ****
  • Posts: 386
    • View Profile
Re: UDP Proxy
« Reply #1 on: July 18, 2018, 04:41:52 PM »
Since it's all Greek to me, what does this achieve? It must be to improve online racing.
« Last Edit: July 19, 2018, 02:08:29 PM by PizzaChet »

HornetMaX

  • Sr. Member
  • ****
  • Posts: 489
    • View Profile
Re: UDP Proxy
« Reply #2 on: August 13, 2018, 10:49:07 AM »
Since it's all Greek to me, what does this achieve? It must be to improve online racing.
Before that, if one needed to code an application that receives bike's data from GPB in real time, the only options were a GPB plugin or a separate app using the proxy plugin.
Now you can also use a separate app simply listening to the UDP port.

PizzaChet

  • Sr. Member
  • ****
  • Posts: 386
    • View Profile
Re: UDP Proxy
« Reply #3 on: August 13, 2018, 04:36:08 PM »
Ah ok. Data for a motion platform or bike controller maybe?

HornetMaX

  • Sr. Member
  • ****
  • Posts: 489
    • View Profile
Re: UDP Proxy
« Reply #4 on: August 13, 2018, 07:51:33 PM »
Ah ok. Data for a motion platform or bike controller maybe?
Amongst other stuff. The thing this new stuff adds is the ability to easily send the telemtry data to a different computer (over a LAN or the net).
If everything runs on the same computer, there's likely little need to use UDP instead of the normal proxy stuff. Unless I've missed something :)