public class iRacingSession extends Session
Session.CarIdentifiers, Session.Message, Session.RestartMethod, Session.Status, Session.Type| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
IRACING_TITLE |
UNLIMITEDLAPS| Constructor and Description |
|---|
iRacingSession(iRacingSIMPlugin SIMPlugin) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_getHasIncidents() |
boolean |
_isOfficial() |
void |
_setHasIncidents(int incidents) |
Data |
getCamera()
Returns the name of the current camera.
|
Data |
getCameraFocus()
Returns the name of what the camera is focused on.
|
Data |
getCameras()
Returns an array of the camera names for this session.
|
Car |
getCar(java.lang.String car)
Returns an instance of a Car object as defined by the "car" argument.
|
Data |
getCars()
Returns the actual number of cars registered for this session.
|
Data |
getCautionLaps()
Returns the number of caution laps.
|
Data |
getCautions()
Returns the number of cautions as seen by the leader.
|
Data |
getClassNames()
Returns an array of the class names sorted fastest to slowest.
|
Data |
getDataVersion()
Returns a SIM specific string indicating the version of the data just returned.
|
Data |
getId()
Returns a SIM specific ID for the current session.
|
Data |
getIncidentLimit()
Returns the total number of incidents allowed for this session.
|
Data |
getIsCautionFlag()
Returns true if the caution flag is waving.
|
Data |
getIsCheckeredFlag()
Returns true if the checkered flag is waving.
|
Data |
getIsCrossedFlag()
Returns true if the crossed flag is waving.
|
Data |
getIsGarageVisible()
Returns true if the garage screen is visible so apps/widgets can hide it.
|
Data |
getIsGreenFlag()
Returns true if the green flag is waving.
|
Data |
getIsPitRoadOpen()
Returns true if pit road is open.
|
Data |
getIsRedFlag()
Returns true if the red flag is waving.
|
Data |
getIsReplay()
Returns true if the session is in replay mode.
|
Data |
getIsReplayLive()
Returns true if the session is in replay mode and has not been rewound to a time in the past.
|
Data |
getIsWhiteFlag()
Returns true if the white flag is waving.
|
Data |
getLap()
Returns the current lap of the race or REFERENCE car if in a different type of session.
|
Data |
getLaps(java.lang.String sessionType)
Returns the total number of laps in the specified session.
|
Data |
getLapsToGo()
Returns the number of laps to go in sessions that define a total number of laps
See
Session.getLaps() |
Data |
getLeagueId()
Returns a SIM specific League ID for the current session.
|
Data |
getMessages()
Returns a string of a semicolon separate list of messages that are currently active.
|
Data |
getName(java.lang.String session)
Returns the name of the session.
|
Data |
getNumberOfCarClasses()
Returns the number of car classes.
|
Data |
getRadioChannelActive()
Returns the active radio channel.
|
Data |
getRadioChannelIsDeleteable(int channel)
Returns if the radio channel can be deleted.
|
Data |
getRadioChannelIsListenOnly(int channel)
Returns if the radio channel can only be listened to.
|
Data |
getRadioChannelIsMutable(int channel)
Returns if the radio channel can be muted.
|
Data |
getRadioChannelIsMuted(int channel)
Returns if the radio channel is currently muted.
|
Data |
getRadioChannelIsScanable(int channel)
Returns if the radio channel can be scanned.
|
Data |
getRadioChannelName(int channel)
Returns the radio channel name.
|
Data |
getRadioChannels()
Returns the number of radio channels that is scannable by you.
|
Data |
getRadioScan()
Returns the radio's scanning state
|
Data |
getReplay()
Returns the state of the current replay position.
|
Data |
getRestart()
Returns the type of restart, double or single file.
|
java.lang.String |
getSendKeys(java.lang.String group,
java.lang.String command)
Returns the string of keys strokes to send to the SIM to
issue the command from the group.
|
Data |
getSpotterPitCountDown()
Returns if the SIM has own pit count down spotter enabled.
|
Data |
getStartTime()
Returns the time the current session started as the number of seconds since Jan 1, 1970 UTC.
|
Data |
getStatus()
Returns the status of the session as one of the following defined in
Session.Status. |
Data |
getStrengthOfField()
Returns a String that is SIM specific that represents the strength of the field.
|
Data |
getTime()
Returns the time of the current session as the number of seconds since Jan 1, 1970 UTC.
|
Data |
getTimeElapsed()
Returns the number of seconds since the current session started.
|
Data |
getTimeRemaining()
If the current session has a time restriction, this returns the number of seconds remaining.
|
Track |
getTrack()
Returns an instance to the Track in this session
Each SIM will have to provide an override that does not return a null
|
Data |
getType()
Returns the type of the current session as defined by
Session.Type |
boolean |
processData() |
Data |
setAdvanceFlag()
Advance to next Session.
|
Data |
setCamera(java.lang.String cameraName,
java.lang.String focusOn,
java.lang.String carIdentifier)
Changes the camera.
|
Data |
setCautionFlag()
Set Full Course Caution Flag on.
|
Data |
setCautionLaps(int laps)
Sets the number of caution laps.
|
Data |
setCautionLapsAdjust(int laps)
Add or subtract laps to the current caution laps.
|
Data |
setChat(java.lang.String text)
Sends the text string as a chat message to all drivers.
|
Data |
setChatFlag(boolean onOffFlag)
Set Chat on or off for all drivers.
|
Data |
setChatReply(java.lang.String text)
Sends the text string as a chat message to the last driver to send you a private message.
|
Data |
setPitClose()
Sets the Pits to be closed.
|
Data |
setPitOpen()
Sets the Pits to be open.
|
Data |
setRadioChannel(int channel)
Makes the specified radio channel the active channel to transmit on.
|
Data |
setRadioChannelDelete(int channel)
Deletes the specified radio channel.
|
Data |
setRadioChannelMute(int channel,
boolean flag)
Mutes or Unmutes the specified radio channel.
|
Data |
setRadioChannelName(java.lang.String channelName)
Makes the specified radio channel the active channel to transmit on.
|
Data |
setRadioScan(boolean flag)
Turns the scanning of the channels on and off, such that, you are only listening on the active channel.
|
Data |
setReloadPaint()
Tell the SIM to reload the paint files for all cars.
|
Data |
setReplay(java.lang.String command)
Tells the replay system what to do.
|
Data |
setReplayPosition(java.lang.String command)
Tells the replay system what position to start playing at.
|
Data |
setRestart(java.lang.String method)
Tells the system what type of restart you want.
|
getDiffCars, getDiffCars, getDiffCars, getDiffCarsRelative, getDiffCarsRelative, getDiffCarsRelative, getIsAppsHidden, getLaps, getName, getRadioChannelIsDeleteable, getRadioChannelIsDeleteable, getRadioChannelIsListenOnly, getRadioChannelIsListenOnly, getRadioChannelIsMutable, getRadioChannelIsMutable, getRadioChannelIsMuted, getRadioChannelIsMuted, getRadioChannelIsScanable, getRadioChannelIsScanable, getRadioChannelName, getRadioChannelName, getReferenceCar, getTimeString, setAppsHidden, setAppsHidden, setAppsHidden, setCamera, setCamera, setCameraFocus, setCameraFocus, setCautionLaps, setCautionLaps, setCautionLapsAdjust, setCautionLapsAdjust, setChatFlag, setRadioChannel, setRadioChannelDelete, setRadioChannelMute, setRadioChannelMute, setRadioChannelMute, setRadioScan, setReferenceCar, setReferenceCarpublic static final java.lang.String IRACING_TITLE
public iRacingSession(iRacingSIMPlugin SIMPlugin)
public boolean _isOfficial()
public Track getTrack()
Sessionpublic void _setHasIncidents(int incidents)
public boolean _getHasIncidents()
public java.lang.String getSendKeys(java.lang.String group,
java.lang.String command)
SessiongetSendKeys in class Sessiongroup - The group to get the commands from (i.e. ADMIN_COMMANDS, RADIO_COMMANDS)command - The command within the group to retrieve (i.e. BLACK, ADD)SendKeyspublic Data getCamera()
SessionPATH = /Session/Camera
public Data getCameraFocus()
SessionPATH = /Session/CameraFocus
getCameraFocus in class SessionData container.public Data getCameras()
SessionPATH = /Session/Cameras
getCameras in class SessionData container.public Car getCar(java.lang.String car)
SessiongetCar in class Sessioncar - A string representing the car you want. Values accepted are:
Carpublic Data getCars()
SessionPATH = /Session/Cars
public Data getCautionLaps()
SessionPATH = /Session/CautionLaps
getCautionLaps in class SessionData container.public Data getCautions()
SessionPATH = /Session/Cautions
getCautions in class SessionData container.public Data getClassNames()
SessionPATH = /Session/ClassNames
getClassNames in class SessionData container.public Data getDataVersion()
SessionPATH = /Session/DataVersion
getDataVersion in class SessionData container.public Data getId()
SessionPATH = /Session/Id 1.2
public Data getIncidentLimit()
SessionPATH = /Session/IncidentLimit
getIncidentLimit in class SessionData container.public Data getIsGarageVisible()
SessionPATH = /Session/IsGarageVisible
getIsGarageVisible in class SessionData container.public Data getIsGreenFlag()
SessionPATH = /Session/IsGreenFlag
getIsGreenFlag in class SessionData container.public Data getIsCautionFlag()
SessionPATH = /Session/IsCautionFlag
getIsCautionFlag in class SessionData container.public Data getIsCheckeredFlag()
SessionPATH = /Session/IsCheckeredFlag
getIsCheckeredFlag in class SessionData container.public Data getIsCrossedFlag()
SessionPATH = /Session/IsCrossedFlag
getIsCrossedFlag in class SessionData container.public Data getIsWhiteFlag()
SessionPATH = /Session/IsWhiteFlag
getIsWhiteFlag in class SessionData container.public Data getIsRedFlag()
SessionPATH = /Session/IsRedFlag
getIsRedFlag in class SessionData container.public Data getIsPitRoadOpen()
SessionPATH = /Session/IsPitRoadOpen
getIsPitRoadOpen in class SessionData container.public Data getIsReplay()
SessionPATH = /Session/IsReplay
getIsReplay in class SessionData container.public Data getIsReplayLive()
SessionPATH = /Session/IsReplayLive
getIsReplayLive in class SessionData container.public Data getLap()
SessionCurrent lap is defined as the lap you are about to complete. Meaning that, if you're on lap 1, you just took the green flag.
PATH = /Session/Lap
public Data getLaps(java.lang.String sessionType)
SessionPATH = /Session/Laps/(SESSIONTYPE)
getLaps in class SessionsessionType - The session type, Session.Type, to get the laps from. Defaults to current session.Data container.public Data getLapsToGo()
SessionSession.getLaps()
PATH = /Session/LapsToGo
getLapsToGo in class SessionData container.public Data getLeagueId()
SessionPATH = /Session/LeagueId 1.2
getLeagueId in class SessionData container.public Data getMessages()
SessionSession.Message.
You can display as is, or use it as an index to the the translation for a particular language.
For example: ";ONELAPTOGREEN;"
PATH = /Session/Messages
getMessages in class SessionData container.public Data getName(java.lang.String session)
SessionPATH = /Session/Name/(session)
public Data getNumberOfCarClasses()
SessionSession.getNumberOfCarClasses()
PATH = /Session/NumberOfCarClasses
getNumberOfCarClasses in class SessionData container.public Data getRadioChannels()
SessionPATH = /Session/RadioChannels
getRadioChannels in class SessionData container.public Data getRadioChannelActive()
SessionPATH = /Session/RadioChannelActive
getRadioChannelActive in class SessionData container.public Data getRadioChannelIsDeleteable(int channel)
SessiongetRadioChannelIsDeleteable in class Sessionchannel - (Optional) The channel number. Defaults to the active channel.Data container.public Data getRadioChannelIsListenOnly(int channel)
SessiongetRadioChannelIsListenOnly in class Sessionchannel - (Optional) The channel number. Defaults to the active channel.Data container.public Data getRadioChannelIsMutable(int channel)
SessiongetRadioChannelIsMutable in class Sessionchannel - (Optional) The channel number. Default to the active channel.Data container.public Data getRadioChannelIsMuted(int channel)
SessiongetRadioChannelIsMuted in class Sessionchannel - (Optional) The channel number. Defaults to the active channel.Data container.public Data getRadioChannelIsScanable(int channel)
SessiongetRadioChannelIsScanable in class Sessionchannel - (Optional) The channel number. Defaults to the active channel.Data container.public Data getRadioChannelName(int channel)
SessiongetRadioChannelName in class Sessionchannel - (Optional) The channel number. Defaults to the active channel.Data container.public Data getRadioScan()
SessionPATH = /Session/RadioScan
getRadioScan in class SessionData container.public Data setRadioChannel(int channel)
SessionsetRadioChannel in class Sessionchannel - The channel number.Data container.public Data setRadioChannelDelete(int channel)
SessionsetRadioChannelDelete in class Sessionchannel - The channel number.Data container.public Data setRadioChannelMute(int channel, boolean flag)
SessionsetRadioChannelMute in class Sessionchannel - (Optional) The channel number. Defaults to the active channel.flag - (Optional) Y to mute, N to unmute. Default is Y.Data container.public Data setRadioChannelName(java.lang.String channelName)
SessionsetRadioChannelName in class SessionchannelName - The channel name, limited to 15 characters.Data container.public Data setRadioScan(boolean flag)
SessionPATH = /Session/setRadioScan/(Y/N)
setRadioScan in class Sessionflag - Y to enable scanning, N to disable scanningData container.public Data getReplay()
SessionPATH = /Session/Replay
public Data setReplay(java.lang.String command)
SessionPATH = /Session/setReplay/(COMMAND)
public Data setReplayPosition(java.lang.String command)
SessionsetReplayPosition in class Sessioncommand - The position to go to.Data container.public Data getRestart()
SessionPATH = /Session/Restart
getRestart in class SessionData container.public Data setRestart(java.lang.String method)
SessionsetRestart in class Sessionmethod - The restart method.Data container.public Data getSpotterPitCountDown()
SessionPATH = /Session/SpotterPitCountDown
getSpotterPitCountDown in class SessionData container.public Data getStartTime()
SessionPATH = /Session/StartTime
getStartTime in class SessionData container.public Data getStatus()
SessionSession.Status.
PATH = /Session/Status 1.12
public Data getStrengthOfField()
SessionPATH = /Session/StrengthOfField
getStrengthOfField in class SessionData container.public Data getTime()
SessionPATH = /Session/Time
public Data getTimeElapsed()
SessionPATH = /Session/TimeElapsed
getTimeElapsed in class SessionData container.public Data getTimeRemaining()
SessionPATH = /Session/TimeRemaining
getTimeRemaining in class SessionData container.public Data getType()
SessionSession.Type
PATH = /Session/Type
public Data setAdvanceFlag()
SessionPATH = /Session/setAdvanceFlag
setAdvanceFlag in class SessionData container.public Data setChat(java.lang.String text)
SessionPATH = /Session/setChat/(TEXT)
public Data setChatReply(java.lang.String text)
SessionPATH = /Session/setChatReply/(TEXT)
setChatReply in class Sessiontext - The text to send to the chat windowData container.public Data setChatFlag(boolean onOffFlag)
SessionPATH = /Session/setChatFlag/(Y/N)
setChatFlag in class SessiononOffFlag - Y/N to turn chat on or off for all drivers.Data container.public Data setCamera(java.lang.String cameraName, java.lang.String focusOn, java.lang.String carIdentifier)
SessionPATH = /Session/setCamera/(CAMERA)/(FOCUSON)/(CARIDENTIFIER)
setCamera in class SessioncameraName - The name of the camera. Can be the string CURRENT or blank to use the currently selected camera.focusOn - (Optional) What to focus on. Valid values are (CRASHES,LEADER,EXCITING,DRIVER). Default is DRIVER.carIdentifier - (Optional) A car identifier as defined by Session.getCar(String). Default is REFERENCE.Data container.public Data setCautionFlag()
SessionPATH = /Session/setCautionFlag
setCautionFlag in class SessionData container.public Data setCautionLapsAdjust(int laps)
SessionsetCautionLapsAdjust in class Sessionlaps - +/- the number of laps to add to the current caution laps.Data container.public Data setCautionLaps(int laps)
SessionsetCautionLaps in class Sessionlaps - The number of laps for the caution.Data container.public Data setPitClose()
SessionPATH = /Session/setPitClose
setPitClose in class SessionData container.public Data setPitOpen()
SessionPATH = /Session/setPitOpen
setPitOpen in class SessionData container.public Data setReloadPaint()
SessionPATH = /Session/setReloadPaint
setReloadPaint in class SessionData container.public boolean processData()