Skip to content

Commit fbdf0f9

Browse files
committed
项目改名 删除不必要的字段 将时间格式改歪数据格式。
1 parent 93a194d commit fbdf0f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+161
-162
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
/SQlLiteDatabase.db
99
/IoTSharp.Gateway.Modbus.csproj.user
1010
/.vs/ProjectEvaluation
11+
/.vs/IoTSharp.Gateways

Data/ApplicationDbContext.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
22
using Microsoft.EntityFrameworkCore;
33

4-
namespace IoTSharp.Gateway.Modbus.Data
4+
namespace IoTSharp.Gateways.Data
55
{
66
public class ApplicationDbContext : IdentityDbContext
77
{

Data/Enmus.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.ComponentModel;
44
using System.ComponentModel.DataAnnotations;
55

6-
namespace IoTSharp.Gateway.Modbus.Data
6+
namespace IoTSharp.Gateways.Data
77
{
88
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))]
99
[JsonConverter(typeof(StringEnumConverter))]

Data/Migrations/20220626135705_CreateIdentitySchema.Designer.cs

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Data/Migrations/20220626135705_CreateIdentitySchema.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#nullable disable
55

6-
namespace IoTSharp.Gateway.Modbus.Migrations
6+
namespace IoTSharp.Gateways.Migrations
77
{
88
public partial class CreateIdentitySchema : Migration
99
{

Data/Migrations/20220626162542_ModBusDataMapping.Designer.cs

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Data/Migrations/20220626162542_ModBusDataMapping.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#nullable disable
55

6-
namespace IoTSharp.Gateway.Modbus.Migrations
6+
namespace IoTSharp.Gateways.Migrations
77
{
88
public partial class ModBusDataMapping : Migration
99
{

Data/Migrations/20220723142653_modify2022.Designer.cs

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Data/Migrations/20220723142653_modify2022.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#nullable disable
44

5-
namespace IoTSharp.Gateway.Modbus.Migrations
5+
namespace IoTSharp.Gateways.Migrations
66
{
77
public partial class modify2022 : Migration
88
{

Data/Migrations/20220724053755_addtime_interval.Designer.cs

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Data/Migrations/20220724053755_addtime_interval.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#nullable disable
44

5-
namespace IoTSharp.Gateway.Modbus.Migrations
5+
namespace IoTSharp.Gateways.Migrations
66
{
77
public partial class addtime_interval : Migration
88
{

Data/Migrations/ApplicationDbContextModelSnapshot.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// <auto-generated />
22
using System;
3-
using IoTSharp.Gateway.Modbus.Data;
3+
using IoTSharp.Gateways.Data;
44
using Microsoft.EntityFrameworkCore;
55
using Microsoft.EntityFrameworkCore.Infrastructure;
66
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
77

88
#nullable disable
99

10-
namespace IoTSharp.Gateway.Modbus.Migrations
10+
namespace IoTSharp.Gateways.Migrations
1111
{
1212
[DbContext(typeof(ApplicationDbContext))]
1313
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
@@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
1717
#pragma warning disable 612, 618
1818
modelBuilder.HasAnnotation("ProductVersion", "6.0.7");
1919

20-
modelBuilder.Entity("IoTSharp.Gateway.Modbus.Data.ModbusSlave", b =>
20+
modelBuilder.Entity("IoTSharp.Gateways.Data.ModbusSlave", b =>
2121
{
2222
b.Property<Guid>("Id")
2323
.ValueGeneratedOnAdd()
@@ -45,7 +45,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
4545
b.ToTable("ModbusSlaves");
4646
});
4747

48-
modelBuilder.Entity("IoTSharp.Gateway.Modbus.Data.PointMapping", b =>
48+
modelBuilder.Entity("IoTSharp.Gateways.Data.PointMapping", b =>
4949
{
5050
b.Property<Guid>("Id")
5151
.ValueGeneratedOnAdd()
@@ -288,9 +288,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
288288
b.ToTable("AspNetUserTokens", (string)null);
289289
});
290290

291-
modelBuilder.Entity("IoTSharp.Gateway.Modbus.Data.PointMapping", b =>
291+
modelBuilder.Entity("IoTSharp.Gateways.Data.PointMapping", b =>
292292
{
293-
b.HasOne("IoTSharp.Gateway.Modbus.Data.ModbusSlave", "Owner")
293+
b.HasOne("IoTSharp.Gateways.Data.ModbusSlave", "Owner")
294294
.WithMany("PointMappings")
295295
.HasForeignKey("OwnerId");
296296

@@ -348,7 +348,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
348348
.IsRequired();
349349
});
350350

351-
modelBuilder.Entity("IoTSharp.Gateway.Modbus.Data.ModbusSlave", b =>
351+
modelBuilder.Entity("IoTSharp.Gateways.Data.ModbusSlave", b =>
352352
{
353353
b.Navigation("PointMappings");
354354
});

Data/ModbusSlave.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.ComponentModel;
22
using System.ComponentModel.DataAnnotations;
33

4-
namespace IoTSharp.Gateway.Modbus.Data
4+
namespace IoTSharp.Gateways.Data
55
{
66
public class ModbusSlave
77
{

Data/PointMapping.cs

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.ComponentModel;
22
using System.ComponentModel.DataAnnotations;
33

4-
namespace IoTSharp.Gateway.Modbus.Data
4+
namespace IoTSharp.Gateways.Data
55
{
66
public class PointMapping
77
{
@@ -48,22 +48,16 @@ public class PointMapping
4848
/// <summary>
4949
/// 默认不转换
5050
/// </summary>
51-
[DisplayName("时间格式")]
52-
public string? DateTimeFormat { get; set; }
51+
[DisplayName("数据格式")]
52+
public string? DataFormat { get; set; }
5353
/// <summary>
5454
/// 默认 65001 , 简体中文 936 繁体 950
5555
/// </summary>
5656
[DisplayName("字符串编码")]
5757
[DefaultValue(936)]
5858
public int CodePage { get; set; } = 936;
5959

60-
/// <summary>
61-
/// 每循环几次才采集此点位。 每个循环间隔由从机采集间隔由ModbusSlave的TimeInterval决定,
62-
/// 所以, 此点位采集间隔则为 Cycles*(TimeInterval+通讯延迟)
63-
/// </summary>
64-
[DisplayName("采集跃次")]
65-
[DefaultValue(1)]
66-
public int Cycles { get; set; } = 1;
60+
6761

6862
public ModbusSlave? Owner { get; set; }
6963

Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ EXPOSE 443
77

88
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
99
WORKDIR /src
10-
COPY ["IoTSharp.Gateway.Modbus.csproj", "."]
11-
RUN dotnet restore "./IoTSharp.Gateway.Modbus.csproj"
10+
COPY ["IoTSharp.Gateways.csproj", "."]
11+
RUN dotnet restore "./IoTSharp.Gateways.csproj"
1212
COPY . .
1313
WORKDIR "/src/."
14-
RUN dotnet build "IoTSharp.Gateway.Modbus.csproj" -c Release -o /app/build
14+
RUN dotnet build "IoTSharp.Gateways.csproj" -c Release -o /app/build
1515

1616
FROM build AS publish
17-
RUN dotnet publish "IoTSharp.Gateway.Modbus.csproj" -c Release -o /app/publish
17+
RUN dotnet publish "IoTSharp.Gateways.csproj" -c Release -o /app/publish
1818

1919
FROM base AS final
2020
WORKDIR /app
2121
COPY --from=publish /app/publish .
22-
ENTRYPOINT ["dotnet", "IoTSharp.Gateway.Modbus.dll"]
22+
ENTRYPOINT ["dotnet", "IoTSharp.Gateways.dll"]

IoTSharp.Gateway.Modbus.csproj renamed to IoTSharp.Gateways.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>net6.0</TargetFramework>
55
<Nullable>annotations</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7-
<UserSecretsId>aspnet-IoTSharp.Gateway.Modbus-554A6128-AB47-40BC-8BC3-40D3123C6BFF</UserSecretsId>
7+
<UserSecretsId>aspnet-IoTSharp.Gateways-554A6128-AB47-40BC-8BC3-40D3123C6BFF</UserSecretsId>
88
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
99
<DockerfileContext>.</DockerfileContext>
1010
<RestoreAdditionalProjectSources>

IoTSharp.Gateways.csproj.user

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ActiveDebugProfile>IoTSharp.Gateway.Modbus</ActiveDebugProfile>
5+
<_SelectedScaffolderID>ModelBasedCrudRazorPageScaffolder</_SelectedScaffolderID>
6+
<_SelectedScaffolderCategoryPath>root/Common</_SelectedScaffolderCategoryPath>
7+
<WebStackScaffolding_ViewDialogWidth>650.4</WebStackScaffolding_ViewDialogWidth>
8+
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
9+
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
10+
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
11+
<WebStackScaffolding_LayoutPageFile />
12+
<WebStackScaffolding_DbContextTypeFullName>IoTSharp.Gateway.Modbus.Data.ApplicationDbContext</WebStackScaffolding_DbContextTypeFullName>
13+
</PropertyGroup>
14+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
15+
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
16+
</PropertyGroup>
17+
</Project>

0 commit comments

Comments
 (0)