/// <summary> /// 创建一个主动方使用的ALE管理器。 /// </summary> public RsspNodeClient(RsspClientConfig config) : base(config) { _rsspConfig = config; // config.LinkInfo.ToList().ForEach(p => { var key = this.BuildSaiConnectionID(config.LocalID, p.Key); var rsspEP = new RsspEndPoint(config.LocalID, p.Key, _rsspConfig.ApplicationType, _rsspConfig.LocalEquipType, true, config.SeqNoThreshold, config.EcInterval, _rsspConfig.AuthenticationKeys, null) { DefenseTech = config.DefenseTech, ServiceType = config.ServiceType, Algorithm = config.Algorithm, LocalEquipType = config.LocalEquipType, }; var value = new SaiConnectionClient(rsspEP, p.Value, this, this); this.AddSaiConnection(key, value); }); }
/// <summary> /// 创建一个RSSP-II客户端。 /// </summary> /// <param name="config">客户端配置信息。</param> /// <returns>一个IRsspNode接口。</returns> public static IRsspNode CreateClientNode(RsspClientConfig config) { if (config.ServiceType != ServiceType.D) { throw new ArgumentException("只支持D类服务类型。"); } return(new RsspNodeClient(config)); }
public override IRsspNode Create() { var linkCfg = _settings.GetLinkConfig(); var deviceType = (byte)_settings.DeviceType; var defenseTech = _settings.DefenseTech; var appType = _settings.ApplicationType; var cfg = new RsspClientConfig(_settings.LocalID, deviceType, appType, defenseTech, linkCfg); cfg.AuthenticationKeys = _settings.GetAuthenticationKeys(); cfg.EcInterval = _settings.EcInterval; cfg.SeqNoThreshold = _settings.SeqNoThreshold; return(RsspFactory.CreateClientNode(cfg)); }