コード例 #1
0
        public void UpdateTmlStateInfomation()
        {
            //if (EquipmentRunningInfoHolding.TmlRunningInfoDictionary.ContainsKey(this.NodeId))
            //{
            //    this.UpdateTerminalStateInfo(EquipmentRunningInfoHolding.TmlRunningInfoDictionary[this.NodeId]);
            //}
            if (
                Sr.EquipmentInfoHolding.Services.ServicesEquipemntInfoHold.EquipmentInfoDictionary.ContainsKey(
                    EquipmentRtuId))
            {
                var equ =
                    Sr.EquipmentInfoHolding.Services.ServicesEquipemntInfoHold.EquipmentInfoDictionary[
                        EquipmentRtuId];
                if (equ.RtuModel == 3005 || equ.RtuModel == 3090)
                {
                    var s = equ.RtuState;
                    if (s == 0)
                    {
                        EquipmentImageState = 3011;
                        return;
                    }
                    if (s == 1)
                    {
                        EquipmentImageState = 3012;
                        return;
                    }
                    var haserror =
                        Wlst.Sr.EquipemntLightFault.Services.TmlExistFaultsInfoServices.IsRtuHasError(this.EquipmentRtuId);
                    var lighton    = RtuNewDataService.IsRtuHasElectric(this.EquipmentRtuId);
                    int errorindex = 0;
                    if (haserror && lighton)
                    {
                        errorindex = 3;
                    }
                    if (haserror && !lighton)
                    {
                        errorindex = 1;
                    }
                    if (!haserror && lighton)
                    {
                        errorindex = 2;
                    }

                    EquipmentImageState = 3015 + errorindex;
                }
                else
                {
                    var haserror =
                        Wlst.Sr.EquipemntLightFault.Services.TmlExistFaultsInfoServices.IsRtuHasError(this.EquipmentRtuId);
                    //    var lighton = Wlst.Sr.EquipmentNewData.Services.RtuNewDataService.IsRtuHasElectric(this.EquipmentRtuId);
                    EquipmentImageState = equ.RtuModel + (haserror?1:0);
                }
            }
        }
コード例 #2
0
        private void UpdateTmlStateInfomation()
        {
            if (
                Sr.EquipmentInfoHolding.Services.ServicesEquipemntInfoHold.EquipmentInfoDictionary.ContainsKey(
                    NodeId))
            {
                var equ =
                    Sr.EquipmentInfoHolding.Services.ServicesEquipemntInfoHold.EquipmentInfoDictionary[
                        NodeId];
                if (equ.RtuModel == 3005 || equ.RtuModel == 3090)
                {
                    var s = equ.RtuState;
                    if (s == 0)
                    {
                        PicIndex = 3001;
                        return;
                    }
                    if (s == 1)
                    {
                        PicIndex = 3002;
                        return;
                    }
                    var haserror =
                        Wlst.Sr.EquipemntLightFault.Services.TmlErrorStates.IsRtuHasError(this.NodeId);
                    var lighton    = RtuNewDataService.IsRtuHasElectric(this.NodeId);
                    int errorindex = 0;
                    if (haserror && lighton)
                    {
                        errorindex = 3;
                    }
                    if (haserror && !lighton)
                    {
                        errorindex = 1;
                    }
                    if (!haserror && lighton)
                    {
                        errorindex = 2;
                    }

                    PicIndex = 3005 + errorindex;
                }
                else
                {
                    var tmp =
                        Wlst.Sr.EquipemntLightFault.Services.TmlErrorStates.IsRtuHasError(this.NodeId);
                    PicIndex = equ.RtuModel + (tmp ? 1 : 0);
                }
            }
        }