Пример #1
0
        public bool IsVariable(string _str, ref tblController _tblcontroller, ref tblVariable _tblvariable, ref tblFormalParameter _tblformalparameter, ref string _subpropertytxt, ref byte _subproperty, ref bool _isrefernce)
        {
            string str   = "";
            int    count = 0;

            _str = _str.ToLower();
            string[] varname = _str.Split(new Char[] { '.' });
            _subproperty = 0;
            count        = varname.Length;
            // count = varname.Count();
            if (varname != null)
            {
                if (IsFCSName(varname[0], ref _tblcontroller))
                {
                    for (int i = 1; i < count; i++)
                    {
                        str += varname[i] + ".";
                    }
                    if (str != "")
                    {
                        str = str.Remove(str.Length - 1, 1);
                        if (_tblcontroller.GetGlobalPOU().IsVariable(str, ref _tblvariable, ref _isrefernce, ref _tblformalparameter, ref _subpropertytxt, ref _subproperty))
                        {
                        }
                    }
                }
            }
            return(false);
        }
Пример #2
0
        public override bool PostInsertTriger()
        {
            tblController tblcontroller = new tblController();

            tblcontroller.SolutionID     = this.SolutionID;
            tblcontroller.ControllerName = "USERDEFINED";
            tblcontroller.type           = (int)StationType.DUMMY;
            tblcontroller.Insert();

            return(true);
        }
Пример #3
0
 public bool IsFCSName(string _name, ref tblController _tblcontroller)
 {
     foreach (tblController tblcontroller in m_tblControllerCollection)
     {
         if (tblcontroller.ControllerName.ToLower() == _name.ToLower())
         {
             _tblcontroller = tblcontroller;
             return(true);
         }
     }
     return(false);
 }
Пример #4
0
        public tblPou GetGlobaltblPouObjectFromID(long id)
        {
            tblController tblcontroller = GetControllerobjectofPOUID(id);

            foreach (tblPou tblpou in tblcontroller.m_tblPouCollection)
            {
                if (tblpou.pouName == "GLOBAL")
                {
                    return(tblpou);
                }
            }
            return(null);
        }
Пример #5
0
        public tblPou GetPouFromID(long id)
        {
            tblController tblcontroller = GetControllerobjectofPOUID(id);

            foreach (tblPou tblpou in tblcontroller.m_tblPouCollection)
            {
                if (tblpou.pouID == id)
                {
                    return(tblpou);
                }
            }
            return(null);
        }
Пример #6
0
        public ItemType IsValidItem(string str)
        {
            int    len;
            string _str = str.ToLower();

            string[] parts = _str.Split(new Char[] { '.' });
            len = parts.Length;
            if (len != 0)
            {
                tblController _tblcontroller = null;
                if (IsFCSName(parts[0], ref _tblcontroller))
                {
                    if (len == 1)
                    {
                        return(ItemType.FCS);
                    }
                    else
                    {
                    }
                }
            }
            return(ItemType.UNKNOWN);
        }
Пример #7
0
 public tblUserAccessCollection(tblController _parent)
 {
     _ControllerID_tblController = _parent;
 }
Пример #8
0
 public tblPouCollection(tblController _parent)
 {
     _ControllerID_tblController = _parent;
 }
Пример #9
0
 public tblModbusServerCollection(tblController _parent)
 {
     _ControllerID_tblController = _parent;
 }
Пример #10
0
 public bool Contains(tblController item)
 {
     return(List.Contains(item));
 }
Пример #11
0
 public int IndexOf(tblController item)
 {
     return(List.IndexOf(item));
 }
Пример #12
0
 public void Insert(int index, tblController item)
 {
     List.Insert(index, item);
     this.OntblControllerChanged(EventArgs.Empty);
 }
Пример #13
0
 public void Remove(tblController item)
 {
     List.Remove(item);
     this.OntblControllerChanged(EventArgs.Empty);
 }
Пример #14
0
 public void Add(tblController item)
 {
     List.Add(item);
     this.OntblControllerChanged(EventArgs.Empty);
 }
Пример #15
0
 public tblModbusClientCollection(tblController _parent)
 {
     _ControllerID_tblController = _parent;
 }