コード例 #1
0
        public override void DirectVMNotify()
        {
            System.Collections.BitArray ta;

            if (SegmentInfo != null && PLC_Status != null)
            {
                TelegramTransportStatus tel = PLC_Status as TelegramTransportStatus;

                SegmentInfo.Name    = Name;
                SegmentInfo.AlarmID = tel.FirstAlarmID;
                SegmentInfo.Fault   = tel.Fault;
                ta = tel.Alarms.Clone() as System.Collections.BitArray;
                if (SegmentConveyors.Count() == 0) // only main cabinet
                {
                    Warehouse.StrategyList.ForEach(bs => ta[98] = (bs is Strategy.StrategyGeneral)? (bs as Strategy.StrategyGeneral).DatabaseToLarge: ta[98]);
                }
                SegmentInfo.SetAlarms(ta, Warehouse);
                SegmentInfo.SetSensors(tel.State);
                SegmentInfo.SetState(tel.Status);
                SegmentInfo.Status = tel.Status;
                SegmentInfo.State  = tel.State;
                SegmentInfo.Online = Communicator.Online();
                CallNotifyVM(SegmentInfo);
            }
        }
コード例 #2
0
ファイル: SimpleTransport.cs プロジェクト: II01/i2MFCSv2.TAI
 public void OnTelegramTransportStatus(Telegram t)
 {
     PLC_Status = t as TelegramTransportStatus;
     // do code here
 }