[REL] rF2 Shared Memory Tools for Developers

Is there a way to know that some rF2Scoring.vehicels array position is actually a leftover after some position before it was removed from server? Because I see now if I boot some AI from server the one after it in rF2Scoring.vehicels array jumps in upper position, but leaves copy of its data in old position. So now I have 2 same drivers in that array and no way to tell which one is live and which one is old data leftover?

UPD. Sorry was not thinking straight. The answer appears to be sort by position and show only mNumVehicles drivers.
You do not need to sort by position. Just check rf2scoring.mscoringinfo.mnumvehicles. it contains number of updated vehicles. To save couple of picosecond. I don't clear buffer past active,as you noticed:)

Check the monitor app it shows pretty much everything you need to do to read this stuff.

Mimd me asking what are you trying to do?

Let me know if you have questions.
 
I`m trying to do LIveTiming. Its really early as I`m trying out available server-client techs for me. I`ll ask if I need more info.
 
I`m trying to do LIveTiming. Its really early as I`m trying out available server-client techs for me. I`ll ask if I need more info.
something I did not investigate yet, is running plugin in dedicated server. There's untested code in plugin, that roots from rF1 plugin. But if you'll need it I can have a look at some point. Good luck :)
 
One more thing - if you end up using this plugin, let me know please. Having list of users will help me convincing people to move, as running fewer plugins is good for rF2.
 
rF2ScoringInfo.mSectorFlag array always returns [1,11,11] if yellow flag is in any sector. For example, if YF is in S2 it is [1, 11, 11] instead of [11, 1, 11]. Is this a bug?
 
Hmmm, I never heard CC announce yellow incorrectly. I checked the code and looks I am only reading this in CC during Race. What session is this?
 
Ok, so I was testing before only on Silverstone International layout and there mSectorFlag does not work correctly. Now I tried other 2 Silverstone layouts and there it works correctly. So I guess its a Silverstone International track bug and not related to plugin. Sorry again.
 
Yes: First lap of FCY
upload_2018-3-22_8-35-17.png


s3 yellow.
upload_2018-3-22_8-32-15.png


Note that shared memory plugin does pretty much nothing but copies rF2 internals, and if there's problem copying somewhere many things will be completely broken. The only artificial struct is rF2Extended.
 

Attachments

  • upload_2018-3-22_8-34-9.png
    upload_2018-3-22_8-34-9.png
    2.1 KB · Views: 618
  • upload_2018-3-22_8-34-42.png
    upload_2018-3-22_8-34-42.png
    2.1 KB · Views: 497
03/29/2018 - v3.0.1.0

Plugin:
  • Add DedicatedServerMapGlobally preference to allow mapping dedicated server shared memory buffers to global section, so that users running under other accounts can access them. Note that "Create Global Objects" permission is needed on user account running dedicated server.
 
Hi @The Iron Wolf
How does one go about this ?
"Note that "Create Global Objects" permission is needed on user account running dedicated server."
Hi Ceecee, This is administrative/Group Policy task and you have to research it yourself unfortunately. But roughly, on Pro OS there's Local Security Policy->Local Policies->Create global objects.

This might not be available on Home editions.
 
09/04/2018 - v3.1.0.0

Plugin:

  • Exposed FFB info. Add $rFactor2SMMP_ForceFeedback$ buffer to map rF2ForceFeedback structure. Note that since it is a single value buffer, and it is updated at 400FPS, no synchronization is applied nor needed while reading it.
Monitor:

  • Updated to expose FFB info.
 
@The Iron Wolf
Does your plugin support the data output of the new integrated ABS and TC?
Seems like it doesn't. But would be cool for SimHub.
Did S397 announce they exposed anything new (other than deltaBest)? I checked InternalsPlugin from s397, still good old v7 from ISI :) So I am not aware of any updates.

There are 2 things related to TC/ABS in v7 internals:
Code:
// Driver input
  double mUnfilteredThrottle;    // ranges  0.0-1.0
  double mUnfilteredBrake;       // ranges  0.0-1.0
  double mUnfilteredSteering;    // ranges -1.0-1.0 (left to right)
  double mUnfilteredClutch;      // ranges  0.0-1.0

  // Filtered input (various adjustments for rev or speed limiting, TC, ABS?, speed sensitive steering, clutch work for semi-automatic shifting, etc.)
  double mFilteredThrottle;      // ranges  0.0-1.0
  double mFilteredBrake;         // ranges  0.0-1.0
  double mFilteredSteering;      // ranges -1.0-1.0 (left to right)
  double mFilteredClutch;        // ranges  0.0-1.0
So I suppose when ABS fluctuates, Filtered brake will vary from Unfiltered. Same for TC and throttle.

Second, aid settings are already exposed via
rF2Extended::mPhysics

namely:
Code:
struct rF2PhysicsOptions
{
  unsigned char mTractionControl;  // 0 (off) - 3 (high)
  unsigned char mAntiLockBrakes;   // 0 (off) - 2 (high)
 
Hi. I see now that mServerName is available in API. Do you plan on adding it to rF2ScoringInfo? Would be useful to show server name in LiveTiming.
 
Hi. I see now that mServerName is available in API. Do you plan on adding it to rF2ScoringInfo? Would be useful to show server name in LiveTiming.
Hi, I'll ping you on the Discord to discuss. I will be looking into plugin updates soon, because it turns out there are few fields in the reserved bytes that are given meaning in SCR/KQ plugin. I will see where this fits. I don't see code now but if it is not part of current ScoringInfo, it'll likely have to go the new buffer, or extended, because buffers are exact mirror of ISI structures.
 
12/15/2018 - v3.2.0.0

Plugin/Monitor:

  • Update exposed field headers and C# marhsaling code to include fields found in Rules/Knockout Qualifying plugins. See this commit to see what has changed.
Special thanks for testing goes to @Nibo
 
01/28/2019 - v3.3.0.6

Plugin/Monitor:
  • Expose Message Center messages, global status message and pit lane speed values via rF2Extended buffer. This functionality if off by default and is enabled via "EnableDirectMemoryAccess" plugin variable.
 
02/08/2019 - v3.4.0.6

Plugin/Monitor:

  • Expose Stock Car Rules plugin FCY instruction message in DMA mode.
  • Deprecate SCR plugin hosting (breaking change).
 
Back
Top