Exemple #1
0
 //Удалить все выходы
 protected override void ClearOuts()
 {
     OutsId.Clear();
     AlarmOut = null;
     SoeOut   = null;
     TextOut  = null;
 }
Exemple #2
0
        //Добавить выход в провайдер
        protected override ProviderOut AddOut(ProviderSignal sig)
        {
            var obType = sig.Inf.Get("ObjectType").ToUpper();

            switch (obType)
            {
            case "ALARM":
                return(AlarmOut ?? (AlarmOut = new OvationMsgOut(this, "ALARM")));

            case "SOE":
                return(SoeOut ?? (SoeOut = new OvationMsgOut(this, "SOE")));

            case "TEXT":
                return(TextOut ?? (TextOut = new OvationMsgOut(this, "TEXT")));
            }

            int id = sig.Inf.GetInt("Id");

            return(OutsId.ContainsKey(id)
                ? OutsId[id]
                : OutsId.Add(id, new OvationOut(this, id)));
        }