/*public override void write(ByteStream queue) * { * if (nullValue != null) * nullValue.write(queue); * else if (realValue != null) * realValue.write(queue); * else if (binaryValue != null) * binaryValue.write(queue); * else if (integerValue != null) * integerValue.write(queue); * else * constructedValue.write(queue, 0); * }*/ public PriorityValue(ByteStream queue) { // Sweet Jesus... int tag = (queue.PeekFromHere(0) & 0xff); if ((tag & 8) == 8) { // A class tag, so this is a constructed value. ConstructedValue = new AmbiguousValue(queue, 0); } else { // A primitive value tag = tag >> 4; if (tag == Null.TYPE_ID) { NullValue = new Null(queue); } else if (tag == Real.TYPE_ID) { RealValue = new Real(queue); } else if (tag == Primitive.Enumerated.TYPE_ID) { BinaryValue = new BinaryPV(queue); } else if (tag == UnsignedInteger.TYPE_ID) { IntegerValue = new UnsignedInteger(queue); } else { throw new BACnetErrorException(ErrorClass.Property, ErrorCode.InvalidDataType, "Unsupported primitive id: " + tag); } } }
public BinaryValueWrapper(BinaryPV item) { this.Item = item; }
public static PropertyStates NewBinaryValue(BinaryPV binaryValue) { return new BinaryValueWrapper(binaryValue); }
public static PriorityValue NewBinary(BinaryPV binary) { return new BinaryWrapper(binary); }
public static PropertyStates NewBinaryValue(BinaryPV binaryValue) { return(new BinaryValueWrapper(binaryValue)); }
public PriorityValue(BinaryPV binaryValue) { this.BinaryValue = binaryValue; }
public static PriorityValue NewBinary(BinaryPV binary) { return(new BinaryWrapper(binary)); }