|
@@ -41,6 +41,8 @@ public class SimplePacket extends Packet {
|
|
|
* @param payload
|
|
|
* String which represents the payload which is encapsulated by
|
|
|
* this packet
|
|
|
+ * @param label
|
|
|
+ * Label of this packet, represented as a short
|
|
|
*/
|
|
|
public SimplePacket(long time, Port source, Port destination, String payload) {
|
|
|
super(time, source, destination);
|
|
@@ -48,6 +50,29 @@ public class SimplePacket extends Packet {
|
|
|
this.destination = destination;
|
|
|
this.payload = payload;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Creates a new dummy packet with a String as payload
|
|
|
+ *
|
|
|
+ * @param time
|
|
|
+ * time the package was created in System.currentTimeMillis
|
|
|
+ * @param source
|
|
|
+ * SmartDevice which sent this packet
|
|
|
+ * @param destination
|
|
|
+ * SmartDevice which should receive this packet
|
|
|
+ * @param payload
|
|
|
+ * String which represents the payload which is encapsulated by
|
|
|
+ * this packet
|
|
|
+ * @param label
|
|
|
+ * Label of this packet, represented as a short
|
|
|
+ */
|
|
|
+ public SimplePacket(long time, Port source, Port destination, String payload, short label) {
|
|
|
+ super(time, source, destination);
|
|
|
+ this.source = source;
|
|
|
+ this.destination = destination;
|
|
|
+ this.payload = payload;
|
|
|
+ this.label = label;
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
|
public byte[] dumpBytes() {
|