Virtual Robot Racing League

Developer Center

VRRL
RaceFault Class Reference

The record of a fault committed by a robot in a race More...

Public Types

enum  Types { Types.RefusedPowerOnCall, Types.RefusedPowerOffCall, Types.PoweredOnPrematurely, Types.MovedBeforeStart }
 The types of faults More...
 

Public Member Functions

 RaceFault (Types tp, float time)
 [Used by the simulation. Do not invoke or override.] More...
 
override string ToString ()
 Returns a human-readable string of the type of fault More...
 
String GetDescription ()
 Returns a detailed description of how the fault occurred More...
 
bool CanHaveMultiple ()
 Returns whether or not this fault can be committed more than once per robot per race More...
 

Properties

Types Type [get]
 The type of this fault More...
 
float Time [get]
 The time this fault occurred, in seconds since the simulation started More...
 

Detailed Description

The record of a fault committed by a robot in a race

Member Enumeration Documentation

◆ Types

enum RaceFault.Types
strong

The types of faults

Enumerator
RefusedPowerOnCall 

The robot did not power on within 2 seconds of a power-on request

RefusedPowerOffCall 

The robot did not power off within 5 seconds of a power-off request

PoweredOnPrematurely 

The robot powered on before a power-on request was received

MovedBeforeStart 

The robot moved before the race began

Constructor & Destructor Documentation

◆ RaceFault()

RaceFault.RaceFault ( Types  tp,
float  time 
)

[Used by the simulation. Do not invoke or override.]

Parameters
tp
time

Member Function Documentation

◆ CanHaveMultiple()

bool RaceFault.CanHaveMultiple ( )

Returns whether or not this fault can be committed more than once per robot per race

Returns
Whether or not this fault can be committed more than once per robot per race

◆ GetDescription()

String RaceFault.GetDescription ( )

Returns a detailed description of how the fault occurred

Returns
A detailed description of how the fault occurred

◆ ToString()

override string RaceFault.ToString ( )

Returns a human-readable string of the type of fault

Returns
A human-readable string of the type of fault

Property Documentation

◆ Time

float RaceFault.Time
get

The time this fault occurred, in seconds since the simulation started

◆ Type

Types RaceFault.Type
get

The type of this fault