C# Class SimTelemetry.Data.Telemetry

Inheritance: ITelemetry
Mostra file Open project: nlhans/SimTelemetry

Public Properties

Property Type Description
Computations SimTelemetry.Data.Computations
Peripherals IDevices
binaryDirectory string
m Telemetry

Public Methods

Method Description
Bootup ( string workingDirectory ) : void

This method actually boots up the data frame-work. This method is called via the ThreadPool from Run().

ForceTrackLoad ( ) : void

'Force' a track reload.

NetworkTrack_LoadInfo ( NetworkTrackInformation routeInfo ) : void

Loads track info from network.

NetworkTrack_LoadRoute ( RouteCollection routeCollection ) : void

Loads route from network.

Run ( ) : void

Runs the telemetry network. The boot-up code is called via ThreadPool

Telemetry ( ) : System

Initialize telemetry. The main program will have to call Run() seperately.

Track_Load ( ISimulator sim, string track ) : void

Load new track. Specify location of gamedirectory and file.

Track_Unload ( ) : void

Unloads track.

Private Methods

Method Description
GetConnection ( ) : IDbConnection

This creates a new OleDB connection to the SimTelemetry access database. This function is called from the Triton Database pool allowing simultanous access from various threads to the database.

Report_DrivingStart ( ISimulator sim ) : void

Fire Driving Start event.

Report_DrivingStop ( ISimulator sim ) : void

Fire Driving Stop event.

Report_Laps ( ISimulator me, ILap lap ) : void

Fire Lap event.

Report_SessionStart ( ISimulator me ) : void

Fire Session Start event.

Report_SessionStop ( ISimulator me ) : void

Fire Session Stop event.

Report_SimStart ( ISimulator me ) : void

Fire Sim Start event.

Report_SimStop ( ISimulator me ) : void

Fire Sim Stop event.

Simulator_StatePoller ( ) : void

Thread polling the status of all simulators. Will fire events Sim_Start/Stop, Session_Start/Stop.

For proper shutdown of this thread, call TritonBase.TriggerExit();

Telemetry_Session_Start ( object sender ) : void

Whenever a session starts this function will trigger the track parser to load the new track file. The event Track_Loaded is fired with a 500ms delay to allow the track parser to complete. The session_start function is trigger from the Simulator_StatePoller, which runs seperately anyway.

Method Details

Bootup() public method

This method actually boots up the data frame-work. This method is called via the ThreadPool from Run().
public Bootup ( string workingDirectory ) : void
workingDirectory string Pass string.Empty for default; otherwise provide working directory for SimTelemetry
return void

ForceTrackLoad() public method

'Force' a track reload.
public ForceTrackLoad ( ) : void
return void

NetworkTrack_LoadInfo() public method

Loads track info from network.
public NetworkTrack_LoadInfo ( NetworkTrackInformation routeInfo ) : void
routeInfo SimTelemetry.Data.Net.NetworkTrackInformation
return void

NetworkTrack_LoadRoute() public method

Loads route from network.
public NetworkTrack_LoadRoute ( RouteCollection routeCollection ) : void
routeCollection SimTelemetry.Objects.RouteCollection
return void

Run() public method

Runs the telemetry network. The boot-up code is called via ThreadPool
public Run ( ) : void
return void

Telemetry() public method

Initialize telemetry. The main program will have to call Run() seperately.
public Telemetry ( ) : System
return System

Track_Load() public method

Load new track. Specify location of gamedirectory and file.
public Track_Load ( ISimulator sim, string track ) : void
sim ISimulator Source simulator of track
track string Relative path from gamedirectory to track file OR track name.
return void

Track_Unload() public method

Unloads track.
public Track_Unload ( ) : void
return void

Property Details

Computations public_oe property

General calculations based on game data.
public Computations,SimTelemetry.Data Computations
return SimTelemetry.Data.Computations

Peripherals public_oe property

Data sent to hardware devices. Currently only used for exclusive peripherals.
public IDevices Peripherals
return IDevices

binaryDirectory public_oe property

public string binaryDirectory
return string

m public_oe static_oe property

Single-ton Telemetry for general access everywhere.
public static Telemetry,SimTelemetry.Data m
return Telemetry