F1Game.UDP
24.0.0
dotnet add package F1Game.UDP --version 24.0.0
NuGet\Install-Package F1Game.UDP -Version 24.0.0
<PackageReference Include="F1Game.UDP" Version="24.0.0" />
paket add F1Game.UDP --version 24.0.0
#r "nuget: F1Game.UDP, 24.0.0"
// Install F1Game.UDP as a Cake Addin #addin nuget:?package=F1Game.UDP&version=24.0.0 // Install F1Game.UDP as a Cake Tool #tool nuget:?package=F1Game.UDP&version=24.0.0
F1Game.UDP
Library to parse UDP telemetry packets from F1 24 game.
UDP Specification
UDP specification is here.
Versioning
Each major version of the F1Game.UDP
library is designed to support a specific version of the F1 game. The major version number of the library corresponds to the version of the game it supports. For example, F1Game.UDP
version 23.x supports F1 23 game, and version 24.x supports F1 24 game and so on.
Usages
You can parse an array of bytes to packets using the ToPacket
extension method.
The ToPacket
method returns a UnionPacket
struct, which has properties for different types of packets, such as:
CarDamageDataPacket
CarSetupDataPacket
CarStatusDataPacket
CarTelemetryDataPacket
EventDataPacket
FinalClassificationDataPacket
LapDataPacket
LobbyInfoDataPacket
MotionDataPacket
MotionExDataPacket
ParticipantsDataPacket
SessionDataPacket
SessionHistoryDataPacket
TimeTrialDataPacket
TyreSetsDataPacket
You can access the specific packet data by accessing the corresponding property of the UnionPacket
struct, you should check what packet type it is first using PacketType
property.
using F1Game.UDP;
UnionPacket packet = arrayOfBytes.ToPacket();
if (packet.PacketType == PacketType.CarTelemetry)
{
CarTelemetryDataPacket carTelemetryData = packet.CarTelemetryData;
// Access car telemetry data
}
switch (packet.PacketType)
{
case PacketType.CarTelemetry:
CarTelemetryDataPacket carTelemetryData = packet.CarTelemetryData;
// Access car telemetry data
break;
case PacketType.CarStatus:
CarStatusDataPacket carStatusData = packet.CarStatusData;
// Access car status data
break;
// Add other cases for different packet types
}
Benchmarks
You can check performance of the library by running benchmarks in F1Game.UDP.Benchmarks
project.
Results on my machine are here.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
24.0.0 | 127 | 6/13/2024 |
23.2.0 | 100 | 6/12/2024 |
23.1.0 | 106 | 6/10/2024 |
23.0.1 | 102 | 6/9/2024 |
23.0.0-alpha | 90 | 6/8/2024 |
0.0.1-alpha | 162 | 12/25/2023 |