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();
}
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();
}
Aggregations