blob: 5a82711b754b90caf8559c468be7045b88ed6e9e [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.ver13;
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 OFActionIdExperimenterVer13 {
29 // version: 1.3
30 final static byte WIRE_VERSION = 4;
31 final static int MINIMUM_LENGTH = 8;
32
33
34 public final static OFActionIdExperimenterVer13.Reader READER = new Reader();
35
36 static class Reader implements OFMessageReader<OFActionIdExperimenter> {
37 @Override
38 public OFActionIdExperimenter readFrom(ChannelBuffer bb) throws OFParseError {
39 if(bb.readableBytes() < MINIMUM_LENGTH)
40 return null;
41 int start = bb.readerIndex();
42 // fixed value property type == 65535
43 short type = bb.readShort();
44 if(type != (short) 0xffff)
45 throw new OFParseError("Wrong type: Expected=OFActionType.EXPERIMENTER(65535), got="+type);
46 int length = U16.f(bb.readShort());
47 if(length < MINIMUM_LENGTH)
48 throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
49 int experimenter = bb.readInt();
50 bb.readerIndex(start);
51 switch(experimenter) {
52 case 0x5c16c7:
53 // discriminator value 0x5c16c7L=0x5c16c7L for class OFActionIdBsnVer13
54 return OFActionIdBsnVer13.READER.readFrom(bb);
55 case 0x2320:
56 // discriminator value 0x2320L=0x2320L for class OFActionIdNiciraVer13
57 return OFActionIdNiciraVer13.READER.readFrom(bb);
58 default:
59 throw new OFParseError("Unknown value for discriminator experimenter of class OFActionIdExperimenterVer13: " + experimenter);
60 }
61 }
62 }
63}