Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:m0ch.FIPA.AgentDescription"/> class
 /// </summary>
 /// <param name="agentAID">Agent's aid</param>
 /// <param name="ownership">Agent's Ownership</param>
 /// <param name="agentState">Agent' state</param>
 public AMSAgentDescription(AID agentAID          = null, string ownership = null,
                            AgentState agentState = AgentState.None)
 {
     this.Name        = agentAID;
     this._ownership  = ownership;
     this._agentState = agentState;
 }
Exemplo n.º 2
0
        public bool registerOnDF(AID agentId, ServiceDescription[] srviceDsc = null, string[] prtocol = null,
                                 string[] ontlogy = null, string[] lnguage = null)
        {
            DFAgentDescription agentDescription = new DFAgentDescription(agentId, srviceDsc, prtocol, ontlogy, lnguage);

            return(this._df.Register(agentDescription));
        }
Exemplo n.º 3
0
Arquivo: AMS.cs Projeto: armysick/mOch
 /// <summary>
 /// Modify the specified agent description with a newly passed
 /// </summary>
 /// <returns></returns>
 /// <param name="agent">Agent's AID</param>
 /// <param name="newDscrAgent">New agent description</param>
 public void Modify(AID agent, AMSAgentDescription newDscrAgent)
 {
     if (_activeAgents.ContainsKey(agent))
     {
         _activeAgents[agent] = newDscrAgent;
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:m0ch.FIPA.DFAgentDescription"/> class.
 /// </summary>
 /// <param name="agentAID">Agent's aid.</param>
 /// <param name="services">A ServiceDescription Service.</param>
 /// <param name="protocol">An array of strings representing Protocol.</param>
 /// <param name="ontology">An array of strings representing Ontology.</param>
 /// <param name="language">An array of strings representing Language.</param>
 public DFAgentDescription(AID agentAID = null,
                           ServiceDescription[] services = null,
                           String[] protocol             = null,
                           String[] ontology             = null,
                           String[] language             = null)
 {
     this.Name      = agentAID;
     this._services = services;
     this._protocol = protocol;
     this._ontology = ontology;
     this._language = language;
 }
Exemplo n.º 5
0
        /// <summary>
        /// Register an agent on AMS
        /// </summary>
        /// <param name="agentId">The unique Agent's AID</param>
        /// <param name="ownership">Agent's ownership; Set to empty string if no parameter is passed.</param>
        /// <param name="agentState">Agent's current state. Set to NONE if no parameter is passed.</param>
        /// <returns>True if registered, False otherwise</returns>
        public bool RegisterOnAMS(AID agentId, string ownership = "", AgentState agentState = AgentState.None)
        {
            AMSAgentDescription agentDescription = new AMSAgentDescription(agentId, ownership, agentState);

            return(this._ams.Register(agentDescription));
        }