blob: 4d830e99c7f21c0a79a11fb9158f71d95af917ad [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.ver11;
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;
27import java.util.Set;
28
29abstract class OFActionBsnVer11 {
30 // version: 1.1
31 final static byte WIRE_VERSION = 2;
32 final static int MINIMUM_LENGTH = 16;
33
34
35 public final static OFActionBsnVer11.Reader READER = new Reader();
36
37 static class Reader implements OFMessageReader<OFActionBsn> {
38 @Override
39 public OFActionBsn readFrom(ChannelBuffer bb) throws OFParseError {
40 if(bb.readableBytes() < MINIMUM_LENGTH)
41 return null;
42 int start = bb.readerIndex();
43 // fixed value property type == 65535
44 short type = bb.readShort();
45 if(type != (short) 0xffff)
46 throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
47 int length = U16.f(bb.readShort());
48 if(length < MINIMUM_LENGTH)
49 throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
50 // fixed value property experimenter == 0x5c16c7L
51 int experimenter = bb.readInt();
52 if(experimenter != 0x5c16c7)
53 throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
54 int subtype = bb.readInt();
55 bb.readerIndex(start);
56 switch(subtype) {
57 case 0x4:
58 // discriminator value 0x4L=0x4L for class OFActionBsnChecksumVer11
59 return OFActionBsnChecksumVer11.READER.readFrom(bb);
60 case 0x1:
61 // discriminator value 0x1L=0x1L for class OFActionBsnMirrorVer11
62 return OFActionBsnMirrorVer11.READER.readFrom(bb);
63 case 0x2:
64 // discriminator value 0x2L=0x2L for class OFActionBsnSetTunnelDstVer11
65 return OFActionBsnSetTunnelDstVer11.READER.readFrom(bb);
66 default:
67 throw new OFParseError("Unknown value for discriminator subtype of class OFActionBsnVer11: " + subtype);
68 }
69 }
70 }
71}