use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.ofj.nxm.of.match.icmp.type.grouping.IcmpTypeValuesBuilder in project openflowplugin by opendaylight.
the class IcmpTypeCodecTest method createMatchEntry.
private MatchEntry createMatchEntry() {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
final IcmpTypeCaseValueBuilder caseBuilder = new IcmpTypeCaseValueBuilder();
final IcmpTypeValuesBuilder valuesBuilder = new IcmpTypeValuesBuilder();
matchEntryBuilder.setOxmClass(Nxm0Class.class);
matchEntryBuilder.setOxmMatchField(NxmOfIcmpType.class);
matchEntryBuilder.setHasMask(false);
valuesBuilder.setValue((short) 1);
caseBuilder.setIcmpTypeValues(valuesBuilder.build());
matchEntryBuilder.setMatchEntryValue(caseBuilder.build());
return matchEntryBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.ofj.nxm.of.match.icmp.type.grouping.IcmpTypeValuesBuilder in project openflowplugin by opendaylight.
the class IcmpTypeCodec method deserialize.
@Override
public MatchEntry deserialize(ByteBuf message) {
MatchEntryBuilder matchEntriesBuilder = deserializeHeaderToBuilder(message);
IcmpTypeCaseValueBuilder icmpTypeCaseValueBuilder = new IcmpTypeCaseValueBuilder();
icmpTypeCaseValueBuilder.setIcmpTypeValues(new IcmpTypeValuesBuilder().setValue(message.readUnsignedByte()).build());
matchEntriesBuilder.setMatchEntryValue(icmpTypeCaseValueBuilder.build());
matchEntriesBuilder.setHasMask(false);
return matchEntriesBuilder.build();
}
Aggregations