blob: 51548153248d92735a4f54d63fb3625c907c4c38 [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;
27import java.util.Set;
28
29abstract class OFBsnHeaderVer13 {
30 // version: 1.3
31 final static byte WIRE_VERSION = 4;
32 final static int MINIMUM_LENGTH = 16;
33
34
35 public final static OFBsnHeaderVer13.Reader READER = new Reader();
36
37 static class Reader implements OFMessageReader<OFBsnHeader> {
38 @Override
39 public OFBsnHeader readFrom(ChannelBuffer bb) throws OFParseError {
40 if(bb.readableBytes() < MINIMUM_LENGTH)
41 return null;
42 int start = bb.readerIndex();
43 // fixed value property version == 4
44 byte version = bb.readByte();
45 if(version != (byte) 0x4)
46 throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version);
47 // fixed value property type == 4
48 byte type = bb.readByte();
49 if(type != (byte) 0x4)
50 throw new OFParseError("Wrong type: Expected=OFType.EXPERIMENTER(4), got="+type);
51 int length = U16.f(bb.readShort());
52 if(length < MINIMUM_LENGTH)
53 throw new OFParseError("Wrong length: Expected to be >= " + MINIMUM_LENGTH + ", was: " + length);
54 U32.f(bb.readInt());
55 // fixed value property experimenter == 0x5c16c7L
56 int experimenter = bb.readInt();
57 if(experimenter != 0x5c16c7)
58 throw new OFParseError("Wrong experimenter: Expected=0x5c16c7L(0x5c16c7L), got="+experimenter);
59 int subtype = bb.readInt();
60 bb.readerIndex(start);
61 switch(subtype) {
62 case 0x16:
63 // discriminator value 0x16L=0x16L for class OFBsnBwClearDataReplyVer13
64 return OFBsnBwClearDataReplyVer13.READER.readFrom(bb);
65 case 0x15:
66 // discriminator value 0x15L=0x15L for class OFBsnBwClearDataRequestVer13
67 return OFBsnBwClearDataRequestVer13.READER.readFrom(bb);
68 case 0x14:
69 // discriminator value 0x14L=0x14L for class OFBsnBwEnableGetReplyVer13
70 return OFBsnBwEnableGetReplyVer13.READER.readFrom(bb);
71 case 0x13:
72 // discriminator value 0x13L=0x13L for class OFBsnBwEnableGetRequestVer13
73 return OFBsnBwEnableGetRequestVer13.READER.readFrom(bb);
74 case 0x17:
75 // discriminator value 0x17L=0x17L for class OFBsnBwEnableSetReplyVer13
76 return OFBsnBwEnableSetReplyVer13.READER.readFrom(bb);
77 case 0x12:
78 // discriminator value 0x12L=0x12L for class OFBsnBwEnableSetRequestVer13
79 return OFBsnBwEnableSetRequestVer13.READER.readFrom(bb);
80 case 0xa:
81 // discriminator value 0xaL=0xaL for class OFBsnGetInterfacesReplyVer13
82 return OFBsnGetInterfacesReplyVer13.READER.readFrom(bb);
83 case 0x9:
84 // discriminator value 0x9L=0x9L for class OFBsnGetInterfacesRequestVer13
85 return OFBsnGetInterfacesRequestVer13.READER.readFrom(bb);
86 case 0x5:
87 // discriminator value 0x5L=0x5L for class OFBsnGetMirroringReplyVer13
88 return OFBsnGetMirroringReplyVer13.READER.readFrom(bb);
89 case 0x4:
90 // discriminator value 0x4L=0x4L for class OFBsnGetMirroringRequestVer13
91 return OFBsnGetMirroringRequestVer13.READER.readFrom(bb);
92 case 0x22:
93 // discriminator value 0x22L=0x22L for class OFBsnPduRxReplyVer13
94 return OFBsnPduRxReplyVer13.READER.readFrom(bb);
95 case 0x21:
96 // discriminator value 0x21L=0x21L for class OFBsnPduRxRequestVer13
97 return OFBsnPduRxRequestVer13.READER.readFrom(bb);
98 case 0x23:
99 // discriminator value 0x23L=0x23L for class OFBsnPduRxTimeoutVer13
100 return OFBsnPduRxTimeoutVer13.READER.readFrom(bb);
101 case 0x20:
102 // discriminator value 0x20L=0x20L for class OFBsnPduTxReplyVer13
103 return OFBsnPduTxReplyVer13.READER.readFrom(bb);
104 case 0x1f:
105 // discriminator value 0x1fL=0x1fL for class OFBsnPduTxRequestVer13
106 return OFBsnPduTxRequestVer13.READER.readFrom(bb);
107 case 0x3:
108 // discriminator value 0x3L=0x3L for class OFBsnSetMirroringVer13
109 return OFBsnSetMirroringVer13.READER.readFrom(bb);
110 case 0x19:
111 // discriminator value 0x19L=0x19L for class OFBsnSetPktinSuppressionReplyVer13
112 return OFBsnSetPktinSuppressionReplyVer13.READER.readFrom(bb);
113 case 0xb:
114 // discriminator value 0xbL=0xbL for class OFBsnSetPktinSuppressionRequestVer13
115 return OFBsnSetPktinSuppressionRequestVer13.READER.readFrom(bb);
116 case 0x10:
117 // discriminator value 0x10L=0x10L for class OFBsnVirtualPortCreateReplyVer13
118 return OFBsnVirtualPortCreateReplyVer13.READER.readFrom(bb);
119 case 0xf:
120 // discriminator value 0xfL=0xfL for class OFBsnVirtualPortCreateRequestVer13
121 return OFBsnVirtualPortCreateRequestVer13.READER.readFrom(bb);
122 case 0x1a:
123 // discriminator value 0x1aL=0x1aL for class OFBsnVirtualPortRemoveReplyVer13
124 return OFBsnVirtualPortRemoveReplyVer13.READER.readFrom(bb);
125 case 0x11:
126 // discriminator value 0x11L=0x11L for class OFBsnVirtualPortRemoveRequestVer13
127 return OFBsnVirtualPortRemoveRequestVer13.READER.readFrom(bb);
128 case 0x3c:
129 // discriminator value 0x3cL=0x3cL for class OFBsnArpIdleVer13
130 return OFBsnArpIdleVer13.READER.readFrom(bb);
131 case 0x39:
132 // discriminator value 0x39L=0x39L for class OFBsnControllerConnectionsReplyVer13
133 return OFBsnControllerConnectionsReplyVer13.READER.readFrom(bb);
134 case 0x38:
135 // discriminator value 0x38L=0x38L for class OFBsnControllerConnectionsRequestVer13
136 return OFBsnControllerConnectionsRequestVer13.READER.readFrom(bb);
137 case 0x28:
138 // discriminator value 0x28L=0x28L for class OFBsnFlowIdleVer13
139 return OFBsnFlowIdleVer13.READER.readFrom(bb);
140 case 0x27:
141 // discriminator value 0x27L=0x27L for class OFBsnFlowIdleEnableGetReplyVer13
142 return OFBsnFlowIdleEnableGetReplyVer13.READER.readFrom(bb);
143 case 0x26:
144 // discriminator value 0x26L=0x26L for class OFBsnFlowIdleEnableGetRequestVer13
145 return OFBsnFlowIdleEnableGetRequestVer13.READER.readFrom(bb);
146 case 0x25:
147 // discriminator value 0x25L=0x25L for class OFBsnFlowIdleEnableSetReplyVer13
148 return OFBsnFlowIdleEnableSetReplyVer13.READER.readFrom(bb);
149 case 0x24:
150 // discriminator value 0x24L=0x24L for class OFBsnFlowIdleEnableSetRequestVer13
151 return OFBsnFlowIdleEnableSetRequestVer13.READER.readFrom(bb);
152 case 0x31:
153 // discriminator value 0x31L=0x31L for class OFBsnGentableClearReplyVer13
154 return OFBsnGentableClearReplyVer13.READER.readFrom(bb);
155 case 0x30:
156 // discriminator value 0x30L=0x30L for class OFBsnGentableClearRequestVer13
157 return OFBsnGentableClearRequestVer13.READER.readFrom(bb);
158 case 0x2e:
159 // discriminator value 0x2eL=0x2eL for class OFBsnGentableEntryAddVer13
160 return OFBsnGentableEntryAddVer13.READER.readFrom(bb);
161 case 0x2f:
162 // discriminator value 0x2fL=0x2fL for class OFBsnGentableEntryDeleteVer13
163 return OFBsnGentableEntryDeleteVer13.READER.readFrom(bb);
164 case 0x32:
165 // discriminator value 0x32L=0x32L for class OFBsnGentableSetBucketsSizeVer13
166 return OFBsnGentableSetBucketsSizeVer13.READER.readFrom(bb);
167 case 0x34:
168 // discriminator value 0x34L=0x34L for class OFBsnGetSwitchPipelineReplyVer13
169 return OFBsnGetSwitchPipelineReplyVer13.READER.readFrom(bb);
170 case 0x33:
171 // discriminator value 0x33L=0x33L for class OFBsnGetSwitchPipelineRequestVer13
172 return OFBsnGetSwitchPipelineRequestVer13.READER.readFrom(bb);
173 case 0x2b:
174 // discriminator value 0x2bL=0x2bL for class OFBsnLacpConvergenceNotifVer13
175 return OFBsnLacpConvergenceNotifVer13.READER.readFrom(bb);
176 case 0x3f:
177 // discriminator value 0x3fL=0x3fL for class OFBsnLogVer13
178 return OFBsnLogVer13.READER.readFrom(bb);
179 case 0x37:
180 // discriminator value 0x37L=0x37L for class OFBsnRoleStatusVer13
181 return OFBsnRoleStatusVer13.READER.readFrom(bb);
182 case 0x3b:
183 // discriminator value 0x3bL=0x3bL for class OFBsnSetAuxCxnsReplyVer13
184 return OFBsnSetAuxCxnsReplyVer13.READER.readFrom(bb);
185 case 0x3a:
186 // discriminator value 0x3aL=0x3aL for class OFBsnSetAuxCxnsRequestVer13
187 return OFBsnSetAuxCxnsRequestVer13.READER.readFrom(bb);
188 case 0x2a:
189 // discriminator value 0x2aL=0x2aL for class OFBsnSetLacpReplyVer13
190 return OFBsnSetLacpReplyVer13.READER.readFrom(bb);
191 case 0x29:
192 // discriminator value 0x29L=0x29L for class OFBsnSetLacpRequestVer13
193 return OFBsnSetLacpRequestVer13.READER.readFrom(bb);
194 case 0x36:
195 // discriminator value 0x36L=0x36L for class OFBsnSetSwitchPipelineReplyVer13
196 return OFBsnSetSwitchPipelineReplyVer13.READER.readFrom(bb);
197 case 0x35:
198 // discriminator value 0x35L=0x35L for class OFBsnSetSwitchPipelineRequestVer13
199 return OFBsnSetSwitchPipelineRequestVer13.READER.readFrom(bb);
200 case 0x3d:
201 // discriminator value 0x3dL=0x3dL for class OFBsnTableSetBucketsSizeVer13
202 return OFBsnTableSetBucketsSizeVer13.READER.readFrom(bb);
203 case 0x2d:
204 // discriminator value 0x2dL=0x2dL for class OFBsnTimeReplyVer13
205 return OFBsnTimeReplyVer13.READER.readFrom(bb);
206 case 0x2c:
207 // discriminator value 0x2cL=0x2cL for class OFBsnTimeRequestVer13
208 return OFBsnTimeRequestVer13.READER.readFrom(bb);
209 default:
210 throw new OFParseError("Unknown value for discriminator subtype of class OFBsnHeaderVer13: " + subtype);
211 }
212 }
213 }
214}