Java 类org.projectfloodlight.openflow.protocol.action.OFActionSetNwTos 实例源码

项目:fresco_floodlight    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:iTAP-controller    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:SDN-Multicast    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:arscheduler    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:floodlight1.2-delay    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:floodlight-hardware    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 *
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:ACAMPController    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:fast-failover-demo    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:floodlightLB    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:DSC    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}
项目:floodlight    文件:ActionUtils.java   
/**
 * Parse set_tos actions.
 * The key and delimiter for the action should be omitted, and only the
 * data should be presented to this decoder. A leading 0x is permitted.
 * 
 * @param actionToDecode; The action as a string to decode
 * @param version; The OF version to create the action for
 * @param log
 * @return
 */
private static OFActionSetNwTos decode_set_tos_bits(String actionToDecode, OFVersion version, Logger log) {
    Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode); 
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte tosbits = get_byte(n.group(1));
                OFActionSetNwTos.Builder ab = OFFactories.getFactory(version).actions().buildSetNwTos();
                ab.setNwTos(tosbits);
                log.debug("action {}", ab.build());
                return ab.build();
            }
            catch (NumberFormatException e) {
                log.debug("Invalid dst-port in: {} (error ignored)", actionToDecode);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", actionToDecode);
        return null;
    }
    return null;
}