mirror of
https://github.com/evopro-ag/Sharp7Reactive.git
synced 2025-12-13 02:32:51 +00:00
Compare commits
7 Commits
18659454f5
...
8836c14e2b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8836c14e2b | ||
|
|
e912d088eb | ||
|
|
2655d1ec41 | ||
|
|
f90ad5f9be | ||
|
|
636c56d252 | ||
|
|
f1734ebd73 | ||
|
|
0c1d5067c2 |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -26,8 +26,6 @@ jobs:
|
||||
run: nuget install NUnit.ConsoleRunner -Version 3.17.0 -DirectDownload -OutputDirectory .
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore /p:version=${{ env.version }}
|
||||
- name: Tests
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DeepEqual" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||
<PackageReference Include="NUnit" Version="4.0.1" />
|
||||
<PackageReference Include="DeepEqual" Version="5.1.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
||||
<PackageReference Include="NUnit" Version="4.1.0" />
|
||||
<PackageReference Include="Shouldly" Version="4.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Sharp7.Rx.Enums;
|
||||
|
||||
internal enum CpuType
|
||||
{
|
||||
S7_300,
|
||||
S7_400,
|
||||
S7_1200,
|
||||
S7_1500
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
#nullable enable
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Sharp7.Rx;
|
||||
|
||||
public static class S7ErrorCodes
|
||||
@@ -22,7 +20,7 @@ public static class S7ErrorCodes
|
||||
{0x900000, "This happens when the DB is not long enough."},
|
||||
{
|
||||
0x40000, """
|
||||
This error occurs when the DB is "optimized" or "PUT/GET communication" is not enabled.
|
||||
This can happen when the cpu MPI address or rack is wrong, the DB is "optimized", or "PUT/GET communication" is not enabled.
|
||||
See https://snap7.sourceforge.net/snap7_client.html#target_compatibility.
|
||||
"""
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
<AnalysisLevel>latest-Recommended</AnalysisLevel>
|
||||
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
|
||||
<Authors>evopro system engineering AG</Authors>
|
||||
<Company>evopro system engineering AG</Company>
|
||||
<Description>Reactive framework for Sharp7, the Ethernet S7 PLC communication suite. Handling RFC1006 connections to Siemens S7 300, 1200 and 1500.</Description>
|
||||
@@ -23,16 +25,17 @@
|
||||
CA1848: For improved performance, use the LoggerMessage delegates
|
||||
CA2254: The logging message template should not vary between calls
|
||||
CA1859: Change type of field 'xxx' from interface to type for performance reasons
|
||||
CS1591: Missing XML comment for publicly visible type or member
|
||||
-->
|
||||
<NoWarn>$(NoWarn);CA1848;CA2254;CA1859</NoWarn>
|
||||
<NoWarn>$(NoWarn);CA1848;CA2254;CA1859;CS1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" PrivateAssets="All" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||
<PackageReference Include="Sharp7" Version="1.1.84" />
|
||||
<PackageReference Include="System.Interactive" Version="6.0.1" />
|
||||
<PackageReference Include="System.Reactive" Version="6.0.0" />
|
||||
<PackageReference Include="System.Reactive" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -192,7 +192,7 @@ public class Sharp7Plc : IPlc
|
||||
}
|
||||
finally
|
||||
{
|
||||
ArrayPool<byte>.Shared.Return(buffer);
|
||||
arrayPool.Return(buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ internal class VariableNameParser : IVariableNameParser
|
||||
{
|
||||
if (defaultValue.HasValue)
|
||||
return defaultValue.Value;
|
||||
throw new InvalidS7AddressException($"Variable of type {type} must have a length set \"{input}\"", input);
|
||||
throw new InvalidS7AddressException($"Variable of type {type} must have a length set. Example \"db12.byte10.3\", found \"{input}\"", input);
|
||||
}
|
||||
|
||||
if (!ushort.TryParse(match.Groups["bitOrLength"].Value, out var result))
|
||||
@@ -132,7 +132,7 @@ internal class VariableNameParser : IVariableNameParser
|
||||
byte GetBit()
|
||||
{
|
||||
if (!match.Groups["bitOrLength"].Success)
|
||||
throw new InvalidS7AddressException($"Variable of type {type} must have a bit number set \"{input}\"", input);
|
||||
throw new InvalidS7AddressException($"Variable of type {type} must have a bit number set. Example \"db12.bit10.3\", found \"{input}\"", input);
|
||||
|
||||
if (!byte.TryParse(match.Groups["bitOrLength"].Value, out var result))
|
||||
throw new InvalidS7AddressException($"\"{match.Groups["bitOrLength"].Value}\" is an invalid bit number in \"{input}\"", input);
|
||||
|
||||
Reference in New Issue
Block a user