├── images
├── log.jpg
├── 二维码.jpg
├── device.jpg
├── shebei.jpg
├── shouye.jpg
├── weixi.jpg
├── 1648884682.jpg
├── 1648891279.jpg
├── 1648891309.jpg
├── 1648891338.jpg
├── 1648891377.jpg
├── 1648891419.jpg
├── 1648894225.jpg
├── deviceParm.jpg
├── diagnostics.png
└── datalocation.jpg
└── src
├── IOTCS.EdgeGateway.Infrastructure
├── WebApi
│ ├── Views
│ │ ├── Home
│ │ │ └── Index.cshtml
│ │ ├── _ViewStart.cshtml
│ │ └── _Layout.cshtml
│ ├── Settings
│ │ ├── AccessToken.cs
│ │ ├── Token.cs
│ │ ├── Settings.cs
│ │ ├── CustomException.cs
│ │ └── OpenApiData.cs
│ ├── Filter
│ │ ├── HttpGlobalExceptionFilter.cs
│ │ └── ManageVerifyAttribute.cs
│ ├── Controller
│ │ ├── SystemController.cs
│ │ ├── LoginController.cs
│ │ └── DeviceConfigController.cs
│ └── ApplicationMvcModule.cs
├── Socket
│ ├── Model
│ │ ├── NullClientToServerProtocol.cs
│ │ ├── WebSocketClientToServerProtocol.cs
│ │ └── WebSocketProtocol.cs
│ ├── WebSocketServerOptions.cs
│ └── AppWebSocketModule.cs
├── Server
│ ├── ServerPortDetecter.cs
│ ├── ApplicationStartModule.cs
│ ├── ApplicationStartBase.cs
│ └── ApplicationWithServiceProvider.cs
├── Serialize
│ └── AppJsonModule.cs
├── Extensions
│ └── SwaggerExtension.cs
└── IOTCS.EdgeGateway.Infrastructure.csproj
├── IOTCS.EdgeGateway.Server
├── iotcs.db
├── Database
│ └── iotcs.db
├── IOTCS.EdgeGateway.Server.csproj
├── Program.cs
└── appSettings.json
├── IOTCS.EdgeGateway.ComResDriver
├── IHttpDriver.cs
├── IMqttDriver.cs
├── IOTCS.EdgeGateway.ComResDriver.csproj
└── IResourceDriver.cs
├── IOTCS.EdgeGateway.Freesql.Helper
├── Application
│ ├── IService.cs
│ ├── ServiceBase.cs
│ └── ServiceBaseAbstract.cs
├── Domain
│ ├── UnitOfWorkManager.cs
│ ├── IRepositoryBase.cs
│ └── RepositoryBase.cs
└── IOTCS.EdgeGateway.Freesql.Helper.csproj
├── IOTCS.EdgeGateway.Plugins
├── Monitor
│ ├── IMonitorTask.cs
│ └── Model
│ │ ├── OpcConnectionStatusDto.cs
│ │ ├── WebSocketProtocol.cs
│ │ └── SystemInfoDto.cs
├── ModbusDriver
│ ├── IModbusRTUDriver.cs
│ ├── IModbusRTUOverTcpDriver.cs
│ └── IModbusTcpDriver.cs
├── OpcUADriver
│ └── IOpcUADriver.cs
├── BACNetDriver
│ └── IBACNetDriver.cs
├── SiemensDriver
│ ├── ISiemensS71200NetDriver.cs
│ └── ISiemensS71500NetDriver.cs
├── Executor
│ ├── ICollector.cs
│ └── ResourceComparer .cs
├── DataInitialize
│ └── IInitializeConfiguration.cs
├── IOTCS.EdgeGateway.Plugins.csproj
└── AppPluginModule.cs
├── IOTCS.EdgeGateway.Freesql
├── IOuterDBSessionContext.cs
├── ICommonDbSessionContext.cs
├── IdleBus
│ └── DbBus.cs
├── IDBSessionContext.cs
├── Extensions
│ ├── OuterDbContextOptions.cs
│ ├── DbContextOptions.cs
│ ├── CommonDbContextServiceCollectionExtensions.cs
│ ├── OuterDbContextServiceCollectionExtensions.cs
│ └── DbContextServiceCollectionExtensions.cs
├── DbContext
│ └── AppFreeSqlDbContextModule.cs
└── IOTCS.EdgeGateway.Freesql.csproj
├── IOTCS.EdgeGateway.BaseDriver
├── IOTCS.EdgeGateway.BaseDriver.csproj
└── IDriver.cs
├── IOTCS.EdgeGateway.BaseProcPipeline
├── IPipelineContext.cs
├── IOTCS.EdgeGateway.BaseProcPipeline.csproj
└── RouterMessage.cs
├── IOTCS.EdgeGateway.Reflection
├── IOTCS.EdgeGateway.Reflection.csproj
└── StructTuple.cs
├── IOTCS.EdgeGateway.Core
├── IocManager.cs
├── Collections
│ ├── IConcurrentList.cs
│ ├── ITypeList.cs
│ ├── IKeyValueCache.cs
│ ├── ConcurrentHashSet.cs
│ ├── SystemKeyValue.cs
│ └── Pair.cs
├── Extensions
│ ├── DecimalExtensions.cs
│ ├── ByteArrayExtensions.cs
│ ├── DateTimeExtensions.cs
│ └── CollectionExtensions.cs
├── IOTCS.EdgeGateway.Core.csproj
└── Security
│ ├── MD5Helper.cs
│ └── RC4.cs
├── IOTCS.EdgeGateway.Application
├── IOpcStorageService.cs
├── IDBDataStorageService.cs
├── IFreeSqlMgrService.cs
├── IAuthorizationService.cs
├── IUserService.cs
├── IDriveService.cs
├── IResourceService.cs
├── IDataLocationService.cs
├── IDeviceConfigService.cs
├── IRelationshipService.cs
├── IDeviceService.cs
├── Imps
│ ├── OpcStorageService.cs
│ ├── FreeSqlMgrService.cs
│ ├── DriveService.cs
│ └── RelationshipService.cs
├── IOTCS.EdgeGateway.Application.csproj
├── Utils
│ └── TimestampHelper.cs
└── AppServicesModule.cs
├── IOTCS.EdgeGateway.Commands
├── OpcUaCommand.cs
├── OpcUaNotification.cs
├── IOTCS.EdgeGateway.Commands.csproj
└── UINotification.cs
├── IOTCS.EdgeGateway.Diagnostics
├── ISystemDiagnostics.cs
├── IUINotification.cs
├── Notification
│ └── SystemNotification.cs
├── DiagnosticsContext
│ └── AppDiagnosticsContextModule.cs
├── IOTCS.EdgeGateway.Diagnostics.csproj
├── UINotification.cs
└── SystemDiagnostics.cs
├── IOTCS.EdgeGateway.Domain
├── ValueObject
│ ├── PublishStatusDto.cs
│ ├── TokenObject.cs
│ ├── SystemManagerDto.cs
│ ├── InitailizeDatabaseDto.cs
│ ├── Notification
│ │ ├── MonitorVariableValueDto.cs
│ │ ├── NotifyChangeDto.cs
│ │ ├── NotifyBase.cs
│ │ └── NotifyChangeVariableDto.cs
│ ├── SendMessageDto.cs
│ ├── DataRequestDto.cs
│ ├── JwtSettingsDto.cs
│ ├── DataNodeDto.cs
│ ├── LoginDto.cs
│ ├── RelationshipDto.cs
│ ├── Device
│ │ ├── DriveDto.cs
│ │ ├── DeviceConfigDto.cs
│ │ └── DeviceDto.cs
│ ├── OpcConfigDto.cs
│ ├── UserDto.cs
│ ├── DataResponseDto.cs
│ ├── ResourceDto.cs
│ └── DataLocationDto.cs
├── DomainService
│ ├── IDeviceDomainService.cs
│ ├── IRelationshipDomainService.cs
│ └── Impl
│ │ ├── RelationshipDomainService.cs
│ │ └── DeviceDomainService.cs
├── Repositories
│ ├── IFreeSqlMgrRepository.cs
│ ├── IOpcStorageRepository.cs
│ ├── IUserRepository.cs
│ ├── IDataLocationRepository.cs
│ ├── IDeviceConfigRepository.cs
│ ├── IResourceRepository.cs
│ ├── IDriveRepository.cs
│ ├── IRelationshipRepository.cs
│ └── IDeviceRepository.cs
├── Models
│ ├── InitailizeDatabaseModel.cs
│ ├── NodeTypeConfigModel.cs
│ ├── RelationshipModel.cs
│ ├── DriveModel.cs
│ ├── DeviceConfigModel.cs
│ ├── UserModel.cs
│ ├── ResourceModel.cs
│ ├── DataLocationModel.cs
│ ├── DeviceModel.cs
│ └── RuleModel.cs
└── IOTCS.EdgeGateway.Domain.csproj
├── IOTCS.EdgeGateway.Dispatch
├── IDispatchManager.cs
├── AppDispatchModule.cs
├── IOTCS.EdgeGateway.Dispatch.csproj
└── DispatchManager.cs
├── IOTCS.EdgeGateway.Library
├── IOTCS.EdgeGateway.Library.csproj
└── OpcUaStatusEventArgs.cs
├── IOTCS.EdgeGateway.MqttHandler
├── IMqttSessionContext.cs
├── IOTCS.EdgeGateway.MqttHandler.csproj
├── AppMqttHandlerModule.cs
├── Extensions
│ └── MqttContextOptions.cs
└── MqttSessionContext.cs
├── IOTCS.EdgeGateway.WsHandler
├── IOTCS.EdgeGateway.WsHandler.csproj
└── WsMessageHandler.cs
├── IOTCS.EdgeGateway.HttpHandler
├── IOTCS.EdgeGateway.HttpHandler.csproj
└── AppHttpHandlerModule.cs
├── IOTCS.EdgeGateway.WebSocketManager
├── IOTCS.EdgeGateway.WebSocketManager.csproj
├── Networking
│ ├── Message.cs
│ ├── RemoteException.cs
│ ├── InvocationResult.cs
│ └── InvocationDescriptor.cs
├── Json
│ ├── JsonBinderWithoutAssembly.cs
│ └── PrimitiveJsonConverter.cs
├── Strategies
│ └── MethodInvocationStrategy.cs
└── WebSocketManagerExtensions.cs
├── IOTCS.EdgeGateway.Logging
├── Logging
│ ├── ILoggerProvider.cs
│ ├── LoggerFactoryExtensions.cs
│ ├── ILoggerFactory.cs
│ ├── ILogger.cs
│ ├── Internal
│ │ ├── NullLoggerProvider.cs
│ │ └── NullLogger.cs
│ └── LogLevel.cs
├── NullLogger.cs
├── IOTCS.EdgeGateway.Logging.csproj
├── Log4Net
│ ├── Internal
│ │ └── InternalConst.cs
│ └── Log4NetLoggerProvider.cs
├── Console
│ ├── Console
│ │ ├── Internal
│ │ │ ├── LogMessage.cs
│ │ │ └── WindowsLogConsole.cs
│ │ ├── IConsole.cs
│ │ └── ConsoleLoggerProvider.cs
│ └── ConsoleLoggerFactoryExtensions.cs
├── Log4NetLoggerFactoryExtensions.cs
└── LoggingServiceCollectionExtensions.cs
├── IOTCS.EdgeGateway.CmdHandler
├── OpcHandlerModule.cs
├── Models
│ └── WebSocketProtocol.cs
├── IOTCS.EdgeGateway.CmdHandler.csproj
├── SystemNotificationHandler.cs
└── OpcUaNotificationHandler.cs
├── IOTCS.EdgeGateway.Repository
├── IOTCS.EdgeGateway.Repository.csproj
├── QuickCollect.SCADA.Server.Repository.csproj
├── RepositoryModule.cs
├── FreeSqlMgrRepository.cs
├── OpcStorageRepository.cs
└── DeviceConfigRepository.cs
├── IOTCS.EdgeGateway.ProcPipeline
├── AppPipelineModule.cs
└── IOTCS.EdgeGateway.ProcPipeline.csproj
└── IOTCS.EdgeGateway.ResDriver
└── IOTCS.EdgeGateway.ResDriver.csproj
/images/log.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/log.jpg
--------------------------------------------------------------------------------
/images/二维码.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/二维码.jpg
--------------------------------------------------------------------------------
/images/device.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/device.jpg
--------------------------------------------------------------------------------
/images/shebei.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/shebei.jpg
--------------------------------------------------------------------------------
/images/shouye.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/shouye.jpg
--------------------------------------------------------------------------------
/images/weixi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/weixi.jpg
--------------------------------------------------------------------------------
/images/1648884682.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/1648884682.jpg
--------------------------------------------------------------------------------
/images/1648891279.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/1648891279.jpg
--------------------------------------------------------------------------------
/images/1648891309.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/1648891309.jpg
--------------------------------------------------------------------------------
/images/1648891338.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/1648891338.jpg
--------------------------------------------------------------------------------
/images/1648891377.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/1648891377.jpg
--------------------------------------------------------------------------------
/images/1648891419.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/1648891419.jpg
--------------------------------------------------------------------------------
/images/1648894225.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/1648894225.jpg
--------------------------------------------------------------------------------
/images/deviceParm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/deviceParm.jpg
--------------------------------------------------------------------------------
/images/diagnostics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/diagnostics.png
--------------------------------------------------------------------------------
/images/datalocation.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/images/datalocation.jpg
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/WebApi/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | }
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/WebApi/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/_Layout.cshtml";
3 | }
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Server/iotcs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/src/IOTCS.EdgeGateway.Server/iotcs.db
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Server/Database/iotcs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IOT-CS/IOTCS/HEAD/src/IOTCS.EdgeGateway.Server/Database/iotcs.db
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.ComResDriver/IHttpDriver.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.ComResDriver
2 | {
3 | public interface IHttpDriver : IResourceDriver
4 | {
5 |
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.ComResDriver/IMqttDriver.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.ComResDriver
2 | {
3 | public interface IMqttDriver : IResourceDriver
4 | {
5 |
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Freesql.Helper/Application/IService.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.Freesql.Helper.Application
2 | {
3 | public interface IService
4 | {
5 |
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Freesql.Helper/Domain/UnitOfWorkManager.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.Freesql.Helper
2 | {
3 | public class UnitOfWorkManager
4 | {
5 |
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/Monitor/IMonitorTask.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.Plugins.Monitor
2 | {
3 | public interface IMonitorTask
4 | {
5 | bool Executing();
6 | }
7 | }
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Freesql/IOuterDBSessionContext.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace IOTCS.EdgeGateway.Freesql
3 | {
4 | public interface IOuterDBSessionContext
5 | {
6 | IFreeSql CreateDbContext();
7 | }
8 | }
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/Socket/Model/NullClientToServerProtocol.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.Infrastructure.Socket
2 | {
3 | public class NullClientToServerProtocol
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/WebApi/Views/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | @RenderBody()
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.BaseDriver/IOTCS.EdgeGateway.BaseDriver.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.BaseProcPipeline/IPipelineContext.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.BaseProcPipeline
2 | {
3 | public interface IPipelineContext
4 | {
5 | void SendPayload(RouterMessage router);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/WebApi/Settings/AccessToken.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.Infrastructure.WebApi
2 | {
3 | public class AccessToken
4 | {
5 | public string Token { get; set; }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Reflection/IOTCS.EdgeGateway.Reflection.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.ComResDriver/IOTCS.EdgeGateway.ComResDriver.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/ModbusDriver/IModbusRTUDriver.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.BaseDriver;
2 |
3 | namespace IOTCS.EdgeGateway.Plugins.ModbusDriver
4 | {
5 | public interface IModbusRTUDriver : IDriver
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/OpcUADriver/IOpcUADriver.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.BaseDriver;
2 |
3 | namespace IOTCS.EdgeGateway.Plugins.OpcUADriver
4 | {
5 | public interface IOpcUADriver : IDriver
6 | {
7 |
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/BACNetDriver/IBACNetDriver.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.BaseDriver;
2 |
3 | namespace IOTCS.EdgeGateway.Plugins.BACNetDriver
4 | {
5 | public interface IBACNetDriver : IDriver
6 | {
7 |
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/ModbusDriver/IModbusRTUOverTcpDriver.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.BaseDriver;
2 |
3 | namespace IOTCS.EdgeGateway.Plugins.ModbusDriver
4 | {
5 | public interface IModbusRTUOverTcpDriver : IDriver
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/ModbusDriver/IModbusTcpDriver.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.BaseDriver;
2 |
3 | namespace IOTCS.EdgeGateway.Plugins.ModbusDriver
4 | {
5 | public interface IModbusTcpDriver : IDriver
6 | {
7 |
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Freesql/ICommonDbSessionContext.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 | namespace IOTCS.EdgeGateway.Freesql
4 | {
5 | public interface ICommonDbSessionContext
6 | {
7 | IFreeSql CreateDbContext(dynamic options, string type);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/SiemensDriver/ISiemensS71200NetDriver.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.BaseDriver;
2 |
3 | namespace IOTCS.EdgeGateway.Plugins.SiemensDriver
4 | {
5 | public interface ISiemensS71200NetDriver : IDriver
6 | {
7 |
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/SiemensDriver/ISiemensS71500NetDriver.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.BaseDriver;
2 |
3 | namespace IOTCS.EdgeGateway.Plugins.SiemensDriver
4 | {
5 | public interface ISiemensS71500NetDriver : IDriver
6 | {
7 |
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Core/IocManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net.WebSockets;
3 |
4 | namespace IOTCS.EdgeGateway.Core
5 | {
6 | public class IocManager
7 | {
8 | public static IServiceProvider Instance { get; set; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Freesql/IdleBus/DbBus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace IOTCS.EdgeGateway.Freesql.IdleBus
4 | {
5 | public class DbBus : IdleBus
6 | {
7 | public DbBus() : base(TimeSpan.FromMinutes(30)) { }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Application/IOpcStorageService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace IOTCS.EdgeGateway.Application
4 | {
5 | public interface IOpcStorageService
6 | {
7 | Task Insert(string resourceId, string sql);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/WebApi/Settings/Token.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.Infrastructure.WebApi
2 | {
3 | public class Token
4 | {
5 | public string Name { get; set; }
6 | public string Id { get; set; }
7 |
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/Server/ServerPortDetecter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Infrastructure.Server
6 | {
7 | public class ServerPortDetecter
8 | {
9 |
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/Executor/ICollector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Plugins.Executor
6 | {
7 | public interface ICollector
8 | {
9 | void Run();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Freesql/IDBSessionContext.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace IOTCS.EdgeGateway.Freesql
3 | {
4 | ///
5 | /// 数据连接的Session接口
6 | ///
7 | public interface IDBSessionContext
8 | {
9 | IFreeSql CreateDbContext();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.BaseDriver/IDriver.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.BaseDriver
2 | {
3 | public interface IDriver
4 | {
5 | bool Connect(string deviceID);
6 |
7 | string Run(string deviceID, string groupID);
8 |
9 | bool IsAviable();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/Socket/WebSocketServerOptions.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.Infrastructure.Socket
2 | {
3 | public class WebSocketServerOptions
4 | {
5 | public string IpAddress { get; set; } = "*";
6 |
7 | public int Port { get; set; } = 6003;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Commands/OpcUaCommand.cs:
--------------------------------------------------------------------------------
1 | using MediatR;
2 |
3 | namespace IOTCS.EdgeGateway.Commands
4 | {
5 | public class OpcUaCommand : INotification
6 | {
7 | ///
8 | /// 主体数据
9 | ///
10 | public string Message { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Diagnostics/ISystemDiagnostics.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace IOTCS.EdgeGateway.Diagnostics
4 | {
5 | public interface ISystemDiagnostics
6 | {
7 | void Publish(string message);
8 |
9 | void PublishDiagnosticsInfo(string message);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/PublishStatusDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class PublishStatusDto
8 | {
9 | public bool IsPublish { get; set; } = false;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/DataInitialize/IInitializeConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Plugins.DataInitialize
6 | {
7 | public interface IInitializeConfiguration
8 | {
9 | void Executing();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Commands/OpcUaNotification.cs:
--------------------------------------------------------------------------------
1 | using MediatR;
2 |
3 | namespace IOTCS.EdgeGateway.Commands
4 | {
5 | public class OpcUaNotification : INotification
6 | {
7 | ///
8 | /// 主体数据
9 | ///
10 | public string Message { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Diagnostics/IUINotification.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Diagnostics
6 | {
7 | public interface IUINotification
8 | {
9 | void Publish(string message, string deviceID, string groupID);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Dispatch/IDispatchManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Threading.Tasks;
5 |
6 | namespace IOTCS.EdgeGateway.Dispatch
7 | {
8 | public interface IDispatchManager
9 | {
10 | Task RunTaskAsync(dynamic data);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Commands/IOTCS.EdgeGateway.Commands.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/TokenObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class TokenObject
8 | {
9 | public string Name { get; set; }
10 | public string Id { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.BaseProcPipeline/IOTCS.EdgeGateway.BaseProcPipeline.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/Server/ApplicationStartModule.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Infrastructure.WebApi;
2 | using Volo.Abp.Modularity;
3 |
4 | namespace IOTCS.EdgeGateway.Infrastructure.Server
5 | {
6 | [DependsOn(typeof(ApplicationMvcModule))]
7 | public class ApplicationStartModule : AbpModule
8 | {
9 |
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Library/IOTCS.EdgeGateway.Library.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.BaseProcPipeline/RouterMessage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.BaseProcPipeline
6 | {
7 | public class RouterMessage
8 | {
9 | public string Message { get; set; }
10 |
11 | public string OriginMessage { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.MqttHandler/IMqttSessionContext.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.MqttHandler.Extensions;
2 | using MQTTnet.Client;
3 | using System.Threading.Tasks;
4 |
5 | namespace IOTCS.EdgeGateway.MqttHandler
6 | {
7 | public interface IMqttSessionContext
8 | {
9 | Task CreateMqttContextAsync(MqttContextOptions options);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Freesql.Helper/Application/ServiceBase.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 |
4 | namespace IOTCS.EdgeGateway.Freesql.Helper.Application
5 | {
6 | public abstract class ServiceBase
7 | {
8 | protected ServiceBase(IServiceProvider services)
9 | {
10 |
11 | }
12 |
13 | public IServiceProvider Services { get; protected set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Application/IDBDataStorageService.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Domain.ValueObject;
2 | using System.Threading.Tasks;
3 |
4 | namespace IOTCS.EdgeGateway.Application
5 | {
6 | public interface IDBDataStorageService
7 | {
8 | Task Insert(DataRequestDto request);
9 |
10 | Task BatchInsert(DataRequestDto request);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/SystemManagerDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class SystemManagerDto
8 | {
9 | public bool IsPublishing { get; set; } = false;
10 |
11 | public bool Reboot { get; set; } = false;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.WsHandler/IOTCS.EdgeGateway.WsHandler.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/Server/ApplicationStartBase.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 |
3 | namespace IOTCS.EdgeGateway.Infrastructure.Server
4 | {
5 | public class ApplicationStartBase : ApplicationIntegrated
6 | {
7 | public ApplicationStartBase(IServiceCollection services) : base(services)
8 | { }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Application/IFreeSqlMgrService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using System.Collections.Generic;
4 | using IOTCS.EdgeGateway.Domain.ValueObject;
5 |
6 | namespace IOTCS.EdgeGateway.Application
7 | {
8 | public interface IFreeSqlMgrService
9 | {
10 | InitailizeDatabaseDto CreateDbConnections(IEnumerable resources);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Freesql.Helper/IOTCS.EdgeGateway.Freesql.Helper.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.MqttHandler/IOTCS.EdgeGateway.MqttHandler.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Diagnostics/Notification/SystemNotification.cs:
--------------------------------------------------------------------------------
1 | using MediatR;
2 |
3 | namespace IOTCS.EdgeGateway.Diagnostics.Notification
4 | {
5 | ///
6 | /// 系统通知相关的信息
7 | ///
8 | public class SystemNotification : INotification
9 | {
10 | public dynamic Message { get; set; }
11 |
12 | public string MsgType { get; set; } = "";
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.HttpHandler/IOTCS.EdgeGateway.HttpHandler.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/DomainService/IDeviceDomainService.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Domain.ValueObject;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace IOTCS.EdgeGateway.Domain.DomainService
8 | {
9 | public interface IDeviceDomainService
10 | {
11 | Task> GetAllDevice ();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/Repositories/IFreeSqlMgrRepository.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Domain.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace IOTCS.EdgeGateway.Domain.Repositories
7 | {
8 | public interface IFreeSqlMgrRepository
9 | {
10 | InitailizeDatabaseModel CreateDbConnections(IEnumerable resources);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/Repositories/IOpcStorageRepository.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 |
4 | namespace IOTCS.EdgeGateway.Domain.Repositories
5 | {
6 | public interface IOpcStorageRepository
7 | {
8 | Task Insert(string resourceId, string sql);
9 |
10 | Task BatchInsert(string resourceId, IEnumerable sqlList);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/WebApi/Settings/Settings.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.Infrastructure.WebApi
2 | {
3 | public class Settings
4 | {
5 | public string SecurityKey { get; set; }
6 | public string Issuer { get; set; }
7 | public string Audience { get; set; }
8 | public int LifeTime { get; set; }
9 | public bool ValidateLifetime { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.WebSocketManager/IOTCS.EdgeGateway.WebSocketManager.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netcoreapp3.1
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/InitailizeDatabaseDto.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Freesql.IdleBus;
2 | using System;
3 | using System.Collections.Concurrent;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class InitailizeDatabaseDto
8 | {
9 | public DbBus DBBus { get; set; }
10 |
11 | public ConcurrentDictionary TDengine { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Commands/UINotification.cs:
--------------------------------------------------------------------------------
1 | using MediatR;
2 |
3 | namespace IOTCS.EdgeGateway.Commands
4 | {
5 | public class UINotification : INotification
6 | {
7 | public string DeviceID { get; set; }
8 |
9 | public string GroupID { get; set; }
10 |
11 | ///
12 | /// 主体数据
13 | ///
14 | public string UIMessage { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/DomainService/IRelationshipDomainService.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Domain.ValueObject;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace IOTCS.EdgeGateway.Domain.DomainService
8 | {
9 | public interface IRelationshipDomainService
10 | {
11 | Task> GetRelationship();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.HttpHandler/AppHttpHandlerModule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using Volo.Abp.Modularity;
5 |
6 | namespace IOTCS.EdgeGateway.HttpHandler
7 | {
8 | public class AppHttpHandlerModule : AbpModule
9 | {
10 | public override void ConfigureServices(ServiceConfigurationContext context)
11 | {
12 |
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Application/IAuthorizationService.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Domain.ValueObject;
2 | using Newtonsoft.Json.Linq;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace IOTCS.EdgeGateway.Application
8 | {
9 | public interface IAuthorizationService
10 | {
11 | UserDto GenerateToken(string name, string password);
12 |
13 | bool ValidateToken(JToken token);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/Models/InitailizeDatabaseModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Collections.Concurrent;
4 | using IOTCS.EdgeGateway.Freesql.IdleBus;
5 |
6 | namespace IOTCS.EdgeGateway.Domain.Models
7 | {
8 | public class InitailizeDatabaseModel
9 | {
10 | public DbBus DBBus { get; set; }
11 |
12 | public ConcurrentDictionary TDengine { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Logging/Logging/ILoggerProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace IOTCS.EdgeGateway.Logging
4 | {
5 | ///
6 | /// 日志提供程序
7 | ///
8 | public interface ILoggerProvider : IDisposable
9 | {
10 | ///
11 | /// 创建一个新的实例
12 | ///
13 | /// 日志名称
14 | ILogger CreateLogger(string name);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.CmdHandler/OpcHandlerModule.cs:
--------------------------------------------------------------------------------
1 | using MediatR;
2 | using Volo.Abp.Modularity;
3 |
4 | namespace IOTCS.EdgeGateway.CmdHandler
5 | {
6 | public class OpcHandlerModule : AbpModule
7 | {
8 | public override void PreConfigureServices(ServiceConfigurationContext context)
9 | {
10 | context.Services.AddMediatR(new[] { typeof(UINotificationHandler), typeof(SystemNotificationHandler) });
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Core/Collections/IConcurrentList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace IOTCS.EdgeGateway.Core.Collections
7 | {
8 | public interface IConcurrentList : IList, ICollection, IEnumerable
9 | {
10 | int BinSearch(T value);
11 |
12 | T Find(Predicate match);
13 |
14 | bool Exists(Predicate match);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.MqttHandler/AppMqttHandlerModule.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 | using Volo.Abp.Modularity;
3 |
4 | namespace IOTCS.EdgeGateway.MqttHandler
5 | {
6 | public class AppMqttHandlerModule : AbpModule
7 | {
8 | public override void ConfigureServices(ServiceConfigurationContext context)
9 | {
10 | context.Services.Add(ServiceDescriptor.Singleton());
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.WebSocketManager/Networking/Message.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.WebSocketManager.Common
2 | {
3 | public enum MessageType
4 | {
5 | Text,
6 | MethodInvocation,
7 | ConnectionEvent,
8 | MethodReturnValue
9 | }
10 |
11 | public class Message
12 | {
13 | public MessageType MessageType { get; set; }
14 |
15 | public string RequestType { get; set; } = "No";
16 |
17 | public dynamic Data { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/Models/NodeTypeConfigModel.cs:
--------------------------------------------------------------------------------
1 | using FreeSql.DataAnnotations;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace IOTCS.EdgeGateway.Domain.Models
7 | {
8 | [Table(Name = "tb_nodetypeconfig")]
9 | public class NodeTypeConfigModel
10 | {
11 | public string Id { get; set; }
12 |
13 | public string DriveType { get; set; }
14 |
15 | public string NodeTypeJson { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.WsHandler/WsMessageHandler.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.WebSocketManager;
2 | using IOTCS.EdgeGateway.WebSocketManager.Common;
3 |
4 | namespace IOTCS.EdgeGateway.WsHandler
5 | {
6 | public class WsMessageHandler : WebSocketHandler
7 | {
8 | public WsMessageHandler(WebSocketConnectionManager webSocketConnectionManager)
9 | : base(webSocketConnectionManager, new StringMethodInvocationStrategy())
10 | {
11 |
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/Notification/MonitorVariableValueDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject.Notification
6 | {
7 | public class MonitorVariableValueDto
8 | {
9 | public string Id { get; set; }
10 |
11 | public string Source { get; set; }
12 |
13 | public string Sink { get; set; }
14 |
15 | public string Status { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/SendMessageDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class SendMessageDto
8 | {
9 | public PayloadMessage Payload { get; set; }
10 | }
11 |
12 | public class PayloadMessage
13 | {
14 | public string ClientID { get; set; } = "OPC UA";
15 |
16 | public List Values { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/DataRequestDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class DataRequestDto
8 | {
9 | ///
10 | /// 数据资源ID号
11 | ///
12 | public string ResourceId { get; set; }
13 |
14 | public string InputMessage { get; set; }
15 |
16 | public string SqlTemplate { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/JwtSettingsDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class JwtSettingsDto
8 | {
9 | public string SecurityKey { get; set; }
10 | public string Issuer { get; set; }
11 | public string Audience { get; set; }
12 | public int LifeTime { get; set; }
13 | public bool ValidateLifetime { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Plugins/Monitor/Model/OpcConnectionStatusDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Plugins.Monitor
6 | {
7 | public class OpcConnectionStatusDto
8 | {
9 | public string OpcName { get; set; }
10 |
11 | public string OpcUrl { get; set; }
12 |
13 |
14 | public DateTime ConnectTime { get; set; }
15 |
16 | public bool IsConnected { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/DataNodeDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class DataNodeDto
8 | {
9 | public string Tag { get; set; }
10 |
11 | public string FieldName { get; set; }
12 |
13 | public string NodeId { get; set; }
14 |
15 | public string NodeValue { get; set; }
16 |
17 | public string StatusCode { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/LoginDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class LoginDto
8 | {
9 | public string UserName { get; set; }
10 |
11 | public string Password { get; set; }
12 |
13 | public string ValidCode { get; set; }
14 |
15 | public string Token { get; set; }
16 |
17 | public string DisplayName { get; set; }
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.ComResDriver/IResourceDriver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Threading.Tasks;
5 |
6 | namespace IOTCS.EdgeGateway.ComResDriver
7 | {
8 | public interface IResourceDriver
9 | {
10 | dynamic Parameter { get; set; }
11 |
12 | string Initialize(string config);
13 |
14 | string CheckConnected(string config);
15 |
16 | bool IsConnected();
17 |
18 | Task Run(dynamic data);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Application/IUserService.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Domain.ValueObject;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 |
5 | namespace IOTCS.EdgeGateway.Application
6 | {
7 | public interface IUserService
8 | {
9 | Task GetUserInfoByName(string userName);
10 | Task> GetAsync();
11 | Task Insert(UserDto data);
12 | Task UpdatePwd(UserDto data);
13 | Task Delete(UserDto data);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Logging/NullLogger.cs:
--------------------------------------------------------------------------------
1 | namespace IOTCS.EdgeGateway.Logging
2 | {
3 | public class NullLogger
4 | {
5 | public static ILogger Logger
6 | {
7 | get
8 | {
9 | var loggerFactory = new LoggerFactory()
10 | .AddConsole(LogLevel.Trace, true)
11 | .AddLog4Net();
12 | var logger = loggerFactory.CreateLogger("errorAppender");
13 | return logger;
14 | }
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Core/Extensions/DecimalExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace System
2 | {
3 | ///
4 | /// Decimal extension methods
5 | /// Decimal的扩展函数
6 | ///
7 | public static class DecimalExtensions {
8 | ///
9 | /// Remove excess 0s after decimal
10 | /// 删除小数点后多余的0
11 | /// Eg: giving 12.3000 will return 12.3
12 | ///
13 | public static decimal Normalize(this decimal value) {
14 | return value / 1.000000000000000000000000000000000m;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Dispatch/AppDispatchModule.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using Volo.Abp.Modularity;
6 |
7 | namespace IOTCS.EdgeGateway.Dispatch
8 | {
9 | public class AppDispatchModule : AbpModule
10 | {
11 | public override void ConfigureServices(ServiceConfigurationContext context)
12 | {
13 | context.Services.Add(ServiceDescriptor.Singleton());
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/ValueObject/RelationshipDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace IOTCS.EdgeGateway.Domain.ValueObject
6 | {
7 | public class RelationshipDto
8 | {
9 | public string Id { get; set; }
10 | public string ResourceId { get; set; }
11 |
12 | public string ResourceName { get; set; }
13 | public string Topic { get; set; }
14 | public string CreateTime { get; set; }
15 | public string CreaterBy { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Application/IDriveService.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Domain.ValueObject.Device;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace IOTCS.EdgeGateway.Application
8 | {
9 | public interface IDriveService
10 | {
11 | Task Create(DriveDto deviceDto);
12 |
13 | Task> GetAllrive();
14 |
15 | Task Update(DriveDto deviceDto);
16 |
17 | Task Delete(DriveDto deviceDto);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Application/IResourceService.cs:
--------------------------------------------------------------------------------
1 | using IOTCS.EdgeGateway.Domain.ValueObject;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 |
5 | namespace IOTCS.EdgeGateway.Application
6 | {
7 | public interface IResourceService
8 | {
9 | Task> GetAsync();
10 |
11 | Task Insert(ResourceDto data);
12 |
13 | Task Update(ResourceDto data);
14 | Task Delete(ResourceDto data);
15 |
16 | Task TestAsync(ResourceDto data);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Logging/IOTCS.EdgeGateway.Logging.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/IOTCS.EdgeGateway.Domain.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Domain/Models/RelationshipModel.cs:
--------------------------------------------------------------------------------
1 | using FreeSql.DataAnnotations;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace IOTCS.EdgeGateway.Domain.Models
7 | {
8 | [Table(Name = "tb_relationship")]
9 | public class RelationshipModel
10 | {
11 | public string Id { get; set; }
12 | public string ResourceId { get; set; }
13 | public string Topic { get; set; }
14 | public string CreateTime { get; set; }
15 | public string CreaterBy { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Infrastructure/WebApi/Settings/CustomException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace IOTCS.EdgeGateway.Infrastructure.WebApi
4 | {
5 | public class CustomerException:SystemException
6 | {
7 | public CustomerException():base()
8 | {
9 |
10 | }
11 | public CustomerException(string message):base(message)
12 | {
13 |
14 | }
15 |
16 | public CustomerException(string message, Exception innerException):base(message,innerException)
17 | {
18 |
19 | }
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/IOTCS.EdgeGateway.Core/Collections/ITypeList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace IOTCS.EdgeGateway.Core.Collections
5 | {
6 | public interface ITypeList : ITypeList