X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0ffc37686edcc803601f76ab51fdfed5fc2f241..f26cd6685142f04fd0024837cd5251ceb34dbc41:/examples/java/tracing/Sender.java diff --git a/examples/java/tracing/Sender.java b/examples/java/tracing/Sender.java index 30d0dc3e24..82930bdcb8 100644 --- a/examples/java/tracing/Sender.java +++ b/examples/java/tracing/Sender.java @@ -1,12 +1,11 @@ -/* - * Sender of basic ping/pong example - * - * Copyright (c) 2006-2013. The SimGrid Team. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. - */ +/* Sender of basic ping/pong example */ + +/* Copyright (c) 2006-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + package tracing; import org.simgrid.msg.Host; import org.simgrid.msg.HostNotFoundException; @@ -27,7 +26,7 @@ public class Sender extends Process { public void main(String[] args) throws MsgException { Msg.info("hello !"); - Trace.hostPushState (host.getName(), "PM_STATE", "sendingPing"); + Trace.hostPushState (getHost().getName(), "PM_STATE", "sendingPing"); int hostCount = args.length; Msg.info("host count: " + hostCount); @@ -52,7 +51,7 @@ public class Sender extends Process { ping.setTime(time); ping.send(mailboxes[pos]); - Trace.hostPushState (host.getName(), "PM_STATE", "waitingPong"); + Trace.hostPushState (getHost().getName(), "PM_STATE", "waitingPong"); pong = (PingPongTask)Task.receive(getHost().getName()); double timeGot = Msg.getClock(); double timeSent = ping.getTime(); @@ -68,11 +67,11 @@ public class Sender extends Process { Msg.info(" --- bw "+ commSizeBw/communicationTime + " ----"); /* Pop the last state (going back to sending ping) */ - Trace.hostPopState (host.getName(), "PM_STATE"); + Trace.hostPopState (getHost().getName(), "PM_STATE"); } /* Pop the sendingPong state */ - Trace.hostPopState (host.getName(), "PM_STATE"); + Trace.hostPopState (getHost().getName(), "PM_STATE"); Msg.info("goodbye!"); } }