SigmaOrigo.Swdl
1.0.0-preview.2
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.2
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.2
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=SigmaOrigo.Swdl&version=1.0.0-preview.2&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.2
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 | 110 | 8/27/2024 |
1.6.9 | 135 | 7/6/2024 |
1.6.6 | 106 | 6/19/2024 |
1.6.5 | 217 | 3/19/2024 |
1.6.4 | 179 | 3/16/2024 |
1.6.3 | 203 | 3/13/2024 |
1.6.2 | 195 | 3/3/2024 |
1.6.1 | 161 | 2/13/2024 |
1.6.0 | 142 | 2/13/2024 |
1.5.1 | 185 | 2/12/2024 |
1.5.0 | 360 | 10/12/2023 |
1.4.0 | 272 | 10/3/2023 |
1.3.2 | 312 | 9/28/2023 |
1.3.1 | 207 | 9/28/2023 |
1.3.0 | 286 | 9/26/2023 |
1.2.0 | 237 | 9/26/2023 |
1.1.0 | 235 | 9/25/2023 |
1.0.1 | 281 | 9/4/2023 |
1.0.0 | 288 | 9/4/2023 |
1.0.0-preview.3 | 113 | 6/19/2023 |
1.0.0-preview.2 | 93 | 5/22/2023 |
1.0.0-preview.1 | 89 | 5/10/2023 |
1.0.0-preview.0 | 101 | 5/10/2023 |