/// <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; }
public MergedVariable(VariableItem item, PLCClient plc) : base(item, plc) { }
/// <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);
/// <summary> /// 初始化Variable /// </summary> /// <param name="item">变量项目</param> /// <param name="plc">PLC设备</param> public Variable(VariableItem item, PLCClient plc) { Item = item; PLC = plc; }