Struct HardwareControl
- Namespace
- rF2SharedMemoryNet.RF2Data.Structs
- Assembly
- rF2SharedMemoryNet.dll
Represents a hardware control structure used for communication between rFactor 2 and external systems.
public struct HardwareControl
- Inherited Members
Remarks
This structure is designed to facilitate data exchange with hardware control systems in rFactor 2. It includes versioning fields to track updates, a layout version identifier, a control name, and a return value. The VersionUpdateBegin and VersionUpdateEnd fields are used to ensure data consistency during updates.
Fields
ControlName
Represents the name of a hardware control as a byte array.
public byte[] ControlName
Field Value
- byte[]
Remarks
The array is marshaled using the ByValArray attribute and has a fixed size defined by MAX_HWCONTROL_NAME_LEN. This ensures compatibility with unmanaged code.
FRetVal
Represents a double-precision floating-point value.
public double FRetVal
Field Value
Remarks
This field can be used to store or retrieve a numeric value.
LayoutVersion
Represents the version number of the layout configuration.
public int LayoutVersion
Field Value
Remarks
This field is used to track the version of the layout configuration. It can be useful for ensuring compatibility or identifying changes in layout structure.
VersionUpdateBegin
Represents the version number of the buffer at the point when an update begins.
public uint VersionUpdateBegin
Field Value
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
Remarks
This field can be used to track the completion of buffer write operations. Each time a buffer write is finalized, the value of this counter is incremented.