User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

working_with_recipes [2019/01/09 10:43] (current)
akuzmuk created
Line 1: Line 1:
 +====== Recipes functions ======
 +==== ApplyRecipe(recipeId, userId) ====
 +The **ApplyRecipe** function applies the recipe with the number **recipeId** on behalf of the user with id = **userId**. If this user does not have permissions for this recipe, the recipe will not be applied. 
 +The application of the recipe is to write the corresponding values to the registers that are specified in the recipe.
 +==== GetRecipeById(recipeId) ====
 +The **GetRecipeById** function gets the recipe with the number **recipeId**. Function is available since WebHMI v 3.2.
 +On success table with following fields will be returned:
 +  * id - Recipe Id
 +  * title - Recipe title
 +  * registers - table with Register Id as key and new value as value
 +On error (recipe not found, etc) false will be returned.