OTX-Runtime for DotNet  
OpenTestSystem.Otx.Runtime.Api.License.LicenseManager Class Reference

Class to manage the OTX-Runtime API licenses More...

Static Public Member Functions

static string GetLicenseKey ()
 Gets the license key. More...
 
static void SetLicenseKey (string licenseKey)
 Sets a valid license key to release the API. More...
 

Detailed Description

Class to manage the OTX-Runtime API licenses

Member Function Documentation

◆ GetLicenseKey()

static string OpenTestSystem.Otx.Runtime.Api.License.LicenseManager.GetLicenseKey ( )
inlinestatic

Gets the license key.

Returns
The license key (Format "XXXX-XXXX-XXXX-XXXX-XXXX"), if a valid license key was set, otherwise an empty string.

◆ SetLicenseKey()

static void OpenTestSystem.Otx.Runtime.Api.License.LicenseManager.SetLicenseKey ( string  licenseKey)
inlinestatic

Sets a valid license key to release the API.

The license key has the format "XXXX-XXXX-XXXX-XXXX-XXXX". A valid license key must be available. Please ask the software supplier. Without a valid license key no RuntimeManager can be created.

Important: The license key must be set before an instance is created!

Parameters
licenseKeyLicense key has the format "XXXX-XXXX-XXXX-XXXX-XXXX".

Examples

1 // Pseudo-Code example to use license manager
2 // ==========================================
3 // Please note that the exact syntax of C++, DotNet and Java is different!
4 
5 void main()
6 {
7  // Release the license manager
8  OpenTestSystem.Otx.Runtime.Api.License.LicenseManager.SetLicenseKey("XXXXX-XXXXX-XXXXX-XXXXX-XXXXX");
9 
10  try
11  {
12  // If no valid license key was set, no RuntimeManager can be created and an InvalidLicenseException is thrown.
13  IRuntimeManager runtimeManager = RuntimeManagerFactory.CreateSocketRuntimeManager(8889, 8888);
14 
15  // ...
16  }
17  catch (Exception e)
18  {
19  throw new Exception(e);
20  }
21 }

The documentation for this class was generated from the following file:
OpenTestSystem.Otx.Runtime.Api.License
Namespace containing all objects related to licensing
Definition: IpcLicenseCheckerBase.cs:10
OpenTestSystem.Otx.Runtime.Api.License.LicenseManager
Class to manage the OTX-Runtime API licenses
Definition: LicenseManager.cs:12
OpenTestSystem.Otx.Runtime.Api.License.LicenseManager.SetLicenseKey
static void SetLicenseKey(string licenseKey)
Sets a valid license key to release the API.
Definition: LicenseManager.cs:26
OpenTestSystem.Otx
Namespace containing all objects which are standardized according to ISO 13209 (OTX)
OpenTestSystem.Otx.Runtime
Namespace containing all objects for browsing and execution of OTX procedures
Definition: ApiConstants.cs:6
OpenTestSystem
Namespace containing all objects related to testing inside automotive industry
OpenTestSystem.Otx.Runtime.Api
Namespace containing the programming interface for browsing and execution of OTX procedures in own ap...
Definition: ApiConstants.cs:6