Module sopRegister
Holds all created standard operating procedures.
The created SOPs must be added in this static module. This prevents from being dependent on the load order of the Lua files. The currently added SOPs can be received at any time. A callback can be added to get notified about SOPs which are added subsequently.
Info:
- Copyright: 2022 Patrick Lang
- Author: Patrick Lang
Functions
| addSOP (sop) | Adds a standard operating procedure to the list of SOPs |
| getAllSOPs () | Gets all registered standard operating procedures |
| addAddedCallback (callback) | Adds a callback which is exeucted if a SOP is added to the register. |
Functions
- addSOP (sop)
-
Adds a standard operating procedure to the list of SOPs
Parameters:
- sop standardOperatingProcedure The standard operating procedure to add
- getAllSOPs ()
-
Gets all registered standard operating procedures
Returns:
-
tab
An array which contains all standard operating procedures
- addAddedCallback (callback)
-
Adds a callback which is exeucted if a SOP is added to the register.
The added SOP is passed as a parameter to the callback.
Parameters:
- callback func The callback to add.
Usage:
sopRegister.addAddedCallback(function(sop) end)