Skip to main content

llkGetFeatureInfo

Descriptionโ€‹

Provides information about the requested Feature of the activated license

Important

The function allocates memory. To release it, use the llkFree function

Syntaxโ€‹

llkGetFeatureInfo
LLKStatus LLK_API llkGetFeatureInfo(uint32_t featureId, char** featureInfoJson);

Parametersโ€‹

ParamDescription
featureIdFeature number
featureInfoJsonPointer to the retrieved information, in JSON format

Return Valuesโ€‹

Status CodeNo.Description
LLK_OK0Request was successfully completed. The operation status is successful
LLK_INVALID_PARAMETER1The parameter featureInfoJson is invalid (null pointers are forbidden)
LLK_FEATURE_NOT_FOUND2Requested Feature not found
LLK_LICENSE_NOT_ACTIVATED_YET12The entitlement has not been activated yet. For activation/initialization, use llkActivateLicense
LLK_INTERNAL_TRY_AGAIN701Internal error. In the case of this function, an error means that the operating system can't allocate memory

Examplesโ€‹

C++ example
  char* featureInfoJson = nullptr;
const uint32_t featureId = 0;
const LLKStatus status = llkGetFeatureInfo(featureId, &featureInfoJson);

if (status == LLKStatus::LLK_OK) {
std::cout << json::parse(featureInfoJson).dump(1) << std::endl;
}

/*null pointers are ok for llkFree*/
llkFree(featureInfoJson);

Example of a successful operation

{
"Feature": {
"ID": 0,
"Name": "Test_0",
"executionsLimit": 0,
"licenseType": 2,
"validFromDate": 1700410608,
"validUpToDate": 1701993600
}
}

In this example, used the library nlohmann json, to format and print the captured data

Description of featureInfoJsonโ€‹

ParamDescription
IDUnique Feature number
NameFeature name (string)
executionsLimitAmount of executions (balance)
licenseTypeLimitation type
validFromDatetimestamp when the Feature became available as part of the current license
validUpToDateAn expiration timestamp. After that, the feature is no longer available
Related Topics

More about Feature limitation types - LLKFeatureLicenseType


Version historyโ€‹

  • Added in version 1.0.0