Quantcast

receiving messages using ONLY the Jason BDI engine

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

receiving messages using ONLY the Jason BDI engine

Sura Monday
Hi All,
My work involves agents communicating across a network using a new type of middleware. When one agent sends a message to another agent,this message goes through this middleware.
For this work, I am using ONLY  the Jason BDI engine. I know that I have to override the sendMsg(jason.asSemantics.Message m) given in the FAQ code, to send out a message initiated in the agent code. However, I am not sure how  I can pass a received message to the agent code. My guess is I have to override the checkMail() method, but not sure how to.

Hope you can point out how this should be done.
Thanks.
/Sura

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: receiving messages using ONLY the Jason BDI engine

Jomi Hubner
Hi Sura, 

you are right, you need to customise the checkMail method. This method has to get the messages from your middleware and put them in the agent mailbox. You can take a look at
src/jason/infra/centralised/CentralisedAgArch.java
for an example:

    public void checkMail() {
        for (Message im : <get the messages from your middleware here>) {
            getTS().getC().addMsg(im);
        }
    }


HTH,

Jomi

On 22/08/2012, at 01:15, Sura Monday wrote:

Hi All,
My work involves agents communicating across a network using a new type of middleware. When one agent sends a message to another agent,this message goes through this middleware.
For this work, I am using ONLY  the Jason BDI engine. I know that I have to override the sendMsg(jason.asSemantics.Message m) given in the FAQ code, to send out a message initiated in the agent code. However, I am not sure how  I can pass a received message to the agent code. My guess is I have to override the checkMail() method, but not sure how to.

Hope you can point out how this should be done.
Thanks.
/Sura
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users

-- 
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: receiving messages using ONLY the Jason BDI engine

Sura Monday
Hi Jomi,
Thanks a lot. This is how I implemented it:

public void checkMail() {
        while (!localMsgQueue.isEmpty()) {
            Message im = localMsgQueue.poll();
            getTS().getC().getMailBox().offer(im);           
        }
    }
   
/Sura


From: Jomi Hubner <[hidden email]>
To: Sura Monday <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Thursday, August 23, 2012 11:01 AM
Subject: Re: [Jason-users] receiving messages using ONLY the Jason BDI engine

Hi Sura, 

you are right, you need to customise the checkMail method. This method has to get the messages from your middleware and put them in the agent mailbox. You can take a look at
src/jason/infra/centralised/CentralisedAgArch.java
for an example:

    public void checkMail() {
        for (Message im : <get the messages from your middleware here>) {
            getTS().getC().addMsg(im);
        }
    }


HTH,

Jomi

On 22/08/2012, at 01:15, Sura Monday wrote:

Hi All,
My work involves agents communicating across a network using a new type of middleware. When one agent sends a message to another agent,this message goes through this middleware.
For this work, I am using ONLY  the Jason BDI engine. I know that I have to override the sendMsg(jason.asSemantics.Message m) given in the FAQ code, to send out a message initiated in the agent code. However, I am not sure how  I can pass a received message to the agent code. My guess is I have to override the checkMail() method, but not sure how to.

Hope you can point out how this should be done.
Thanks.
/Sura
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users

-- 
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: receiving messages using ONLY the Jason BDI engine

Rafael H Bordini-2
In reply to this post by Sura Monday
Hi Sura,

Just a note to say that you don't need to use only the BDI engine IF the only reason is because you wanted to use a different middleware. I imagine you have other reasons. If others are in a similar situation, the best way to use a different middleware with Jason is to create a new "infrastructure" (and hopefully make it available for others!).

Cheers,

Rafael


On 22/08/2012 01:15, Sura Monday wrote:
Hi All,
My work involves agents communicating across a network using a new type of middleware. When one agent sends a message to another agent,this message goes through this middleware.
For this work, I am using ONLY  the Jason BDI engine. I know that I have to override the sendMsg(jason.asSemantics.Message m) given in the FAQ code, to send out a message initiated in the agent code. However, I am not sure how  I can pass a received message to the agent code. My guess is I have to override the checkMail() method, but not sure how to.

Hope you can point out how this should be done.
Thanks.
/Sura


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Loading...