Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        public static byte[] ToByteArray(this FaHDeviceType thisDeviceType)
        {
            UInt16 deviceID = (UInt16)thisDeviceType;

            return(KNXHelpers.uint16ToKnx(deviceID));
        }