plugin register - part-cw/lambdanative GitHub Wiki
(plugin-register name start casestart run caseend end ptype)
plugin-register registers a plugin. This is the only public function to be called automatically in any plugin code, which is the means by which it makes itself available for instantiation.
| Parameter | Description |
|---|---|
| name | Plugin name, to be used when making an instance of it in applications |
| start | Function to be called when the plugin is initialized |
| casestart | Function to be called when a case is started, e.g. to open files to be written to |
| run | Main plugin function, which gets called every time the plugin scheduler dispatches the plugin |
| caseend | Function to be called when a case is started, e.g. to close files opened by the plugin |
| end | Function to be called when the plugin is deleted or when the scheduler cleans up plugins before an application terminates |
| ptype | The plugin type: 'input, 'output, 'algorithm, or 'dse |
Example
Example 1: From the end of the trendoutput plugin, where it registers itself if included in an application's PLUGINS file.
;; register the plugin
(plugin-register "trendoutput" trendoutput:init trendoutput:caseinit trendoutput:caserun
trendoutput:caseend trendoutput:end 'output)