Skip to content

License

MiraOS requires a license to run. The license validation itself does not interfere with the application, if the license is valid.

Attempting to run MiraOS without a valid license causes the device to restart after 10 seconds.

The Mira license API gives feedback if the license is currently being validated, and if it is valid or not.

Example

PROCESS(license_checker, ev, data) {
    PROCESS_BEGIN();

    /* Wait while the process is being checked */
    PROCESS_WAIT_WHILE(mira_license_is_validating());

    /* Check license validity */
    if (mira_license_is_valid()) {
        /* License is valid */
    } else {
        /* License is not valid */
    }

    PROCESS_END();
}

Functions

mira_license_is_validating

mira_bool_t mira_license_is_validating(
    void);

Check if the license is currently under validation.

To wait until the license validation is done, use:

PROCESS_WAIT_WHILE(mira_license_is_validating());
mira_bool_t is_valid = mira_license_is_valid();

Without a valid license, the device restarts within a few seconds.

Return

MIRA_TRUE if license is still validating, MIRA_FALSE if done validating.

mira_license_is_valid

mira_bool_t mira_license_is_valid(
    void);

Return if the license is valid.

During validation, the return value is undefined.

To wait until the license validation is done, use:

PROCESS_WAIT_WHILE(mira_license_is_validating());
mira_bool_t is_valid = mira_license_is_valid();

Return

MIRA_TRUE if license is valid, MIRA_FALSE if license is not valid.