UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

27 lines (26 loc) 954 B
import { Packet } from './base'; import { PacketType } from './enums'; import { NodeLap } from './structs'; /** * Node and Lap Packet - variable size * * To receive {@link IS_NLP} packets at a specified interval: * * - Set the Interval field in the {@link IS_ISI} (InSimInit) packet (10, 20, 30... 8000 ms) * - Set {@link ISF_NLP} flag in the {@link IS_ISI} packet * * If {@link ISF_NLP} flag is set, one {@link IS_NLP} packet is sent... */ export declare class IS_NLP extends Packet { /** 4 + NumP * 6 (PLUS 2 if needed to make it a multiple of 4) */ readonly Size = 4; readonly Type = PacketType.ISP_NLP; /** 0 unless this is a reply to a {@link TINY_NLP} request */ ReqI: number; /** Number of players in race */ NumP: number; /** Node and lap of each player, 1 to {@link NLP_MAX_CARS} (NumP) */ Info: NodeLap[]; unpack(buffer: Uint8Array<ArrayBuffer>): this; } export declare const NLP_MAX_CARS = 40;