public Variable(int pBaseAddress, PD_Length pSize, int pLength, string pName) { if (pBaseAddress < 0 || pLength <= 0 || (pLength > (int)pSize * 8 || pLength > this._maxVariableLength)) { this.BaseAddress = 0; this.Length = 0; this.BitOffset = 0; this.VarType = VarType.Unknown; } else { this.BaseAddress = pBaseAddress; this.Length = pLength; this.BitOffset = 0; this.VarType = VarType.UInt64; this.CalcMinMaxRange(); this.ByteLength = (int)pSize; if (pName != "Input" && pName != "Output") { this.Name = pName; } else { this.Name = string.Format("{0} {1}.{2}", (object)pName, (object)this.BaseAddress.ToString(), (object)this.BitOffset.ToString()); } } }
public VarOutput(int pBaseAddress, PD_Length pSize, int pLength, string pName) : base(pBaseAddress, pSize, pLength, string.IsNullOrEmpty(pName) ? "Output" : pName) { this._outValue = this.MinValue; }
public VarOutput(int pBaseAddress, PD_Length pSize, int pLength, int pBitOffset) : this(pBaseAddress, pSize, pLength, pBitOffset, "Output") { }
public VarOutput(int pBaseAddress, PD_Length pSize, int pLength) : this(pBaseAddress, pSize, pLength, "Output") { }
public VarInput(int pBaseAddress, PD_Length pSize, int pLength, int pBitOffset, string pName) : base(pBaseAddress, pSize, pLength, pBitOffset, string.IsNullOrEmpty(pName) ? "Input" : pName) { this._inpValue = this.MinValue; }