Inheco.SiLA2.Scila.Features 0.10.0-BETA

This is a prerelease version of Inheco.SiLA2.Scila.Features.
dotnet add package Inheco.SiLA2.Scila.Features --version 0.10.0-BETA                
NuGet\Install-Package Inheco.SiLA2.Scila.Features -Version 0.10.0-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="Inheco.SiLA2.Scila.Features" Version="0.10.0-BETA" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Inheco.SiLA2.Scila.Features --version 0.10.0-BETA                
#r "nuget: Inheco.SiLA2.Scila.Features, 0.10.0-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 Inheco.SiLA2.Scila.Features as a Cake Addin
#addin nuget:?package=Inheco.SiLA2.Scila.Features&version=0.10.0-BETA&prerelease

// Install Inheco.SiLA2.Scila.Features as a Cake Tool
#tool nuget:?package=Inheco.SiLA2.Scila.Features&version=0.10.0-BETA&prerelease                

##SiLA2 Implementation of INHECO SCILA Device

This feature enables the integration of SCILA device in a SiLA2 standard conformed software solutions.

For an introduction about SiLA2 development with C# there is a SiLA2 reference implementation sila_csharp.

The service that implements this SiLA2 feature is called

SiLA2.Scila.Features.Services.ScilaSiLA1Service

The configuration of the service in a SiLA2 Server would follow the pattern described in the sila_csharp reference implementation with additional parameters. NetworkInterfaceName and DeviceIP are required.

"ServerConfig": {
    "Name": "Inheco SiLA2 SCILA Prototype Server",
    "UUID": "CB2CDF15-AB7D-4EC1-B7C8-CD0BCE40135C",
    "FQHN": "localhost", //IP or CIDR or Fully Qualified Host Name
    "Port": 7706,
    "NetworkInterface": "Default",
    "DiscoveryServiceName": "_sila._tcp"
  },
  "CommandLifetimeInSeconds": 60,
  "ServerInfo": {
    "VendorURI": "https://www.inheco.com",
    "Description": "SCILA SiLA2 server implementation.",
    "Version": "7.5.3",
    "Type": "SiLA2ScilaServer"
  },
  "NetworkInterfaceName": "My Ethernet",
  "DeviceIp": "192.168.1.128"
  //"ConnectLockId": "myLockId",
  //"CustomDeviceId": "myDeviceId",
  //"EventReceiverPort": 7071

Internally, the feature connects to a IhcPmsLib.Scila.Scila device (specified by the "DeviceIp" above) which sends DataEvents and StatusEvents to the PMS.

Registration of the services with WebApplicationBuilder (from sila_csharp reference implementation) would include also the following lines:

using static Sila2.Com.Inheco.Scila.Scilasila1.V1.ScilaSiLA1;
...
app.MapGrpcService<ScilaSiLA1Service>();
...                                                
services.AddSingleton<ScilaSiLA1Service>();
...

In a SiLA2 client application, we could call a SiLA2 command as follows:

private static async Task<GrpcChannel> GetChannel(string[] args) {
    var configBuilder = new ConfigurationBuilder()
        .SetBasePath(Directory.GetCurrentDirectory())
        .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
    var configuration = configBuilder.Build();
    var clientSetup = new Configurator(configuration, args);
    ILogger<Program> logger = (ILogger<Program>)clientSetup.ServiceProvider.GetService(typeof(ILogger<Program>));
    var clientConfig = clientSetup.ServiceProvider.GetService<IClientConfig>();
    Console.WriteLine($"Using Server-URI '{clientConfig.IpOrCdirOrFullyQualifiedHostName}:{clientConfig.Port}' from ClientConfig");
    GrpcChannel channel = await ((IGrpcChannelProvider)clientSetup.ServiceProvider.GetService(typeof(IGrpcChannelProvider))).GetChannel(clientConfig.IpOrCdirOrFullyQualifiedHostName, clientConfig.Port, accceptAnyServerCertificate: true);
    return channel;
}

try
{
    var client = new ScilaSiLA1.ScilaSiLA1Client(channel);
    var resGS = client.GetStatus(new GetStatus_Parameters());
    var resGDI = client.GetDeviceIdentification(new GetDeviceIdentification_Parameters());
}
catch (Grpc.Core.RpcException rpcex)
{
    _errorMessage = ErrorHandling.HandleException(rpcex);
}
catch (Exception ex)
{
    _errorMessage = ex.Message;
}
    
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.10.0-BETA 65 6/27/2024
0.9.1-BETA 244 10/23/2023
0.9.0-BETA 73 10/16/2023

v0.10.0
- new SiLA2-Features: split into mandatory/common/scila specific
- added various SiLA2 properties
- updated reference: SiLA2.Core 8.1.0, Grpc.Tools 2.64.0
- updated reference: Inheco.IhcPmasLib.Scila 1.1.0
v0.9.2
- target framework net8.0
v0.9.1
- feature.xml included as embedded resource
- server should ensure to call ScilaSiLA1Service-ctor once at startup.
v0.9.0
- initial beta release