UNPKG

@z0mt3c/f1-telemetry-client

Version:

[![Node.js CI](https://github.com/z0mt3c/f1-telemetry-client/actions/workflows/node.js.yml/badge.svg)](https://github.com/z0mt3c/f1-telemetry-client/actions/workflows/node.js.yml) [![NPM Release](https://img.shields.io/npm/v/@z0mt3c/f1-telemetry-client.sv

23 lines (22 loc) 897 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PacketLobbyInfoDataParser = void 0; const F1Parser_1 = require("../F1Parser"); const LobbyInfoDataParser_1 = require("./LobbyInfoDataParser"); const PacketHeaderParser_1 = require("./PacketHeaderParser"); class PacketLobbyInfoDataParser extends F1Parser_1.F1Parser { constructor(buffer, packetFormat, bigintEnabled) { super(); this.endianess('little') .nest('m_header', { type: new PacketHeaderParser_1.PacketHeaderParser(packetFormat, bigintEnabled), }) .uint8('m_numPlayers') .array('m_lobbyPlayers', { length: 22, type: new LobbyInfoDataParser_1.LobbyInfoDataParser(packetFormat), }); this.data = this.fromBuffer(buffer); } } exports.PacketLobbyInfoDataParser = PacketLobbyInfoDataParser;