use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class Reg2CodecTest method deserializeTest.
@Test
public void deserializeTest() {
createBuffer(buffer);
input = reg2Codec.deserialize(buffer);
final RegCaseValue result = (RegCaseValue) input.getMatchEntryValue();
assertEquals(Nxm1Class.class, input.getOxmClass());
assertEquals(NxmNxReg2.class, input.getOxmMatchField());
assertEquals(false, input.isHasMask());
assertEquals(1, result.getRegValues().getValue().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class Reg4CodecTest method deserializeTest.
@Test
public void deserializeTest() {
createBuffer(buffer);
input = reg4Codec.deserialize(buffer);
final RegCaseValue result = (RegCaseValue) input.getMatchEntryValue();
assertEquals(Nxm1Class.class, input.getOxmClass());
assertEquals(NxmNxReg4.class, input.getOxmMatchField());
assertEquals(false, input.isHasMask());
assertEquals(1, result.getRegValues().getValue().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class AbstractRegCodec method serialize.
@Override
public void serialize(MatchEntry input, ByteBuf outBuffer) {
serializeHeader(input, outBuffer);
final RegCaseValue regCase = ((RegCaseValue) input.getMatchEntryValue());
outBuffer.writeInt(regCase.getRegValues().getValue().intValue());
if (input.isHasMask()) {
outBuffer.writeInt(regCase.getRegValues().getMask().intValue());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class Reg7CodecTest method deserializeTest.
@Test
public void deserializeTest() {
createBuffer(buffer);
input = reg7Codec.deserialize(buffer);
final RegCaseValue result = (RegCaseValue) input.getMatchEntryValue();
assertEquals(Nxm1Class.class, input.getOxmClass());
assertEquals(NxmNxReg7.class, input.getOxmMatchField());
assertEquals(false, input.isHasMask());
assertEquals(1, result.getRegValues().getValue().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue in project openflowplugin by opendaylight.
the class Reg1CodecTest method deserializeTest.
@Test
public void deserializeTest() {
createBuffer(buffer);
input = reg1Codec.deserialize(buffer);
final RegCaseValue result = (RegCaseValue) input.getMatchEntryValue();
assertEquals(Nxm1Class.class, input.getOxmClass());
assertEquals(NxmNxReg1.class, input.getOxmMatchField());
assertEquals(false, input.isHasMask());
assertEquals(1, result.getRegValues().getValue().intValue());
}
Aggregations