public void handlePacketTransmissionEvent(PacketTransmissionEvent event) {
	current_qsize -= event.packet_size;
	available_tsize -= event.packet_size;
	if (current_qsize < 0 || available_tsize < 0) {
	    EponSimulator.printError("Trying to handle an invalid packet transmission!");
	}

	packets_sent++;
	PacketArrivalEvent packet_transmitted = (PacketArrivalEvent) (upstream_queue.getNextEvent(true));
	double current_packet_delay = event.time - packet_transmitted.time;
	if (current_packet_delay > maximum_packet_delay) {
	    maximum_packet_delay = current_packet_delay;
	}
	packets_delay += current_packet_delay;

	if (EponSimulator.onu_queue_threshold == 0) {
	    current_dba_packets_sent++;
	    current_dba_packets_delay += current_packet_delay;
	}

	if (EponSimulator.simulation_verbose) {
	    event.printEvent();
	}

	PacketArrivalEvent next_packet_to_transmit = (PacketArrivalEvent) (upstream_queue.getNextEvent(false));
	int next_packet_size = next_packet_to_transmit == null ? 0 : next_packet_to_transmit.packet_size;
	if (next_packet_size > 0 && next_packet_size <= available_tsize - EponSimulator.REPORT_SIZE) {
	    double next_packet_transmission_time = event.time + (double) next_packet_size / EponSimulator.uplink_capacity;
	    EponSimulator.handler.addEvent(new PacketTransmissionEvent (next_packet_transmission_time, this, "handlePacketTransmissionEvent", next_packet_size));
	} else if (EponSimulator.REPORT_SIZE <= available_tsize) {
	    double next_traffic_report_time = event.time + traffic_report_transmission_time;	    
	    EponSimulator.handler.addEvent(new TrafficReportEvent (next_traffic_report_time, this, "handleTrafficReportEvent"));
	} 
    }