Package org.hxzon.netprotocol.field

Examples of org.hxzon.netprotocol.field.ProtocolBitField


        return _type;
    }

    public ProtocolBitField fetchPriority() {
        if (_priority == null) {
            _priority = new ProtocolBitField("priority", "优先级", 0, 0, 3, this);
        }
        return _priority;
    }
View Full Code Here


        return _priority;
    }

    public ProtocolBitField fetchCfi() {
        if (_cfi == null) {
            _cfi = new ProtocolBitField("cfi", "格式", 0, 3, 1, this) {
                public String getValueAsString() {
                    return getValue() == 0 ? "规范格式" : "非规范格式";
                }
            };
        }
View Full Code Here

        return _cfi;
    }

    public ProtocolBitField fetchVlanId() {
        if (_vlanId == null) {
            _vlanId = new ProtocolBitField("vlan id", "VLAN ID", 0, 4, 12, this);
        }
        return _vlanId;
    }
View Full Code Here

        return fetchPacket().getHeaderFields();
    }

    public ProtocolBitField fetchPtpVersion() {
        if (_ptpVersion == null) {
            _ptpVersion = new ProtocolBitField("ptpVersion", "PTP版本", 1, 4, 4, this) {
                public String getValueAsString() {
                    return "ieee1588 v" + getValue();
                }
            };
        }
View Full Code Here

        return _totalLen;
    }

    public ProtocolBitField fetchHeaderLen() {
        if (_headerLen == null) {
            _headerLen = new ProtocolBitField("headerLength", "头部长度", 0, 4, 4, this) {
                public String getValueAsString() {
                    return (getValue() * 4) + "(=" + getValue() + "*4)";
                }
            };
        }
View Full Code Here

        return _identification;
    }

    public ProtocolBitField fetchFragmentFlags() {
        if (_fragmentFlags == null) {
            _fragmentFlags = new ProtocolBitField("fragment flags", "段标识", 6, 0, 3, this) {
                public String getValueAsString() {
                    return fragmentFlagDescription(getValue());
                }
            };
        }
View Full Code Here

        return BitUtil.isSet(fetchFragmentFlags().getValue(), MoreFragment);
    }

    public ProtocolBitField fetchFragmentOffset() {
        if (_fragmentOffset == null) {
            _fragmentOffset = new ProtocolBitField("fragment offset", "段偏移", 6, 3, 13, this) {
                public String getValueAsString() {
                    return (getValue() * 8) + "(=" + getValue() + "*8)";
                }
            };
        }
View Full Code Here

TOP

Related Classes of org.hxzon.netprotocol.field.ProtocolBitField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.