public EdGroupAddress(KNXGroupAddress address) { this.Id = address.Id; this.Name = address.Name; this.KnxAddress = KNXAddressHelper.AddressToString(address.KnxAddress); this.Type = (KNXDataType)address.Type; this.KnxMainNumber = address.KnxMainNumber; this.KnxSubNumber = address.KnxSubNumber; this.DPTName = address.DPTName; this.DefaultValue = address.DefaultValue; this.Priority = (KNXPriority)address.Priority; this.IsCommunication = address.IsCommunication; this.IsRead = address.IsRead; this.IsWrite = address.IsWrite; this.IsTransmit = address.IsTransmit; this.IsUpgrade = address.IsUpgrade; this.Actions = new GroupAddressActions(address.Actions); //this.Actions = new List<DatapointActionNode>(); //if (null != address.Actions) //{ // foreach (DatapointAction action in address.Actions) // { // this.Actions.Add(new DatapointActionNode(action)); // } //} }
public KNXGroupAddress ToKnx() { var address = new KNXGroupAddress(); address.Id = this.Id; address.Name = this.Name; address.KnxAddress = KNXAddressHelper.StringToAddress(this.KnxAddress); address.Type = (int)this.Type; address.KnxMainNumber = this.KnxMainNumber; address.KnxSubNumber = this.KnxSubNumber; //address.KnxSize = this.KnxSize; //address.KnxDPTName = this.KnxDPTName; //address.Type = (int)this.Type; address.DPTName = this.DPTName; //address.DPTText = this.DPTText; address.DefaultValue = this.DefaultValue; address.Priority = (int)this.Priority; //address.WireNumber = this.WireNumber; address.IsCommunication = this.IsCommunication; address.IsRead = this.IsRead; address.IsWrite = this.IsWrite; address.IsTransmit = this.IsTransmit; address.IsUpgrade = this.IsUpgrade; //address.ReadTimeSpan = this.ReadTimeSpan; //address.Tip = this.Tip; address.Actions = this.Actions.ToKnx(); //address.Actions = new List<DatapointAction>(); //if (null != address.Actions) //{ // foreach (DatapointActionNode node in this.Actions) // { // address.Actions.Add(node.ToKnx()); // } //} return(address); }