car

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const OUT_THRESHOLD = 60.0

Variables

This section is empty.

Functions

This section is empty.

Types

type CarProcessor

type CarProcessor struct {
	ByCarIdx           map[uint32]*carv1.CarEntry
	ByCarNum           map[string]*carv1.CarEntry
	ComputeState       map[string]*analysisv1.CarComputeState
	StintLookup        map[string]*analysisv1.CarStint
	PitLookup          map[string]*analysisv1.CarPit
	CarOccupancyLookup map[string]*analysisv1.CarOccupancy
	NumByIdx           map[uint32]string
	CurrentDrivers     map[uint32]string
	CarClasses         []*carv1.CarClass
	// contains filtered or unexported fields
}

func NewCarProcessor

func NewCarProcessor(opts ...CarProcessorOption) *CarProcessor

func (*CarProcessor) ProcessCarPayload

func (p *CarProcessor) ProcessCarPayload(payload *racestatev1.PublishDriverDataRequest)

gets called when a new car state is arrived via grpc

func (*CarProcessor) ProcessStatePayload

func (p *CarProcessor) ProcessStatePayload(payload *racestatev1.PublishStateRequest)

gets called when a state message is received via "...live.state" topic

func (*CarProcessor) ProcessStatePayloads

func (p *CarProcessor) ProcessStatePayloads(payloads []*racestatev1.PublishStateRequest)

gets called when multiple state message are available and needs to be processed (mainly in tests)

type CarProcessorOption

type CarProcessorOption func(cp *CarProcessor)

func WithRaceSessions added in v0.24.0

func WithRaceSessions(raceSessions []uint32) CarProcessorOption

Jump to

Keyboard shortcuts

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