Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

GetFlexLicensesInformation method

  • Last UpdatedJul 23, 2024
  • 2 minute read

Returns an array that contains FLEX licenses available to the Galaxy Repository. The array includes the license type, the number of available licenses, number of deployed licenses, number of configured licenses, and number available for deployment (undeployed but available licenses).

One array is returned for each license type (single-engine platform licenses and multiple-engine platform licenses).

Class

IGalaxy

Syntax

[C#]

FLEXLICENSESINFORMATION[] GetFlexLicensesInformation();

[Visual C++]

HRESULT GetFlexLicensesInformation

(

[out, retval]SAFEARRAY(struct FLEXLICENSESINFORMATION)* response

);

struct FLEXLICENSESINFORMATION

{

int licenseType;

int availableToGR;

int deployed;

int configured;

int availableForDeploy;

}FLEXLICENSESINFORMATION;

Parameters

licenseType

Integer that defines the FLEX License Type:

  • 1 = single engine platform

  • 2 = multiple-engine platform

Each license type outputs an array that lists the number of licenses in each the following categories(number available to GR, number deployed, number configured, number available). There will be one array for single engine platform licenses, and one array for multiple engine licenses.

availableToGR

Total number of licenses (single or multiple) available for the Galaxy Repository to use.

deployed

Number of licenses (single or multiple) deployed from the Galaxy Repository.

configured

Number of licenses (single or multiple) that have been configured in the AVEVA™ License Manager.

availableForDeploy

Number of licenses (single or multiple) that are available to be deployed (total available minus number already deployed).

Example

// create GRAccessAppClass object

GRAccessApp grAccess = new GRAccessAppClass();

// Query for galaxies

IGalaxies gals = grAccess.QueryGalaxies(nodeName);

if (gals == null || grAccess.CommandResult.Successful == false)

{

Console.WriteLine(grAccess.CommandResult.CustomMessage + grAccess.CommandResult.Text);

return;

}

IGalaxy galaxy = gals[galaxyName];

FLEXLICENSESINFORMATION[] flex = galaxy.GetFlexLicensesInformation();

if (flex != null && flex.Length > 0)

{

Console.WriteLine(

"LicenceType:\t\t" + ((flex[0].licenceType == 1) ? "Single AppEngine":"Unlimited AppEngine") + "\n" +

"AvailableToGR:\t\t" + flex[0].availableToGR.ToString() + " \n" +

"Deployed:\t\t" + flex[0].deployed.ToString() + "\n" +

"Configured:\t\t" + flex[0].configured.ToString() + “\n" +

"AvailableForDeploy:\t" + flex[0].availableForDeploy.ToString() + ");

}

for(int i= 0; i < flex.Length; i++)

{

Console.WriteLine(

"LicenceType:\t\t" + ((flex[i].licenceType == 1) ? "Single AppEngine" : "Unlimited AppEngine") + "\n" +

"AvailableToGR:\t\t" + flex[i].availableToGR.ToString() + " \n" +

"Deployed:\t\t" + flex[i].deployed.ToString() + "\n" +

"Configured:\t\t" + flex[i].configured.ToString() + "\n" +

"AvailableForDeploy:\t" + flex[i].availableForDeploy.ToString());

Console.WriteLine("============================================================");

}

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in