Table of Contents

Struct RulesControl

Namespace
rF2SharedMemoryNet.RF2Data.Structs
Assembly
rF2SharedMemoryNet.dll

Represents the control structure for managing track rules and participants in rFactor2.

public struct RulesControl
Inherited Members

Remarks

This structure is used to manage the state and actions related to track rules in rFactor2. It includes versioning information for updates, layout versioning, track rules, and arrays of actions and participants. The version update fields are incremented before and after buffer writes to ensure consistency during updates.

Fields

Actions

Represents an array of track rule actions for mapped vehicles in rFactor2.

public TrackRulesAction[] Actions

Field Value

TrackRulesAction[]

Remarks

The array is marshaled using the ByValArray attribute, with a fixed size specified by MAX_MAPPED_VEHICLES. This ensures compatibility with unmanaged code.

LayoutVersion

Represents the version number of the layout.

public int LayoutVersion

Field Value

int

Remarks

This field indicates the current version of the layout configuration. It can be used to track changes or updates to the layout structure.

Participants

Represents an array of participants in the track rules system.

public TrackRulesParticipant[] Participants

Field Value

TrackRulesParticipant[]

Remarks

The array is marshaled using the ByValArray attribute, with a fixed size specified by MAX_MAPPED_VEHICLES. This ensures compatibility with unmanaged code.

TrackRules

Represents the track rules for an RF2 simulation.

public TrackRules TrackRules

Field Value

TrackRules

VersionUpdateBegin

Represents the version number of the buffer at the point when an update begins.

public uint VersionUpdateBegin

Field Value

uint

Remarks

This value is incremented immediately before the buffer is written to, indicating the start of an update. It can be used to track changes or ensure consistency during buffer operations.

VersionUpdateEnd

Represents the version update counter that is incremented after a buffer write operation is completed.

public uint VersionUpdateEnd

Field Value

uint

Remarks

This field is used to track the completion of buffer write operations. It is incremented automatically after each write operation to indicate the end of the update process.