UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

65 lines (64 loc) 1.9 kB
import { Struct } from '../packets'; import type { DashLights } from './DashLights'; import type { OutGaugeFlags } from './OutGaugeFlags'; /** * OutGauge - 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 * * Each update sends the following UDP packet. */ export declare class OutGaugePack extends Struct { static readonly MIN_SIZE = 92; static readonly MAX_SIZE = 96; /** Time in milliseconds (to check order) */ Time: number; /** Car name */ Car: string; Flags: OutGaugeFlags | 0; /** Reverse: 0, Neutral: 1, First: 2,... */ Gear: number; /** Unique ID of viewed player (0 = none) */ PLID: number; /** m/s */ Speed: number; /** RPM */ RPM: number; /** bar */ Turbo: number; /** C */ EngTemp: number; /** 0 to 1 */ Fuel: number; /** bar */ OilPressure: number; /** C */ OilTemp: number; /** Dash lights available */ DashLights: DashLights | 0; /** Dash lights currently switched on */ ShowLights: DashLights | 0; /** 0 to 1 */ Throttle: number; /** 0 to 1 */ Brake: number; /** 0 to 1 */ Clutch: number; /** Usually Fuel */ Display1: string; /** Usually Settings */ Display2: string; /** Optional - only if OutGauge ID is specified */ ID: number; unpack(buffer: Uint8Array<ArrayBuffer>): this; }