pdcomm_opcua_license_install
Function
Installs PDComm license text for this library.
int32_t pdcomm_opcua_license_install(const uint8_t *text, size_t size)The text replaces text installed earlier through this function and is merged with the other license sources (environment variables and pdcomm.license files). It applies to every client and server of this library; the SECS/GEM and Modbus libraries have their own installation. Installing a license never stops existing clients or servers.
Parameters
| Name | Description |
|---|---|
text | UTF-8 text with one or more -----BEGIN PDCOMM LICENSE----- blocks; text outside the blocks is ignored. May be null when size is zero. |
size | Size of text in bytes, at most 1 MiB. Zero (or text with only whitespace) removes the installed text. |
Returns
#PDCOMM_OPCUA_OK when at least one block verified (expired or host-bound licenses are accepted and reported by pdcomm_opcua_license_status()), or when the text was removed; #PDCOMM_OPCUA_INVALID_INPUT for a null text with a nonzero size, text over 1 MiB or not UTF-8, or text without a block whose signature verifies (the previous text stays installed; the detail text names the reason); #PDCOMM_OPCUA_INTERNAL_ERROR.
Notes
- Thread-safe. Added in ABI 0.2.