10.07.2015 Views

pdf - 395 K - Ecole des mines de Nantes

pdf - 395 K - Ecole des mines de Nantes

pdf - 395 K - Ecole des mines de Nantes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}}}return (AgentId) first;using System;5. Class MAP.Messagenamespace MAP{/// /// Defines messages for inter-agent communication./// [Serializable]public class Message{// Message natures.public enum Natures {Request, Inform};private Natures _nature;private AgentId _sen<strong>de</strong>r, _recipient;private string _subject;private object _content;private Conversation _conversation;/// /// Message creation with a content object./// The object must be serializable for remote communication./// Warning: be sure not to break the encapsulation of theagent's mental/// state in the case of local communication. If the objectbelongs to the/// agent's state, be sure it is Marshal-By-Value and notMarshal-By-Ref,/// or pass a <strong>de</strong>ep copy of it./// /// /// /// /// /// public Message(AgentId sen<strong>de</strong>r, AgentId recipient, Naturesnature,string subject, object content){_sen<strong>de</strong>r = sen<strong>de</strong>r;_recipient = recipient;_nature = nature;_subject = subject;_content = content;_conversation = null;}/// /// Simple message creation./// /// /// /// /// MSc EMOOSE Thesis – http://www.emn.fr/EMOOSE 80

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!