@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
23 lines • 945 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PacketParticipantsDataParser = void 0;
const F1Parser_1 = require("../F1Parser");
const PacketHeaderParser_1 = require("./PacketHeaderParser");
const ParticipantDataParser_1 = require("./ParticipantDataParser");
class PacketParticipantsDataParser extends F1Parser_1.F1Parser {
data;
constructor(buffer, packetFormat) {
super();
this.endianess('little').nest('m_header', {
type: new PacketHeaderParser_1.PacketHeaderParser(packetFormat),
});
this.uint8('m_numActiveCars');
this.array('m_participants', {
length: 22,
type: new ParticipantDataParser_1.ParticipantDataParser(packetFormat),
});
this.data = this.fromBuffer(buffer);
}
}
exports.PacketParticipantsDataParser = PacketParticipantsDataParser;
//# sourceMappingURL=PacketParticipantsDataParser.js.map