How to generate a control plugin

From EdnaWiki
Revision as of 17:29, 26 April 2010 by Basham (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 which can be found in the edna/kernal/bin directory.

 [ssg37927@ws016 bin]$ $EDNA_HOME/kernel/bin/ --help

This displays the range of code which can be used, however the main useage for control plugins is the following -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

  1. it will be called EDPluginControlPluginName
  2. it will be a control plugin
  3. it will be specified as version 2.1 in the path name of its location
  4. it will use the /location/of/datamodel/xsd.xsd datamodel description to get its input and output from
    1. its input object will be XSDataInputMTZDUMPUnitCellSpaceGroup
    2. its output object will be XSDataResultMTZDUMPUnitCellSpaceGroup
  5. the author in the doc is set to a n other
  6. the copywrite information is set to 'DLS'
  7. 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.