TORCS  1.3.9
The Open Racing Car Simulator
Simulation Module Interface

Interface for simulation modules, the simulation module is discovered and loaded during runtime. More...

Collaboration diagram for Simulation Module Interface:

Files

file  simu.h
 Simulation Module Interface Definition.
 

Classes

struct  tSimItf
 Interface Structure for Simulation. More...
 

Typedefs

typedef void(* tfSimInit) (int nbCars, tTrack *track, tdble fuelFactor, tdble damageFactor, tdble tireFactor)
 Callback function prototype for simulation module initialization (bring up module and hand over track and parameters) More...
 
typedef void(* tfSimConfig) (tCarElt *carElt, struct RmInfo *reInfo)
 Callback function prototype for simulation configuration of a given car. More...
 
typedef void(* tfSimReConfig) (tCarElt *carElt)
 Callback function prototype for simulation reconfiguration of a given car (refueling, setup adjustments) More...
 
typedef void(* tfSimUpdate) (struct Situation *s, double deltaTime, int telemetry)
 Callback function prototype for progressing the given Situation by a given simulation time step. More...
 
typedef void(* tfSimShutdown) (void)
 Callback function prototype for simulation module shutdown. More...
 

Detailed Description

Interface for simulation modules, the simulation module is discovered and loaded during runtime.

Typedef Documentation

◆ tfSimConfig

typedef void(* tfSimConfig) (tCarElt *carElt, struct RmInfo *reInfo)

Callback function prototype for simulation configuration of a given car.

Parameters
[in]carEltCar to configure
[in]reInfoRace manager info

Definition at line 60 of file simu.h.

◆ tfSimInit

typedef void(* tfSimInit) (int nbCars, tTrack *track, tdble fuelFactor, tdble damageFactor, tdble tireFactor)

Callback function prototype for simulation module initialization (bring up module and hand over track and parameters)

Parameters
[in]nbCarsNumber of cars to simulate
[in]trackTrack to race on
[in]fuelFactorFactor for fuel consumtion, e.g 1 for normal, 0 for none, etc.
[in]damageFactorFactor for damage, e.g. 1 for normal, 0 for none, etc.
[in]tireFactorFactor for tire wear, e.g. 1 for normal, 0 for none, etc.

Definition at line 53 of file simu.h.

◆ tfSimReConfig

typedef void(* tfSimReConfig) (tCarElt *carElt)

Callback function prototype for simulation reconfiguration of a given car (refueling, setup adjustments)

Parameters
[in]carEltCar to reconfigure

Definition at line 66 of file simu.h.

◆ tfSimShutdown

typedef void(* tfSimShutdown) (void)

Callback function prototype for simulation module shutdown.

Definition at line 79 of file simu.h.

◆ tfSimUpdate

typedef void(* tfSimUpdate) (struct Situation *s, double deltaTime, int telemetry)

Callback function prototype for progressing the given Situation by a given simulation time step.

Parameters
[in,out]sSituation to progress
[in]deltaTimeTimestep, usually RCM_MAX_DT_SIMU
[in]telemetryIndex of car to receive telemetry

Definition at line 74 of file simu.h.