Tobii Pro SDK C API
set_device_name.c
#include <stdio.h>
#include <string.h>
void set_device_name_example(TobiiResearchEyeTracker* eyetracker) {
char* current_device_name;
tobii_research_get_device_name(eyetracker, &current_device_name);
printf("The current name of the eye tracker is %s.\n", current_device_name);
TobiiResearchStatus status = tobii_research_set_device_name(eyetracker, "A new name");
if (TOBII_RESEARCH_STATUS_OK == status) {
char* device_name;
tobii_research_get_device_name(eyetracker, &device_name);
printf("The eye tracker changed name to %s\n", device_name);
}
printf("This eye tracker doesn't support changing the device name.");
printf("You need a higher level license to change the device name.");
}
tobii_research_set_device_name(eyetracker, current_device_name);
tobii_research_free_string(current_device_name);
}