fatma chamekh
2014-08-29 13:19:22 UTC
Hi all,
I am a little bit confused in the way to send message between agent. I
think there is two differents way : if agents are in the same container, or
if they are in differents containers.
should i use the same code in each case
like for exemple :(sure after registration in DF)
sender
ACLMessage msg = new ACLMessage(ACLMessage.INFORM);
msg.addReceiver(tet2o);
msg.setLanguage("StringLanguage");
msg.setContent(res.getLabel().toString());
msg.setDefaultEnvelope();
Receiver
ACLMessage msg = blockingReceive();
if (msg!=null System.out.println(getLocalName()+ " rx
msg"+msg.getContent());
I tried those instructions, it doesn't work.
I don't know what is wrong.
Thanks
Cliquez ici pour Répo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140829/8fa6e745/attachment.html>
I am a little bit confused in the way to send message between agent. I
think there is two differents way : if agents are in the same container, or
if they are in differents containers.
should i use the same code in each case
like for exemple :(sure after registration in DF)
sender
ACLMessage msg = new ACLMessage(ACLMessage.INFORM);
msg.addReceiver(tet2o);
msg.setLanguage("StringLanguage");
msg.setContent(res.getLabel().toString());
msg.setDefaultEnvelope();
Receiver
ACLMessage msg = blockingReceive();
if (msg!=null System.out.println(getLocalName()+ " rx
msg"+msg.getContent());
I tried those instructions, it doesn't work.
I don't know what is wrong.
Thanks
Cliquez ici pour Répo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140829/8fa6e745/attachment.html>