private void getDataFromEvent(Sim_event ev)
    {
        IO_data io = (IO_data) ev.get_data();

        // if the sender is not part of the overall network topology
        // whereas this entity is, then need to return back the data,
        // since it is not compatible.
        if (link_ != null)
        {
            // outName = "Output_xxx", where xxx = sender entity name
            String outName = GridSim.getEntityName( ev.get_src() );

            // NOTE: this is a HACK job. "Output_" has 7 chars. So,
            // the idea is to get only the entity name by removing
            // "Output_" word in the outName string.
            String name = outName.substring(7);

            // if the sender is not system GIS then ignore the message
            if (GridSim.getEntityId(name) != GridSim.getGridInfoServiceEntityId())
            {
                // sends back the data to "Input_xxx", where
                // xxx = sender entity name. If not sent, then the sender
                // will wait forever to receive this data. As a result,
                // the whole simulation program will be hanged or does not
                // terminate successfully.
                int id = GridSim.getEntityId("Input_" + name);
                super.sim_schedule(id, 0.0, ev.get_tag(), io);

                // print an error message
                System.out.println(super.get_name() + ".body(): Error - " +
                    "incompatible message protocol.");
                System.out.println("    Sender: " + name + " is not part " +
                    "of this entity's network topology.");
                System.out.println("    Hence, sending back the received data.");
                System.out.println();
                return;
            }
        }

        // NOTE: need to have a try-catch statement. This is because,
        // if the above if statement holds, then Input_receiver will send
        // back to Input_sender without going through Output_receiver entity.
        // Hence, a try-catch is needed to prevent exception of wrong casting.
        try
        {
            // Simulate Transmission Time after Receiving
            // Hold first then dispatch
            double senderBaudRate = ( (Output)
                    Sim_system.get_entity(ev.get_src()) ).getBaudRate();

            // NOTE: io is in byte and baud rate is in bits. 1 byte = 8 bits
            // So, convert io into bits
            double minBaudRate = Math.min(baudRate_, senderBaudRate);
            double communicationDelay = GridSimRandom.realIO(
                    (io.getByteSize() * BITS) / minBaudRate);

            // NOTE: Below is a deprecated method for SimJava 2
            //super.sim_hold(communicationDelay);
            super.sim_process(communicationDelay);   // receiving time
        }
        catch (Exception e) {
            // .... empty
        }

        // Deliver Event to the entity (its parent) to which
        // it is acting as buffer
        super.sim_schedule( inPort_, GridSimTags.SCHEDULE_NOW,
                ev.get_tag(), io.getData() );
    }