SigmaOrigo.Swdl 1.6.5

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet tool install --global SigmaOrigo.Swdl --version 1.6.5
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local SigmaOrigo.Swdl --version 1.6.5
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=SigmaOrigo.Swdl&version=1.6.5
nuke :add-package SigmaOrigo.Swdl --version 1.6.5

This package provides a .NET tool (swdl) and is part of the Sigma Origo Diagnostics Agent SDK.

Use this tool to run and debug software download operations to a vehicle that is connected to the local machine.

Install tool

 > dotnet tool install --global SigmaOrigo.Swdl

Run local agent

 > swdl PACKAGE-ID .\DummyAgent.exe

Debug local agent

First start the agent process from Visual Studio (or another debugger) then execute:

 > swdl PACKAGE-ID

Command options

Option Description
--vin value When specified, identifies the vehicle for which the software download operation shall be executed. When not specified, the first discovered vehicle will be used.
--environment value When specified, identifies the environment of the software download operation.
--confirm Automatically confirm SWDL continuation.
--deployment-type value When specified, the deployment type of the software download operation.
--tester-present-target address When specified, the UDS target address to which tester present messages shall be sent while awaiting confirmation unless the agent specifies explicit tester present settings.
--tester-present-interval millis When specified, the interval in milliseconds at which tester present messages shall be sent while awaiting confirmation unless the agent specifies explicit tester present settings. Default: 2000
--client-data file Path to a file that provide client data, encoded in a JSON object, that shall be given as input to the SWDL agent
--verbose Enable verbose output.

Example: Dummy agent

This dummy SWDL agent is implemeted using NuGet package:
SigmaOrigo.Diagnostics.Agent

using SigmaOrigo.Diagnostics.Agent;

await new DummyAgent().RunAgentAsync().ConfigureAwait(false);

internal sealed class DummyAgent : AgentApplication
{
    protected override async Task<bool> RunSwdlAsync(SwdlContext context)
    {
        await context.LogInformationAsync(
            $"Simulating execution of SWDL package {context.Input.PackageId} " +
            $"in the {context.Input.Environment ?? "DEFAULT"} environment");

        try
        {
            var data = await this.ReadDataAsync(context).ConfigureAwait(false);
            await context.LogInformationAsync($"Data from vehicle: {data}");
        }
        catch (Exception error)
        {
            await context.LogErrorAsync($"Failed to read data from vehicle: {error.Message}");
        }

        for (var i = 0; i <= 33; ++i)
        {
            if (context.GracefulAbortToken.IsCancellationRequested)
            {
                return false;
            }

            await Task.Delay(100);
            await context.SetProgressAsync(i * 3, "Simulating progress...");
        }

        return true;
    }

    private async Task<string> ReadDataAsync(SwdlContext context)
    {
        const string did = "ED20";
        const string ecu = "1A01";

        var completionSource = new TaskCompletionSource<string>();
        using var timeout = new CancellationTokenSource(1000);
        using var timeoutHandler = timeout.Token.Register(() => completionSource.TrySetCanceled(timeout.Token));
        using var responseHandler = context.RegisterResponseHandler((source, payload) =>
        {
            if (source == ecu && payload.StartsWith($"62{did}"))
            {
                completionSource.TrySetResult(payload.Substring(6));
            }
        });

        await context.SendRequestAsync(ecu, $"22{did}").ConfigureAwait(false);

        return await completionSource.Task.ConfigureAwait(false);
    }
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.6.5 161 3/19/2024
1.6.4 133 3/16/2024
1.6.3 154 3/13/2024
1.6.2 140 3/3/2024
1.6.1 114 2/13/2024
1.6.0 89 2/13/2024
1.5.1 140 2/12/2024
1.5.0 311 10/12/2023
1.4.0 214 10/3/2023
1.3.2 257 9/28/2023
1.3.1 153 9/28/2023
1.3.0 237 9/26/2023
1.2.0 189 9/26/2023
1.1.0 190 9/25/2023
1.0.1 227 9/4/2023
1.0.0 241 9/4/2023
1.0.0-preview.3 93 6/19/2023
1.0.0-preview.2 75 5/22/2023
1.0.0-preview.1 77 5/10/2023
1.0.0-preview.0 84 5/10/2023