Exemple #1
0
        /// <summary>
        /// 添加变量
        /// </summary>
        /// <param name="item"></param>
        /// <param name="plc"></param>
        public void Add(VariableItem item, PLCClient plc)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }
            if (plc == null)
            {
                throw new ArgumentNullException(nameof(plc));
            }
            var v = new Variable(item, plc);

            _variables[v.Item.Name] = v;
        }
Exemple #2
0
 public MergedVariable(VariableItem item, PLCClient plc) : base(item, plc)
 {
 }
Exemple #3
0
 /// <summary>
 /// Merge with specified address
 /// </summary>
 /// <param name="to">Specified to be merged with address</param>
 /// <param name="item">Variable item</param>
 /// <param name="lastArrayLength">Array length</param>
 public abstract void Merge(IAddress to, VariableItem item, int?lastArrayLength);
Exemple #4
0
 /// <summary>
 /// 初始化Variable
 /// </summary>
 /// <param name="item">变量项目</param>
 /// <param name="plc">PLC设备</param>
 public Variable(VariableItem item, PLCClient plc)
 {
     Item = item;
     PLC  = plc;
 }