RE: [jade-develop] How to suspend an agent so that I ahve enough time todisplay teh sniffer agent out in the RMA


Subject: RE: [jade-develop] How to suspend an agent so that I ahve enough time todisplay teh sniffer agent out in the RMA
From: Bellifemine Fabio (Fabio.Bellifemine@TILAB.COM)
Date: Thu Mar 13 2003 - 09:19:18 MET


David, this is what the javadoc of doWait() says:
 
Make a state transition from active to waiting within Agent Platform Life Cycle. This method can be called by the Agent Platform or by the agent itself and causes the agent to block, stopping all its activities until some event happens. A waiting agent wakes up as soon as a message arrives or when doWake() is called. Calling doWait() on a suspended or waiting agent has no effect.
Java gives you the sleep() method that serves your purpose.
-----Original Message-----
From: David [mailto:amdawong@starhub.net.sg]
Sent: 13 March 2003 05:14
To: JADE
Subject: [jade-develop] How to suspend an agent so that I ahve enough time todisplay teh sniffer agent out in the RMA

Hi Jaders,
 
I am trying to put a wait() instruction somewhere in my code so that
I have enough time to click on the agents which I am trying to show the ACL messages exchanges between them
in a demo.
 
I have a problem. I tried to use doWait(3000). It doesn't really work coz the agent just wakes up whenever messages arrive.
As such, it is such that before the sniffer ( as it usually takes some tiem before it appears) agents appear so that I can click on the
Agents which I want to listen to, the whole auction process is completed and I do not get to listen or show any message exchange at all.
 
I tried to use
doSuspend();
doWait(3000);
doActivate();
 
in one of my behaviours code ( this is the behaviour which I want to monitor the message exchanges in),
the agents just suspends forever.
 
I hope someone can shed some light on how can I achieve my objective of showing the ACL Message exchanges between agents before all
these message exchanges are completed.
 
Many thanks !!
 
 
Regards
David

David, this is what the javadoc of doWait() says:
 
Make a state transition from active to waiting within Agent Platform Life Cycle. This method can be called by the Agent Platform or by the agent itself and causes the agent to block, stopping all its activities until some event happens. A waiting agent wakes up as soon as a message arrives or when doWake() is called. Calling doWait() on a suspended or waiting agent has no effect.
Java gives you the sleep() method that serves your purpose.
-----Original Message-----
From: David [mailto:amdawong@starhub.net.sg]
Sent: 13 March 2003 05:14
To: JADE
Subject: [jade-develop] How to suspend an agent so that I ahve enough time todisplay teh sniffer agent out in the RMA

Hi Jaders,

 

I am trying to put a wait() instruction somewhere in my code so that

I have enough time to click on the agents which I am trying to show the ACL messages exchanges between them

in a demo.

 

I have a problem. I tried to use doWait(3000). It doesn’t really work coz the agent just wakes up whenever messages arrive.

As such, it is such that before the sniffer ( as it usually takes some tiem before it appears) agents appear so that I can click on the

Agents which I want to listen to, the whole auction process is completed and I do not get to listen or show any message exchange at all.

 

I tried to use

doSuspend();

doWait(3000);

doActivate();

 

in one of my behaviours code ( this is the behaviour which I want to monitor the message exchanges in),

the agents just suspends forever.

 

I hope someone can shed some light on how can I achieve my objective of showing the ACL Message exchanges between agents before all

these message exchanges are completed.

 

Many thanks !!

 

 

Regards

David

_______________________________________________
jade-develop mailing list
jade-develop@sharon.cselt.it
http://sharon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT http://jade.cselt.it/mailing.htm#unsubscribe



This archive was generated by hypermail 2a22 : Thu Mar 13 2003 - 09:19:45 MET