tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | // Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University |
| 2 | // Copyright (c) 2011, 2012 Open Networking Foundation |
| 3 | // Copyright (c) 2012, 2013 Big Switch Networks, Inc. |
| 4 | // This library was generated by the LoxiGen Compiler. |
| 5 | // See the file LICENSE.txt which should have been included in the source distribution |
| 6 | |
| 7 | // Automatically generated by LOXI from template of_virtual_class.java |
| 8 | // Do not modify |
| 9 | |
| 10 | package org.projectfloodlight.openflow.protocol.ver13; |
| 11 | |
| 12 | import org.projectfloodlight.openflow.protocol.*; |
| 13 | import org.projectfloodlight.openflow.protocol.action.*; |
| 14 | import org.projectfloodlight.openflow.protocol.actionid.*; |
| 15 | import org.projectfloodlight.openflow.protocol.bsntlv.*; |
| 16 | import org.projectfloodlight.openflow.protocol.errormsg.*; |
| 17 | import org.projectfloodlight.openflow.protocol.meterband.*; |
| 18 | import org.projectfloodlight.openflow.protocol.instruction.*; |
| 19 | import org.projectfloodlight.openflow.protocol.instructionid.*; |
| 20 | import org.projectfloodlight.openflow.protocol.match.*; |
| 21 | import org.projectfloodlight.openflow.protocol.oxm.*; |
| 22 | import org.projectfloodlight.openflow.protocol.queueprop.*; |
| 23 | import org.projectfloodlight.openflow.types.*; |
| 24 | import org.projectfloodlight.openflow.util.*; |
| 25 | import org.projectfloodlight.openflow.exceptions.*; |
| 26 | import org.jboss.netty.buffer.ChannelBuffer; |
| 27 | import java.util.Set; |
| 28 | |
| 29 | abstract class OFActionIdVer13 { |
| 30 | // version: 1.3 |
| 31 | final static byte WIRE_VERSION = 4; |
| 32 | final static int MINIMUM_LENGTH = 4; |
| 33 | |
| 34 | |
| 35 | public final static OFActionIdVer13.Reader READER = new Reader(); |
| 36 | |
| 37 | static class Reader implements OFMessageReader<OFActionId> { |
| 38 | @Override |
| 39 | public OFActionId readFrom(ChannelBuffer bb) throws OFParseError { |
| 40 | if(bb.readableBytes() < MINIMUM_LENGTH) |
| 41 | return null; |
| 42 | int start = bb.readerIndex(); |
| 43 | short type = bb.readShort(); |
| 44 | bb.readerIndex(start); |
| 45 | switch(type) { |
| 46 | case (short) 0xffff: |
| 47 | // discriminator value OFActionType.EXPERIMENTER=65535 for class OFActionIdExperimenterVer13 |
| 48 | return OFActionIdExperimenterVer13.READER.readFrom(bb); |
| 49 | case (short) 0xc: |
| 50 | // discriminator value OFActionType.COPY_TTL_IN=12 for class OFActionIdCopyTtlInVer13 |
| 51 | return OFActionIdCopyTtlInVer13.READER.readFrom(bb); |
| 52 | case (short) 0xb: |
| 53 | // discriminator value OFActionType.COPY_TTL_OUT=11 for class OFActionIdCopyTtlOutVer13 |
| 54 | return OFActionIdCopyTtlOutVer13.READER.readFrom(bb); |
| 55 | case (short) 0x10: |
| 56 | // discriminator value OFActionType.DEC_MPLS_TTL=16 for class OFActionIdDecMplsTtlVer13 |
| 57 | return OFActionIdDecMplsTtlVer13.READER.readFrom(bb); |
| 58 | case (short) 0x18: |
| 59 | // discriminator value OFActionType.DEC_NW_TTL=24 for class OFActionIdDecNwTtlVer13 |
| 60 | return OFActionIdDecNwTtlVer13.READER.readFrom(bb); |
| 61 | case (short) 0x16: |
| 62 | // discriminator value OFActionType.GROUP=22 for class OFActionIdGroupVer13 |
| 63 | return OFActionIdGroupVer13.READER.readFrom(bb); |
| 64 | case (short) 0x0: |
| 65 | // discriminator value OFActionType.OUTPUT=0 for class OFActionIdOutputVer13 |
| 66 | return OFActionIdOutputVer13.READER.readFrom(bb); |
| 67 | case (short) 0x14: |
| 68 | // discriminator value OFActionType.POP_MPLS=20 for class OFActionIdPopMplsVer13 |
| 69 | return OFActionIdPopMplsVer13.READER.readFrom(bb); |
| 70 | case (short) 0x1b: |
| 71 | // discriminator value OFActionType.POP_PBB=27 for class OFActionIdPopPbbVer13 |
| 72 | return OFActionIdPopPbbVer13.READER.readFrom(bb); |
| 73 | case (short) 0x12: |
| 74 | // discriminator value OFActionType.POP_VLAN=18 for class OFActionIdPopVlanVer13 |
| 75 | return OFActionIdPopVlanVer13.READER.readFrom(bb); |
| 76 | case (short) 0x13: |
| 77 | // discriminator value OFActionType.PUSH_MPLS=19 for class OFActionIdPushMplsVer13 |
| 78 | return OFActionIdPushMplsVer13.READER.readFrom(bb); |
| 79 | case (short) 0x1a: |
| 80 | // discriminator value OFActionType.PUSH_PBB=26 for class OFActionIdPushPbbVer13 |
| 81 | return OFActionIdPushPbbVer13.READER.readFrom(bb); |
| 82 | case (short) 0x11: |
| 83 | // discriminator value OFActionType.PUSH_VLAN=17 for class OFActionIdPushVlanVer13 |
| 84 | return OFActionIdPushVlanVer13.READER.readFrom(bb); |
| 85 | case (short) 0x19: |
| 86 | // discriminator value OFActionType.SET_FIELD=25 for class OFActionIdSetFieldVer13 |
| 87 | return OFActionIdSetFieldVer13.READER.readFrom(bb); |
| 88 | case (short) 0xf: |
| 89 | // discriminator value OFActionType.SET_MPLS_TTL=15 for class OFActionIdSetMplsTtlVer13 |
| 90 | return OFActionIdSetMplsTtlVer13.READER.readFrom(bb); |
| 91 | case (short) 0x17: |
| 92 | // discriminator value OFActionType.SET_NW_TTL=23 for class OFActionIdSetNwTtlVer13 |
| 93 | return OFActionIdSetNwTtlVer13.READER.readFrom(bb); |
| 94 | case (short) 0x15: |
| 95 | // discriminator value OFActionType.SET_QUEUE=21 for class OFActionIdSetQueueVer13 |
| 96 | return OFActionIdSetQueueVer13.READER.readFrom(bb); |
| 97 | default: |
| 98 | throw new OFParseError("Unknown value for discriminator type of class OFActionIdVer13: " + type); |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | } |