iracing

package
v0.0.0-...-f51fd74 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufInfo

type BufInfo struct {
	TickCount int
	BufOffset int
}

type Client

type Client struct {
	SessionInfoYaml string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *ClientConfig) *Client

func (*Client) Emit

func (ir *Client) Emit(varName string)

func (*Client) Session

func (ir *Client) Session()

func (*Client) Variables

func (ir *Client) Variables()

type ClientConfig

type ClientConfig struct {
	Debug         bool
	RetryInterval int
}

type IRHeader

type IRHeader struct {
	Ver      int // api header version
	Status   int // irsdk_StatusField
	TickRate int // refresh rate being used by iracing to update the telemetry eg 60 or 360 Hz

	// Session info
	SessionInfoTickCount int //increment on changes
	SessionInfoLen       int // length in bytes of the session info yaml string
	SessionInfoOffset    int // location of the yaml data

	NumVars         int // sounds like number of variables but may actually be the length of the variables data
	VarHeaderOffset int // offset to the irsdk_varHeader[numVars] array

	NumBuf int
	BufLen int

	// iracing sdk implies 4 current buffers verify if this - num
	BufInfos []*BufInfo
}

IRHeader represents the iracing memory mapped file header. This must be read to know where the offsets for the information about the which iracing variables are available.

type Mmap

type Mmap []byte

func (*Mmap) Header

func (m *Mmap) Header() *reflect.SliceHeader

Header function exposes the slice header so we can manipulate it around another slice that other slice is a portion of the memory mapped iracing file

type Output

type Output struct {
	// contains filtered or unexported fields
}

func (*Output) OutputChannel

func (o *Output) OutputChannel() chan *Suspension

for now this will receive variables and output them somewhere

type Suspension

type Suspension struct {
	LFShockDef float32
	LFShockVel float32

	RFShockDef float32
	RFShockVel float32

	LRShockDef float32
	LRShockVel float32

	RRShockDef float32
	RRShockVel float32
}

Jump to

Keyboard shortcuts

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