title bug fix: mote may have several log interfaces

This commit is contained in:
fros4943 2010-02-03 15:55:50 +00:00
parent 778c14e9e3
commit 182805a65d

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: LogListener.java,v 1.24 2010/01/15 10:54:05 fros4943 Exp $ * $Id: LogListener.java,v 1.25 2010/02/03 15:55:50 fros4943 Exp $
*/ */
package se.sics.cooja.plugins; package se.sics.cooja.plugins;
@ -297,15 +297,8 @@ public class LogListener extends VisPlugin {
} }
private void updateTitle() { private void updateTitle() {
int observing = simulation.getEventCentral().getLogOutputObservationsCount(); setTitle("Log Listener (listening on "
int tot = simulation.getMotesCount(); + simulation.getEventCentral().getLogOutputObservationsCount() + " log interfaces)");
if (observing == tot) {
setTitle("Log Listener (listening on all " + simulation.getMotesCount() + " motes)");
} else {
setTitle("Log Listener (listening on "
+ simulation.getEventCentral().getLogOutputObservationsCount() + "/"
+ simulation.getMotesCount() + " motes)");
}
} }
public void closePlugin() { public void closePlugin() {