Java 类org.projectfloodlight.openflow.protocol.oxm.OFOxmExpOchSigId 实例源码

项目:athena    文件:OfOpticalSwitchImplLinc13.java   
/**
 * Rewrite actions to use LINC OF optical extensions.
 *
 * @param actions original actions
 * @return rewritten actions
 */
private List<OFAction> rewriteActions(List<OFAction> actions) {
    List<OFAction> newActions = new LinkedList<>();

    for (OFAction action : actions) {
        if (!(action instanceof OFActionSetField)) {
            newActions.add(action);
            continue;
        }

        OFActionSetField sf = (OFActionSetField) action;
        if (!(sf.getField() instanceof OFOxmExpOchSigId)) {
            newActions.add(action);
            continue;
        }

        OFOxmExpOchSigId oxm = (OFOxmExpOchSigId) sf.getField();
        CircuitSignalID signalId = oxm.getValue();

        newActions.add(
                factory().actions().circuit(factory().oxms().ochSigid(signalId)));
    }

    return newActions;
}
项目:onos    文件:OfOpticalSwitchImplLinc13.java   
/**
 * Rewrite actions to use LINC OF optical extensions.
 *
 * @param actions original actions
 * @return rewritten actions
 */
private List<OFAction> rewriteActions(List<OFAction> actions) {
    List<OFAction> newActions = new LinkedList<>();

    for (OFAction action : actions) {
        if (!(action instanceof OFActionSetField)) {
            newActions.add(action);
            continue;
        }

        OFActionSetField sf = (OFActionSetField) action;
        if (!(sf.getField() instanceof OFOxmExpOchSigId)) {
            newActions.add(action);
            continue;
        }

        OFOxmExpOchSigId oxm = (OFOxmExpOchSigId) sf.getField();
        CircuitSignalID signalId = oxm.getValue();

        newActions.add(
                factory().actions().circuit(factory().oxms().ochSigid(signalId)));
    }

    return newActions;
}