Search in sources :

Example 1 with PortMessageBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortMessageBuilder in project openflowplugin by opendaylight.

the class PortMessageDeserializer method deserialize.

@Override
public PortMessage deserialize(ByteBuf message) {
    final PortMessageBuilder builder = new PortMessageBuilder().setVersion((short) EncodeConstants.OF13_VERSION_ID).setXid(message.readUnsignedInt()).setPortNumber(new PortNumberUni(message.readUnsignedInt()));
    message.skipBytes(PADDING_IN_PORT_MOD_MESSAGE_1);
    builder.setHardwareAddress(ByteBufUtils.readIetfMacAddress(message));
    message.skipBytes(PADDING_IN_PORT_MOD_MESSAGE_2);
    builder.setConfiguration(readPortConfig(message));
    // Skip mask
    message.skipBytes(EncodeConstants.SIZE_OF_INT_IN_BYTES);
    builder.setAdvertisedFeatures(readPortFeatures(message));
    message.skipBytes(PADDING_IN_PORT_MOD_MESSAGE_3);
    return builder.build();
}
Also used : PortNumberUni(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortNumberUni) PortMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortMessageBuilder)

Aggregations

PortMessageBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortMessageBuilder)1 PortNumberUni (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortNumberUni)1