Menu

A_doubt_about_Modules

AFME
2010-04-02
2013-03-03
  • Alessio Carbone

    Alessio Carbone - 2010-04-02

    Hi guys,

    In AFME tutorial, in example regarding Modules (page 9/56, Platform Modules…) I don't understand instruction 'mod null=MyModule' reported in the agent design file ModulesAgent.sh. What is its meaning? Why 'null=MyModule'? I saw that in the class MyModule the name of module is fixed to 'mymodule'….I think that I would be  'mymodule=MyModule', but with 'mod null=MyModule' in ModulesAgent.sh it works fine….

    I hope that problem is clear….

    thanks a lot

    lucignolo

     
  • Conor

    Conor - 2010-04-02

    Hi lucignolo,

    The reason for the syntax name=ModuleClass is for backwards compatibility with Agent Factory. In most cases, the compiler will ignore the name specified, so both 'mod null=MyModule' and 'mymodule=MyModule' will work. The only case in which the compiler uses the name is when creating GUI modules. In which case, the name specified must be gui (see the example on creating GUI modules). In short, in most cases you can specify any name for the module in the agent design in that it is legacy from the Agent Factory syntax and will be overridden by the name specified in the code in the module class.

    hope this helps to clear this up,
    Conor

     

Log in to post a comment.

Auth0 Logo