test_class.file: src/agents/apps/floodlight/floodlight-1.2/src/test/java/net/floodlightcontroller/packet/SPUDTest.java
test_class.identifier: SPUDTest
test_case.body: @Test
      public void testDeserialize() throws PacketParsingException {
          byte[] spudPacket =  {
                  (byte) 0xd8, 0x00, 0x00, (byte) 0xd8, (byte) 0xb6,
                  0x40, 0x17, (byte) 0x88, 0x0a, 0x51, 0x01, 0x07,
                  0x00, (byte) 0xa1, 0x00, (byte) 0xa2, 0x68, 0x75,
                  0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x65,
                  0x4a, 0x61, 0x63, 0x6f, 0x62, 0x67, 0x6d, 0x65,
                  0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x68, 0x61,
                  0x73, 0x20, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64,
                  0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6f,
                  0x6d
          };
          SPUD packet = new SPUD();
          packet.deserialize(spudPacket, 0, spudPacket.length);
          byte[] packetSerialized = packet.serialize();
          assertTrue(Arrays.equals(spudPacket, packetSerialized));
      }
test_case.class_method_signature: SPUDTest.testDeserialize()
test_case.full_signature: @Test public void testDeserialize()
test_case.identifier: testDeserialize
test_case.invocations: deserialize serialize assertTrue equals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDeserialize()
focal_class.declarator: MAGIC_CONSTANT =
          { (byte) 0xd8, 0x00, 0x00, (byte) 0xd8 }
focal_class.modifier: public static final
focal_class.original_string: public static final byte[] MAGIC_CONSTANT =
          { (byte) 0xd8, 0x00, 0x00, (byte) 0xd8 };
focal_class.type: byte[]
focal_class.var_name: MAGIC_CONSTANT
focal_class.declarator: HEADER_LENGTH = 13
focal_class.modifier: public static final
focal_class.original_string: public static final int HEADER_LENGTH = 13;
focal_class.type: int
focal_class.var_name: HEADER_LENGTH
focal_class.declarator: COMMAND_DATA = 0x0
focal_class.modifier: public static final
focal_class.original_string: public static final byte COMMAND_DATA = 0x0;
focal_class.type: byte
focal_class.var_name: COMMAND_DATA
focal_class.declarator: COMMAND_OPEN = 0x1
focal_class.modifier: public static final
focal_class.original_string: public static final byte COMMAND_OPEN = 0x1;
focal_class.type: byte
focal_class.var_name: COMMAND_OPEN
focal_class.declarator: COMMAND_CLOSE = 0x2
focal_class.modifier: public static final
focal_class.original_string: public static final byte COMMAND_CLOSE = 0x2;
focal_class.type: byte
focal_class.var_name: COMMAND_CLOSE
focal_class.declarator: COMMAND_ACK = 0x3
focal_class.modifier: public static final
focal_class.original_string: public static final byte COMMAND_ACK = 0x3;
focal_class.type: byte
focal_class.var_name: COMMAND_ACK
focal_class.declarator: tubeID
focal_class.modifier: protected
focal_class.original_string: protected long tubeID;
focal_class.type: long
focal_class.var_name: tubeID
focal_class.declarator: command
focal_class.modifier: protected
focal_class.original_string: protected byte command;
focal_class.type: byte
focal_class.var_name: command
focal_class.declarator: adec
focal_class.modifier: protected
focal_class.original_string: protected boolean adec;
focal_class.type: boolean
focal_class.var_name: adec
focal_class.declarator: pdec
focal_class.modifier: protected
focal_class.original_string: protected boolean pdec;
focal_class.type: boolean
focal_class.var_name: pdec
focal_class.declarator: reserved
focal_class.modifier: protected
focal_class.original_string: protected byte reserved;
focal_class.type: byte
focal_class.var_name: reserved
focal_class.file: src/agents/apps/floodlight/floodlight-1.2/src/main/java/net/floodlightcontroller/packet/SPUD.java
focal_class.identifier: SPUD
focal_class.class_method_signature: SPUD.getTubeID()
focal_class.full_signature: public long getTubeID()
focal_class.identifier: getTubeID
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getTubeID()
focal_class.class_method_signature: SPUD.setTubeID(long tubeID)
focal_class.full_signature: public SPUD setTubeID(long tubeID)
focal_class.identifier: setTubeID
focal_class.modifiers: public
focal_class.parameters: (long tubeID)
focal_class.return: SPUD
focal_class.signature: SPUD setTubeID(long tubeID)
focal_class.class_method_signature: SPUD.getCommand()
focal_class.full_signature: public byte getCommand()
focal_class.identifier: getCommand
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte
focal_class.signature: byte getCommand()
focal_class.class_method_signature: SPUD.setCommand(byte command)
focal_class.full_signature: public SPUD setCommand(byte command)
focal_class.identifier: setCommand
focal_class.modifiers: public
focal_class.parameters: (byte command)
focal_class.return: SPUD
focal_class.signature: SPUD setCommand(byte command)
focal_class.class_method_signature: SPUD.getADEC()
focal_class.full_signature: public boolean getADEC()
focal_class.identifier: getADEC
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean getADEC()
focal_class.class_method_signature: SPUD.setADEC(boolean adec)
focal_class.full_signature: public SPUD setADEC(boolean adec)
focal_class.identifier: setADEC
focal_class.modifiers: public
focal_class.parameters: (boolean adec)
focal_class.return: SPUD
focal_class.signature: SPUD setADEC(boolean adec)
focal_class.class_method_signature: SPUD.getPDEC()
focal_class.full_signature: public boolean getPDEC()
focal_class.identifier: getPDEC
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean getPDEC()
focal_class.class_method_signature: SPUD.setPDEC(boolean pdec)
focal_class.full_signature: public SPUD setPDEC(boolean pdec)
focal_class.identifier: setPDEC
focal_class.modifiers: public
focal_class.parameters: (boolean pdec)
focal_class.return: SPUD
focal_class.signature: SPUD setPDEC(boolean pdec)
focal_class.class_method_signature: SPUD.getReserved()
focal_class.full_signature: public byte getReserved()
focal_class.identifier: getReserved
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte
focal_class.signature: byte getReserved()
focal_class.class_method_signature: SPUD.setReserved(byte reserved)
focal_class.full_signature: public SPUD setReserved(byte reserved)
focal_class.identifier: setReserved
focal_class.modifiers: public
focal_class.parameters: (byte reserved)
focal_class.return: SPUD
focal_class.signature: SPUD setReserved(byte reserved)
focal_class.class_method_signature: SPUD.serialize()
focal_class.full_signature: @Override public byte[] serialize()
focal_class.identifier: serialize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] serialize()
focal_class.class_method_signature: SPUD.deserialize(byte[] data, int offset, int length)
focal_class.full_signature: @Override public IPacket deserialize(byte[] data, int offset, int length)
focal_class.identifier: deserialize
focal_class.modifiers: @Override public
focal_class.parameters: (byte[] data, int offset, int length)
focal_class.return: IPacket
focal_class.signature: IPacket deserialize(byte[] data, int offset, int length)
focal_class.class_method_signature: SPUD.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: SPUD.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.superclass: extends BasePacket
focal_method.body: @Override
      public IPacket deserialize(byte[] data, int offset, int length)
              throws PacketParsingException {
          ByteBuffer bb = ByteBuffer.wrap(data, offset, length);
          byte[] magicConstant = new byte[MAGIC_CONSTANT.length];
          bb.get(magicConstant, 0, MAGIC_CONSTANT.length);
          if (!Arrays.equals(magicConstant, MAGIC_CONSTANT)) {
              throw new PacketParsingException("Magic constant is incorrect.");
          }
          tubeID = bb.getLong();
          byte lastByte = bb.get();
          command = (byte) ((lastByte & 0xc0) >>> 6);
          adec = ((lastByte & 0x20) != 0);
          pdec = ((lastByte & 0x10) != 0);
          reserved = (byte) (lastByte & 0xF);
          // TODO: make sure reserved bits are 0 for this version.
          this.payload = new Data();
          this.payload = payload.deserialize(data, bb.position(), bb.limit()-bb.position());
          this.payload.setParent(this);
          return this;
      }
focal_method.class_method_signature: SPUD.deserialize(byte[] data, int offset, int length)
focal_method.full_signature: @Override public IPacket deserialize(byte[] data, int offset, int length)
focal_method.identifier: deserialize
focal_method.invocations: wrap get equals getLong get deserialize position limit position setParent
focal_method.modifiers: @Override public
focal_method.parameters: (byte[] data, int offset, int length)
focal_method.return: IPacket
focal_method.signature: IPacket deserialize(byte[] data, int offset, int length)