use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ErrorTypeV10 in project openflowplugin by opendaylight.
the class OF10ErrorMessageFactory method deserialize.
@Override
public ErrorMessage deserialize(ByteBuf rawMessage) {
ErrorMessageBuilder builder = new ErrorMessageBuilder();
builder.setVersion((short) EncodeConstants.OF10_VERSION_ID);
builder.setXid(rawMessage.readUnsignedInt());
int type = rawMessage.readUnsignedShort();
ErrorTypeV10 errorType = ErrorTypeV10.forValue(type);
decodeType(builder, errorType, type);
decodeCode(rawMessage, builder, errorType);
int remainingBytes = rawMessage.readableBytes();
if (remainingBytes > 0) {
byte[] data = new byte[remainingBytes];
rawMessage.readBytes(data);
builder.setData(data);
}
return builder.build();
}
Aggregations