use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInput in project openflowplugin by opendaylight.
the class GetAsyncRequestMessageFactoryTest method test.
@Test
public void test() {
ByteBuf bb = BufferHelper.buildBuffer();
GetAsyncInput deserializedMessage = BufferHelper.deserialize(factory, bb);
BufferHelper.checkHeaderV13(deserializedMessage);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInput in project openflowplugin by opendaylight.
the class GetAsyncRequestMessageFactory method deserialize.
@Override
public GetAsyncInput deserialize(ByteBuf rawMessage) {
GetAsyncInputBuilder builder = new GetAsyncInputBuilder();
builder.setVersion((short) EncodeConstants.OF13_VERSION_ID);
builder.setXid(rawMessage.readUnsignedInt());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInput in project openflowplugin by opendaylight.
the class GetaAsyncRequestMessageFactoryTest method testGetAsyncReques.
/**
* Testing of {@link GetAsyncRequestMessageFactory} for correct translation from POJO.
*/
@Test
public void testGetAsyncReques() throws Exception {
GetAsyncInputBuilder builder = new GetAsyncInputBuilder();
BufferHelper.setupHeader(builder, EncodeConstants.OF13_VERSION_ID);
GetAsyncInput message = builder.build();
ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
getAsyncFactory.serialize(message, out);
BufferHelper.checkHeaderV13(out, MESSAGE_TYPE, MESSAGE_LENGTH);
}
Aggregations