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, setReferenceCar
public static final java.lang.String IRACING_TITLE
public iRacingSession(iRacingSIMPlugin SIMPlugin)
public boolean _isOfficial()
public Track getTrack()
Session
public void _setHasIncidents(int incidents)
public boolean _getHasIncidents()
public java.lang.String getSendKeys(java.lang.String group, java.lang.String command)
Session
getSendKeys
in class Session
group
- 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)SendKeys
public Data getCamera()
Session
PATH = /Session/Camera
public Data getCameraFocus()
Session
PATH = /Session/CameraFocus
getCameraFocus
in class Session
Data
container.public Data getCameras()
Session
PATH = /Session/Cameras
getCameras
in class Session
Data
container.public Car getCar(java.lang.String car)
Session
getCar
in class Session
car
- A string representing the car you want. Values accepted are:
Car
public Data getCars()
Session
PATH = /Session/Cars
public Data getCautionLaps()
Session
PATH = /Session/CautionLaps
getCautionLaps
in class Session
Data
container.public Data getCautions()
Session
PATH = /Session/Cautions
getCautions
in class Session
Data
container.public Data getClassNames()
Session
PATH = /Session/ClassNames
getClassNames
in class Session
Data
container.public Data getDataVersion()
Session
PATH = /Session/DataVersion
getDataVersion
in class Session
Data
container.public Data getId()
Session
PATH = /Session/Id
1.2
public Data getIncidentLimit()
Session
PATH = /Session/IncidentLimit
getIncidentLimit
in class Session
Data
container.public Data getIsGarageVisible()
Session
PATH = /Session/IsGarageVisible
getIsGarageVisible
in class Session
Data
container.public Data getIsGreenFlag()
Session
PATH = /Session/IsGreenFlag
getIsGreenFlag
in class Session
Data
container.public Data getIsCautionFlag()
Session
PATH = /Session/IsCautionFlag
getIsCautionFlag
in class Session
Data
container.public Data getIsCheckeredFlag()
Session
PATH = /Session/IsCheckeredFlag
getIsCheckeredFlag
in class Session
Data
container.public Data getIsCrossedFlag()
Session
PATH = /Session/IsCrossedFlag
getIsCrossedFlag
in class Session
Data
container.public Data getIsWhiteFlag()
Session
PATH = /Session/IsWhiteFlag
getIsWhiteFlag
in class Session
Data
container.public Data getIsRedFlag()
Session
PATH = /Session/IsRedFlag
getIsRedFlag
in class Session
Data
container.public Data getIsPitRoadOpen()
Session
PATH = /Session/IsPitRoadOpen
getIsPitRoadOpen
in class Session
Data
container.public Data getIsReplay()
Session
PATH = /Session/IsReplay
getIsReplay
in class Session
Data
container.public Data getIsReplayLive()
Session
PATH = /Session/IsReplayLive
getIsReplayLive
in class Session
Data
container.public Data getLap()
Session
Current 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)
Session
PATH = /Session/Laps/(SESSIONTYPE)
getLaps
in class Session
sessionType
- The session type, Session.Type
, to get the laps from. Defaults to current session.Data
container.public Data getLapsToGo()
Session
Session.getLaps()
PATH = /Session/LapsToGo
getLapsToGo
in class Session
Data
container.public Data getLeagueId()
Session
PATH = /Session/LeagueId
1.2
getLeagueId
in class Session
Data
container.public Data getMessages()
Session
Session.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 Session
Data
container.public Data getName(java.lang.String session)
Session
PATH = /Session/Name/(session)
public Data getNumberOfCarClasses()
Session
Session.getNumberOfCarClasses()
PATH = /Session/NumberOfCarClasses
getNumberOfCarClasses
in class Session
Data
container.public Data getRadioChannels()
Session
PATH = /Session/RadioChannels
getRadioChannels
in class Session
Data
container.public Data getRadioChannelActive()
Session
PATH = /Session/RadioChannelActive
getRadioChannelActive
in class Session
Data
container.public Data getRadioChannelIsDeleteable(int channel)
Session
getRadioChannelIsDeleteable
in class Session
channel
- (Optional) The channel number. Defaults to the active channel.Data
container.public Data getRadioChannelIsListenOnly(int channel)
Session
getRadioChannelIsListenOnly
in class Session
channel
- (Optional) The channel number. Defaults to the active channel.Data
container.public Data getRadioChannelIsMutable(int channel)
Session
getRadioChannelIsMutable
in class Session
channel
- (Optional) The channel number. Default to the active channel.Data
container.public Data getRadioChannelIsMuted(int channel)
Session
getRadioChannelIsMuted
in class Session
channel
- (Optional) The channel number. Defaults to the active channel.Data
container.public Data getRadioChannelIsScanable(int channel)
Session
getRadioChannelIsScanable
in class Session
channel
- (Optional) The channel number. Defaults to the active channel.Data
container.public Data getRadioChannelName(int channel)
Session
getRadioChannelName
in class Session
channel
- (Optional) The channel number. Defaults to the active channel.Data
container.public Data getRadioScan()
Session
PATH = /Session/RadioScan
getRadioScan
in class Session
Data
container.public Data setRadioChannel(int channel)
Session
setRadioChannel
in class Session
channel
- The channel number.Data
container.public Data setRadioChannelDelete(int channel)
Session
setRadioChannelDelete
in class Session
channel
- The channel number.Data
container.public Data setRadioChannelMute(int channel, boolean flag)
Session
setRadioChannelMute
in class Session
channel
- (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)
Session
setRadioChannelName
in class Session
channelName
- The channel name, limited to 15 characters.Data
container.public Data setRadioScan(boolean flag)
Session
PATH = /Session/setRadioScan/(Y/N)
setRadioScan
in class Session
flag
- Y to enable scanning, N to disable scanningData
container.public Data getReplay()
Session
PATH = /Session/Replay
public Data setReplay(java.lang.String command)
Session
PATH = /Session/setReplay/(COMMAND)
public Data setReplayPosition(java.lang.String command)
Session
setReplayPosition
in class Session
command
- The position to go to.Data
container.public Data getRestart()
Session
PATH = /Session/Restart
getRestart
in class Session
Data
container.public Data setRestart(java.lang.String method)
Session
setRestart
in class Session
method
- The restart method.Data
container.public Data getSpotterPitCountDown()
Session
PATH = /Session/SpotterPitCountDown
getSpotterPitCountDown
in class Session
Data
container.public Data getStartTime()
Session
PATH = /Session/StartTime
getStartTime
in class Session
Data
container.public Data getStatus()
Session
Session.Status
.
PATH = /Session/Status
1.12
public Data getStrengthOfField()
Session
PATH = /Session/StrengthOfField
getStrengthOfField
in class Session
Data
container.public Data getTime()
Session
PATH = /Session/Time
public Data getTimeElapsed()
Session
PATH = /Session/TimeElapsed
getTimeElapsed
in class Session
Data
container.public Data getTimeRemaining()
Session
PATH = /Session/TimeRemaining
getTimeRemaining
in class Session
Data
container.public Data getType()
Session
Session.Type
PATH = /Session/Type
public Data setAdvanceFlag()
Session
PATH = /Session/setAdvanceFlag
setAdvanceFlag
in class Session
Data
container.public Data setChat(java.lang.String text)
Session
PATH = /Session/setChat/(TEXT)
public Data setChatReply(java.lang.String text)
Session
PATH = /Session/setChatReply/(TEXT)
setChatReply
in class Session
text
- The text to send to the chat windowData
container.public Data setChatFlag(boolean onOffFlag)
Session
PATH = /Session/setChatFlag/(Y/N)
setChatFlag
in class Session
onOffFlag
- 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)
Session
PATH = /Session/setCamera/(CAMERA)/(FOCUSON)/(CARIDENTIFIER)
setCamera
in class Session
cameraName
- 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()
Session
PATH = /Session/setCautionFlag
setCautionFlag
in class Session
Data
container.public Data setCautionLapsAdjust(int laps)
Session
setCautionLapsAdjust
in class Session
laps
- +/- the number of laps to add to the current caution laps.Data
container.public Data setCautionLaps(int laps)
Session
setCautionLaps
in class Session
laps
- The number of laps for the caution.Data
container.public Data setPitClose()
Session
PATH = /Session/setPitClose
setPitClose
in class Session
Data
container.public Data setPitOpen()
Session
PATH = /Session/setPitOpen
setPitOpen
in class Session
Data
container.public Data setReloadPaint()
Session
PATH = /Session/setReloadPaint
setReloadPaint
in class Session
Data
container.public boolean processData()