public static OFControllerRoleReason readFrom(ChannelBuffer bb) throws OFParseError { try { return ofWireValue(bb.readByte()); } catch (IllegalArgumentException e) { throw new OFParseError(e); } }
public static OFControllerRoleReason ofWireValue(byte val) { switch(val) { case MASTER_REQUEST_VAL: return OFControllerRoleReason.MASTER_REQUEST; case CONFIG_VAL: return OFControllerRoleReason.CONFIG; case EXPERIMENTER_VAL: return OFControllerRoleReason.EXPERIMENTER; default: throw new IllegalArgumentException("Illegal wire value for type OFControllerRoleReason in version 1.4: " + val); } }
public static byte toWireValue(OFControllerRoleReason e) { switch(e) { case MASTER_REQUEST: return MASTER_REQUEST_VAL; case CONFIG: return CONFIG_VAL; case EXPERIMENTER: return EXPERIMENTER_VAL; default: throw new IllegalArgumentException("Illegal enum value for type OFControllerRoleReason in version 1.4: " + e); } }
public static OFControllerRoleReason readFrom(ByteBuf bb) throws OFParseError { try { return ofWireValue(bb.readByte()); } catch (IllegalArgumentException e) { throw new OFParseError(e); } }
public static OFControllerRoleReason ofWireValue(byte val) { switch(val) { case MASTER_REQUEST_VAL: return OFControllerRoleReason.MASTER_REQUEST; case CONFIG_VAL: return OFControllerRoleReason.CONFIG; case EXPERIMENTER_VAL: return OFControllerRoleReason.EXPERIMENTER; default: throw new IllegalArgumentException("Illegal wire value for type OFControllerRoleReason in version 1.5: " + val); } }
public static byte toWireValue(OFControllerRoleReason e) { switch(e) { case MASTER_REQUEST: return MASTER_REQUEST_VAL; case CONFIG: return CONFIG_VAL; case EXPERIMENTER: return EXPERIMENTER_VAL; default: throw new IllegalArgumentException("Illegal enum value for type OFControllerRoleReason in version 1.5: " + e); } }
public static void writeTo(ChannelBuffer bb, OFControllerRoleReason e) { bb.writeByte(toWireValue(e)); }
public static void putTo(OFControllerRoleReason e, PrimitiveSink sink) { sink.putByte(toWireValue(e)); }
public static void writeTo(ByteBuf bb, OFControllerRoleReason e) { bb.writeByte(toWireValue(e)); }