watchRecipeTypesList

[ Function ]

public static watchRecipeTypesList(
    options?: RecipeManagement.IRecipeWatchOptions | null,
    callback: null | ((this: void, data: TcHmi.Server.RecipeManagement.IWatchResultObject<TcHmi.Server.RecipeManagement.FolderRecipeType>) => void) = null
): DestroyFunction;

Monitors the list of all recipe types that exist in the system for changes.

Parameter

Name

Type

Description

options

TcHmi.Server.RecipeManagement.IRecipeWatchOptions, null

Recipe management options

callback [ optional ]

(data: TcHmi.Server.RecipeManagement.IWatchResultObject<TcHmi.Server.RecipeManagement.FolderRecipeType>) => void, null

Asynchronous callback function that is triggered when a value has changed.

Return value

Type

Description

DestroyFunction

Returns a function that can be called to stop monitoring and release all associated resources.

watchRecipeTypesList 1:

Available from version 1.12

Sample - JavaScript

TcHmi.Server.RecipeManagement.watchRecipeTypesList (
    null,
    function(data) {
        if (data.error === TcHmi.Errors.NONE) {
            console.log(data.value);
        } else {
            // Error
        }
    }
);