Documentation
¶
Index ¶
Constants ¶
View Source
const MaxSegments = 40
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CarLocation ¶
type CarLocation int
const ( NoLocation CarLocation = iota Pitlane PitOut OutLap OnTrack OutOfRace Stopped )
TODO - add garage and grid - need to calculate these based on speed and session type
func (CarLocation) String ¶
func (c CarLocation) String() string
type Event ¶
type Event struct {
Timestamp time.Time
Name string
Type EventType
Status SessionState
Heartbeat bool
CurrentLap int
TotalLaps int
Sector1Segments int
Sector2Segments int
Sector3Segments int
TotalSegments int
SegmentFlags [MaxSegments]FlagState
PitExitOpen bool
TrackStatus FlagState
SafetyCar TrackState
RemainingTime time.Duration
SessionStartTime time.Time
ClockStopped bool
DRSEnabled DRSState
}
type RaceControlMessage ¶
type SegmentType ¶
type SegmentType int
const ( None SegmentType = iota YellowSegment GreenSegment InvalidSegment // Doesn't get displayed, cut corner/boundaries or invalid segment time? PurpleSegment RedSegment // After chequered flag/stopped on track PitlaneSegment // In pitlane Mystery Mystery2 // ??? 2021 - Turkey Practice_2 Mystery3 // ??? 2020 - Italy Race )
type SessionState ¶
type SessionState int
const ( UnknownState SessionState = iota Inactive Started Aborted Finished Finalised Ended )
func (SessionState) String ¶
func (s SessionState) String() string
type SessionType ¶
type SessionType int
const ( Practice1Session SessionType = iota Practice2Session Practice3Session QualifyingSession SprintSession RaceSession PreSeasonSession )
func (SessionType) String ¶
func (s SessionType) String() string
type Timing ¶
type Timing struct {
Timestamp time.Time
Position int
Name string
ShortName string
Number int
Team string
Color string
TimeDiffToFastest time.Duration
TimeDiffToPositionAhead time.Duration
GapToLeader time.Duration
Segment [MaxSegments]SegmentType
Sector1 time.Duration
Sector1PersonalFastest bool
Sector1OverallFastest bool
Sector2 time.Duration
Sector2PersonalFastest bool
Sector2OverallFastest bool
Sector3 time.Duration
Sector3PersonalFastest bool
Sector3OverallFastest bool
LastLap time.Duration
LastLapPersonalFastest bool
LastLapOverallFastest bool
FastestLap time.Duration
OverallFastestLap bool
KnockedOutOfQualifying bool
ChequeredFlag bool
Tire TireType
LapsOnTire int
Lap int
DRSOpen bool
Pitstops int
Location CarLocation
SpeedTrap int
SpeedTrapPersonalFastest bool
SpeedTrapOverallFastest bool
}
type TrackState ¶
type TrackState int
const ( Clear TrackState = iota VirtualSafetyCar VirtualSafetyCarEnding SafetyCar SafetyCarEnding )
func (TrackState) String ¶
func (t TrackState) String() string
Click to show internal directories.
Click to hide internal directories.