@rflafla/f1-udp-parser
Version:
The F1 series of games support the outputting of key game data via a UDP data stream. This data can be interpreted by external apps or connected peripherals for a range of different uses, including providing additional telemetry information, customised HU
24 lines • 930 B
JavaScript
;
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 {
data;
constructor(buffer, packetFormat) {
super();
this.endianess('little')
.nest('m_header', {
type: new PacketHeaderParser_1.PacketHeaderParser(packetFormat),
})
.uint8('m_numPlayers')
.array('m_lobbyPlayers', {
length: 22,
type: new LobbyInfoDataParser_1.LobbyInfoDataParser(packetFormat),
});
this.data = this.fromBuffer(buffer);
}
}
exports.PacketLobbyInfoDataParser = PacketLobbyInfoDataParser;
//# sourceMappingURL=PacketLobbyInfoDataParser.js.map