public static int toWireValue(Set<OFTableConfig> set) { int wireValue = 0; for(OFTableConfig e: set) { switch(e) { case TABLE_MISS_CONTROLLER: wireValue |= TABLE_MISS_CONTROLLER_VAL; break; case TABLE_MISS_CONTINUE: wireValue |= TABLE_MISS_CONTINUE_VAL; break; case TABLE_MISS_DROP: wireValue |= TABLE_MISS_DROP_VAL; break; default: throw new IllegalArgumentException("Illegal enum value for type OFTableConfig in version 1.2: " + e); } } return wireValue; }
public static int toWireValue(Set<OFTableConfig> set) { int wireValue = 0; for(OFTableConfig e: set) { switch(e) { case TABLE_MISS_CONTROLLER: wireValue |= TABLE_MISS_CONTROLLER_VAL; break; case TABLE_MISS_CONTINUE: wireValue |= TABLE_MISS_CONTINUE_VAL; break; case TABLE_MISS_DROP: wireValue |= TABLE_MISS_DROP_VAL; break; default: throw new IllegalArgumentException("Illegal enum value for type OFTableConfig in version 1.1: " + e); } } return wireValue; }
public static int toWireValue(Set<OFTableConfig> set) { int wireValue = 0; for(OFTableConfig e: set) { switch(e) { case DEPRECATED_MASK: wireValue |= DEPRECATED_MASK_VAL; break; case EVICTION: wireValue |= EVICTION_VAL; break; case VACANCY_EVENTS: wireValue |= VACANCY_EVENTS_VAL; break; default: throw new IllegalArgumentException("Illegal enum value for type OFTableConfig in version 1.4: " + e); } } return wireValue; }
public static int toWireValue(Set<OFTableConfig> set) { int wireValue = 0; for(OFTableConfig e: set) { switch(e) { case DEPRECATED_MASK: wireValue |= DEPRECATED_MASK_VAL; break; case EVICTION: wireValue |= EVICTION_VAL; break; case VACANCY_EVENTS: wireValue |= VACANCY_EVENTS_VAL; break; default: throw new IllegalArgumentException("Illegal enum value for type OFTableConfig in version 1.5: " + e); } } return wireValue; }
public static Set<OFTableConfig> readFrom(ChannelBuffer bb) throws OFParseError { try { return ofWireValue(bb.readInt()); } catch (IllegalArgumentException e) { throw new OFParseError(e); } }
public static Set<OFTableConfig> ofWireValue(int val) { EnumSet<OFTableConfig> set = EnumSet.noneOf(OFTableConfig.class); if((val & TABLE_MISS_MASK_VAL) == TABLE_MISS_CONTROLLER_VAL) set.add(OFTableConfig.TABLE_MISS_CONTROLLER); else if((val & TABLE_MISS_MASK_VAL) == TABLE_MISS_CONTINUE_VAL) set.add(OFTableConfig.TABLE_MISS_CONTINUE); else if((val & TABLE_MISS_MASK_VAL) == TABLE_MISS_DROP_VAL) set.add(OFTableConfig.TABLE_MISS_DROP); return Collections.unmodifiableSet(set); }
public static Set<OFTableConfig> ofWireValue(int val) { EnumSet<OFTableConfig> set = EnumSet.noneOf(OFTableConfig.class); if((val & DEPRECATED_MASK_VAL) != 0) set.add(OFTableConfig.DEPRECATED_MASK); return Collections.unmodifiableSet(set); }
public static int toWireValue(Set<OFTableConfig> set) { int wireValue = 0; for(OFTableConfig e: set) { switch(e) { case DEPRECATED_MASK: wireValue |= DEPRECATED_MASK_VAL; break; default: throw new IllegalArgumentException("Illegal enum value for type OFTableConfig in version 1.3: " + e); } } return wireValue; }
public static Set<OFTableConfig> ofWireValue(int val) { EnumSet<OFTableConfig> set = EnumSet.noneOf(OFTableConfig.class); if((val & DEPRECATED_MASK_VAL) != 0) set.add(OFTableConfig.DEPRECATED_MASK); if((val & EVICTION_VAL) != 0) set.add(OFTableConfig.EVICTION); if((val & VACANCY_EVENTS_VAL) != 0) set.add(OFTableConfig.VACANCY_EVENTS); return Collections.unmodifiableSet(set); }
public static Set<OFTableConfig> readFrom(ByteBuf bb) throws OFParseError { try { return ofWireValue(bb.readInt()); } catch (IllegalArgumentException e) { throw new OFParseError(e); } }
public static void writeTo(ChannelBuffer bb, Set<OFTableConfig> set) { bb.writeInt(toWireValue(set)); }
public static void putTo(Set<OFTableConfig> set, PrimitiveSink sink) { sink.putInt(toWireValue(set)); }
public static void writeTo(ByteBuf bb, Set<OFTableConfig> set) { bb.writeInt(toWireValue(set)); }