DNV.Vista.Gateway.Client
1.0.0-rc.4
dotnet add package DNV.Vista.Gateway.Client --version 1.0.0-rc.4
NuGet\Install-Package DNV.Vista.Gateway.Client -Version 1.0.0-rc.4
<PackageReference Include="DNV.Vista.Gateway.Client" Version="1.0.0-rc.4" />
paket add DNV.Vista.Gateway.Client --version 1.0.0-rc.4
#r "nuget: DNV.Vista.Gateway.Client, 1.0.0-rc.4"
// Install DNV.Vista.Gateway.Client as a Cake Addin #addin nuget:?package=DNV.Vista.Gateway.Client&version=1.0.0-rc.4&prerelease // Install DNV.Vista.Gateway.Client as a Cake Tool #tool nuget:?package=DNV.Vista.Gateway.Client&version=1.0.0-rc.4&prerelease
Vista Gateway Client
Vista Gateway Client is a library that provides a configured client for supported protocols and package types. It ensures strict implementation and validation of the packages according to their respective supported types.
Supported Protocols
- HTTPS
- MQTT
Supported Package Types
- ISO19848 DataChannelList
- ISO19848 TimeSeriesData
What is ISO19848?
ISO 19848 is an international standard for the digital exchange of data between ship systems, covering both operational and technical data. It standardizes the structure of data for easier exchange and interpretation, facilitating data integration in maritime industries.
- Schemas: ISO19848 schemas
- Vista documentation: docs.vista.dnv.com
Acquire an API Key
To use Vista Gateway Client, you will need an API key to authenticate with the gateway. Please reach out to your DNV contact to request an API key. When doing so, make sure to mention the specific service you are interested in to ensure you receive the correct key for your use case.
Installation
To use the Vista Gateway Client, you need .NET 8. Follow the steps below to install and configure the client.
1. Add Package Reference
Install the package via NuGet Package Manager or using the .NET CLI:
dotnet add package DNV.Vista.Gateway.Client
2. Add Client to the Dependency Injection Builder
using Vista.Gateway.Client;
var builder = WebApplication.CreateBuilder(args); // Must be an IHostApplicationBuilder
builder.AddVistaGatewayClient(options =>
{
options.ApiKey = "<Your API Key>";
options.Protocol = Protocol.Http; // or Protocol.MQTT
});
3. Create and Send a Package
using Vista.SDK;
using Vista.Gateway.Client;
// Resolve the client from the DI container
var client = serviceProvider.GetRequiredService<IVistaGatewayClient>();
// Create package. E.g. ISO19848 DataChannelList
var package = new DataChannelList
{
// Configure the package according to ISO 19848 standard
};
// Create client package
var clientPackage = new GatewayPackage.ISO19848.DataChannelList(
Package: package,
ExternalId: "<Your External ID>",
CorrelationId: "<Your Correlation ID>",
UserAgent: "<Your User Agent>"
);
try {
// Send the package
await client.SendAsync(clientPackage);
}
catch (VistaGatewayException ex)
{
// Handle VistaGatewayException
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- DNV.Vista.SDK (>= 0.2.0-preview-209)
- DNV.Vista.SDK.System.Text.Json (>= 0.2.0-preview-209)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- MQTTnet.Extensions.ManagedClient (>= 4.3.6.1152)
- Vista.Gateway.Common (>= 1.0.0-rc.4)
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.0-rc.4 | 36 | 11/21/2024 |
1.0.0-rc.3 | 37 | 11/18/2024 |
1.0.0-rc.2 | 49 | 11/11/2024 |
1.0.0-preview-2 | 39 | 10/29/2024 |