Example #1
0
        public void SetDeviceChannel(uint index, KNXu16SimpleStruct value)
        {
            //Index is numbered 1---X
            //Stored in array as 0--(X-1)
            index--;
            int byteindex = (int)((index * 2) + __FAHChannelStart);

            Array.Copy(value.ToByteArray(), 0, base.payloadReference.PayloadByteData, byteindex, 2);
        }
Example #2
0
        public KNXu16SimpleStruct GenerateNewConsistancyTag()
        {
            Random rand = new Random();

            byte[] newRand = new byte[2];
            rand.NextBytes(newRand);
            ConsistancyValue = new KNXu16SimpleStruct(newRand);
            AutoSave();
            return(ConsistancyValue);
        }
Example #3
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);
        }
Example #4
0
 public bool ReadChannelIndentifier(int ChannelIndex, out KNXu16SimpleStruct data)
 {
     data = null;
     try
     {
         data = Channels[ChannelIndex].ChannelIdentifier;
         if (data == null)
         {
             return(false);
         }
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #5
0
 public void WriteChannelIndentifier(int ChannelIndex, KNXu16SimpleStruct data)
 {
     EnsureChannelExist(ChannelIndex);
     Channels[ChannelIndex].ChannelIdentifier = data;
 }