Skip to content

charliefoxtwo/DCS-BIOS-Communicator

Repository files navigation

DCS BIOS Communicator

Nuget .NET 8 CI build GitHub Discord


DCS BIOS Communicator logo - a vector outline of an airplane

DCS-BIOS Communicator

a .NET library for communicating with DCS-BIOS

Table of Contents
  1. Features
  2. Getting Started
  3. Benchmarks
  4. Roadmap
  5. Acknowledgments

DCS BIOS Communicator is a .net 8 library for interacting with DCS-BIOS. It parses the raw data bytes provided by DCS-BIOS and will trigger actions when it receives data.

Features

  • Parses data from DCS-BIOS
  • Handles pesky UTF-8 symbols
  • Might buy you an ice cream sandwich if you're lucky
  • Cross-platform

Usage

// create a new UDP client for talking to DCS-BIOS
var client = new BiosUdpClient(IPAddress.Parse("239.255.50.10"), 7778, 5010, logger);
client.OpenConnection();

// create your own translator class which implements IBiosTranslator
var biosListener = new BiosListener(client, translator, logger);

// register the json configuration files
var configLocation = "%userprofile%/Saved Games/DCS.openbeta/Scripts/DCS-BIOS/doc/json/";
foreach (var config in await AircraftBiosConfiguration.AllConfigurations(configLocation))
{
    biosListener.RegisterConfiguration(config);
}

// start the listener
biosListener.Start();

Benchmarks

Benchmarks are strictly for parsing data received from the UDP server and do not include network time or UDP receive time.

BenchmarkDotNet v0.13.12, Windows 11
AMD Ryzen 9 5900X, 1 CPU, 24 logical and 12 physical cores
.NET SDK 8.0.206

Job=.NET 8.0  Runtime=.NET 8.0
Method Mean Error StdDev Ratio
TestString 30.043 ns 0.1793 ns 0.1677 ns 1.00
TestInt 1.290 ns 0.0114 ns 0.0106 ns 1.00

Roadmap

  • Unit tests

Acknowledgements

About

A package for communicating with DCS-BIOS in .net 6.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages