cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/hosts/network/NetworkHost.java
private void sendPacketsToLocalVms() {
        for (final HostPacket hostPkt : pktsToSendForLocalVms) {
            hostPkt.setSendTime(hostPkt.getReceiveTime());
            hostPkt.getVmPacket().setReceiveTime(getSimulation().clock());
            // insert the packet in receivedlist
            final Vm destinationVm = hostPkt.getVmPacket().getDestination();
            getVmPacketScheduler(destinationVm).addPacketToListOfPacketsSentFromVm(hostPkt.getVmPacket());
        }

        if (!pktsToSendForLocalVms.isEmpty()) {
            for (final Vm vm : getVmList()) {
                vm.updateProcessing(
                    getSimulation().clock(), getVmScheduler().getAllocatedMips(vm));
            }
        }

        pktsToSendForLocalVms.clear();
    }
/**
     * Gets the packets from the local packets buffer and sends them
     * to VMs inside this host.
     */
Gets the packets from the local packets buffer and sends them
to VMs inside this host.
Gets the packets from the local packets buffer and sends them to VMs inside this host .
private void sendPacketsToLocalVms() {
        for (final HostPacket hostPkt : pktsToSendForLocalVms) {
            hostPkt.setSendTime(hostPkt.getReceiveTime());
            hostPkt.getVmPacket().setReceiveTime(getSimulation().clock());
            final Vm destinationVm = hostPkt.getVmPacket().getDestination();
            getVmPacketScheduler(destinationVm).addPacketToListOfPacketsSentFromVm(hostPkt.getVmPacket());
        }
        if (!pktsToSendForLocalVms.isEmpty()) {
            for (final Vm vm : getVmList()) {
                vm.updateProcessing(
                    getSimulation().clock(), getVmScheduler().getAllocatedMips(vm));
            }
        }
        pktsToSendForLocalVms.clear();
    }
private void sendPacketsToLocalVms ( ) { for ( final HostPacket hostPkt : pktsToSendForLocalVms ) { hostPkt . setSendTime ( hostPkt . getReceiveTime ( ) ) ; hostPkt . getVmPacket ( ) . setReceiveTime ( getSimulation ( ) . clock ( ) ) ; final Vm destinationVm = hostPkt . getVmPacket ( ) . getDestination ( ) ; getVmPacketScheduler ( destinationVm ) . addPacketToListOfPacketsSentFromVm ( hostPkt . getVmPacket ( ) ) ; } if ( ! pktsToSendForLocalVms . isEmpty ( ) ) { for ( final Vm vm : getVmList ( ) ) { vm . updateProcessing ( getSimulation ( ) . clock ( ) , getVmScheduler ( ) . getAllocatedMips ( vm ) ) ; } } pktsToSendForLocalVms . clear ( ) ; }
Gets the packets from the local packets buffer and sends them
 to VMs inside this host.
Gets the packets from the local packets buffer and sends them to VMs inside this host .
// insert the packet in receivedlist