checkLicenseOption()

The function checkLicenseOption() allows you to check the number of available licenses for the specified WinCC OA license option.

Synopsis

int checkLicenseOption(string licenseOption, [mapping details]);

Parameters

Parameters Meaning
licenseOption Name of a WinCC OA License option (feature) or a customer-specific keyword
details

An optional return value parameter. A mapping is returned. It contains the keys below. This is an example:

WCCOAui1:["checkLicensOption:"]["Returns:"][0]["License
                                    Details:"][mapping 5 items WCCOAui1: "all" : 10 WCCOAui1: "used"
                                    : 2 WCCOAui1: "free" : 10 WCCOAui1: "usedInThisSystem" : 1
                                    WCCOAui1: "featureMap" : 0 WCCOAui1:] 

"all":Contains the number of all licenses for the specified license option.

"used": Contains the number of licenses for the specified license option that are already in use.

"free": Contains the number of free licenses for the specified license option.

"usedInThisSystem" : Shows more detailed information about the current state of the used license container when multiple projects are configured to use the same license container. "usedInThisSystem" is the number of license options that are in use by the licensing component (Event Manager).

When only one Event manager is using a container, this is the same as the value being "used". When multiple projects are using the same container, the value being "used" is the value for all of the projects, and "usedInThisSystem" refers to the local system.

"featureMap" : Contains further internal information of a license option.

Return Value

The function returns the number of available licenses for the specified license option (parameter "licenseOption"). If the provided option does not exist, the function returns 0.

Errors

The function returns -1 for invalid parameters.

Description

The function checkLicenseOption() allows you to check the number of available licenses for the specified license option (parameter "licenseOption"). Note that the function is a read-only function and does not change the available license quantity.

The function checkLicenseOption() returns a mapping. The mapping keys are only returned for the WinCC OA Licensing.

Example

The example checks the available licenses for the license option "myFeature".

main(mapping event)
{
  int i;
  mapping lDetails;
  i = checkLicenseOption("myFeature", lDetails);
  DebugN("checkLicensOption:", "Returns:", i, "License Details:", lDetails);
}

The example returns, for example:

WCCOAui1:["checkLicenseOption:"]["Returns:"][0]["License Details:"][mapping 5items
"all": 10
"used": 2
"free": 7
"usedInThisSystem": 3
WCCOAui1: "featureMap" : -1
WCCOAui1:]

Assignment

Licensing

Availability

UI, CTRL