Search in sources :

Example 6 with FlowModsBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.nx.learn.FlowModsBuilder in project openflowplugin by opendaylight.

the class LearnCodecUtil method readFlowToPort.

private static FlowMods readFlowToPort(ByteBuf message, short numBits) {
    FlowModOutputToPortBuilder builder = new FlowModOutputToPortBuilder();
    builder.setSrcField((long) message.readInt());
    builder.setSrcOfs((int) message.readShort());
    builder.setFlowModNumBits((int) numBits);
    length -= TO_PORT_LENGTH - EncodeConstants.SIZE_OF_SHORT_IN_BYTES;
    FlowModsBuilder flowModsBuilder = new FlowModsBuilder();
    FlowModOutputToPortCaseBuilder caseBuilder = new FlowModOutputToPortCaseBuilder();
    caseBuilder.setFlowModOutputToPort(builder.build());
    flowModsBuilder.setFlowModSpec(caseBuilder.build());
    return flowModsBuilder.build();
}
Also used : FlowModOutputToPortCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.FlowModOutputToPortCaseBuilder) FlowModOutputToPortBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.flow.mod.output.to.port._case.FlowModOutputToPortBuilder) FlowModsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.nx.action.learn.FlowModsBuilder)

Example 7 with FlowModsBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.nx.learn.FlowModsBuilder in project openflowplugin by opendaylight.

the class LearnCodecUtil method readFlowModAddMatchFromField.

private static FlowMods readFlowModAddMatchFromField(ByteBuf message, short numBits) {
    FlowModAddMatchFromFieldBuilder builder = new FlowModAddMatchFromFieldBuilder();
    builder.setSrcField((long) message.readInt());
    builder.setSrcOfs((int) message.readShort());
    builder.setDstField((long) message.readInt());
    builder.setDstOfs((int) message.readShort());
    builder.setFlowModNumBits((int) numBits);
    length -= FROM_FIELD_LENGTH - EncodeConstants.SIZE_OF_SHORT_IN_BYTES;
    FlowModsBuilder flowModsBuilder = new FlowModsBuilder();
    FlowModAddMatchFromFieldCaseBuilder caseBuilder = new FlowModAddMatchFromFieldCaseBuilder();
    caseBuilder.setFlowModAddMatchFromField(builder.build());
    flowModsBuilder.setFlowModSpec(caseBuilder.build());
    return flowModsBuilder.build();
}
Also used : FlowModAddMatchFromFieldCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.FlowModAddMatchFromFieldCaseBuilder) FlowModAddMatchFromFieldBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.flow.mod.add.match.from.field._case.FlowModAddMatchFromFieldBuilder) FlowModsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.nx.action.learn.FlowModsBuilder)

Aggregations

FlowModsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.nx.action.learn.FlowModsBuilder)6 ArrayList (java.util.ArrayList)2 FlowModAddMatchFromFieldCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.FlowModAddMatchFromFieldCaseBuilder)2 FlowModAddMatchFromValueCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.FlowModAddMatchFromValueCaseBuilder)2 FlowModCopyFieldIntoFieldCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.FlowModCopyFieldIntoFieldCaseBuilder)2 FlowModCopyValueIntoFieldCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.FlowModCopyValueIntoFieldCaseBuilder)2 FlowModOutputToPortCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.FlowModOutputToPortCaseBuilder)2 FlowModAddMatchFromFieldBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.flow.mod.add.match.from.field._case.FlowModAddMatchFromFieldBuilder)2 FlowModAddMatchFromValueBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.flow.mod.add.match.from.value._case.FlowModAddMatchFromValueBuilder)2 FlowModCopyFieldIntoFieldBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.flow.mod.copy.field.into.field._case.FlowModCopyFieldIntoFieldBuilder)2 FlowModCopyValueIntoFieldBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.flow.mod.copy.value.into.field._case.FlowModCopyValueIntoFieldBuilder)2 FlowModOutputToPortBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.flow.mod.spec.flow.mod.spec.flow.mod.output.to.port._case.FlowModOutputToPortBuilder)2 FlowMods (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.nx.action.learn.FlowMods)1 FlowModSpec (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.flow.mod.spec.FlowModSpec)1 FlowMods (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.nx.learn.FlowMods)1 FlowModsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.nx.learn.FlowModsBuilder)1