FlyByWireless.XPLM 1.0.8-beta

This is a prerelease version of FlyByWireless.XPLM.
dotnet add package FlyByWireless.XPLM --version 1.0.8-beta                
NuGet\Install-Package FlyByWireless.XPLM -Version 1.0.8-beta                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FlyByWireless.XPLM" Version="1.0.8-beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FlyByWireless.XPLM --version 1.0.8-beta                
#r "nuget: FlyByWireless.XPLM, 1.0.8-beta"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FlyByWireless.XPLM as a Cake Addin
#addin nuget:?package=FlyByWireless.XPLM&version=1.0.8-beta&prerelease

// Install FlyByWireless.XPLM as a Cake Tool
#tool nuget:?package=FlyByWireless.XPLM&version=1.0.8-beta&prerelease                

FlyByWireless.XPLM

P/Invoke for X-Plane plugin library manager

Reference Packages

Microsoft.DotNet.ILCompiler must be a top level dependency for native AOT:

<PackageReference Include="FlyByWireless.XPLM" Version="1.0.8-*"/>
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="6.0.0-*"/>

Implement

The plugin must implement FlyByWireless.XPLM.XPluginBase as XPlugin in its assembly root namespace:

using FlyByWireless.XPLM;

namespace XplTemplate;

sealed class XPlugin : XPluginBase
{
    public override string? Name => "Fly by Wireless";
    public override string? Signature => "hk.timtim.flybywireless";
    public override string? Description => "X-Plane plugin library template.";

    public XPlugin() : base()
    {
        // e.g. check for API support
        if (Utilities.Versions.XPLMVersion < 303)
        {
            throw new NotSupportedException("TCAS override not supported.");
        }
    }

    public override void Dispose()
    {
        // TODO: uninitialize
    }

    public override void Enable()
    {
        // TODO: start loops
    }

    public override void Disable()
    {
        // TODO: stop loops
    }

    public override void ReceiveMessage(int from, int message, nint param)
    {
        // TODO: handle message from aother plugin
        base.ReceiveMessage(from, message, param);
    }
}

Name and Signature fall back to assembly name and root namespace respectively when not overridden to return non-null values.

Publish

dotnet publish -r win-x64 -c Release
dotnet publish -r osx-x64 -c Release
dotnet publish -r linux-x64 -c Release

In Debug config, plugin error messages are written to Debug Output; if a debugger is attached, it will also break. An error callback could be installed in Release config too:

Utilities.ErrorCallback = message =>
{
    Debug.WriteLine(message);
    if (Debugger.IsAttached)
    {
        Debugger.Break();
    }
};
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • net6.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
1.0.8-beta 176 2/11/2022