SigmaOrigo.Swdl
1.0.0-preview.1
Prefix Reserved
This is a prerelease version of SigmaOrigo.Swdl.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global SigmaOrigo.Swdl --version 1.0.0-preview.1
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.0.0-preview.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=SigmaOrigo.Swdl&version=1.0.0-preview.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package SigmaOrigo.Swdl --version 1.0.0-preview.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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)
> swdl PACKAGE-ID
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 | Versions 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.10 | 106 | 8/27/2024 |
1.6.9 | 131 | 7/6/2024 |
1.6.6 | 102 | 6/19/2024 |
1.6.5 | 213 | 3/19/2024 |
1.6.4 | 175 | 3/16/2024 |
1.6.3 | 199 | 3/13/2024 |
1.6.2 | 189 | 3/3/2024 |
1.6.1 | 157 | 2/13/2024 |
1.6.0 | 138 | 2/13/2024 |
1.5.1 | 181 | 2/12/2024 |
1.5.0 | 356 | 10/12/2023 |
1.4.0 | 266 | 10/3/2023 |
1.3.2 | 308 | 9/28/2023 |
1.3.1 | 203 | 9/28/2023 |
1.3.0 | 282 | 9/26/2023 |
1.2.0 | 231 | 9/26/2023 |
1.1.0 | 231 | 9/25/2023 |
1.0.1 | 277 | 9/4/2023 |
1.0.0 | 284 | 9/4/2023 |
1.0.0-preview.3 | 111 | 6/19/2023 |
1.0.0-preview.2 | 91 | 5/22/2023 |
1.0.0-preview.1 | 85 | 5/10/2023 |
1.0.0-preview.0 | 99 | 5/10/2023 |