OpenSimTools / RaceDirector

The sim racer's Swiss Army knife.
MIT License
3 stars 0 forks source link

ACC memory-mapped file Race telemetry #35

Open paoloambrosio opened 2 years ago

paoloambrosio commented 2 years ago

Implement telemetry for ACC with what provided by memory-mapped files. Relates to #49 and #50.

paoloambrosio commented 2 years ago

Edit: this would have been really difficult with the Dataflow API, so we implemented #28 first. The following is not relevant anymore.

To implement UDP reading we would require...

  1. UDP connection block (IPropagatorBlock<byte[], byte[]>)
    • connects to UDP
    • incoming socket messages are sent to source
    • target sends messages to socket
    • terminates when connection terminates
  2. ACC UDP connection block
    • ACC UDP out message =transform=> byte[] => UDP connection block
    • UDP connection block => byte[] =transform=> ACC UDP out message
  3. Restarting source
    • timer tick
    • if source can be created (i.e. connection can be established)
      • stop this timer (timer.Change(Timeout.Infinite, Timeout.Infinite))
      • link source to output
      • listen to source termination, unlink it (?) and restart timer
    • else wait for the next timer
paoloambrosio commented 2 years ago

Telemetry file not present in main menu. Otherwise...

graphicData.Status when
0 recorded replay (when everything is 0)
1 race replay (with session data)
2 in game menus with staticData.AidMechanicalDamage as -1.0
3 in single player paused menu