net.ctdp.rfdynhud.gamedata
Class LiveGameData

java.lang.Object
  extended by net.ctdp.rfdynhud.gamedata.LiveGameData

public class LiveGameData
extends java.lang.Object

Complete model of live game data.

Author:
Marvin Froehlich (CTDP)

Nested Class Summary
static interface LiveGameData.GameDataUpdateListener
           
 
Constructor Summary
LiveGameData(java.lang.String gameId, GameResolution gameResolution, GameEventsManager eventsManager)
          Creates an instance of LiveGameData.
 
Method Summary
 CommentaryRequestInfo getCommentaryRequestInfo()
          Gets the commentary request info.
 GameFileSystem getFileSystem()
           
 java.lang.String getGameID()
           
 GameResolution getGameResolution()
          Gets game resolution and viewport information.
 GraphicsInfo getGraphicsInfo()
          Gets the graphics info.
 LiveGameDataController getLiveGameDataController()
          Gets the controller.
 ModInfo getModInfo()
          Gets the mod info.
 VehiclePhysics getPhysics()
          Gets the vehicle physics model.
 ProfileInfo getProfileInfo()
          Gets the profile info.
 ScoringInfo getScoringInfo()
          Gets the scoring info.
 VehicleSetup getSetup()
          Gets the vehicle setup model.
 TelemetryData getTelemetryData()
          Gets the telemetry data.
 TrackInfo getTrackInfo()
          Gets the track info.
 VehicleInfo getVehicleInfo()
          Gets the vehicle info.
 boolean isGamePaused()
          Gets whether the game is paused.
 boolean isInRealtimeMode()
          Gets whether we're in realtime mode (cockpit).
 void registerDataUpdateListener(LiveGameData.GameDataUpdateListener l)
           
 void registerGameEventsListener(GameEventsListener l)
           
 void setLiveGameDataController(LiveGameDataController controller)
          Sets the controller.
 void unregisterDataUpdateListener(LiveGameData.GameDataUpdateListener l)
           
 void unregisterGameEventsListener(GameEventsListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiveGameData

public LiveGameData(java.lang.String gameId,
                    GameResolution gameResolution,
                    GameEventsManager eventsManager)
Creates an instance of LiveGameData.

Parameters:
gameId -
gameResolution -
eventsManager -
Method Detail

registerDataUpdateListener

public void registerDataUpdateListener(LiveGameData.GameDataUpdateListener l)

unregisterDataUpdateListener

public void unregisterDataUpdateListener(LiveGameData.GameDataUpdateListener l)

registerGameEventsListener

public void registerGameEventsListener(GameEventsListener l)

unregisterGameEventsListener

public void unregisterGameEventsListener(GameEventsListener l)

getGameID

public final java.lang.String getGameID()

getFileSystem

public final GameFileSystem getFileSystem()

getGameResolution

public final GameResolution getGameResolution()
Gets game resolution and viewport information.

Returns:
game resolution and viewport information.

setLiveGameDataController

public void setLiveGameDataController(LiveGameDataController controller)
Sets the controller.

Parameters:
controller -

getLiveGameDataController

public final LiveGameDataController getLiveGameDataController()
Gets the controller.

Returns:
the controller.

isGamePaused

public final boolean isGamePaused()
Gets whether the game is paused. Since rFactor1 doesn't tell its plugins about the paused state, this can only be a guess based on the last TelemetryData update. So this info can be up to some splitss of a second late.

Returns:
whether the game is paused.

isInRealtimeMode

public final boolean isInRealtimeMode()
Gets whether we're in realtime mode (cockpit).

Returns:
whether we're in realtime mode (cockpit).

getPhysics

public final VehiclePhysics getPhysics()
Gets the vehicle physics model.

Returns:
the vehicle physics model.

getSetup

public final VehicleSetup getSetup()
Gets the vehicle setup model.

Returns:
the vehicle setup model.

getTelemetryData

public final TelemetryData getTelemetryData()
Gets the telemetry data.

Returns:
the telemetry data.

getScoringInfo

public final ScoringInfo getScoringInfo()
Gets the scoring info.

Returns:
the scoring info.

getGraphicsInfo

public final GraphicsInfo getGraphicsInfo()
Gets the graphics info.

Returns:
the graphics info.

getCommentaryRequestInfo

public final CommentaryRequestInfo getCommentaryRequestInfo()
Gets the commentary request info.

Returns:
the commentary request info.

getModInfo

public final ModInfo getModInfo()
Gets the mod info.

Returns:
the mod info.

getVehicleInfo

public final VehicleInfo getVehicleInfo()
Gets the vehicle info.

Returns:
the vehicle info.

getProfileInfo

public final ProfileInfo getProfileInfo()
Gets the profile info.

Returns:
the profile info.

getTrackInfo

public final TrackInfo getTrackInfo()
Gets the track info.

Returns:
the track info.