Solved Is there a possibility for message or socket based interprocess communication?

Discussion in 'Mod Support' started by Stiegfried, May 11, 2018.

  1. Stiegfried

    Stiegfried
    Expand Collapse

    Joined:
    Feb 17, 2018
    Messages:
    16
    Hey everyone,

    first of all some background information for better understanding:
    I am currently writing my bachelor-thesis at a german university on how it is possible to use BeamNG.drive as the simulation-software of a driving-simulator. For this purpose it is important that BeamNG can communicate with Matlab.
    So far I have managed to make BeamNG and Matlab communicate via file based interprocess communication using a mod. Both programms write the data they are supposed to send to the other one in a .csv file and read from the file of the other one. This way about 5% of the time Matlab tries to access the data it doesn't receive any (probably because BeamNG just deleted the old data and hasn't written the new yet?). Also the polling on the site of Matlab uses quite some performance in order to be frequent enough to be sure not to miss any data.

    Now to my question: Is there a way to use eihter a socket based (e.g. TCP) or a message based interprocess communication between BeamNG and another programm (in this case Matlab)? Or would that maybe not increase the performance and quality (by that I mean not losing any data by overwriting it to early) of the communication at all and therefor be useless?

    Thanks in advance for any responses, may it be hints or entire answers, positive or negative.

    PS: Not entirely sure if "mod support" is the right forum for this, but it seems the best fitting one to me.
     
  2. metalmuncher

    metalmuncher
    Expand Collapse

    Joined:
    Aug 6, 2012
    Messages:
    257
    The OutGauge/OutSim implementations in lua/vehicle/extensions should be a good starting place for sending out vehicle data over UDP.
     
    • Agree Agree x 1
  3. Stiegfried

    Stiegfried
    Expand Collapse

    Joined:
    Feb 17, 2018
    Messages:
    16
    That indeed looks like a great place to start. Thanks for pointing these files out.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice