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