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
    I don't think it is
     
  2. Stefan Mizzi

    Stefan Mizzi Well-Known Member

    Joined:
    Feb 6, 2015
    Ratings:
    +625 / 0 / -0
    Yeah me neither.....I was hoping that you had hacked it in some way :)
     
  3. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    I did have a poke around to see if there was any way I could tell - perhaps the AI drivers were always added to the block after the player or something but I couldn't see a usable pattern
     
    • Informative Informative x 1
  4. Stefan Mizzi

    Stefan Mizzi Well-Known Member

    Joined:
    Feb 6, 2015
    Ratings:
    +625 / 0 / -0
    I have a problem with generating a unique Id for each session. The closest I got is

    SessionType + TrackInfo.TrackId + TrackInfo.LayoutId

    but that is not unique at all :(

    I'd appreciate if you can add some unique Id for each session.

    Thanks!
     
  5. Stefan Mizzi

    Stefan Mizzi Well-Known Member

    Joined:
    Feb 6, 2015
    Ratings:
    +625 / 0 / -0
    Hi,

    I am now developing a few in-game overlays using directX and at the moment I cannot tell from the Shared API if the user:

    1. Had pause the game
    2. Is in pits but not on the track, that is he is view the timing, changing the set etc. I need to hide the overlays if the users is in menu doing something.

    Thanks!
    Stefan
     
  6. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Can't you use the PlayerData.GameSimulationTime to detect pause / viewing replays?

    No idea about the other one. We could do with a better way to communicate our requests to the devs for this stuff really, to prevent requests getting lost
     
  7. Stefan Mizzi

    Stefan Mizzi Well-Known Member

    Joined:
    Feb 6, 2015
    Ratings:
    +625 / 0 / -0
    I checked GameSimulationTime but its value does not seem to change or make sense. I could be wrong though.

    Yeah, I think the requests here fall into a very deep dark well......not sure what they prefer. Or maybe they prefer we ask nothing haha
     
  8. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    GameSimulationTime is the number of seconds since the session started I think. It definitely does get updated
     
    • Informative Informative x 1
  9. tobias.schlottbohm

    tobias.schlottbohm Member

    Joined:
    Jun 24, 2015
    Ratings:
    +17 / 0 / -0
    +1
     
    • Agree Agree x 1
  10. Gil Ritter

    Gil Ritter Well-Known Member

    Joined:
    Feb 26, 2015
    Ratings:
    +91 / 0 / -0
    Yes, that would be nice. :)
     
  11. AforD||M@g!ndo$ch

    AforD||M@g!ndo$ch New Member

    Joined:
    Mar 2, 2016
    Ratings:
    +0 / 0 / -0
    Hello....sorry....maybe a little off-topic....but do you have detailed information about the shared memory API used by Race07? If yes, could you please provide it to me/us?
     
    Last edited: Mar 3, 2016
  12. Rene

    Rene New Member

    Joined:
    Mar 7, 2016
    Ratings:
    +2 / 0 / -0
    Could you also have a look at the tire temps? At first glance they look good, but i.e. when you try a make donuts to heat up rear tires you won't really notice a huge increase of temps.

    A quick word on the C example:

    In function 'is_process_running' the snapshot handle should be closed to avoid memory leaks. I am just mentioning this as people tend to copy code without looking at it in detail.

    Code:
    bool is_process_running(const TCHAR* name)
    {
        HANDLE hSnapshot = NULL;
        PROCESSENTRY32 entry;
        bool bRunning = false;
    
        ZeroMemory(&entry, sizeof(entry));
        entry.dwSize = sizeof(PROCESSENTRY32);
    
        hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
        if (INVALID_HANDLE_VALUE != hSnapshot)
        {
            if (Process32First(hSnapshot, &entry))
            {
                while (!bRunning && Process32Next(hSnapshot, &entry))
                {
                    bRunning = _tcscmp(entry.szExeFile, name) == 0;
                }
            }
    
            CloseHandle(hSnapshot);
            hSnapshot = NULL;
        }
    
        return bRunning;
    }
    Regards
    René
     
    • Like Like x 2
  13. Rene

    Rene New Member

    Joined:
    Mar 7, 2016
    Ratings:
    +2 / 0 / -0
    It's the same as for GTL, GTR and GTR2. You should be able to google it.
    Each of the titles has a different shared memory name though:

    GTR: $SimBin$
    GTR2: $gtr2$
    GTL: $gtlegends$
    RACE07: $Race$
     
  14. AforD||M@g!ndo$ch

    AforD||M@g!ndo$ch New Member

    Joined:
    Mar 2, 2016
    Ratings:
    +0 / 0 / -0
    Hey, I already found some Details, e.g.http://www.racedepartment.com/threads/how-to-get-live-data-from-race07.63386/
    I just wondered if there was some additional data added in the meantime ;-)
     
  15. Ironman

    Ironman New Member

    Joined:
    Jan 22, 2016
    Ratings:
    +0 / 0 / -0
    Hi,
    Using the Shared Memory API, I would like to create a list of laps and then display some telemetry data for the lap the user has selected. How can I recognize the start of a new lap?

    I guess that to get the data we have to use some kind of reading rate (for example every 1/10 of a second or so). What should we use usually?


    Regards,
    Daniel
     
    Last edited: Mar 23, 2016
  16. Fanapryde

    Fanapryde Well-Known Member

    Joined:
    Jan 22, 2016
    Ratings:
    +410 / 0 / -0
    I am using Sensadigit's DashmeterPro since a few days now, but I don't seem to get water and oil temperature readouts, at least they never even reach 60°C, which is obviously too low...
    Or doesn't RR's API send these ?
    I looked at a few cockpit gauges too and there was not much happening either ?
     
  17. Stefan Mizzi

    Stefan Mizzi Well-Known Member

    Joined:
    Feb 6, 2015
    Ratings:
    +625 / 0 / -0
    R3E API definitely sends that data. If the data is good or not, that I would not know though. I can check on my dash.
     
    • Informative Informative x 2
  18. Fanapryde

    Fanapryde Well-Known Member

    Joined:
    Jan 22, 2016
    Ratings:
    +410 / 0 / -0
    Thanks, I'd appreciate that...
     
  19. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    The engine temp data you're seeing is what r3e is sending. The temperatures in most cars are unrealistically low
     
    • Agree Agree x 1
  20. Fanapryde

    Fanapryde Well-Known Member

    Joined:
    Jan 22, 2016
    Ratings:
    +410 / 0 / -0
    OK, so this is a known issue ?