blob: 896197d979155ecca903f2c85bc5821238256e3a [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001// 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
10package org.projectfloodlight.openflow.protocol.ver12;
11
12import org.projectfloodlight.openflow.protocol.*;
13import org.projectfloodlight.openflow.protocol.action.*;
14import org.projectfloodlight.openflow.protocol.actionid.*;
15import org.projectfloodlight.openflow.protocol.bsntlv.*;
16import org.projectfloodlight.openflow.protocol.errormsg.*;
17import org.projectfloodlight.openflow.protocol.meterband.*;
18import org.projectfloodlight.openflow.protocol.instruction.*;
19import org.projectfloodlight.openflow.protocol.instructionid.*;
20import org.projectfloodlight.openflow.protocol.match.*;
21import org.projectfloodlight.openflow.protocol.oxm.*;
22import org.projectfloodlight.openflow.protocol.queueprop.*;
23import org.projectfloodlight.openflow.types.*;
24import org.projectfloodlight.openflow.util.*;
25import org.projectfloodlight.openflow.exceptions.*;
26import org.jboss.netty.buffer.ChannelBuffer;
27
28abstract class OFQueuePropVer12 {
29 // version: 1.2
30 final static byte WIRE_VERSION = 3;
31 final static int MINIMUM_LENGTH = 8;
32
33
34 public final static OFQueuePropVer12.Reader READER = new Reader();
35
36 static class Reader implements OFMessageReader<OFQueueProp> {
37 @Override
38 public OFQueueProp readFrom(ChannelBuffer bb) throws OFParseError {
39 if(bb.readableBytes() < MINIMUM_LENGTH)
40 return null;
41 int start = bb.readerIndex();
42 short type = bb.readShort();
43 bb.readerIndex(start);
44 switch(type) {
45 case (short) 0x1:
46 // discriminator value 0x1=0x1 for class OFQueuePropMinRateVer12
47 return OFQueuePropMinRateVer12.READER.readFrom(bb);
48 case (short) 0xffff:
49 // discriminator value 0xffff=0xffff for class OFQueuePropExperimenterVer12
50 return OFQueuePropExperimenterVer12.READER.readFrom(bb);
51 case (short) 0x2:
52 // discriminator value 0x2=0x2 for class OFQueuePropMaxRateVer12
53 return OFQueuePropMaxRateVer12.READER.readFrom(bb);
54 default:
55 throw new OFParseError("Unknown value for discriminator type of class OFQueuePropVer12: " + type);
56 }
57 }
58 }
59}