Skip to content

Commit

Permalink
PacketEventTag: Removed PacketQueuedEvent class because the queue len…
Browse files Browse the repository at this point in the history
…gth fields were useless.

They recorded the queue length after the packet left the queue which isn't very useful.
  • Loading branch information
levy committed Nov 23, 2023
1 parent c2bdc54 commit f58673d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 0 additions & 6 deletions src/inet/common/PacketEventTag.msg
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ class PacketEvent extends cObject
b packetLength = b(-1);
}

class PacketQueuedEvent extends PacketEvent
{
int queuePacketLength = -1;
b queueDataLength = b(-1);
}

class PacketTransmittedEvent extends PacketEvent
{
bps datarate = bps(-1);
Expand Down
4 changes: 1 addition & 3 deletions src/inet/queueing/queue/PacketQueue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ Packet *PacketQueue::pullPacket(const cGate *gate)
else
queue.pop();
auto queueingTime = simTime() - packet->getArrivalTime();
auto packetEvent = new PacketQueuedEvent();
packetEvent->setQueuePacketLength(getNumPackets());
packetEvent->setQueueDataLength(getTotalLength());
auto packetEvent = new PacketEvent();
insertPacketEvent(this, packet, PEK_QUEUED, 0, queueingTime, packetEvent);
increaseTimeTag<QueueingTimeTag>(packet, queueingTime, queueingTime);
emit(packetPulledSignal, packet);
Expand Down

0 comments on commit f58673d

Please sign in to comment.