Exemplo n.º 1
0
        public bool Equals(BACnetMACaddress madr)
        {
            if (length != madr.length)
            {
                return(false);
            }

            switch (length)
            {
            case 0:
                break;

            case 1:
                if (madr.uintMACaddress != uintMACaddress)
                {
                    return(false);
                }
                break;

            case 6:
                if (ipMACaddress.Equals(madr.ipMACaddress) != true)
                {
                    return(false);
                }
                break;

            default:
                throw new Exception("m0173-Illegal MAC address length??");
                // return false;
            }
            return(true);
        }
Exemplo n.º 2
0
        public bool Equals(MACaddress madr)
        {
            if (length != madr.length)
            {
                return(false);
            }

            switch (length)
            {
            case 0:
                break;

            case 1:
                if (madr.uintMACaddress != uintMACaddress)
                {
                    return(false);
                }
                break;

            case 6:
                if (ipMACaddress.Equals(madr.ipMACaddress) != true)
                {
                    return(false);
                }
                break;

            default:
                BACnetLibraryCL.Panic("Illegal MAC address length??");
                return(false);
            }
            return(true);
        }