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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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