use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class OxmMetadataSerializer method serialize.
@Override
public void serialize(MatchEntry entry, ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
MetadataCase entryValue = (MetadataCase) entry.getMatchEntryValue();
outBuffer.writeBytes(entryValue.getMetadata().getMetadata());
if (entry.isHasMask()) {
writeMask(entryValue.getMetadata().getMask(), outBuffer, EncodeConstants.SIZE_OF_LONG_IN_BYTES);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class OxmMplsLabelSerializer method serialize.
@Override
public void serialize(MatchEntry entry, ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
MplsLabelCase entryValue = (MplsLabelCase) entry.getMatchEntryValue();
outBuffer.writeInt(entryValue.getMplsLabel().getMplsLabel().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class TypeKeyMakerFactory method createMatchEntriesKeyMaker.
/**
* Creates a key maker for MatchEntry instances.
*
* @param version openflow wire version that shall be used in lookup key
* @return lookup key
*/
public static TypeKeyMaker<MatchEntry> createMatchEntriesKeyMaker(short version) {
return new AbstractTypeKeyMaker<MatchEntry>(version) {
@Override
public MatchEntrySerializerKey<?, ?> make(MatchEntry entry) {
MatchEntrySerializerKey<?, ?> key;
key = new MatchEntrySerializerKey<>(getVersion(), entry.getOxmClass(), entry.getOxmMatchField());
if (entry.getOxmClass().equals(ExperimenterClass.class)) {
ExperimenterIdCase entryValue = (ExperimenterIdCase) entry.getMatchEntryValue();
key.setExperimenterId(entryValue.getExperimenter().getExperimenter().getValue());
return key;
}
key.setExperimenterId(null);
return key;
}
};
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class OxmPbbIsidSerializer method serialize.
@Override
public void serialize(MatchEntry entry, ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
PbbIsidCase entryValue = (PbbIsidCase) entry.getMatchEntryValue();
outBuffer.writeMedium(entryValue.getPbbIsid().getIsid().intValue());
if (entry.isHasMask()) {
writeMask(entryValue.getPbbIsid().getMask(), outBuffer, getValueLength());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class OxmSctpSrcSerializer method serialize.
@Override
public void serialize(MatchEntry entry, ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
SctpSrcCase entryValue = (SctpSrcCase) entry.getMatchEntryValue();
outBuffer.writeShort(entryValue.getSctpSrc().getPort().getValue().intValue());
}
Aggregations