sharedmemory

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	INVALID_HANDLE_VALUE uintptr = 0x80000000
	ACCPageFilePhysics           = "Local\\acpmf_physics"
	ACCPageFileGraphic           = "Local\\acpmf_graphics"
	ACCPageFileStatic            = "Local\\acpmf_static"
)

Variables

This section is empty.

Functions

func ACCTelemetryToDataFrame

func ACCTelemetryToDataFrame(t ACCTelemetry) (*data.Frame, error)

func GraphicToDataFrame

func GraphicToDataFrame(t SPageFileGraphic, frame *data.Frame) (*data.Frame, error)

func PhysicsToDataFrame

func PhysicsToDataFrame(t SPageFilePhysics) (*data.Frame, error)

func RunSharedMemoryClient

func RunSharedMemoryClient(ch chan ACCTelemetry, ctrl chan string, interval time.Duration)

Types

type ACCTelemetry

type ACCTelemetry struct {
	SPageFileGraphic
	SPageFilePhysics
}

type SPageFileGraphic

type SPageFileGraphic struct {
	PacketId                 int32
	Status                   int32
	Session                  int32
	CurrentTime              [30]byte
	LastTime                 [30]byte
	BestTime                 [30]byte
	Split                    [30]byte
	CompletedLaps            int32
	Position                 int32
	ICurrentTime             int32
	ILastTime                int32
	IBestTime                int32
	SessionTimeLeft          float32
	DistanceTraveled         float32
	IsInPit                  int32
	CurrentSectorIndex       int32
	LastSectorTime           int32
	NumberOfLaps             int32
	TyreCompound             [68]byte
	ReplayTimeMultiplier     float32
	NormalizedCarPosition    float32
	ActiveCars               int32
	CarCoordinates           [60][3]float32
	CarId                    [60]int32
	PlayercarId              int32
	PenaltyTime              float32
	Flag                     int32
	Penalty                  int32
	IdealLineOn              int32
	IsInPitLane              int32
	SurfaceGrip              float32
	MandatoryPitDone         int32
	WindSpeed                float32
	WindDirection            float32
	IsSetupMenuVisible       int32
	MainDisplayIndex         int32
	SecondaryDisplayIndex    int32
	TCLevel                  int32
	TCCut                    int32
	EngineMap                int32
	ABSLevel                 int32
	FuelxLap                 float32
	RainLights               int32
	FlashingLights           int32
	LightsStage              int32
	ExhaustTemperature       float32
	WiperLv                  int32
	DriverStintTotalTimeLeft int32
	DriverStintTimeLeft      int32
	RainTyres                int32

	SessionIndex         int32
	UsedFuel             float32
	DeltaLapTime         [32]byte
	IDeltaLapTime        int32
	EstimatedLapTime     [32]byte
	IEstimatedLapTime    int32
	IsDeltaPositive      int32
	ISplit               int32
	IsValidLap           int32
	FuelEstimatedLaps    float32
	TrackStatus          [68]byte
	MissingMandatoryPits int32
	Clock                float32
	DirectionLightsLeft  int32
	DirectionLightsRight int32
	GlobalYellow         int32
	GlobalYellow1        int32
	GlobalYellow2        int32
	GlobalYellow3        int32
	GlobalWhite          int32
	GlobalGreen          int32
	GlobalChequered      int32
	GlobalRed            int32
	MfdTyreSet           int32
	MfdFuelToAdd         float32
	MfdTyrePressureFL    float32
	MfdTyrePressureFR    float32
	MfdTyrePressureRL    float32
	MfdTyrePressureRR    float32
	TrackGripStatus      int32
	RainIntensity        int32
	RainIntensityIn10min int32
	RainIntensityIn30min int32
	CurrentTyreSet       int32
	StrategyTyreSet      int32
}

type SPageFilePhysics

type SPageFilePhysics struct {
	PacketId            int32
	Gas                 float32
	Brake               float32
	Fuel                float32
	Gear                int32
	RPMs                int32
	SteerAngle          float32
	SpeedKmh            float32
	Velocity            [3]float32
	AccG                [3]float32
	WheelSlip           [4]float32
	WheelLoad           [4]float32 // Field is not used by ACC
	WheelsPressure      [4]float32
	WheelAngularSpeed   [4]float32
	TyreWear            [4]float32 // Field is not used by ACC
	TyreDirtyLevel      [4]float32 // Field is not used by ACC
	TyreCoreTemperature [4]float32
	CamberRad           [4]float32 // Field is not used by ACC
	SuspensionTravel    [4]float32
	DRS                 float32 // Field is not used by ACC
	TC                  float32
	Heading             float32
	Pitch               float32
	Roll                float32
	CGHeight            float32    // Field is not used by ACC
	CarDamage           [5]float32 // Car damage: front 0, rear 1, left 2, right 3, centre 4
	NumberOfTyresOut    int32      // Field is not used by ACC
	PitLimiterOn        int32
	ABS                 float32
	KersCharge          float32 // Field is not used by ACC
	KersInput           float32 // Field is not used by ACC
	AutoShifterOn       int32
	RideHeight          [2]float32 // Field is not used by ACC
	TurboBoost          float32
	Ballast             float32 // Field is not used by ACC
	AirDensity          float32 // Field is not used by ACC
	AirTemp             float32
	RoadTemp            float32
	LocalAngularVel     [3]float32
	FinalFF             float32 // Force feedback signal
	PerformanceMeter    float32 // Field is not used by ACC
	Enginebrake         int32   // Field is not used by ACC
	Ersrecoverylevel    int32   // Field is not used by ACC
	Erspowerlevel       int32   // Field is not used by ACC
	Ersheatcharging     int32   // Field is not used by ACC
	Ersischarging       int32   // Field is not used by ACC
	Kerscurrentkj       float32 // Field is not used by ACC
	Drsavailable        int32   // Field is not used by ACC
	Drsenabled          int32   // Field is not used by ACC
	BrakeTemp           [4]float32
	Clutch              float32
	TyretempI           [4]float32 // Field is not used by ACC
	TyretempM           [4]float32 // Field is not used by ACC
	TyretempO           [4]float32 // Field is not used by ACC
	IsAIControlled      int32
	TyreContactPoint    [4][3]float32 // Tyre contact point global coordinates [FL, FR, RL, RR
	TyreContactNormal   [4][3]float32 // Tyre contact normal [FL, FR, RL, RR] [x,y,z]
	TyreContactHeading  [4][3]float32 // Tyre contact heading [FL, FR, RL, RR] [x,y,z]
	BrakeBias           float32       // Front brake bias, see Appendix 4
	LocalVelocity       [3]float32
	P2pactivations      int32      // Field is not used by ACC
	P2pstatus           int32      // Field is not used by ACC
	Currentmaxrpm       int32      // Field is not used by ACC
	Mz                  [4]float32 // Field is not used by ACC
	Fx                  [4]float32 // Field is not used by ACC
	Fy                  [4]float32 // Field is not used by ACC
	SlipRatio           [4]float32 // Tyre slip ratio [FL, FR, RL, RR] in radians
	SlipAngle           [4]float32 // Tyre slip angle [FL, FR, RL, RR]
	TCInAction          int32      // Field is not used by ACC
	ABSInAction         int32      // Field is not used by ACC
	SuspensionDamage    [4]float32 // Field is not used by ACC
	TyreTemp            [4]float32 // Field is not used by ACC
}

SPageFilePhysics updates at each physics step. They all refer to the player’s car.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL