Actin®  Version 5.2.0
Software for Robotics Simulation and Control
EcActinLicenseHandle Class Reference

Instantiate this class to receive a valid Actin license and use Actin SDK. More...

#include <ecActinLicenseHandle.h>

Public Types

enum  ErrCode {
  ERR_NONE = 0,
  ERR_INIT = -1,
  ERR_NULL_SCHEME = -2,
  ERR_LIC_INVALID = -3
}
 
typedef boost::scoped_ptr< EcActinLicenseHandleScopedPtr
 Scoped Pointer to EcActinLicenseHandle.
 

Public Member Functions

virtual ~EcActinLicenseHandle ()
 Destructor.
 
EcU32 isInvalid () const
 
const EcBoolean isValid () const
 isValid Returns flag whether license is currently in valid state More...
 
const EcU32 productID () const
 Returns the license handle's Product ID.
 
void setProductId (const EcU32 &productId)
 Sets the Product ID for license handle. This will also reinitialize licensing methods if already initialized.
 
EcU32 initHandle (EcBoolean force=EcFalse)
 initHandle Initializes the license handle. This is used internally or for advanced usages. More...
 

Static Public Member Functions

static EcU32 initialize (const EcU32 &productId=defaultProductId())
 initialize Initializes the Licensing API. Creates an instance of EcActinLicenseHandle with given product ID and sets it as the default instance. This method should be called before any call to getDefaultInstance(). NOTE: This method is not thread-safe. Please ensure that it is called only from a single thread at a time. More...
 
static EcU32 shutdown ()
 shutdown Shuts down licensing API. Actin usage may fail after this call due to an invalid license. NOTE: This method is not thread-safe. More...
 
static const EcActinLicenseHandle *const defaultInstance ()
 
static const EcU32 actinProductId ()
 Returns Actin Product ID.
 
static const EcU32 defaultProductId ()
 Returns default Product ID.
 
static void setDefaultInstance (EcActinLicenseHandle *pInstance)
 setDefaultInstance Sets the default handle instance for checking license validity. The parameter object is copied. The ownership of parameter object stays with the caller anf the caller should manage the lifetime of the parameter object. The lifetime of the internal copy is maintained by EcActinLicenseHandle. More...
 
static EcActinLicenseHandlecreate (const EcU32 &productId=defaultProductId())
 create Creates a handle instance when default instance needs to be set. Caller gets the ownership of the allocated memory and is expected to manage the lifetime. More...
 
static EcActinLicenseHandlecreateUninitialized (const EcU32 &productId=defaultProductId())
 createUninitialized Creates a license handle, but doesn't initialize it. This method can be used for delayed initialization. The caller gets the ownership of the allocated memory and is expected to manage the lifetime. More...
 

Detailed Description

Instantiate this class to receive a valid Actin license and use Actin SDK.

Definition at line 17 of file ecActinLicenseHandle.h.

Member Enumeration Documentation

Standard Error codes returned by methods in EcActinLicenseHandle. The elements in this enum should always have values <= 0. Other platform/implementation-specific error codes may also be returned by the methods in range [1, max(EcU32)).

Definition at line 49 of file ecActinLicenseHandle.h.

Member Function Documentation

static EcActinLicenseHandle* EcActinLicenseHandle::create ( const EcU32 productId = defaultProductId())
static

create Creates a handle instance when default instance needs to be set. Caller gets the ownership of the allocated memory and is expected to manage the lifetime.

Parameters
productIdProduct ID to use for the license handle.
Returns
A license handle. Returns NULL in case of error.
static EcActinLicenseHandle* EcActinLicenseHandle::createUninitialized ( const EcU32 productId = defaultProductId())
static

createUninitialized Creates a license handle, but doesn't initialize it. This method can be used for delayed initialization. The caller gets the ownership of the allocated memory and is expected to manage the lifetime.

Parameters
productIdProduct ID to use for the license handle.
Returns
An uninitialized license handle. Returns NULL in case of error.
static const EcActinLicenseHandle* const EcActinLicenseHandle::defaultInstance ( )
static

Returns the default handle instance for checking license validity. Returned value may be uninitialized in case of an error. An uninitialized handle will always return the license as invalid. The ownership of the allocated memory remains with EcActinLicenseHandle and the caller should not attempt to free it. NOTE: This method is not thread-safe. So, implicit handle initialization in the Actin code may cause multi-threading issues unless you explicitly initialize the default handle by calling EcActinLicenseHandle::initialize() in a thread-safe manner.

Examples:
controlExecutiveModifierExampleMain.cpp, ecPathPlanningCoreMain.cpp, ecPathPlanningMain.cpp, ecQuickStartKinematicsMain.cpp, and ecQuickStartMain.cpp.
EcU32 EcActinLicenseHandle::initHandle ( EcBoolean  force = EcFalse)

initHandle Initializes the license handle. This is used internally or for advanced usages.

Parameters
forceUsed for re-initialization purposes to force a re-init.
Returns
Error code. ERR_NONE (0) for success.
static EcU32 EcActinLicenseHandle::initialize ( const EcU32 productId = defaultProductId())
static

initialize Initializes the Licensing API. Creates an instance of EcActinLicenseHandle with given product ID and sets it as the default instance. This method should be called before any call to getDefaultInstance(). NOTE: This method is not thread-safe. Please ensure that it is called only from a single thread at a time.

Parameters
productIdProduct ID to be used by the Licensing API. Default value is Product ID set by CMake.
Returns
Error Code. ERR_NONE(0) on success.
Examples:
controlExecutiveModifierExampleMain.cpp, ecPathPlanningCoreMain.cpp, ecPathPlanningMain.cpp, ecQuickStartKinematicsMain.cpp, and ecQuickStartMain.cpp.
EcU32 EcActinLicenseHandle::isInvalid ( ) const

Checks and returns status whether license is currently invalid

Returns
EcU32 Returns 0 (false) if valid. Non-zero return values (true) can be platform/implementation specific code.
const EcBoolean EcActinLicenseHandle::isValid ( ) const

isValid Returns flag whether license is currently in valid state

Returns
true if valid, false if invalid/unknown state
static void EcActinLicenseHandle::setDefaultInstance ( EcActinLicenseHandle pInstance)
static

setDefaultInstance Sets the default handle instance for checking license validity. The parameter object is copied. The ownership of parameter object stays with the caller anf the caller should manage the lifetime of the parameter object. The lifetime of the internal copy is maintained by EcActinLicenseHandle.

Parameters
pInstanceDefault handle instance to use.
static EcU32 EcActinLicenseHandle::shutdown ( )
static

shutdown Shuts down licensing API. Actin usage may fail after this call due to an invalid license. NOTE: This method is not thread-safe.

Returns
Error Code. ERR_NONE(0) on success.
Examples:
controlExecutiveModifierExampleMain.cpp, ecPathPlanningCoreMain.cpp, ecPathPlanningMain.cpp, ecQuickStartKinematicsMain.cpp, and ecQuickStartMain.cpp.

The documentation for this class was generated from the following file:
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.