Search in sources :

Example 1 with GetAsyncInput

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);
}
Also used : GetAsyncInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInput) ByteBuf(io.netty.buffer.ByteBuf) Test(org.junit.Test)

Example 2 with GetAsyncInput

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();
}
Also used : GetAsyncInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInputBuilder)

Example 3 with GetAsyncInput

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);
}
Also used : GetAsyncInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInput) GetAsyncInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInputBuilder) ByteBuf(io.netty.buffer.ByteBuf) Test(org.junit.Test)

Aggregations

ByteBuf (io.netty.buffer.ByteBuf)2 Test (org.junit.Test)2 GetAsyncInput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInput)2 GetAsyncInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInputBuilder)2