Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@racehub-io/f1game-udp-parser

racehub-io31MIT0.4.12TypeScript support: included

Rust built Node compatible udp parser for Codemaster's Formula 1 games

automotive, grand prix, f12019, f1 2019, f12020, f1 2020, f12021, f1 2021, formula 1, f1, codemasters, udp, telemetry, racing, simracing, gaming, formula, ps4, xbox, xbox one, playstation, playstation 4, esports, e sports, e-sports, videogame

readme

F1 Game UDP Parser

npm (scoped) GitHub

Installing

Important!

This is a native node module written in Rust. To allow for cross compatibility it builds from source on installation. You will require Rust installed, before installing this module. As soon as Neon is stable enough to compile through node-gyp for compiled releases we will migrate.

$ npm install @racehub-io/f1game-udp-parser

or

$ yarn add @racehub-io/f1game-udp-parser

Usage

import { TelemetryClient, constants } from "@racehub-io/f1game-udp-parser";
// or: const { TelemetryClient, constants } = require('f1game-udp-parser');
const { DATA } = constants;

const client = new TelemetryClient({port: 20777, forwardAddresses: [{port:30500}]});
client.on(DATA, (packetVersion, packetType, packetData) => console.log(packetData));

client.start();

// and when you want to stop:
client.stop();

ToDo

  • <input disabled="" type="checkbox"> Migrate publishing to node-gyp for compiled builds
  • <input disabled="" type="checkbox"> Move UDP socket and EventEmitter to Rust
  • <input disabled="" type="checkbox"> Improve packet dependent logic inside Rust parser
  • <input disabled="" type="checkbox"> Migrate to N-API backend with Neon
  • <input disabled="" type="checkbox"> Update Rust dependencies

changelog

0.1.30 (2020.03.27)

  • Move to GitHub Actions
  • Initialise socket in start to enable re-starting of client

0.1.5 (2020.03.15)

  • Move to TypeScript
  • Fix bug in CarTelemetryData struct with m_brake missing

0.1.4 (2020.01.18)

  • Initial release