• 大小: 32.7MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-07-11
  • 语言: C#
  • 标签: TCP/IP  SECS  HSMS  

资源简介

SECS HSMS, socket create by csharp , easy to use or reference resources

资源截图

代码片段和文件信息

using System;
using System.ComponentModel;
using System.Configuration;
using System.Globalization;
using System.IO;
using System.Net;
namespace Cim.Eap {
    sealed class EAPConfig : ConfigurationSection {
        public static EAPConfig Instance = (EAPConfig)ConfigurationManager.GetSection(“eap“);

        [ConfigurationProperty(“id“ DefaultValue = “EQP“ IsRequired = true)]
        [StringValidator(InvalidCharacters = “ ~!@#$%^&*()[]{}/;‘\“|\\“ MinLength = 3 MaxLength = 7)]
        public string ToolId => (string)this[“id“];

        [ConfigurationProperty(“tcs“)]
        [StringValidator(InvalidCharacters = “ ~!@#$%^&*()[]{}/;‘\“|\\“)]
        public string TcsId => string.IsNullOrEmpty((string)this[“tcs“]) ? this.ToolId : (string)this[“tcs“];

        [Description(@“預先定義好的SECS message清單“)]
        [ConfigurationProperty(“sml“ IsRequired = true)]
        [CallbackValidator(Type = typeof(EAPConfig) CallbackMethodName = “CheckFileExist“)]
        public string SmlFile => (string)this[“sml“];

        [Description(@“GEM event report define link config file“)]
        [ConfigurationProperty(“gem“ IsRequired = true)]
        [CallbackValidator(Type = typeof(EAPConfig) CallbackMethodName = “CheckFileExist“)]
        public string Gemxml => (string)this[“gem“];

        [ConfigurationProperty(“driver“ IsRequired = true)]
        [TypeConverter(typeof(EapDriverConverter))]
        public EapDriver Driver => (EapDriver)this[“driver“];

        [DisplayName(“IP Address“)]
        [Description(“Active Mode: EQP IP address Passive Mode: local socket binding address“)]
        [ConfigurationProperty(“ip“ DefaultValue = “127.0.0.1“ IsRequired = true)]
        [CallbackValidator(Type = typeof(EAPConfig) CallbackMethodName = “IPAddressCheck“)]
        public string IP => (string)this[“ip“];

        [Description(“Active Mode: EQP socket listen port Passive Mode: local socket listen port“)]
        [ConfigurationProperty(“port“ DefaultValue = 5000 IsRequired = true)]
        [IntegerValidator(MinValue = 4000 MaxValue = 5000)]
        public int TcpPort => (int)this[“port“];

        [ConfigurationProperty(“deviceId“ DefaultValue = (ushort)0)]
        public ushort DeviceId => (ushort)this[“deviceId“];

        [Description(“Active / Passive“)]
        [ConfigurationProperty(“mode“ IsRequired = true)]
        public ConnectionMode Mode => (ConnectionMode)this[“mode“];

        [Description(“Socket Receive Buffer Size“)]
        [ConfigurationProperty(“recvBufferSize“ DefaultValue = 16 * 1024)]
        [IntegerValidator(MinValue = 8 * 1024 MaxValue = 64 * 1024)]
        public int SocketRecvBufferSize => (int)this[“recvBufferSize“];

        [Description(“linkTest interval time(豪秒)“)]
        [ConfigurationProperty(“linkTest“ DefaultValue = 30000)]
        [IntegerValidator(MinValue = 20000 MaxValue = 60000)]
        public int linkTestInterval => (int)this[“linkTest“];

        [Description(“T3 timeout(豪秒)“)]
        [ConfigurationProperty

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-08-21 17:09  secs4net-master\
     目录           0  2018-08-21 17:09  secs4net-master\.github\
     目录           0  2018-08-21 17:09  secs4net-master\.github\ISSUE_TEMPLATE\
     文件         799  2018-06-27 21:12  secs4net-master\.github\ISSUE_TEMPLATE\bug_report.md
     文件         560  2018-06-27 21:12  secs4net-master\.github\ISSUE_TEMPLATE\feature_request.md
     文件        1070  2018-06-27 21:12  secs4net-master\LICENSE
     文件        2041  2018-06-27 21:12  secs4net-master\README.md
     文件          27  2018-06-27 21:12  secs4net-master\_config.yml
     目录           0  2018-08-21 17:11  secs4net-master\secs4net\
     文件        3310  2018-06-27 21:12  secs4net-master\secs4net\.gitignore
     目录           0  2018-08-21 17:22  secs4net-master\secs4net\.vs\
     目录           0  2018-08-21 17:22  secs4net-master\secs4net\.vs\config\
     文件       83009  2018-08-21 17:22  secs4net-master\secs4net\.vs\config\applicationhost.config
     目录           0  2018-08-21 17:41  secs4net-master\secs4net\.vs\secs4net\
     目录           0  2018-08-21 17:41  secs4net-master\secs4net\.vs\secs4net\DesignTimeBuild\
     文件     3074928  2018-08-21 17:41  secs4net-master\secs4net\.vs\secs4net\DesignTimeBuild\.dtbcache
     目录           0  2018-08-21 17:12  secs4net-master\secs4net\.vs\secs4net\v15\
     文件     1661952  2018-08-21 17:41  secs4net-master\secs4net\.vs\secs4net\v15\.suo
     目录           0  2018-08-21 17:11  secs4net-master\secs4net\.vs\secs4net\v15\Server\
     目录           0  2018-08-21 17:11  secs4net-master\secs4net\.vs\secs4net\v15\Server\sqlite3\
     文件           0  2018-08-21 17:11  secs4net-master\secs4net\.vs\secs4net\v15\Server\sqlite3\db.lock
     文件     3665920  2018-08-21 17:13  secs4net-master\secs4net\.vs\secs4net\v15\Server\sqlite3\storage.ide
     文件       32768  2018-08-21 17:11  secs4net-master\secs4net\.vs\secs4net\v15\Server\sqlite3\storage.ide-shm
     文件     5586752  2018-08-21 17:13  secs4net-master\secs4net\.vs\secs4net\v15\Server\sqlite3\storage.ide-wal
     目录           0  2018-08-21 17:09  secs4net-master\secs4net\Core\
     目录           0  2018-08-21 17:10  secs4net-master\secs4net\Core\CIM.EAP\
     文件        3280  2018-06-27 21:12  secs4net-master\secs4net\Core\CIM.EAP\.gitignore
     文件       10443  2018-06-27 21:12  secs4net-master\secs4net\Core\CIM.EAP\CIM.Eap.csproj
     目录           0  2018-08-21 17:09  secs4net-master\secs4net\Core\CIM.EAP\Data\
     文件         385  2018-06-27 21:12  secs4net-master\secs4net\Core\CIM.EAP\Data\Carrier.cs
     文件         328  2018-06-27 21:12  secs4net-master\secs4net\Core\CIM.EAP\Data\ControlJob.cs
............此处省略1483个文件信息

评论

共有 条评论