Data Structures | |
struct | AtLicenseInfo |
License info structure. More... | |
Macros | |
#define | HOST_NAME_MAX 64 |
Typedefs | |
typedef struct AtLicenseInfo | AtLicenseInfo |
License info structure. | |
Functions | |
AI_API bool | AiLicenseSetServer (const char *host, unsigned int port) |
Set the name and port of the machine where the license server resides. More... | |
AI_API bool | AiLicenseGetServer (char *host, unsigned int &port) |
Get the name and port of the machine where the license server resides. More... | |
AI_API void | AiLicenseSetAttempts (int attempts) |
Set the maximum attempts of RLM error recoveries. More... | |
AI_API unsigned int | AiLicenseGetAttempts () |
Get the maximum attempts of RLM error recoveries. More... | |
AI_API void | AiLicenseSetAttemptDelay (int msecs) |
Set the time delay (in milliseconds) between RLM error recoveries. More... | |
AI_API unsigned int | AiLicenseGetAttemptDelay () |
Get the time delay (in milliseconds) between RLM error recoveries. More... | |
AI_API int | AiLicenseGetInfo (AtLicenseInfo *&licenses, unsigned int &n) |
Check the status of the license servers provided through the environment variables solidangle_LICENSE, RLM_LICENSE and ARNOLD_LICENSE_[HOST|PORT] and get information about all the installed licenses in those servers. More... | |
Error Codes | |
#define | AI_LIC_SUCCESS 0 |
no error | |
#define | AI_LIC_ERROR_CANTCONNECT 1 |
can't connect to any RLM server | |
#define | AI_LIC_ERROR_INIT 2 |
error on initialization | |
#define | AI_LIC_ERROR_NOTFOUND 3 |
no licenses found (expired or not loaded) | |
#define | AI_LIC_ERROR_NOTAVAILABLE 4 |
no licenses available (all in use) | |
#define | AI_LIC_ERROR -1 |
generic license error | |
AI_API bool AiLicenseSetServer | ( | const char * | host, |
unsigned int | port | ||
) |
Set the name and port of the machine where the license server resides.
If host and/or port have non-zero values, this function will override the use of the environment variables ARNOLD_LICENSE_HOST and/or ARNOLD_LICENSE_PORT respectively. When using a zero value, this will unset the previously set host and/or port (if they were set).
The following code shows a usage example:
host | RLM server hostname. If NULL, the hostname is unset and ARNOLD_LICENSE_HOST or default hostname localhost will be used. |
port | RLM server port. If zero, the port is unset and ARNOLD_LICENSE_PORT or default 5053 port will be used. |
AI_API bool AiLicenseGetServer | ( | char * | host, |
unsigned int & | port | ||
) |
Get the name and port of the machine where the license server resides.
[out] | host | RLM server hostname. |
[out] | port | RLM server port |
AI_API void AiLicenseSetAttempts | ( | int | attempts | ) |
Set the maximum attempts of RLM error recoveries.
attempts | Number of maximum attempts. A zero or negative value will unset the current configured number of attempts. |
AI_API unsigned int AiLicenseGetAttempts | ( | ) |
Get the maximum attempts of RLM error recoveries.
AI_API void AiLicenseSetAttemptDelay | ( | int | msecs | ) |
Set the time delay (in milliseconds) between RLM error recoveries.
msecs | The time delay between retries (in milliseconds). A negative value will unset the current configured time delay. |
AI_API unsigned int AiLicenseGetAttemptDelay | ( | ) |
Get the time delay (in milliseconds) between RLM error recoveries.
AI_API int AiLicenseGetInfo | ( | AtLicenseInfo *& | licenses, |
unsigned int & | n | ||
) |
Check the status of the license servers provided through the environment variables solidangle_LICENSE, RLM_LICENSE and ARNOLD_LICENSE_[HOST|PORT] and get information about all the installed licenses in those servers.
This function checks both the connections, the RLM services and the existence of free licenses in the servers. If nothing fails and there are available licenses, the function will return with AI_LIC_SUCCESS status and 'licenses' will return all Arnold usable licenses, otherwise it will return an error code.
[out] | licenses | All usable licenses held by the RLM license servers |
[out] | n | number of elements returned in the licenses vector |