public FaHDevice() { SystemID = new FahSystemID(0xff, 0xff); DeviceType = FaHDeviceType.TypeNotDefined; Random rnd = new Random(); Byte[] rndConsitancyID = new Byte[2]; rnd.NextBytes(rndConsitancyID); ConsistancyValue = new KNXu16SimpleStruct(rndConsitancyID); }
public static FaHDeviceType FromByteArray(this FaHDeviceType dummy, byte[] input, UInt16 begin) { if (input.Length - begin < 1) { throw new InternalBufferOverflowException(); } FaHDeviceType DeviceType = (FaHDeviceType)KNXHelpers.knxToUint16(input, begin); return(DeviceType); }
public static byte[] ToByteArray(this FaHDeviceType thisDeviceType) { UInt16 deviceID = (UInt16)thisDeviceType; return(KNXHelpers.uint16ToKnx(deviceID)); }