Menu

Guide to run JADEX examples

Help
2017-10-31
2017-11-04
  • Mohan Baruwal Chhetri

    Hi,
    I'm trying to run the PingAgent/PingingAgent example and am having no success with it. The source for these agents is available in the jadex-applications-micro package.

    Is there any tutorial available that shows how to run the different examples? For instance, with the PingingAgent, I see that there are a number of arguments provided for the PingingAgent (see below). Are these supposed to be provided during the creation of the PingingAgent. If so, how do we do this? I could not find any help on this in the Getting Started documentation available at https://download.actoron.com/docs/releases/jadex-3.0.43/jadex-mkdocs/getting-started/getting-started/.

    Could somebody please help point me to the right resources.

    Many thanks,
    Mohan

    /*
    * Agent that pings another and waits for its replies.
    /
    @Description("A simple agent that sends pings to another agent and waits for replies.")
    @Arguments({
    @Argument(name="receiver", clazz=IComponentIdentifier.class, description="The component receiver of the ping target."),
    @Argument(name="missed_max", clazz=int.class, description="Maximum number of allowed missed replies", defaultvalue="3"),
    @Argument(name="timeout", clazz=long.class, description="Timeout for reply", defaultvalue="1000"),
    @Argument(name="content", clazz=String.class, description="Ping message content", defaultvalue="\"ping\"")
    })
    @Agent
    public class PingingAgent
    {
    //-------- attributes --------

    /** The micro agent class. */
    @Agent
    protected IInternalAccess agent;
    
     
  • Alexander Pokahr

    Hi Mohan,

    the complex examples, i.e. with more than one agent, usually have a starter component.

    For the ping example you can start the PingScenario.application.xml.

    For building your own application starter component, you can look at https://download.actoron.com/docs/releases/jadex-3.0.43/jadex-mkdocs/tutorials/ac/06%20Composition/

    Cheers,
    Alex

     
  • Mohan Baruwal Chhetri

    Hi Alex,
    I tried to use the PingScenario.application.xml file.
    When I do that, I can see the PingScenario with the Ping and Pinging Agents created. However, I cannot see any ping messages being exchanged between the agents. I think I am missing something.
    The PingingAgent class takes in a jadex.bridge.IcomponentIdentifier argument. But I'm not sure what to pass in as the argument value.

    Cheers,
    Mohan

     

Log in to post a comment.