Home
News
rFactor 2
rFactor 1
Forums
Contact
Company
Technology
Image Space Inc. YouTube rFactor 2 Twitter Image Space Inc. Google Plus rFactor 2 Facebook
Tracks
Try or Buy rFactor 2
$43.99/84.99 Windows Only PCDL
Download rFactor 2 Demo Now!
Page 5 of 31 FirstFirst 12345678915 ... LastLast
Results 81 to 100 of 605

Thread: VM LiveView Lite for rFactor & rFactor2

  1. #81
    Frank Geyer's Avatar

     PC Specification 

    Registered
    Oct 2010
    Location
    Germany
    Quote Originally Posted by Noel Hibbard View Post
    ...
    I am amazed you don't have locking problems with your setup. I poll my XML file over HTTP from a remote location every 2secs for logging hotlaps. The live timing page is client side and pulls the XML file every 1.5secs. So if you have 50 people all pulling the XML every 1.5secs you are bound to hit a lock. I must be doing something wrong somewhere.
    Hi Noel,

    I am guessing that is what's causing your locking problems !?!? You probably need to change your app to a loader-based-scenario.


    Code:
    Fail Safe Scenario - Live Timing Scheme:
    
    
                                |-- rFactorSL 1 ( via http - 2.5 times a second )
                                |
    rF DS XML (twice a second) ---- rFactorSL 2 ( via local FS - 2.5 times a second )
                                |
                                |-- rFactorSL 3 ( via ftp - 2.5 times a second )
    The loader is a .NET application which transports all RAW DATA presented by the plugin (without any formatting) into the database. Then the RAW DATA within the database is presented thru APACHE via PHP any way you like. Meaning, it doesn't matter how many users are viewing the data, you always ending up with only three processes accessing the rF DS XML file. I always ending up from time to time with a "loader cannot access the XML file", cause it is written twice per seconds by the plugin. But I don't care about this. The data within the database is updated roughly two times a second, which gives me enough room to present live data once a second to the user and statistical data by user request.

    Locking management thru SQL is much more convenient than thru the file system.

    You can even implement this into a load balancing scenario based on DNS-Round-Robin if each loader is writing its collected data into different databases on different mysql servers.

    Cheers
    Frank

    PS: I only use the internal plugins as well, switching everything off which is not required and then building the XML file by fopen( "VMHotlaps\\CurrentScoring.xml", "w" ); and fprintf( fo, "String Data", VARS );
    Last edited by Frank Geyer; 05-11-12 at 05:02 AM.

  2. #82
    Frank Geyer's Avatar

     PC Specification 

    Registered
    Oct 2010
    Location
    Germany
    @Lucky: Sorry pal, but I don't have enough information to get a thorough picture of your environment and configuration. And without this ...

  3. #83
    Noel Hibbard's Avatar

     rFactor 2 Validated PC Specification Facebook profile Where I race LiveRacers Driver Page 

    Registered
    Oct 2010
    Location
    Jacksonville, FL
    On Friday I went another route and that is to just build a windows message using WM_COPYDATA to send the raw data to another app that I wrote in .Net which I will be able to easily deal with from there. It is working perfect so far... well, the WM_COPYDATA is working and I am just building an XML from that and then displaying it in a textbox. I may just send this data over UDP to another server that way all the bandwidth is offloaded to another machine on another network.

    I think I am going to go another route though. I want the .Net app to run as a service and services don't have windows to accept WM_COPYDATA. I could run it as an interactive service but don't really like that idea. So I will probably go with Named Pipes which will take some time to figure out.

    If you are interested in the WM_COPYDATA stuff here is the code I wrote:
    Code:
    string rFdata;
    
    // string some stuff together here
    
    // Find the handle to the .Net app
    HWND hWnd = FindWindow(NULL, "TestApp");
    if (hWnd) {
    	COPYDATASTRUCT cpdata;
    	cpdata.dwData = 0;
    	cpdata.cbData = strlen(rFdata.c_str());
    	cpdata.lpData = (LPVOID) rFdata.c_str() ;
    	SendMessage(hWnd,WM_COPYDATA,(WPARAM)hWnd, (LPARAM)&cpdata);
    }
    I wanted to just pass the whole ScoringInfoV2 struct over as is and then pull it apart on the other end but wasn't successful at matching all the datatypes to build a matching structure on the other end. So I went with a big string. Sending the whole struct would have been nice and clean and would have added very little load to the plugin.

    Thanks for the help Frank. I think your right though, having 40+ people all viewing the timing page pulling this XML ever 1.5secs is bound to create some sort of locking problem.

  4. #84
    LCCMarc's Avatar
     

    Registered
    May 2012
    Hello,
    Excuse me, my English is bad, I use a translator.

    With me, everything works fine but I have a little problem, the circuit appears in mirror, how to display it correctly?

    Thank you in advance, I want to say that this work is great.

    Marc

  5. #85
    Frank Geyer's Avatar

     PC Specification 

    Registered
    Oct 2010
    Location
    Germany
    @Noel: No problem mate, you are welcome any time and thanx for sharing your code snippet !!! One thing to think about your idea to transport scoring data directly via UDP thru the plugin - if I did understand you correctly !?!? If you run in timeouts because of network problems it may block the whole rFactor Dedicated Server ...

    @Marc: You can use the php script http://localhost/vmliveview/trackconfig.php in combination with Map Rotation and Map Mirror X:

    Map Rotation values: from 360 to -360
    Map Mirror X values: 1 and -1

    Or you can edit those values directly within the corresponding database.

  6. #86
    LCCMarc's Avatar
     

    Registered
    May 2012
    Ok, thank you Frank, it works perfectly. I changed the database (phpmyadmin)
    Another big thank you for this work.
    Marc.

  7. #87
    Noel Hibbard's Avatar

     rFactor 2 Validated PC Specification Facebook profile Where I race LiveRacers Driver Page 

    Registered
    Oct 2010
    Location
    Jacksonville, FL
    UDP is connection-less so theoretically if there are network troubles the code keeps going. But I am not doing UDP directly from the plugin. My plugin simply exports all the structs and sends them as WMs via WM_COPYDATA to a ProxyApp I wrote in .Net which then sends the structs via UDP to another server which then logs the laps into a MSSQL database and generates the live timing page. I calculated the bandwidth needed to stream the scorring info and it is about 3456bps/Sec/Driver. So with 45 drivers on the server it will use about 155Kbps/Sec.

    Also, on clients it also exports the telemetry structs. The ProxyApp can do a UDP broadcast and then I can run a telemetry app of some sort on any other machine on the local network. I do endurance racing with three other guys. I think I am going to write an app to grab all the telemetry (for everyone on the team) and upload it to a central server which will then generate a nice webpage with all the data so that we can keep tabs on the teams progress while the other drivers are waiting for their stint. The telemetry takes about 256Kbps/Sec to stream.

  8. #88
    Valbuena72's Avatar

     rFactor 2 Validated PC Specification @Valbuena72 Where I race rF2 Rank Laptimes 

    Registered
    Dec 2011
    Location
    Le mans
    Hi,
    I made a video of my problem
    it marks me OFFLINE yet everything is well parameterized

    Thank's for help

  9. #89
    Florian Mueller's Avatar
     

    New Member
    Mar 2012
    Hallo Frank.

    Hab das mit dem Trackviewer nicht so richtig verstanden könntest du mir mal erklären wie das genau geht mit der einstellung und welche datei ich einfügen muss damit ich die strecke sehe ? würde mich um deine hilfe freuen lg

    Flo

  10. #90
    Frank Geyer's Avatar

     PC Specification 

    Registered
    Oct 2010
    Location
    Germany
    Quote Originally Posted by Noel Hibbard View Post
    UDP is connection-less so theoretically if there are network troubles the code keeps going. But I am not doing UDP directly from the plugin. My plugin simply exports all the structs and sends them as WMs via WM_COPYDATA to a ProxyApp I wrote in .Net which then sends the structs via UDP to another server which then logs the laps into a MSSQL database and generates the live timing page. I calculated the bandwidth needed to stream the scorring info and it is about 3456bps/Sec/Driver. So with 45 drivers on the server it will use about 155Kbps/Sec.

    Also, on clients it also exports the telemetry structs. The ProxyApp can do a UDP broadcast and then I can run a telemetry app of some sort on any other machine on the local network. I do endurance racing with three other guys. I think I am going to write an app to grab all the telemetry (for everyone on the team) and upload it to a central server which will then generate a nice webpage with all the data so that we can keep tabs on the teams progress while the other drivers are waiting for their stint. The telemetry takes about 256Kbps/Sec to stream.
    Yeah, you are right! UDP is connection-less ... sometimes "I wasn't thinking" suppose to be my middle name *big grin* and shouldn't give you any problem in that case !!!

    Anyhow I think you are doing a great job at your site and league, and if there wouldn't be the time difference of approx. 6 hrs between Florida and Germany I would thinking about registering a team to take part in the VLMS !!!

  11. #91
    Frank Geyer's Avatar

     PC Specification 

    Registered
    Oct 2010
    Location
    Germany
    Quote Originally Posted by Valbuena72 View Post
    Hi,
    I made a video of my problem
    it marks me OFFLINE yet everything is well parameterized
    ...
    Thank's for help
    Hi Val,

    from what I've seen you added a wrong value for <xmlURL>file://D:\rFactor\VMHotlaps\CurrentScoring.xsl</xmlURL>.

    Please try changing it to <xmlURL>file://D:/rFactor/VMHotlaps/CurrentScoring.xml</xmlURL>. Also make sure you are using the right VMHotlaps.dll for rFactor1.

    Sorry for being late ...

    Cheers
    Frank

    PS: The delivered .xsl file is only a style sheet to view the generated .xml file by the plugin in a more readable way for "debugging".

  12. #92
    Valbuena72's Avatar

     rFactor 2 Validated PC Specification @Valbuena72 Where I race rF2 Rank Laptimes 

    Registered
    Dec 2011
    Location
    Le mans
    Thank you for the reply!
    But I had resolved within hours.

    Otherwise, the "Hotlap" if you change car (skin), with the same nickname. make it a duplicate of the hotlap.
    There is there a way to remedy
    thank you

  13. #93
    Frank Geyer's Avatar

     PC Specification 

    Registered
    Oct 2010
    Location
    Germany
    Quote Originally Posted by Florian Mueller View Post
    Hallo Frank.

    Hab das mit dem Trackviewer nicht so richtig verstanden könntest du mir mal erklären wie das genau geht mit der einstellung und welche datei ich einfügen muss damit ich die strecke sehe ? würde mich um deine hilfe freuen lg

    Flo
    Hi Flo,

    1. Die .aiw-Datei einer Strecke ins TrackData-Verzeichnis des Loaders kopieren.
    2. Die .aiw-Datei der Strecke umbennen laut dem angegebenen TrackName in der .gdb-Datei der Strecke.
    3. Über den Loader die Streckendaten der umbenannten .aiw-Datei in die Datenbank inportieren.
    4. Die Darstellung der Strecke über ../trackconfig.php bzw. direkt in der Datenbank anpassen.

    Gruß
    Frank

  14. #94
    Frank Geyer's Avatar

     PC Specification 

    Registered
    Oct 2010
    Location
    Germany
    Quote Originally Posted by Valbuena72 View Post
    Thank you for the reply!
    But I had resolved within hours.

    Otherwise, the "Hotlap" if you change car (skin), with the same nickname. make it a duplicate of the hotlap.
    There is there a way to remedy
    thank you
    Hi Val,

    the way the hotlaps within the Loader are determined is:
    Code:
    "SELECT `TrackName`, `DriverName`, `VehicleClass`, `Vehicle`, `LapNo`, `LapTime` FROM `hotlaps` WHERE `TrackName` = '" & TrackName & "' AND `DriverName` = '" & DriverName & "' AND `VehicleClass` = '" & VehicleClass & "' AND `Vehicle` = '" & Vehicle & "' LIMIT 1"
    I am thinking about removing the Vehicle parameter ...
    Code:
    "SELECT `TrackName`, `DriverName`, `VehicleClass`, `LapNo`, `LapTime` FROM `hotlaps` WHERE `TrackName` = '" & TrackName & "' AND `DriverName` = '" & DriverName & "' AND `VehicleClass` = '" & VehicleClass & "' LIMIT 1"
    so in that case the VehicleClass would be "the leading parameter" to differ between Hotlaps per Driver per Track, but I am not sure yet. Anyhow the more I think about it, the more it does make sense doing it the second way ...

    Cheers
    Frank

  15. #95
    Valbuena72's Avatar

     rFactor 2 Validated PC Specification @Valbuena72 Where I race rF2 Rank Laptimes 

    Registered
    Dec 2011
    Location
    Le mans
    hello,
    now I know which file I edit for your changes as you give ?
    Also another idea, would it be possible to scroll the best time of the file hotlap.php in the file marquee.php?

  16. #96
    Valbuena72's Avatar

     rFactor 2 Validated PC Specification @Valbuena72 Where I race rF2 Rank Laptimes 

    Registered
    Dec 2011
    Location
    Le mans
    I created a page on wordpress, I would like to display the hotlap using an Iframe, only the url of the page is generated from the circuit.
    Is it possible to display the page hotlap by retrieving the address without manually editing .. ?

  17. #97
    M3T's Avatar

     rFactor 2 Not Validated 

    New Member
    May 2012
    Hi guys.

    i am a totally noob on this things and i tried to install and configure the live view.....i have the webserver with the mysql hosted in another server and via a store that i have i have the rfactor server here.

    i just can´t open the database...i don't get any errors but when i open rfactorSL.exe it says to me that sql is closed and on the logs it appears the following errors:

    - "sql connection open - unable to connect to any of specified Mysql hosts"

    can someone help me please ??

    all the other things iare working properly but this one dont and the live timing does not show up properly

    thank you

  18. #98
    DerKutscher's Avatar

     rFactor 2 Validated PC Specification Where I race 

    Registered
    Sep 2011
    Location
    Bünde,Germany
    Hi,

    ich habe folgendes Problem. Ich habe vm installiert und klappt für einen Server wunderbar. Jetzt möchte ich es aber für 3 Server einrichten. Habe alles für 3 Server eingerichtet. wenn ich jetzt aber den 2. sl.exe starte und dann den 2. Server wird alles an den 1. sl.exe übertragen. Habe auch 3 datenbanken und auch alles so eingetragen. Finde meinen Fehler nicht. Kann jemand helfen der es schon für mehr als 1 server eingerichtet hat? Teamviewer und TS wären nicht nur möglich sondern klasse. Es sei denn es wäre ganz simpel. Angelegt habe ich im rF2 folder rFactorSL, rFactorSL2, rFactorSL3. des weiteren VMHotlaps, VMHotlaps2, VMHotlaps3.
    Das gleiche natürlich auf den Webserver.

    hi,

    I have the following problem. I installed vm and works just fine for a server. Now I want to set it up but for 3 servers. Have everything set up for 3 servers. If I now get the second sl.exe start and then the second Everything on the server is first sl.exe transferred. Also have 3 databases and everything so incorporated. Can not find my mistake. Can anyone help who has already set up for more than 1 server? TeamViewer and TS were not only possible, but great. Unless it would be quite simple. I have created folder in the RF2 rFactorSL, rFactorSL2, rFactorSL3. further VMHotlaps, VMHotlaps2 VMHotlaps3.
    The same course on the web server.

  19. #99
    Frank Geyer's Avatar

     PC Specification 

    Registered
    Oct 2010
    Location
    Germany
    New inofficial release. See first post for a download link.

    - Added selections for Track and Class to the hotlaps page (php change).
    - In Hotlaps there is no distinction anymore between two different cars in the same class (loader change).
    - Added a new parameter (<LogAI>0</LogAI>) to the config file of the loader to exclude the logging of AI hotlaps (loader change).
    - Recompiled the VMHotlaps.dll for rFactor2 with new rF2 Example Plugin release dated 24. May 2012.

    Have fun.

    Cheers
    Frank
    Last edited by Frank Geyer; 06-05-12 at 06:15 AM.

  20. #100
    Hoschi's Avatar

     PC Specification 

    Registered
    Nov 2011
    Location
    Germany
    Thanks Frank, nice work ! ;-)
    -wenn jäger zu gejagten werden-

Page 5 of 31 FirstFirst 12345678915 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •