public DADR(BACnetManager bnm, BACnetPacket.ADDRESS_TYPE adrtyp) { switch (adrtyp) { case BACnetPacket.ADDRESS_TYPE.LOCAL_BROADCAST: isBroadcast = true; isLocalBroadcast = true; viaIPEP = new myIPEndPoint(IPAddress.Broadcast, bnm.insideSocket.ourSocketPort); break; case BACnetPacket.ADDRESS_TYPE.GLOBAL_BROADCAST: this.networkNumber = 0xffff; isBroadcast = true; isLocalBroadcast = false; isRemoteBroadcast = false; MACaddress = new BACnetMACaddress(); break; case BACnetPacket.ADDRESS_TYPE.REMOTE_BROADCAST: isRemoteBroadcast = true; isLocalBroadcast = false; throw new Exception("m0167-A remote broadcast requires an IP address, network number, cannot use this constructor for this"); default: throw new Exception("m0508-Bad parameter"); } }
public DADR(BACnetManager bnm, BACnetPacket.ADDRESS_TYPE adrtyp, UInt16 networkNumber) { switch (adrtyp) { case BACnetPacket.ADDRESS_TYPE.REMOTE_BROADCAST: isBroadcast = true; viaIPEP = new myIPEndPoint(IPAddress.Broadcast, bnm.insideSocket.ourSocketPort); this.networkNumber = networkNumber; break; case BACnetPacket.ADDRESS_TYPE.LOCAL_BROADCAST: case BACnetPacket.ADDRESS_TYPE.GLOBAL_BROADCAST: throw new Exception("m0169-cannot use this constructor for this"); default: throw new Exception("m0168-Bad parameter"); } }
public DADR(BACnetPacket.ADDRESS_TYPE adrtyp) { switch (adrtyp) { case BACnetPacket.ADDRESS_TYPE.LOCAL_BROADCAST: throw new Exception("m0509-A local broadcast requires an IP address, network number, cannot use this constructor for this"); case BACnetPacket.ADDRESS_TYPE.GLOBAL_BROADCAST: this.networkNumber = 0xffff; isBroadcast = true; isLocalBroadcast = false; isRemoteBroadcast = false; MACaddress = new BACnetMACaddress(); break; case BACnetPacket.ADDRESS_TYPE.REMOTE_BROADCAST: throw new Exception("m0203-A remote broadcast requires an IP address, network number, cannot use this constructor for this"); default: throw new Exception("m0204-Bad parameter"); } }