OpenFMB.Templates.Tools
1.0.0
dotnet add package OpenFMB.Templates.Tools --version 1.0.0
NuGet\Install-Package OpenFMB.Templates.Tools -Version 1.0.0
<PackageReference Include="OpenFMB.Templates.Tools" Version="1.0.0" />
<PackageVersion Include="OpenFMB.Templates.Tools" Version="1.0.0" />
<PackageReference Include="OpenFMB.Templates.Tools" />
paket add OpenFMB.Templates.Tools --version 1.0.0
#r "nuget: OpenFMB.Templates.Tools, 1.0.0"
#:package OpenFMB.Templates.Tools@1.0.0
#addin nuget:?package=OpenFMB.Templates.Tools&version=1.0.0
#tool nuget:?package=OpenFMB.Templates.Tools&version=1.0.0
OpenFMB Configuration Generator
Overview
A simple tool to manipulate pre-mapped template file and generate:
Adapter main configuration
Device specific template
The following
Parameters
are used to manipulate the pre-mapped template and generate adapter main configuration:public class Parameters { public string DeviceIp { get; set; } = "127.0.0.1"; public int DevicePort { get; set; } = 20000; public List<string> DeviceNames { get; set; } = new List<string>() { "MyDevice" }; public List<string> DeviceMrids { get; set; } = new List<string>() { Guid.Empty.ToString() }; public int MasterAddress { get; set; } = 1; public int OutstationAddress { get; set; } = 1; public Protocol Protocol { get; set; } = Protocol.Unknown; public TransportProtocol TransportProtocol { get; set; } = TransportProtocol.NATS; public string NatsUrl { get; set; } = "nats://localhost:4222"; public string NatsJwtCredsFile { get; set; } = "jwt.creds"; public string MqttUrl { get; set; } = "tcp://localhost:1883"; public string MqttUsername { get; set; } = "username"; public string MqttPassword { get; set; } = "password"; public List<ITopic> PublishTopics { get; set; } = new List<ITopic>(); public List<ITopic> SubscribeTopics { get; set; } = new List<ITopic>(); public string TemplatePath { get; set; } = "/openfmb/template.yaml"; }
Installation
NuGet Package: Install teh library via NuGet Package Manager using the following command (TODO):
Install-Package OpenFMB.Templates.Tools
Manual Download: You can manually download the library DLL from the GitHub releases page and reference it in your project
Usage
Here is a simple example of how to use the OpenFMB Template Tools:
using OpenFMB.Templates.Tools.Configurations;
class Program
{
static void Main(string[] args)
{
var config = new Parameters
{
DevicePort = 20000,
DeviceMrids = new List<string>() { Guid.NewGuid().ToString().ToLower() }
};
// Pre-mapped template file
var f = "templates/template1.yaml";
var yaml = File.ReadAllText(f);
var tuple = ConfigGenerator.GenerateAdapterConfigurations(yaml, config);
}
}
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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Newtonsoft.Json (>= 13.0.3)
- OpenFMB.NET (>= 2.1.6)
- YamlDotNet (>= 12.0.2)
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 | 221 | 12/13/2023 |