public void ChangeDevice(GateProperty gatep, DeviceConfig devconf, Guid devc_id, DeviceProperty devp) { if (gatep != null) { gatep_ = gatep; } if (devconf != null) { devconf_ = devconf; } /* いずれかの状態が変化したらデバイスを再構築 */ if ((devi_ == null) || (devc_id != devi_.Class.ID) || (!ClassUtil.Compare(devi_.Config, devconf)) || (!ClassUtil.Compare(devi_.Property, devp)) ) { SetupDevice(DeviceManager.Instance.CreateDeviceObject(devconf, devc_id, devp)); } ApplyGateProperty(); /* 接続コマンドを再構築 */ connect_command_ = HexTextEncoder.ToByteArray(gatep_.ConnectCommand); }
public override bool Equals(object obj) { if (obj is DeviceConfig obj_c) { return(ClassUtil.Compare(this, obj_c)); } return(base.Equals(obj)); }