Document metadata

Application name

CSK_Module_RecipeManager

Version

1.0.2

Date

2024-12-11

Author

SICK AG

Crowns

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).

Functions

CSK_RecipeManager.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)
CSK_RecipeManager.addRecipeViaUI()
Short description

Function to add new recipe via UI.

Sample (auto-generated)
CSK_RecipeManager.addRecipeViaUI()
CSK_RecipeManager.clearFlowConfigRelevantConfiguration()
Short description

Function to clear FlowConfig relevant configurations.

Sample (auto-generated)
CSK_RecipeManager.clearFlowConfigRelevantConfiguration()
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.deleteRecipeOrderIDViaUI()
Short description

Function to delete preselected config out of recipe via UI.

Sample (auto-generated)
CSK_RecipeManager.deleteRecipeOrderIDViaUI()
CSK_RecipeManager.deleteRecipeViaUI()
Short description

Function to delete preselected recipe.

Sample (auto-generated)
CSK_RecipeManager.deleteRecipeViaUI()
CSK_RecipeManager.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()
CSK_RecipeManager.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()
CSK_RecipeManager.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()
CSK_RecipeManager.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)
CSK_RecipeManager.loadRecipeViaUI()
Short description

Function to load configuration of preselected recipe to modules.

Sample (auto-generated)
CSK_RecipeManager.loadRecipeViaUI()
CSK_RecipeManager.moveTableRowDown()
Short description

Function to move selected row in recipe order one position lower.

Sample (auto-generated)
CSK_RecipeManager.moveTableRowDown()
CSK_RecipeManager.moveTableRowUp()
Short description

Function to move selected row in recipe order one position higher.

Sample (auto-generated)
CSK_RecipeManager.moveTableRowUp()
CSK_RecipeManager.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()
CSK_RecipeManager.resetModule()
Short description

Function to reset main configuration of module.

Sample (auto-generated)
CSK_RecipeManager.resetModule()
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.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)
CSK_RecipeManager.updateRecipeConfig()
Short description

Add new config to recipe or update existing, preselected config.

Sample (auto-generated)
CSK_RecipeManager.updateRecipeConfig()

Events

CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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")
CSK_RecipeManager.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.

Functions

RecipeManager_FC.LoadRecipe.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()
RecipeManager_FC.LoadRecipe.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.

Functions

RecipeManager_FC.OnRecipeLoaded.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()
RecipeManager_FC.OnRecipeLoaded.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

RecipeManager_FC.OnRecipeLoaded.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")