Module pyinsim :: Class OutGaugePack
[hide private]
[frames] | no frames]

Class OutGaugePack

source code

External dashboard support.

The user's car in multiplayer or the viewed car in single player or single player replay can output information to a dashboard system while viewed from an internal view.

This can be controlled by 5 lines in the cfg.txt file :

>>> OutGauge Mode 0        :0-off 1-driving 2-driving+replay
>>> OutGauge Delay 1       :minimum delay between packets (100ths of a sec)
>>> OutGauge IP 0.0.0.0    :IP address to send the UDP packet
>>> OutGauge Port 0        :IP port
>>> OutGauge ID 0          :if not zero, adds an identifier to the packet
Instance Methods [hide private]
 
__init__(self, Time=0, Car='', Flags=0, Gear=0, Speed=0.0, RPM=0.0, Turbo=0.0, EngTemp=0.0, Fuel=0.0, OilPress=0.0, OilTemp=0.0, DashLights=0, ShowLights=0, Throttle=0.0, Brake=0.0, Clutch=0.0, Display1='', Display2='', ID=0)
Initailise the packet.
source code
 
unpack(self, data)
Unpack the packet data from a binary formatted string.
source code
Method Details [hide private]

__init__(self, Time=0, Car='', Flags=0, Gear=0, Speed=0.0, RPM=0.0, Turbo=0.0, EngTemp=0.0, Fuel=0.0, OilPress=0.0, OilTemp=0.0, DashLights=0, ShowLights=0, Throttle=0.0, Brake=0.0, Clutch=0.0, Display1='', Display2='', ID=0)
(Constructor)

source code 

Initailise the packet.

Parameters:
  • Time - Time in milliseconds (to check order)
  • Car - Car name
  • Flags - Bit flags from OG_ enumeration
  • Gear - Reverse: 0, Neutral: 1, Firest: 2 etc..
  • Speed - Meters per second
  • RPM - RPM
  • Turbo - BAR
  • EngTemp - C
  • Fuel - 0.0 to 1.0
  • OilPress - BAR
  • OilTemp - C
  • DashLights - Dash lights available (see DL_x below)
  • ShowLights - Dash lights currently switched on
  • Throttle - 0.0 to 1.0
  • Brake - 0.0 to 1.0
  • Clutch - 0.0 to 1.0
  • Display1 - Usually fuel
  • Display2 - Usually settings
  • ID - Options, if OutGauge ID specified

unpack(self, data)

source code 

Unpack the packet data from a binary formatted string.

Parameters:
  • data (string) - The packet data as a binary formatted string.