Main.PluginDevelopment History

Hide minor edits - Show changes to output

December 13, 2009, at 08:01 PM by 137.48.19.49 -
Changed lines 22-23 from:
The '''''initialize()''''' function is called.
to:
->The '''''initialize()''''' function is called.
Changed lines 25-32 from:
ChemChains will populate the variables listed in Plugin with their setters.
The function '''''preSim()''''' is called.
The function '''''bool nSpecs()''''' is called.
If true was returned from '''''bool nSpecs()''''' the function string '''''getSpecs()''''' will be
called .
The function '''''nLogic()''''' is called.
If true was returned from '''''bool nLogic()''''' the function string '''''getLogic()''''' will be
called.
to:
->ChemChains will populate the variables listed in Plugin with their setters.
->The function '''''preSim()''''' is called.
->The function '''''bool nSpecs()''''' is called.
->If true was returned from '''''bool nSpecs()''''' the function string ->'''''getSpecs()''''' will be called .
->The function '''''nLogic()''''' is called.
->If true was returned from '''''bool nLogic()''''' the function string ->'''''getLogic()''''' will be called.
Changed lines 33-40 from:
The variable t will be updated to the current step.
The function '''''string retrieveNodeLevel()''''' will be called.
If a string was returned from '''''retrieveNodeLevel()''''' the current level of the
boolean node with that name will be sent to '''''sendNodeLevel(string, int)'''''
The function '''''midSim()''''' will be called.
The function '''''pair<string, int> setInputNodeLevel()''''' will be called until it
returns a blank string.
to:
->The variable t will be updated to the current step.
->The function '''''string retrieveNodeLevel()''''' will be called.
->If a string was returned from '''''retrieveNodeLevel()''''' the current level of the
->boolean node with that name will be sent to '''''sendNodeLevel(string, int)'''''
->The function '''''midSim()''''' will be called.
->The function '''''pair<string, int> setInputNodeLevel()''''' will be called until it
->returns a blank string.
Changed lines 42-43 from:
The function '''''postSim()''''' will be called.
to:
->The function '''''postSim()''''' will be called.
Changed lines 45-46 from:
The function '''''close()''''' will be called.
to:
->The function '''''close()''''' will be called.
December 13, 2009, at 07:59 PM by 137.48.19.49 -
Changed lines 22-23 from:
The initialize() function is called.
to:
The '''''initialize()''''' function is called.
Changed lines 26-28 from:
The function preSim() is called.
The function bool nSpecs() is called.
If true was returned from bool nSpecs the function string getSpecs() will be
to:
The function '''''preSim()''''' is called.
The function '''''bool nSpecs()''''' is called.
If true was returned from '''''bool nSpecs()''''' the function string '''''getSpecs()''''' will be
Changed lines 30-31 from:
The function nLogic() is called.
If true was returned from bool nLogic the function string getLogic() will be
to:
The function '''''nLogic()''''' is called.
If true was returned from '''''bool nLogic()''''' the function string '''''getLogic()''''' will be
Changed lines 36-40 from:
The function string retrieveNodeLevel() will be called.
If a string was returned from retrieveNodeLevel() the current level of the
boolean node with that name will be sent to sendNodeLevel(string, int)
The function midSim() will be called.
The function pair<string, int> setInputNodeLevel() will be called until it
to:
The function '''''string retrieveNodeLevel()''''' will be called.
If a string was returned from '''''retrieveNodeLevel()''''' the current level of the
boolean node with that name will be sent to '''''sendNodeLevel(string, int)'''''
The function '''''midSim()''''' will be called.
The function '''''pair<string, int> setInputNodeLevel()''''' will be called until it
Changed lines 44-45 from:
The function postSim() will be called.
to:
The function '''''postSim()''''' will be called.
Changed lines 47-48 from:
The function close() will be called.
to:
The function '''''close()''''' will be called.
December 13, 2009, at 07:55 PM by 137.48.19.49 -
Changed lines 47-48 from:
The function close() will be called.
to:
The function close() will be called.
December 13, 2009, at 07:55 PM by 137.48.19.49 -
Changed lines 1-6 from:
Because of the complexity of ChemChains sometimes it is hard to modify it without creating unwanted errors in other parts of the code, especially for someone who isn't familiar with the structure of the program. Allowing plugins serves as a way for code written by others to be executed during a simulation, allowing them to have a their plugin issue commands to ChemChains without having to have them worry about correctly modifying the main program. The purpose of this document is to serve as a guide for making a plugin for ChemChains. First the structure of a plugin in relation to ChemChains will be detailed, following that how the Plugin is treated on an operational level by ChemChains will be detailed. There is an exmple plugin in the plugins folder 'Example'.

In the ChemChains directory there is a folder called Plugins, within this folder is a file called config.txt, which contains a list of all plugins to be executed by ChemChains. The source for a plugin called 'Extension' would be in '/ChemChains/Plugins/Extension' and the library that will be loaded will be '/ChemChains/Plugins/Extension/Extension.so'. The abstract class Plugin in Plugin.hpp functions as an API from which plugins inherit. There is an empty

Throughout a simulation ChemChains will be calling different functions on the plugin, here is a breakdown of what will happen:
to:
Because of the complexity of ChemChains sometimes it is hard to modify it without
creating unwanted errors in other parts of the code, especially for someone who isn't
familiar with the structure of the program. Allowing plugins serves as a way for code
written by others to be executed during a simulation, allowing them to have a their
plugin issue commands to ChemChains without having to have them worry about correctly
modifying the main program. The purpose of this document is to serve as a guide for
making a plugin for ChemChains. First the structure of a plugin in relation to ChemChains
will be detailed, following that how the Plugin is treated on an operational level by
ChemChains will be detailed. There is an exmple plugin in the plugins folder 'Example'.

In the ChemChains directory there is a folder called Plugins, within this folder is a
file called config.txt, which contains a list of all plugins to be executed by
ChemChains. The source for a plugin called 'Extension' would be in '/ChemChains/Plugins
/Extension' and the library that will be loaded will be '/ChemChains/Plugins/Extension
/Extension.so'. The abstract class Plugin in Plugin.hpp functions as an API from which
plugins inherit. There is an empty

Throughout a simulation ChemChains will be calling different functions on the plugin,
here is a breakdown of what will happen:
Changed lines 28-29 from:
If true was returned from bool nSpecs the function string getSpecs() will be called .
to:
If true was returned from bool nSpecs the function string getSpecs() will be
called .
Changed lines 31-32 from:
If true was returned from bool nLogic the function string getLogic() will be called.
to:
If true was returned from bool nLogic the function string getLogic() will be
called.
Changed lines 37-38 from:
If a string was returned from retrieveNodeLevel() the current level of the boolean node with that name will be sent to sendNodeLevel(string, int)
to:
If a string was returned from retrieveNodeLevel() the current level of the
boolean node with that name will be sent to sendNodeLevel(string, int)
Changed lines 40-41 from:
The function pair<string, int> setInputNodeLevel() will be called until it returns a blank string.
to:
The function pair<string, int> setInputNodeLevel() will be called until it
returns a blank string.
Changed lines 51-52 from:
More information about the expected behaviors and purposes of these functions can be found in the example plugin.
to:
More information about the expected behaviors and purposes of these functions can be
found in the example plugin.
December 13, 2009, at 07:51 PM by 137.48.19.49 -
Added lines 1-33:
Because of the complexity of ChemChains sometimes it is hard to modify it without creating unwanted errors in other parts of the code, especially for someone who isn't familiar with the structure of the program. Allowing plugins serves as a way for code written by others to be executed during a simulation, allowing them to have a their plugin issue commands to ChemChains without having to have them worry about correctly modifying the main program. The purpose of this document is to serve as a guide for making a plugin for ChemChains. First the structure of a plugin in relation to ChemChains will be detailed, following that how the Plugin is treated on an operational level by ChemChains will be detailed. There is an exmple plugin in the plugins folder 'Example'.

In the ChemChains directory there is a folder called Plugins, within this folder is a file called config.txt, which contains a list of all plugins to be executed by ChemChains. The source for a plugin called 'Extension' would be in '/ChemChains/Plugins/Extension' and the library that will be loaded will be '/ChemChains/Plugins/Extension/Extension.so'. The abstract class Plugin in Plugin.hpp functions as an API from which plugins inherit. There is an empty

Throughout a simulation ChemChains will be calling different functions on the plugin, here is a breakdown of what will happen:

1. Initialize
The initialize() function is called.

2. Pre Simulation Activities, called before each Simulation
ChemChains will populate the variables listed in Plugin with their setters.
The function preSim() is called.
The function bool nSpecs() is called.
If true was returned from bool nSpecs the function string getSpecs() will be called .
The function nLogic() is called.
If true was returned from bool nLogic the function string getLogic() will be called.

3. Mid Simulation Activities, called on every iteration
The variable t will be updated to the current step.
The function string retrieveNodeLevel() will be called.
If a string was returned from retrieveNodeLevel() the current level of the boolean node with that name will be sent to sendNodeLevel(string, int)
The function midSim() will be called.
The function pair<string, int> setInputNodeLevel() will be called until it returns a blank string.

4. Post Simulation Activities, called after each Simulation
The function postSim() will be called.

5. After all of the Simulations are finished
The function close() will be called.

When running multiple simulations the order of these activities would be something like;
1, 2, 3, 3, 3, ..., 4, 2, 3, 3, 3, ..., 4, 5
More information about the expected behaviors and purposes of these functions can be found in the example plugin.