Exemple #1
0
        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);
        }
Exemple #2
0
        public static GateObject CreateGateObject(GateProperty gatep, DeviceConfig devconf, Guid devc_id, DeviceProperty devp)
        {
            var gate = new GateObject(gatep, devconf, devc_id, devp);

            lock (gate_list_) {
                gate_list_.Add(gate);
            }

            DebugManager.MessageOut(DebugMessageSender.Gate, String.Format("Gate Added. count = {0}", gate_list_.Count));

            return(gate);
        }
Exemple #3
0
 public GateObject(GateProperty gatep, DeviceConfig devconf, Guid devc_id, DeviceProperty devp)
 {
     ChangeDevice(gatep, devconf, devc_id, devp);
 }