Document metadata
Application name |
CSK_Module_RecipeManager |
---|---|
Version |
1.0.2 |
Date |
2024-12-11 |
Author |
SICK AG |
Crowns
- C
- R
CSK_Module_RecipeManager
Short description
This is an automatically generated CROWN (description not necessary).
CSK_RecipeManager
Short description
Module to load specific parameters for other modules.
This is especially helpful to configure a system related to a specific job.
Check UI of this module for most available features.
Typically the features of this module are used like this:
1) Setup a recipe
1) Create a new recipe via 'addRecipe'.
2) Set the name of module to load a specific parameter via 'setRecipeModuleName'.
3) If it is a module with multiple instances, selecte the specific instance via 'setRecipeInstance'.
4) Set the parameter name to load for the module via 'setRecipeParameterName'.
5) Add the preset confiugration to the recipe via 'updateRecipeConfig'.
6) Repeat steps 2) - 5) to add mutliple configurations.
2) Load recipe
It is possible to configure the module to load a specific recipe automatically after loading its persistent data.
It will save the latest selected recipe ('selectRecipe') and if you set the status via 'setLoadRecipeWithParameterLoaded' to true, it will automatically load the recipe.
Beside of this, it is possible to load a recipe via an external event. To do so, register to this event via 'setRegisteredEvent' (the event needs to provide the name of recipe (STRING) as first parameter).
Overview
Functions
addRecipe()
Short description
Function to add new recipe.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of new recipe. |
Sample (auto-generated)
CSK_RecipeManager.addRecipe(name)
addRecipeViaUI()
Short description
Function to add new recipe via UI.
Sample (auto-generated)
CSK_RecipeManager.addRecipeViaUI()
clearFlowConfigRelevantConfiguration()
Short description
Function to clear FlowConfig relevant configurations.
Sample (auto-generated)
CSK_RecipeManager.clearFlowConfigRelevantConfiguration()
deleteRecipe()
Short description
Function to delete recipe.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of recipe. |
Sample (auto-generated)
CSK_RecipeManager.deleteRecipe(name)
deleteRecipeOrderID()
Short description
Function to delete order ID entry out of recipe.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
orderID |
INT |
1 |
Order ID of configuration within recipe. |
Sample (auto-generated)
CSK_RecipeManager.deleteRecipeOrderID(orderID)
deleteRecipeOrderIDViaUI()
Short description
Function to delete preselected config out of recipe via UI.
Sample (auto-generated)
CSK_RecipeManager.deleteRecipeOrderIDViaUI()
deleteRecipeViaUI()
Short description
Function to delete preselected recipe.
Sample (auto-generated)
CSK_RecipeManager.deleteRecipeViaUI()
getParameters()
Short description
Function to get all parameters of the client in JSON format.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
jsonParameters |
STRING |
1 |
JSON string with all parameters. |
Sample (auto-generated)
jsonParameters = CSK_RecipeManager.getParameters()
getStatusModuleActive()
Short description
Function to get status if module is active.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
status = CSK_RecipeManager.getStatusModuleActive()
loadParameters()
Short description
Load parameters for this module from the CSK_PersistentData module if possible and use them.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
success |
BOOL |
1 |
Success to load parameters. |
Sample (auto-generated)
success = CSK_RecipeManager.loadParameters()
loadRecipe()
Short description
Function to load configuration in other moduels based on recipe.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
recipe |
STRING |
1 |
Name of recipe to use. |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
success |
BOOL |
1 |
Status if loading parameters for all modules of recipe was succesfull. |
Sample (auto-generated)
success = CSK_RecipeManager.loadRecipe(recipe)
loadRecipeViaUI()
Short description
Function to load configuration of preselected recipe to modules.
Sample (auto-generated)
CSK_RecipeManager.loadRecipeViaUI()
moveTableRowDown()
Short description
Function to move selected row in recipe order one position lower.
Sample (auto-generated)
CSK_RecipeManager.moveTableRowDown()
moveTableRowUp()
Short description
Function to move selected row in recipe order one position higher.
Sample (auto-generated)
CSK_RecipeManager.moveTableRowUp()
pageCalled()
Short description
Function to register "OnResume" of the module UI (only as helper function).
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
empty |
STRING |
1 |
Empty string (only needed to simplify binding). |
Sample (auto-generated)
empty = CSK_RecipeManager.pageCalled()
resetModule()
Short description
Function to reset main configuration of module.
Sample (auto-generated)
CSK_RecipeManager.resetModule()
selectRecipe()
Short description
Function to select recipe.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of recipe. |
Sample (auto-generated)
CSK_RecipeManager.selectRecipe(name)
selectTableRowInUI()
Short description
Function to select specific row in recipe table in UI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
selection |
STRING |
1 |
UI table selection content. |
Sample (auto-generated)
CSK_RecipeManager.selectTableRowInUI(selection)
sendParameters()
Short description
Send parameters to CSK_PersistentData module if possible to save them.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
noDataSave |
BOOL |
? |
[Optional] Set to TRUE if the data should NOT be saved immediately after sending. |
Sample (auto-generated)
CSK_RecipeManager.sendParameters(noDataSave)
setFlowConfigPriority()
Short description
Function to configure if FlowConfig should have priority for FlowConfig relevant configuration.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_RecipeManager.setFlowConfigPriority(status)
setLoadOnReboot()
Short description
Configure if this module should load its saved parameters at app/device boot up.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_RecipeManager.setLoadOnReboot(status)
setLoadRecipeWithParameterLoaded()
Short description
Function to set if selected recipe should be loaded after persistetn data parameters were loaded.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_RecipeManager.setLoadRecipeWithParameterLoaded(status)
setParameterName()
Short description
Function to set the name of the parameters if saved/loaded via the CSK_PersistentData module.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of the parameter. |
Sample (auto-generated)
CSK_RecipeManager.setParameterName(name)
setRecipeInstance()
Short description
Function to set instance no. of module to set parameter in recipe.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
instanceNo |
INT |
1 |
Number of instance. |
Sample (auto-generated)
CSK_RecipeManager.setRecipeInstance(instanceNo)
setRecipeModuleName()
Short description
Function to set name of module to add / update in recipe.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of module. |
Sample (auto-generated)
CSK_RecipeManager.setRecipeModuleName(name)
setRecipeName()
Short description
Function to set name of recipe in UI to add afterwards.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of recipe. |
Sample (auto-generated)
CSK_RecipeManager.setRecipeName(name)
setRecipeParameterName()
Short description
Function to set name of parameter for module in recipe.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of parameter. |
Sample (auto-generated)
CSK_RecipeManager.setRecipeParameterName(name)
setRegisteredEvent()
Short description
Function to set event to register to receive name of recipe to load.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
event |
STRING |
1 |
Name of event that provides name of recipe to load. |
Sample (auto-generated)
CSK_RecipeManager.setRegisteredEvent(event)
updateRecipeConfig()
Short description
Add new config to recipe or update existing, preselected config.
Sample (auto-generated)
CSK_RecipeManager.updateRecipeConfig()
Events
OnDataLoadedOnReboot
Short description
Event to call if module tried to load parameters and should be ready.
Sample (auto-generated)
function handleOnDataLoadedOnReboot()
-- Do something
end
Script.register("CSK_RecipeManager.OnDataLoadedOnReboot", "handleOnDataLoadedOnReboot")
OnNewParameterName
Short description
Notify name of persistent data parameter.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Parameter name |
Sample (auto-generated)
function handleOnNewParameterName(name)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewParameterName", "handleOnNewParameterName")
OnNewStatusCSKStyle
Short description
Notify UI style to use for CSK modules.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
theme |
STRING |
1 |
UI style |
Sample (auto-generated)
function handleOnNewStatusCSKStyle(theme)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusCSKStyle", "handleOnNewStatusCSKStyle")
OnNewStatusFlowConfigPriority
Short description
Notify if FlowConfig should have priority for FlowConfig relevant configurations.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusFlowConfigPriority(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusFlowConfigPriority", "handleOnNewStatusFlowConfigPriority")
OnNewStatusLoadParameterOnReboot
Short description
Notify status if parameters should be loaded on app/device boot up.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusLoadParameterOnReboot(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusLoadParameterOnReboot", "handleOnNewStatusLoadParameterOnReboot")
OnNewStatusLoadSelectedRecipe
Short description
Notify if selected recipe should be directly loaded after parameters were loaded.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusLoadSelectedRecipe(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusLoadSelectedRecipe", "handleOnNewStatusLoadSelectedRecipe")
OnNewStatusModuleIsActive
Short description
Notify if module can be used on device.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusModuleIsActive(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusModuleIsActive", "handleOnNewStatusModuleIsActive")
OnNewStatusModuleVersion
Short description
Notify version of module.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
version |
STRING |
1 |
Version |
Sample (auto-generated)
function handleOnNewStatusModuleVersion(version)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusModuleVersion", "handleOnNewStatusModuleVersion")
OnNewStatusRecipeInstanceID
Short description
Notify ID of module instance for recipe.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
instanceID |
INT |
1 |
Number of instance. |
Sample (auto-generated)
function handleOnNewStatusRecipeInstanceID(instanceID)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusRecipeInstanceID", "handleOnNewStatusRecipeInstanceID")
OnNewStatusRecipeList
Short description
Notify list of available recipes.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
list |
STRING |
1 |
List of recipes |
Sample (auto-generated)
function handleOnNewStatusRecipeList(list)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusRecipeList", "handleOnNewStatusRecipeList")
OnNewStatusRecipeModuleName
Short description
Notify name of module to add to recipe.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of module. |
Sample (auto-generated)
function handleOnNewStatusRecipeModuleName(name)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusRecipeModuleName", "handleOnNewStatusRecipeModuleName")
OnNewStatusRecipeName
Short description
Notify name of recipe to add.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of recipe. |
Sample (auto-generated)
function handleOnNewStatusRecipeName(name)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusRecipeName", "handleOnNewStatusRecipeName")
OnNewStatusRecipeParameterName
Short description
Notify name of parameter to use for module in recipe.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of parameter |
Sample (auto-generated)
function handleOnNewStatusRecipeParameterName(name)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusRecipeParameterName", "handleOnNewStatusRecipeParameterName")
OnNewStatusRecipeSelected
Short description
Notify status if a recipe is selected.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusRecipeSelected(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusRecipeSelected", "handleOnNewStatusRecipeSelected")
OnNewStatusRecipeSuccessfullyLoaded
Short description
Notify if loading parameters for all modules of recipe was succesfull.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusRecipeSuccessfullyLoaded(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusRecipeSuccessfullyLoaded", "handleOnNewStatusRecipeSuccessfullyLoaded")
OnNewStatusRecipeTable
Short description
Notify list of relevant information of recipe for UI table.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
list |
STRING |
1 |
JSON list of recipe. |
Sample (auto-generated)
function handleOnNewStatusRecipeTable(list)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusRecipeTable", "handleOnNewStatusRecipeTable")
OnNewStatusRegisteredEvent
Short description
Notify name of event to listen for incoming triggers to load a specific recipe.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
eventName |
STRING |
1 |
Name of event. |
Sample (auto-generated)
function handleOnNewStatusRegisteredEvent(eventName)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusRegisteredEvent", "handleOnNewStatusRegisteredEvent")
OnNewStatusSelectedRecipe
Short description
Notify name of selected recipe.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
name |
STRING |
1 |
Name of selected recipe. |
Sample (auto-generated)
function handleOnNewStatusSelectedRecipe(name)
-- Do something
end
Script.register("CSK_RecipeManager.OnNewStatusSelectedRecipe", "handleOnNewStatusSelectedRecipe")
OnPersistentDataModuleAvailable
Short description
Notify status if features of CSK_PersistendData module are available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnPersistentDataModuleAvailable(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnPersistentDataModuleAvailable", "handleOnPersistentDataModuleAvailable")
OnUserLevelAdminActive
Short description
Status of Admin userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnUserLevelAdminActive(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnUserLevelAdminActive", "handleOnUserLevelAdminActive")
OnUserLevelMaintenanceActive
Short description
Status of Maintenance userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnUserLevelMaintenanceActive(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnUserLevelMaintenanceActive", "handleOnUserLevelMaintenanceActive")
OnUserLevelOperatorActive
Short description
Status of Operator userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnUserLevelOperatorActive(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnUserLevelOperatorActive", "handleOnUserLevelOperatorActive")
OnUserLevelServiceActive
Short description
Status of Service userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnUserLevelServiceActive(status)
-- Do something
end
Script.register("CSK_RecipeManager.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")
RecipeManager_FC
Short description
Crown to provide CSK_FlowConfig relevant features.
Overview
RecipeManager_FC.LoadRecipe
Short description
Set source to load a specific recipe.
Overview
Functions
create()
Short description
Internally used CSK_FlowConfig create function.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
Sample (auto-generated)
handle = RecipeManager_FC.LoadRecipe.create()
loadRecipe()
Short description
Set source to load a specific recipe.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
source |
STRING |
1 |
Source to set recipe to load. Parameter: 1: Event name (STRING) |
Sample (auto-generated)
RecipeManager_FC.LoadRecipe.loadRecipe(handle, source)
RecipeManager_FC.OnRecipeLoaded
Short description
Notify status if parameters for all modules of recipe were loaded successfully.
Overview
Functions
create()
Short description
Internally used CSK_FlowConfig create function.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
Sample (auto-generated)
handle = RecipeManager_FC.OnRecipeLoaded.create()
register()
Short description
Internally used CSK_FlowConfig register function.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
eventname |
STRING |
1 |
Internal parameter (not used). |
callback |
STRING |
1 |
Internally used callback function. |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
success |
BOOL |
1 |
Success of register process. |
Sample (auto-generated)
success = RecipeManager_FC.OnRecipeLoaded.register(handle, eventname, callback)
Events
OnRecipeLoaded
Short description
Notify status if parameters for all modules of recipe were loaded successfully.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
OnRecipeLoaded |
STRING |
1 |
'CSK_RecipeManager.OnNewStatusRecipeSuccessfullyLoaded' Parameter: 1: Status if recipe was loaded succesfully (BOOL). |
Sample (auto-generated)
function handleOnRecipeLoaded(handle, OnRecipeLoaded)
-- Do something
end
Script.register("RecipeManager_FC.OnRecipeLoaded.OnRecipeLoaded", "handleOnRecipeLoaded")