public class iRacingCar extends Car
Modifier and Type | Class and Description |
---|---|
static class |
iRacingCar.dynamicIRating |
Car.LapType, Car.Message, Car.SpotterMessages, Car.Status
Modifier and Type | Field and Description |
---|---|
iRacingCar.dynamicIRating |
m_dynamicIRating |
Constructor and Description |
---|
iRacingCar(iRacingSIMPlugin SIMPlugin) |
iRacingCar(iRacingSIMPlugin SIMPlugin,
java.lang.Integer id,
java.lang.String name,
java.lang.Integer driversIdx) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
_getDriversIdx() |
Data |
getBearing(java.lang.String UOM)
Returns the bearing of the car.
|
Data |
getCautions()
Returns the number of Cautions that this car has seen.
|
Data |
getClassColor()
Returns the color of the car's class if in a multi-class session
|
Data |
getClassName()
Returns the name of the car's class in a multicar session.
|
Data |
getColor()
Returns the main color of the car as an RGB value.
|
Data |
getColorNumber()
Returns the main color of the car number as an RGB value.
|
Data |
getColorNumberBackground()
Returns the main color of the car number's background as an RGB value.
|
Data |
getColorNumberOutline()
Returns the main color of the car number's outline as an RGB value.
|
Data |
getDescription()
Returns the printable description of the car.
|
Data |
getDiscontinuality()
Returns the number of times the car has blinked out.
|
Data |
getDivisionName() |
Data |
getDriverClubName()
Returns the club name of the current driver of the car.
|
Data |
getDriverDivisionName()
Returns the division name of the current driver of the car.
|
Data |
getDriverInitials()
Returns the initials of the current driver of the car.
|
Data |
getDriverLicenseColor()
Returns the license color of the current driver of the car.
|
Data |
getDriverLicenseColorText()
Returns the text color that best overlays the license color of the current driver of the car when it is used as a background.
|
Data |
getDriverLicLevel() |
Data |
getDriverLicSubLevel() |
Data |
getDriverName(boolean allowMapping)
Returns the name of the current driver of the car.
|
Data |
getDriverNameShort(boolean allowMapping)
Returns the name of the current driver of the car in a shortened format.
|
Data |
getDriverRating()
Returns the rating of the current driver of the car.
|
Data |
getDriverRatingDelta()
Returns the change of rating of the current driver of the car as the race progresses.
|
Data |
getFuelLevelAtStartFinish(java.lang.String UOM)
Returns the fuel level the last time the car crossed the start/finish line.
|
Data |
getFuelLevelNeeded(int lapsToAverage,
double laps,
java.lang.String UOM)
Returns the amount of fuel you need to add to complete the number of laps specified.
|
Data |
getFuelLevelPerLap(int lapsToAverage,
java.lang.String UOM)
Returns the amount of fuel being consumed per lap.
|
Data |
getFuelLevelToFinish(int lapsToAverage,
double laps,
java.lang.String UOM)
Returns the total amount of fuel needed to finish the race regardless of how much is in the fuel tank.
|
Data |
getHasAutomaticPitCommands()
Automatic Pit Commands will not be enabled until a client calls this function to find out.
|
Data |
getId()
Returns the numeric id of this car.
|
Data |
getImageUrl()
Returns a URL to this car's image suitable for using in the "src" attribute of the "img" tag.
|
Data |
getIncidents()
Returns the number of incidents for the driver of this car.
|
Data |
getIncidentsTeam()
Returns the number of incidents for this car's team.
|
Data |
getIsBlackFlag()
Returns true if the black flag has been waved for this car.
|
Data |
getIsBlueFlag()
Returns true if the blue flag has been waved for this car.
|
Data |
getIsDisqualifyFlag()
Returns true if the disqualify flag has been waved for this car.
|
Data |
getIsDriving()
Returns true if are driving this car.
|
Data |
getIsFixedSetup()
Returns true if the car is in a fixed setup session.
|
Data |
getIsPaceCar()
Returns true if the car is the pace car.
|
Data |
getIsPitSpeedLimiter()
Returns true if the car has the pit speed limiter on.
|
Data |
getIsPushToPassActive()
Returns the push to pass active status.
|
Data |
getIsSpectator()
Returns true if the car is a spectator.
|
Data |
getIsYellowFlag()
Returns true if the yellow flag has been waved for this car.
|
Data |
getLap(java.lang.String ref,
int lapsToAverage)
Returns the lap based on the specified reference type.
|
Data |
getLapInvalidFlags()
Returns the invalid status of each lap in in an array.
|
Data |
getLapsToGo()
Returns the number of laps this car has remaining.
|
Data |
getLapTime(java.lang.String ref,
int lapsToAverage)
Returns the time of the lap based on the specified reference type.
|
Data |
getLapTimeDelta(java.lang.String ref)
Returns the time delta of the lap based on the specified reference type.
|
Data |
getLapTimeDeltaPercent(java.lang.String ref)
Returns the time delta as a percentage of the lap based on the specified reference type.
|
Data |
getLapTimeDeltaReference(java.lang.String ref)
Returns the time delta reference of the lap based on the specified reference type.
|
Data |
getLapTimes()
Returns the lap time of each lap in in an array
The array is indexed as zero based.
|
Data |
getLatitude(java.lang.String UOM)
iRacing only outputs this value in the IBT files for ME
This code checks to see if it exists before returning it, otherwise it calls the base class.
|
Data |
getLatitudeAcceleration(java.lang.String UOM)
Returns the Latitudinal Acceleration.
|
Data |
getLongitude(java.lang.String UOM)
iRacing only outputs this value in the IBT files for ME.
|
Data |
getLongitudeAcceleration(java.lang.String UOM)
Returns the Longitudinal Acceleration.
|
Data |
getMaxTires()
Returns the maximum number of tire sets for this session.
|
Data |
getMergePoint()
Returns the merge point as a percentage from the start/finish line.
|
Data |
getMessages()
Returns a string of a semicolon separate list of messages that are currently active for this car.
|
Data |
getNumber()
Returns the number of the car.
|
Data |
getNumberFont()
Returns the font of the car's number.
|
int |
getNumberRaw()
Returns the integer version of the car number to be used with camera commands.
|
Data |
getNumberSlant()
Returns the slant of the car's number.
|
Data |
getPitLocation()
Returns the pit location as a percentage from the start/finish line.
|
Data |
getPitTime()
Returns the amount of time the last pit stop took.
|
Data |
getPitTimes()
Returns the times this car pitted by lap.
|
Data |
getPosition()
Returns the current position based on all cars in the session.
|
Data |
getPositionClass()
Returns the current position based on the class the car is in.
|
Data |
getPositionClassQualifying()
Returns the qualifying position based on other cars in this session for your class.
|
Data |
getPositionHighest()
Returns the highest position in the current session.
|
Data |
getPositionHighestClass()
Returns the highest position in the current session for your class.
|
Data |
getPositionLowest()
Returns the lowest position in the current session.
|
Data |
getPositionLowestClass()
Returns the lowest position in the current session for your class.
|
Data |
getPositionQualifying()
Returns the qualifying position based on other cars in this session.
|
Data |
getPositions()
Returns the position at the end of each lap in in an array
Positions start at 1, such that 1 is considered the leader, but the array is indexed as zero based.
|
Data |
getPositionsClass()
Returns the class position at the end of each lap in in an array
Positions start at 1, such that 1 is considered the leader, but the array is indexed as zero based.
|
Data |
getPushToPassRemaining()
Returns the number of seconds remaining on the push to pass counter.
|
Data |
getRadioChannel()
Returns the radio channel number that this car is currently transmitting on.
|
Data |
getRadioChannelName()
Returns the radio channel name that this car is currently transmitting on.
|
Data |
getRepairTime()
Returns the amount of time required to repair the car.
|
Data |
getRepairTimeOptional()
Returns the amount of time that is optional to repair the car.
|
Data |
getSpotterMessage()
Returns the current spotter message.
|
Data |
getStartFinishTimes()
Returns the times this car crossed the start/finish by lap.
|
Data |
getStatus()
Returns the current status of the car as defined by
Car.Status |
Data |
getTeamName()
Returns the team name if the current session has teams.
|
Data |
getWarnings()
Returns a semicolon(;) separated list of engine warnings.
|
boolean |
isME()
A convenience function that returns true if the car is an instance of "ME".
|
boolean |
isPaceCar() |
boolean |
isValid()
Returns true if the car instance is actually in the session as defined by the SIM.
|
boolean |
isValid(int id,
int driversIdx) |
boolean |
onDataVersionChange() |
Data |
setAdminFlag(boolean onOffFlag)
Sets this car/driver's admin status.
|
Data |
setBlackFlag(int quantity,
java.lang.String uom)
Sets a black flag for this car/driver.
|
Data |
setChat(java.lang.String text)
Sends the text string as a chat message to this driver.
|
Data |
setChatFlag(boolean onOffFlag)
Sets this car/driver's chat status.
|
Data |
setClearPenaltiesFlag()
Clear all penalties, DQ, EOL, Black Flags.
|
Data |
setDisqualifyFlag()
Disqualify this car but leave them in the session.
|
Data |
setEndOfLineFlag()
Send this car to the end of the pacing line.
|
Data |
setReloadPaint()
Tell the SIM to reload the paint files for this car.
|
Data |
setRemoveFlag()
Remove the user from the session.
|
Data |
setWaveAroundFlag()
Wave this car around the pace car.
|
_dumpGauges, _getDataPublisherMaxTires, _getDefaultGauges, _getGauge, _getSIMGauges, _postInitialization, getBearing, getDriverName, getDriverName, getDriverNameShort, getDriverNameShort, getFuelLaps, getFuelLaps, getFuelLaps, getFuelLapsMaximum, getFuelLapsMaximum, getFuelLapsMaximum, getFuelLevelAtStartFinish, getFuelLevelNeeded, getFuelLevelNeeded, getFuelLevelNeeded, getFuelLevelNeeded, getFuelLevelPerLap, getFuelLevelPerLap, getFuelLevelPerLap, getFuelLevelToFinish, getFuelLevelToFinish, getFuelLevelToFinish, getFuelLevelToFinish, getGauge, getGauge, getIsBelowMinimumSpeed, getIsEqual, getIsEqual, getIsOverSpeedLimit, getIsUnderSpeedLimit, getLap, getLap, getLap, getLapTime, getLapTime, getLapTime, getLapTimeDelta, getLapTimeDeltaPercent, getLapTimeDeltaReference, getLapTimeProjected, getLatitude, getLatitudeAcceleration, getLongitude, getLongitudeAcceleration, getManufacturerLogo, getMergePointLatitude, getMergePointLongitude, getName, getPitSpeedLimit, getPitSpeedLimit, getPitStopsRemaining, getPitStopsRemaining, getPitStopsRemaining, getPositionClassDelta, getPositionDelta, getRPMPitRoadSpeed, getSector, getStatusClass, setAdminFlag, setBlackFlag, setBlackFlag, setBlackFlag, setCamera, setCamera, setChatFlag, setRPMPitRoadSpeed
public iRacingCar.dynamicIRating m_dynamicIRating
public iRacingCar(iRacingSIMPlugin SIMPlugin)
public iRacingCar(iRacingSIMPlugin SIMPlugin, java.lang.Integer id, java.lang.String name, java.lang.Integer driversIdx)
public java.lang.String _getDriversIdx()
public Data getBearing(java.lang.String UOM)
Car
getBearing
in class Car
UOM
- (Optional) A unit of measure to return. Defaults to degrees.public Data getCautions()
Car
To get the number of caution laps seen by this car, use getLap("CAUTION")
getCautions
in class Car
Data
container.public Data getClassColor()
Car
getClassColor
in class Car
Data
container.public Data getClassName()
Car
getClassName
in class Car
Data
container.public Data getColor()
Car
PATH = /Car/(CARIDENTIFIER)/Color
public Data getColorNumber()
Car
getColorNumber
in class Car
Data
container.public Data getColorNumberBackground()
Car
getColorNumberBackground
in class Car
Data
container.public Data getColorNumberOutline()
Car
getColorNumberOutline
in class Car
Data
container.public Data getDescription()
Car
getDescription
in class Car
Data
container.public Data getDiscontinuality()
Car
getDiscontinuality
in class Car
Data
container.public Data getDriverClubName()
Car
getDriverClubName
in class Car
Data
container.public Data getDriverDivisionName()
Car
getDriverDivisionName
in class Car
Data
container.public Data getDriverInitials()
Car
getDriverInitials
in class Car
Data
container.public Data getDriverLicenseColor()
Car
getDriverLicenseColor
in class Car
Data
container.public Data getDriverLicenseColorText()
Car
getDriverLicenseColorText
in class Car
Data
container.public Data getDriverName(boolean allowMapping)
Car
getDriverName
in class Car
allowMapping
- true allows the user to map the name in settings to something else.Data
container.public Data getDriverNameShort(boolean allowMapping)
Car
getDriverNameShort
in class Car
allowMapping
- true allows the user to map the name in settings to something else.Data
container.public Data getDriverRating()
Car
getDriverRating
in class Car
Data
container.public Data getDriverRatingDelta()
Car
getDriverRatingDelta
in class Car
Data
container.public Data getFuelLevelPerLap(int lapsToAverage, java.lang.String UOM)
Car
PATH = /Car/(CARIDENTIFIER)/FuelLevelPerLap/(LAPSTOAVERAGE)/(UOM)
getFuelLevelPerLap
in class Car
lapsToAverage
- (Optional) The number of previous non-caution laps to average. Zero indicates use the worst lap. Default 0.UOM
- (Optional) A unit of measure to return. Set to null or a blank string to use car's UOM.Data
container.public Data getFuelLevelNeeded(int lapsToAverage, double laps, java.lang.String UOM)
Car
Car.getFuelLevelToFinish(int, double, String)
, then subtracts what is in your fuel tank.
The amount could be more than will fit in the fuel cell.
PATH = /Car/(CARIDENTIFIER)/FuelLevelNeeded/(LAPSTOAVERAGE)/(LAPS)/(UOM)
getFuelLevelNeeded
in class Car
lapsToAverage
- (Optional) The number of laps to average. This is passed to Car.getFuelLevelPerLap(int, java.lang.String)
. Default 0.laps
- (Optional) The number of laps to calculate for. Defaults to laps remaining in the race minus current lap percent completed.UOM
- (Optional) A unit of measure to return. Set to null or a blank string to use SIM's default UOM.Data
container.public Data getFuelLevelToFinish(int lapsToAverage, double laps, java.lang.String UOM)
Car
PATH = /Car/(CARIDENTIFIER)/FuelLevelToFinish/(LAPSTOAVERAGE)/(LAPS)/(UOM)
getFuelLevelToFinish
in class Car
lapsToAverage
- (Optional) The number of laps to average. This is passed to Car.getFuelLevelPerLap(int, java.lang.String)
. Default 0.laps
- (Optional) The number of laps to calculate for. Defaults to remaining minus percentage of current lap completed.UOM
- (Optional) A unit of measure to return. Set to null or a blank string to use Car's UOM.Data
container.public Data getHasAutomaticPitCommands()
getHasAutomaticPitCommands
in class Car
Data
container.public Data getId()
Car
PATH = /Car/(CARIDENTIFIER)/Id
public Data getImageUrl()
Car
Using the SIMRacingApps Server, you can prefix "/SIMRacingApps/" + getImageUrl().getString() and call the server. Same for HTML5/JavaScript clients, just assign to the "src" attribute of the "img" tag.
getImageUrl
in class Car
public Data getIncidents()
Car
getIncidents
in class Car
Data
container.public Data getIncidentsTeam()
Car
getIncidentsTeam
in class Car
Data
container.public Data getIsBlackFlag()
Car
getIsBlackFlag
in class Car
Data
container.public Data getIsBlueFlag()
Car
getIsBlueFlag
in class Car
Data
container.public Data getIsDisqualifyFlag()
Car
getIsDisqualifyFlag
in class Car
Data
container.public Data getIsDriving()
Car
getIsDriving
in class Car
Data
container.public Data getIsFixedSetup()
Car
getIsFixedSetup
in class Car
Data
container.public boolean isME()
Car
public Data getIsPitSpeedLimiter()
Car
getIsPitSpeedLimiter
in class Car
Data
container.public Data getIsSpectator()
Car
getIsSpectator
in class Car
Data
container.public Data getIsPaceCar()
Car
getIsPaceCar
in class Car
Data
container.public Data getIsYellowFlag()
Car
getIsYellowFlag
in class Car
Data
container.public Data getLap(java.lang.String ref, int lapsToAverage)
Car
Supported Reference Types are: AVERAGE, AVERAGESINCEPITTING, BEST, CAUTION, COMPLETED, COMPLETEDPERCENT, CURRENT, LED, PITTED, QUALIFYING, SESSIONBEST, SESSIONLAST, SINCEPITTING
getLap
in class Car
ref
- (Optional) as defined by Car.LapType
. Default CURRENT.lapsToAverage
- (Optional) as defined by Car.LapType
. Default 9999.Data
container.public Data getLapsToGo()
Car
getLapsToGo
in class Car
Data
container.public Data getLapTime(java.lang.String ref, int lapsToAverage)
Car
Supported Reference Types are: AVERAGE, AVERAGESINCEPITTING, BEST, CURRENT, FINISHLINE, QUALIFYING, RACESTART, SESSIONBEST, SESSIONLAST
PATH = /Car/(CARIDENTIFIER)/LapTime/(LAPTYPE)/(LAPSTOAVERAGE)
getLapTime
in class Car
ref
- (Optional) as defined by Car.LapType
. Default CURRENT.lapsToAverage
- (Optional) as defined by Car.LapType
. Default 9999.Data
container.public Data getLapTimeDelta(java.lang.String ref)
Car
Supported Reference Types are: BEST, OPTIMAL, SESSIONBEST, SESSIONLAST, SESSIONOPTIMAL
getLapTimeDelta
in class Car
ref
- (Optional) as defined by Car.LapType
. Default CURRENT.Data
container.public Data getLapTimeDeltaReference(java.lang.String ref)
Car
Supported Reference Types are: BEST, OPTIMAL, SESSIONBEST, SESSIONLAST, SESSIONOPTIMAL
getLapTimeDeltaReference
in class Car
ref
- as defined by Car.LapType
. Default CURRENT.Data
container.public Data getLapTimeDeltaPercent(java.lang.String ref)
Car
Supported Reference Types are: BEST, OPTIMAL, SESSIONBEST, SESSIONLAST, SESSIONOPTIMAL
getLapTimeDeltaPercent
in class Car
ref
- as defined by Car.LapType
Data
container.public Data getLapTimes()
Car
getLapTimes
in class Car
Data
container.public Data getLapInvalidFlags()
Car
getLapInvalidFlags
in class Car
Data
container.public Data getLatitude(java.lang.String UOM)
getLatitude
in class Car
UOM
- (Optional) A unit of measure to return. Defaults to degrees.public Data getLatitudeAcceleration(java.lang.String UOM)
Car
getLatitudeAcceleration
in class Car
UOM
- (Optional) A unit of measure to return. Set to null or a blank string to use car's UOM.Data
container.public Data getLongitudeAcceleration(java.lang.String UOM)
Car
getLongitudeAcceleration
in class Car
UOM
- (Optional) A unit of measure to return. Set to null or a blank string to use car's UOM.Data
container.public Data getLongitude(java.lang.String UOM)
getLongitude
in class Car
UOM
- (Optional) A unit of measure to return. Defaults to degrees.public Data getMaxTires()
Car
PATH = /Car/(CARIDENTIFIER)/MaxTires
1.2
getMaxTires
in class Car
public Data getMergePoint()
Car
getMergePoint
in class Car
public Data getMessages()
Car
Car.Message
.
You can display as is, or use it as an index to the the translation for a particular language.
For example: ";REPAIR;"
getMessages
in class Car
Data
container.public Data getNumber()
Car
PATH = /Car/(CARIDENTIFIER)/Number
public int getNumberRaw()
public Data getNumberFont()
Car
getNumberFont
in class Car
Data
container.public Data getNumberSlant()
Car
getNumberSlant
in class Car
Data
container.public Data getPitTime()
Car
PATH = /Car/(CARIDENTIFIER)/PitTime
getPitTime
in class Car
Data
container.public Data getPitTimes()
Car
getPitTimes
in class Car
public Data getPitLocation()
Car
getPitLocation
in class Car
public Data getPosition()
Car
getPosition
in class Car
Data
container.public Data getPositionHighest()
Car
getPositionHighest
in class Car
Data
container.public Data getPositionLowest()
Car
getPositionLowest
in class Car
Data
container.public Data getPositions()
Car
getPositions
in class Car
Data
container.public Data getPositionClass()
Car
getPositionClass
in class Car
Data
container.public Data getPositionHighestClass()
Car
getPositionHighestClass
in class Car
Data
container.public Data getPositionLowestClass()
Car
getPositionLowestClass
in class Car
Data
container.public Data getPositionsClass()
Car
getPositionsClass
in class Car
Data
container.public Data getPositionQualifying()
Car
getPositionQualifying
in class Car
Data
container.public Data getPositionClassQualifying()
Car
getPositionClassQualifying
in class Car
Data
container.public Data getPushToPassRemaining()
Car
getPushToPassRemaining
in class Car
Data
container.public Data getIsPushToPassActive()
Car
getIsPushToPassActive
in class Car
Data
container.public Data getRadioChannel()
Car
getRadioChannel
in class Car
Data
container.public Data getRadioChannelName()
Car
getRadioChannelName
in class Car
Data
container.public Data getSpotterMessage()
Car
getSpotterMessage
in class Car
Data
container.public Data getStartFinishTimes()
Car
getStartFinishTimes
in class Car
public Data getStatus()
Car
Car.Status
PATH = /Car/(CARIDENTIFIER)/Status
public Data getWarnings()
Car
getWarnings
in class Car
Data
container.public Data getDivisionName()
public Data getDriverLicLevel()
public Data getDriverLicSubLevel()
public Data getFuelLevelAtStartFinish(java.lang.String UOM)
Car
getFuelLevelAtStartFinish
in class Car
UOM
- (Optional) A unit of measure to return. Set to null or a blank string to use SIM's default UOM. Default blank to use car's UOM.Data
container.public Data getRepairTime()
Car
getRepairTime
in class Car
Data
container.public Data getRepairTimeOptional()
Car
getRepairTimeOptional
in class Car
Data
container.public Data getTeamName()
Car
getTeamName
in class Car
public boolean isPaceCar()
public boolean isValid()
Car
public boolean isValid(int id, int driversIdx)
public Data setAdminFlag(boolean onOffFlag)
Car
setAdminFlag
in class Car
onOffFlag
- The admin status.Data
container.public Data setBlackFlag(int quantity, java.lang.String uom)
Car
PATH = /Car/(CARIDENTIFIER)/setBlackFlag/(SECONDS/LAPS)/(UOM)
setBlackFlag
in class Car
quantity
- The number of seconds or laps based on the UOM. Default to zero(0).uom
- The unit of measure of the quantity. "s" for seconds, "lap" for laps. Defaults to "s".Data
container.public Data setChat(java.lang.String text)
Car
public Data setChatFlag(boolean onOffFlag)
Car
setChatFlag
in class Car
onOffFlag
- The chat status.Data
container.public Data setClearPenaltiesFlag()
Car
setClearPenaltiesFlag
in class Car
Data
container.public Data setDisqualifyFlag()
Car
setDisqualifyFlag
in class Car
Data
container.public Data setEndOfLineFlag()
Car
setEndOfLineFlag
in class Car
Data
container.public Data setReloadPaint()
Car
PATH = /Session/setReloadPaint
setReloadPaint
in class Car
Data
container.public Data setRemoveFlag()
Car
setRemoveFlag
in class Car
Data
container.public Data setWaveAroundFlag()
Car
setWaveAroundFlag
in class Car
Data
container.public boolean onDataVersionChange()