UAEnable

UAEnable — enables or disables an individual OPC UA client connection.

Synopsis

(UAEnable label 0|1)
    

Arguments

label

The client connection label, as a string.

0|1

Use 1 to enable, or 0 to disable.

Returns

A message indicating success or error. Please refer to Return Syntax for details.

Description

This command enables or disables an individual OPC UA client connection by label. It must be called within a temporary edit session started with UABeginEdit and ending with UAApplyEdit.

Example

require ("Application");

class UaTest Application
{
}

method UaTest.enableUa(label, enabled)
{
    datahub_command("(UABeginEdit)", 1);
    datahub_command(format("(UAEnable %s %d)", 
                           stringc(label), 
                           number(enabled)), 1);
    datahub_command("(UAApplyEdit)", 1);
}

method UaTest.constructor ()
{
    .enableUa("OPCUA000", 1);
}

ApplicationSingleton (UaTest);