Apply Licenses

Tobii = EyeTrackingOperations();

eyetracker_address = 'Address of the desired device';
% Example:
% eyetracker_address = 'tobii-ttp://is405-030106416232';

eyetracker = Tobii.get_eyetracker(eyetracker_address);

licenses_path = {'licenses/se_license_key_IS4BA-00000057'
                'licenses/se_license_key_IS405-030106416232'
                'licenses/se_license_key_IS405-030106416222'
                };

number_of_licenses = size(licenses_path,2);

input_licenses = LicenseKey.empty(number_of_licenses,0);

for i=1:number_of_licenses
    fileID = fopen(file_path,'r');
    input_licenses(i) = LicenseKey(fread(fileID));
    fclose(fileID);
end

% Returns an array with the licenses that were not successfully applied.
% Should return empty if all the licenses were correctly applied.
failed_licenses = eyetracker.apply_licenses(input_licenses);