Shared Memory API

Discussion in 'Community Workshop' started by Mikael Hermansson, Jun 7, 2015.

  1. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    My car class stuff is very simple - just assumptions about brake temp thresholds and a couple of other things, so I just use the car class ID that the game spits out rather that trying to parse the json
     
  2. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Also, my car class data is shared for r3e and pcars, so the r3e json file isn't really appropriate.

    Edit... Sorry about the appalling quality of some of that crew chief code. I really need to tidy it up and refactor the hell out of it but I prefer to spent the little time I have adding stuff and tweaking
     
    Last edited: May 13, 2016
  3. Stefan Mizzi

    Stefan Mizzi Well-Known Member

    Joined:
    Feb 6, 2015
    Ratings:
    +625 / 0 / -0
    And I thought you were parsing the JSON too :)

    Don't worry about the code mate, I perfectly understand as I do the same :p
     
  4. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Its kind of embarrassing when it's public on github for all to see though :)
     
  5. Stefan Mizzi

    Stefan Mizzi Well-Known Member

    Joined:
    Feb 6, 2015
    Ratings:
    +625 / 0 / -0
    @Sector 3 :

    Will there be any further enhancements to the Shared Memory API from the suggestions being made here please?

    I'm asking because we haven't received much feedback in the last months and myself and a friend of mine are building an app and we need to know the way forward (keep using some hacks or hope for some API updates)

    I'd appreciate if you can at least let us know not to expect any updates or if they will at least come one day :)

    Thanks!
     
    • Agree Agree x 3
  6. Gil Ritter

    Gil Ritter Well-Known Member

    Joined:
    Feb 26, 2015
    Ratings:
    +91 / 0 / -0
    Stefan, I think we have the same friend. ;) He did also some very useful stuff for our community. An we are also very interested in further developments of this API.
     
    • Agree Agree x 1
  7. monzoom

    monzoom New Member

    Joined:
    Apr 2, 2015
    Ratings:
    +1 / 0 / -0
    Hi, are there any news for the C#-Version? The latest version doesn't inlcude the latest changes. E.g. the driver data.
    I hope you had found a solution to run the struct under C#.

    Regards
     
  8. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    • Useful Useful x 1
  9. monzoom

    monzoom New Member

    Joined:
    Apr 2, 2015
    Ratings:
    +1 / 0 / -0
    It seems it looks good to me.
    I'll give it a try. ;)
    Thanks in advance.

    Regards
     
  10. FStark

    FStark New Member

    Joined:
    May 9, 2016
    Ratings:
    +0 / 0 / -0
    Hey guys,

    first of all, thank you sector3 for providing the shared memory api, I really appreciate that!
    I am currently playing around with it and have noticed, that the DRS implementation doesnt seem right. Instead of being -1 (no data), the drs_available flag is 1 (drs available) for cars that do not have a DRS.
    I am working on an dashboard application for Windows Phone and would love to implement something to show the current DRS-state properly. I would appreciate it, if you could address that in the next update :)
    (Maybe this has already been answered in this thread, then I am sorry to bother you with that, but unfortunatly I could not afford the time to read all of the posts).

    Thanks in advance!
     
  11. Tarik Userli

    Tarik Userli Well-Known Member

    Joined:
    Mar 7, 2015
    Ratings:
    +578 / 0 / -0
    test
     
    • Funny Funny x 1
  12. FStark

    FStark New Member

    Joined:
    May 9, 2016
    Ratings:
    +0 / 0 / -0
    Yeah I know that, but for me it would make sense to only set the flag for cars that are equipped with a DRS.
     
    • Agree Agree x 1
  13. FStark

    FStark New Member

    Joined:
    May 9, 2016
    Ratings:
    +0 / 0 / -0
    Maybe I have to do it the same way. Even though it's not the coolest. I hope they'll change that one day or add another value to the struct.
     
  14. Gallow24

    Gallow24 New Member

    Joined:
    Feb 6, 2015
    Ratings:
    +0 / 0 / -0
    Is it possible to get damper-velocities in Shared-Memory API?

    And a question about the Tire-Temps. The temperatures of the outer, inner and center don´t vary independent of the camber-settings. Is this normal at the current stage of the tire-model?
     
  15. Christian G

    Christian G Topological Agitator Beta tester

    Joined:
    Apr 8, 2015
    Ratings:
    +2,411 / 0 / -0
    Think so, the temperature is intended to be the tyres core temp, not the surface temp, and I think the core doesn't get influenced by the camber as much as the surface temp.
     
  16. Gallow24

    Gallow24 New Member

    Joined:
    Feb 6, 2015
    Ratings:
    +0 / 0 / -0
    Thank you for this information. So there is no parameter for the tamperature of the surface?
     
  17. Christian G

    Christian G Topological Agitator Beta tester

    Joined:
    Apr 8, 2015
    Ratings:
    +2,411 / 0 / -0
    AfaIk there isn't, core temp is the only value, for the time being at least.
     
  18. Gallow24

    Gallow24 New Member

    Joined:
    Feb 6, 2015
    Ratings:
    +0 / 0 / -0
    Thank you for your reply. I think that´s a problem. With core temperature only it´s difficuilt to adjust the correct camber.

    So it would be nice to have the surface temperatures, maybe the devs can implement it.
     
  19. Gallow24

    Gallow24 New Member

    Joined:
    Feb 6, 2015
    Ratings:
    +0 / 0 / -0
    At the moment i try to understand how to access several values of the shared memory. Now i have a problem:
    I want to see the value for in_pitlane for my own car. Therefore i wrote:

    r3e_driver_data_1* map_buffer = NULL;
    map_buffer = (r3e_driver_data_1*)MapViewOfFile(map_handle, FILE_MAP_READ, 0, 0, sizeof(r3e_driver_data_1));

    But when i want to print this value it doesn´t show up:
    wprintf_s(L"In Box: %.d", map_buffer->in_pitlane);

    What´s the problem? I have no idea. What is needed when i want to show which cars are in pit?
     
  20. Gallow24

    Gallow24 New Member

    Joined:
    Feb 6, 2015
    Ratings:
    +0 / 0 / -0
    Thank you really much. How can i access this value for my own car? Has it a special id or do i need to search it?