OTX-Runtime for C++  
OpenTestSystem::Otx::Runtime::Api::License::LicenseManager Class Reference

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

#include <LicenseManager.h>

Static Public Member Functions

static std::string GetLicenseKey ()
 Gets the license key. More...
 
static void SetLicenseKey (const std::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 std::string OpenTestSystem::Otx::Runtime::Api::License::LicenseManager::GetLicenseKey ( )
static

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 ( const std::string &  licenseKey)
static

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 }
Class to manage the OTX-Runtime API licenses
Definition: LicenseManager.h:27
static void SetLicenseKey(const std::string &licenseKey)
Sets a valid license key to release the API.
Namespace containing all objects related to licensing
Definition: LicenseManager.h:22
Namespace containing the programming interface for browsing and execution of OTX procedures in own ap...
Definition: ClampState.h:7
Namespace containing all objects for browsing and execution of OTX procedures
Definition: ClampState.h:6
Namespace containing all objects which are standardized according to ISO 13209 (OTX)
Namespace containing all objects related to testing inside automotive industry

The documentation for this class was generated from the following file: