main/Smdn.Net.EchonetLite.RouteB.BP35XX-2.0.0-preview1
Created
April 7, 2024 03:59
-
-
Save smdn/b3fa67e8be69928c0be4ff7dab82e974 to your computer and use it in GitHub Desktop.
Smdn.Net.EchonetLite.RouteB.BP35XX 2.0.0-preview1 Release Notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/doc/api-list/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX-net6.0.apilist.cs b/doc/api-list/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX-net6.0.apilist.cs | |
new file mode 100644 | |
index 0000000..1957e48 | |
--- /dev/null | |
+++ b/doc/api-list/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX-net6.0.apilist.cs | |
@@ -0,0 +1,40 @@ | |
+// Smdn.Net.EchonetLite.RouteB.BP35XX.dll (Smdn.Net.EchonetLite.RouteB.BP35XX-2.0.0-preview1) | |
+// Name: Smdn.Net.EchonetLite.RouteB.BP35XX | |
+// AssemblyVersion: 2.0.0.0 | |
+// InformationalVersion: 2.0.0-preview1+7e4ec0f9f1fc7e96046c9643ab2a9a07aa113c90 | |
+// TargetFramework: .NETCoreApp,Version=v6.0 | |
+// Configuration: Release | |
+// Referenced assemblies: | |
+// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 | |
+// Smdn.Devices.BP35XX, Version=1.0.0.0, Culture=neutral | |
+// Smdn.Net.EchonetLite.RouteB, Version=2.0.0.0, Culture=neutral | |
+// Smdn.Net.EchonetLite.RouteB.SkStackIP, Version=2.0.0.0, Culture=neutral | |
+// Smdn.Net.SkStackIP, Version=1.0.0.0, Culture=neutral | |
+// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
+// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
+#nullable enable annotations | |
+ | |
+using System; | |
+using System.Threading; | |
+using System.Threading.Tasks; | |
+using Microsoft.Extensions.DependencyInjection; | |
+using Smdn.Devices.BP35XX; | |
+using Smdn.Net.EchonetLite.RouteB.Transport; | |
+using Smdn.Net.EchonetLite.RouteB.Transport.SkStackIP; | |
+using Smdn.Net.SkStackIP; | |
+ | |
+namespace Smdn.Net.EchonetLite.RouteB.Transport.BP35XX { | |
+ public sealed class BP35A1RouteBEchonetLiteHandlerFactory : SkStackRouteBEchonetLiteHandlerFactory { | |
+ public BP35A1RouteBEchonetLiteHandlerFactory(IServiceCollection services, Action<BP35A1Configurations> configure) {} | |
+ | |
+ protected override SkStackRouteBTransportProtocol TransportProtocol { get; } | |
+ | |
+ protected override async ValueTask<SkStackClient> CreateClientAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken) {} | |
+ } | |
+ | |
+ public static class IRouteBEchonetLiteHandlerBuilderExtensions { | |
+ public static ISkStackRouteBEchonetLiteHandlerFactory AddBP35A1(this IRouteBEchonetLiteHandlerBuilder builder, Action<BP35A1Configurations> configure) {} | |
+ } | |
+} | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.4.1.0. | |
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.1.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
diff --git a/doc/api-list/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX-net8.0.apilist.cs b/doc/api-list/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX-net8.0.apilist.cs | |
new file mode 100644 | |
index 0000000..17124ad | |
--- /dev/null | |
+++ b/doc/api-list/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX-net8.0.apilist.cs | |
@@ -0,0 +1,40 @@ | |
+// Smdn.Net.EchonetLite.RouteB.BP35XX.dll (Smdn.Net.EchonetLite.RouteB.BP35XX-2.0.0-preview1) | |
+// Name: Smdn.Net.EchonetLite.RouteB.BP35XX | |
+// AssemblyVersion: 2.0.0.0 | |
+// InformationalVersion: 2.0.0-preview1+7e4ec0f9f1fc7e96046c9643ab2a9a07aa113c90 | |
+// TargetFramework: .NETCoreApp,Version=v8.0 | |
+// Configuration: Release | |
+// Referenced assemblies: | |
+// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 | |
+// Smdn.Devices.BP35XX, Version=1.0.0.0, Culture=neutral | |
+// Smdn.Net.EchonetLite.RouteB, Version=2.0.0.0, Culture=neutral | |
+// Smdn.Net.EchonetLite.RouteB.SkStackIP, Version=2.0.0.0, Culture=neutral | |
+// Smdn.Net.SkStackIP, Version=1.0.0.0, Culture=neutral | |
+// System.ComponentModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
+// System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
+#nullable enable annotations | |
+ | |
+using System; | |
+using System.Threading; | |
+using System.Threading.Tasks; | |
+using Microsoft.Extensions.DependencyInjection; | |
+using Smdn.Devices.BP35XX; | |
+using Smdn.Net.EchonetLite.RouteB.Transport; | |
+using Smdn.Net.EchonetLite.RouteB.Transport.SkStackIP; | |
+using Smdn.Net.SkStackIP; | |
+ | |
+namespace Smdn.Net.EchonetLite.RouteB.Transport.BP35XX { | |
+ public sealed class BP35A1RouteBEchonetLiteHandlerFactory : SkStackRouteBEchonetLiteHandlerFactory { | |
+ public BP35A1RouteBEchonetLiteHandlerFactory(IServiceCollection services, Action<BP35A1Configurations> configure) {} | |
+ | |
+ protected override SkStackRouteBTransportProtocol TransportProtocol { get; } | |
+ | |
+ protected override async ValueTask<SkStackClient> CreateClientAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken) {} | |
+ } | |
+ | |
+ public static class IRouteBEchonetLiteHandlerBuilderExtensions { | |
+ public static ISkStackRouteBEchonetLiteHandlerFactory AddBP35A1(this IRouteBEchonetLiteHandlerBuilder builder, Action<BP35A1Configurations> configure) {} | |
+ } | |
+} | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.4.1.0. | |
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.1.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
diff --git a/doc/api-list/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX-netstandard2.1.apilist.cs b/doc/api-list/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX-netstandard2.1.apilist.cs | |
new file mode 100644 | |
index 0000000..d6a5ff0 | |
--- /dev/null | |
+++ b/doc/api-list/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX-netstandard2.1.apilist.cs | |
@@ -0,0 +1,39 @@ | |
+// Smdn.Net.EchonetLite.RouteB.BP35XX.dll (Smdn.Net.EchonetLite.RouteB.BP35XX-2.0.0-preview1) | |
+// Name: Smdn.Net.EchonetLite.RouteB.BP35XX | |
+// AssemblyVersion: 2.0.0.0 | |
+// InformationalVersion: 2.0.0-preview1+7e4ec0f9f1fc7e96046c9643ab2a9a07aa113c90 | |
+// TargetFramework: .NETStandard,Version=v2.1 | |
+// Configuration: Release | |
+// Referenced assemblies: | |
+// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 | |
+// Smdn.Devices.BP35XX, Version=1.0.0.0, Culture=neutral | |
+// Smdn.Net.EchonetLite.RouteB, Version=2.0.0.0, Culture=neutral | |
+// Smdn.Net.EchonetLite.RouteB.SkStackIP, Version=2.0.0.0, Culture=neutral | |
+// Smdn.Net.SkStackIP, Version=1.0.0.0, Culture=neutral | |
+// netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
+#nullable enable annotations | |
+ | |
+using System; | |
+using System.Threading; | |
+using System.Threading.Tasks; | |
+using Microsoft.Extensions.DependencyInjection; | |
+using Smdn.Devices.BP35XX; | |
+using Smdn.Net.EchonetLite.RouteB.Transport; | |
+using Smdn.Net.EchonetLite.RouteB.Transport.SkStackIP; | |
+using Smdn.Net.SkStackIP; | |
+ | |
+namespace Smdn.Net.EchonetLite.RouteB.Transport.BP35XX { | |
+ public sealed class BP35A1RouteBEchonetLiteHandlerFactory : SkStackRouteBEchonetLiteHandlerFactory { | |
+ public BP35A1RouteBEchonetLiteHandlerFactory(IServiceCollection services, Action<BP35A1Configurations> configure) {} | |
+ | |
+ protected override SkStackRouteBTransportProtocol TransportProtocol { get; } | |
+ | |
+ protected override async ValueTask<SkStackClient> CreateClientAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken) {} | |
+ } | |
+ | |
+ public static class IRouteBEchonetLiteHandlerBuilderExtensions { | |
+ public static ISkStackRouteBEchonetLiteHandlerFactory AddBP35A1(this IRouteBEchonetLiteHandlerBuilder builder, Action<BP35A1Configurations> configure) {} | |
+ } | |
+} | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.4.1.0. | |
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.1.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX.csproj b/src/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX.csproj | |
new file mode 100644 | |
index 0000000..c86ec8a | |
--- /dev/null | |
+++ b/src/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.BP35XX.csproj | |
@@ -0,0 +1,45 @@ | |
+<!-- | |
+SPDX-FileCopyrightText: 2024 smdn <smdn@smdn.jp> | |
+SPDX-License-Identifier: MIT | |
+--> | |
+<Project Sdk="Microsoft.NET.Sdk"> | |
+ <PropertyGroup> | |
+ <TargetFrameworks>netstandard2.1;net6.0;net8.0</TargetFrameworks> | |
+ <VersionPrefix>2.0.0</VersionPrefix> | |
+ <VersionSuffix>preview1</VersionSuffix> | |
+ <!-- <PackageValidationBaselineVersion>2.0.0</PackageValidationBaselineVersion> --> | |
+ <Nullable>enable</Nullable> | |
+ <RootNamespace/> <!-- empty the root namespace so that the namespace is determined only by the directory name, for code style rule IDE0030 --> | |
+ <NoWarn>CS1591;$(NoWarn)</NoWarn> <!-- CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' --> | |
+ </PropertyGroup> | |
+ | |
+ <PropertyGroup Label="metadata"> | |
+ <Description> | |
+<![CDATA[BP35A1など、Skyley Networksの[SKSTACK IP](https://www.skyley.com/wiki/?SKSTACK+IP+for+HAN)を搭載する[ROHM Wi-SUNモジュール](https://www.rohm.co.jp/products/wireless-communication/specified-low-power-radio-modules)を使用して、スマート電力量メータとの情報伝達手段である「Bルート」を介したECHONET Lite規格の通信を扱うためのAPIを提供します。 | |
+ECHONET Lite規格における下位通信層に相当する実装を作成するファクトリクラス`BP35A1RouteBEchonetLiteHandlerFactory`をはじめとするAPIを提供します。 | |
+]]> | |
+ </Description> | |
+ <CopyrightYear>2024</CopyrightYear> | |
+ </PropertyGroup> | |
+ | |
+ <PropertyGroup Label="package properties"> | |
+ <PackageTags>SKSTACK;SKSTACK-IP;Route-B;B-Route;Wi-SUN;BP35A1;ROHM-BP35A1;$(PackageTags)</PackageTags> | |
+ <GenerateNupkgReadmeFileDependsOnTargets>$(GenerateNupkgReadmeFileDependsOnTargets);GenerateReadmeFileContent</GenerateNupkgReadmeFileDependsOnTargets> | |
+ </PropertyGroup> | |
+ | |
+ <ItemGroup> | |
+ <PackageReference Include="Smdn.Devices.BP35XX" /> | |
+ <ProjectOrPackageReference Include="$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)..\Smdn.Net.EchonetLite.RouteB.SkStackIP\Smdn.Net.EchonetLite.RouteB.SkStackIP.csproj'))" /> | |
+ </ItemGroup> | |
+ | |
+ <Target Name="GenerateReadmeFileContent"> | |
+ <PropertyGroup> | |
+ <PackageReadmeFileContent><![CDATA[# $(PackageId) $(PackageVersion) | |
+$(Description) | |
+ | |
+## Contributing | |
+This project welcomes contributions, feedbacks and suggestions. You can contribute to this project by submitting [Issues]($(RepositoryUrl)/issues/new/choose) or [Pull Requests]($(RepositoryUrl)/pulls/) on the [GitHub repository]($(RepositoryUrl)). | |
+]]></PackageReadmeFileContent> | |
+ </PropertyGroup> | |
+ </Target> | |
+</Project> | |
diff --git a/src/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.Transport.BP35XX/BP35A1RouteBEchonetLiteHandlerFactory.cs b/src/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.Transport.BP35XX/BP35A1RouteBEchonetLiteHandlerFactory.cs | |
new file mode 100644 | |
index 0000000..8b0ab8d | |
--- /dev/null | |
+++ b/src/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.Transport.BP35XX/BP35A1RouteBEchonetLiteHandlerFactory.cs | |
@@ -0,0 +1,50 @@ | |
+// SPDX-FileCopyrightText: 2023 smdn <smdn@smdn.jp> | |
+// SPDX-License-Identifier: MIT | |
+using System; | |
+using System.Threading; | |
+using System.Threading.Tasks; | |
+ | |
+using Microsoft.Extensions.DependencyInjection; | |
+ | |
+using Smdn.Devices.BP35XX; | |
+using Smdn.Net.EchonetLite.RouteB.Transport.SkStackIP; | |
+using Smdn.Net.SkStackIP; | |
+ | |
+namespace Smdn.Net.EchonetLite.RouteB.Transport.BP35XX; | |
+ | |
+public sealed class BP35A1RouteBEchonetLiteHandlerFactory : SkStackRouteBEchonetLiteHandlerFactory { | |
+ private readonly Action<BP35A1Configurations> configure; | |
+ | |
+ /// <inheritdoc/> | |
+ protected override SkStackRouteBTransportProtocol TransportProtocol => SkStackRouteBTransportProtocol.Udp; | |
+ | |
+#pragma warning disable IDE0290 | |
+ public BP35A1RouteBEchonetLiteHandlerFactory( | |
+ IServiceCollection services, | |
+ Action<BP35A1Configurations> configure | |
+ ) | |
+ : base(services) | |
+ { | |
+ this.configure = configure ?? throw new ArgumentNullException(nameof(configure)); | |
+ } | |
+#pragma warning restore IDE0290 | |
+ | |
+ protected override async ValueTask<SkStackClient> CreateClientAsync( | |
+ IServiceProvider serviceProvider, | |
+ CancellationToken cancellationToken | |
+ ) | |
+ { | |
+ var configurations = new BP35A1Configurations(); | |
+ | |
+ configure(configurations); | |
+ | |
+ if (string.IsNullOrEmpty(configurations.SerialPortName)) | |
+ throw new InvalidOperationException($"{configurations.SerialPortName} is not valid"); | |
+ | |
+ return await BP35A1.CreateAsync( | |
+ configurations: configurations, | |
+ serviceProvider: serviceProvider, | |
+ cancellationToken: cancellationToken | |
+ ).ConfigureAwait(false); | |
+ } | |
+} | |
diff --git a/src/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.Transport.BP35XX/IRouteBEchonetLiteHandlerBuilderExtensions.cs b/src/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.Transport.BP35XX/IRouteBEchonetLiteHandlerBuilderExtensions.cs | |
new file mode 100644 | |
index 0000000..50c6834 | |
--- /dev/null | |
+++ b/src/Smdn.Net.EchonetLite.RouteB.BP35XX/Smdn.Net.EchonetLite.RouteB.Transport.BP35XX/IRouteBEchonetLiteHandlerBuilderExtensions.cs | |
@@ -0,0 +1,38 @@ | |
+// SPDX-FileCopyrightText: 2023 smdn <smdn@smdn.jp> | |
+// SPDX-License-Identifier: MIT | |
+using System; | |
+ | |
+using Microsoft.Extensions.DependencyInjection; | |
+using Microsoft.Extensions.DependencyInjection.Extensions; | |
+ | |
+using Smdn.Devices.BP35XX; | |
+using Smdn.Net.EchonetLite.RouteB.Transport.SkStackIP; | |
+ | |
+namespace Smdn.Net.EchonetLite.RouteB.Transport.BP35XX; | |
+ | |
+public static class IRouteBEchonetLiteHandlerBuilderExtensions { | |
+ public static ISkStackRouteBEchonetLiteHandlerFactory AddBP35A1( | |
+ this IRouteBEchonetLiteHandlerBuilder builder, | |
+ Action<BP35A1Configurations> configure | |
+ ) | |
+ { | |
+#pragma warning disable CA1510 | |
+ if (builder is null) | |
+ throw new ArgumentNullException(nameof(builder)); | |
+ if (configure is null) | |
+ throw new ArgumentNullException(nameof(configure)); | |
+#pragma warning restore CA1510 | |
+ | |
+ // TODO: support for IConfigureOptions<TOptions> of Microsoft.Extensions.Options | |
+ var factory = new BP35A1RouteBEchonetLiteHandlerFactory(builder.Services, configure); | |
+ | |
+ builder.Services.TryAdd( | |
+ ServiceDescriptor.Singleton( | |
+ typeof(IRouteBEchonetLiteHandlerFactory), | |
+ factory | |
+ ) | |
+ ); | |
+ | |
+ return factory; | |
+ } | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment