How to generate a control plugin
Control plugins are generated in the same way as execution plugins, however they do not work out of the box in the same way.
Firstly you will need to use the PluginGenerator.py which can be found in the edna/kernal/bin directory.
[ssg37927@ws016 bin]$ $EDNA_HOME/kernel/bin/PluginGenerator.py --help
This displays the range of code which can be used, however the main useage for control plugins is the following
PluginGenerator.py -n PluginName -b Control -v 2.1 -i XSDataInputMTZDUMPUnitCellSpaceGroup -r XSDataResultMTZDUMPUnitCellSpaceGroup -a 'a n other' -c DLS -s EDPluginExecProcess -x /location/of/datamodel/xsd.xsd
This will generate a plugin with the following propertys
- it will be called EDPluginControlPluginName
- it will be a control plugin
- it will be specified as version 2.1 in the path name of its location
- it will use the /location/of/datamodel/xsd.xsd datamodel description to get its input and output from
- its input object will be XSDataInputMTZDUMPUnitCellSpaceGroup
- its output object will be XSDataResultMTZDUMPUnitCellSpaceGroup
- the author in the doc is set to a n other
- the copywrite information is set to 'DLS'
- finaly the basic plugin will try to run the slave plugin EDPluginExecProcess
As with the other plugin generator, if you do not specify -i or -r then the generator will exit and prompt you for input.
Once you have run the plugin generator, you can try to run the tests, but they will fail, the reason for this is that the datamodels are not correcly set up to run it, so you will need to write some of the code for the plugin to get it working with the slave as well.
Remember however that this is only an example and you can include more than 1 plugin per control plugin, see the Control plugin documentation for more specifics on how to do this.