main class for communication with the EyeLogic server More...
Classes | |
class | DeviceConfig |
configuration of the eye tracker More... | |
class | DeviceGeometry |
geometric position of the device related to the active monitor More... | |
class | ReturnCalibrate |
return values of calibrate( ) More... | |
class | ReturnConnect |
return values of connect( ) More... | |
class | ReturnNextData |
return values of getNextEvent( ), getNextGazeSample( ) and getNextEyeImage( ) More... | |
class | ReturnSetActiveScreen |
return values of setActiveScreen( ) More... | |
class | ReturnStart |
return values of requestTracking( ) More... | |
class | ReturnStreamEyeImages |
return values of streamEyeImages( ) More... | |
class | ReturnValidate |
return values of validate( ) More... | |
class | ScreenConfig |
configuration of the stimulus screen More... | |
class | ServerInfo |
connection information for an EyeLogic server More... | |
class | ValidationPointResult |
ValidationPointResult. More... | |
class | ValidationResult |
ValidationResult. More... | |
Public Member Functions | |
def | __init__ (self, str clientName) |
constructor More... | |
def | __del__ (self) |
destructor | |
def | registerGazeSampleCallback (self, GazeSampleCallback sampleCallback) |
registers sample callback listener More... | |
def | registerEyeImageCallback (self, EyeImageCallback eyeImageCallback) |
registers eye image callback listener More... | |
def | registerEventCallback (self, EventCallback eventCallback) |
registers event callback listener More... | |
ReturnConnect | connect (self) |
initialize connection to the server (method is blocking until connection established). More... | |
ReturnConnect | connectRemote (self, ServerInfo server) |
initialize connection to a remote server (method is blocking until connection established) More... | |
[ServerInfo] | requestServerList (self, c_int32 blockingDurationMS, c_int32 maxNumServer) |
Ping all running EyeLogic servers in the local network and wait some time for their response. More... | |
def | disconnect (self) |
closes connection to the server | |
bool | isConnected (self) |
whether a connection to the server is established | |
ScreenConfig | getActiveScreen (self) |
get stimulus screen configuration More... | |
[ScreenConfig] | getAvailableScreens (self) |
Get a list of screens connected to the local machine. More... | |
ReturnSetActiveScreen | setActiveScreen (self, str id, DeviceGeometry deviceGeometry) |
Make a screen connected to this machine to the active screen. More... | |
DeviceConfig | getDeviceConfig (self) |
get configuration of actual eye tracker device More... | |
ReturnStreamEyeImages | streamEyeImages (self, c_bool enable) |
Enabled/disables eye image stream. More... | |
(ReturnNextData, ELEvent) | getNextEvent (self, c_int timeoutMillis) |
Obtains the next unread event or blocks until a new event occurs or the given timeout is reached. More... | |
(ReturnNextData, ELGazeSample) | getNextGazeSample (self, c_int timeoutMillis) |
Obtains the next unread gazeSample or blocks until a new GazeSample is received or the given timeout is reached. More... | |
(ReturnNextData, ELEyeImage) | getNextEyeImage (self, c_int timeoutMillis) |
Obtains the next unread eye image or blocks until a new eye image is received or the given timeout is reached. More... | |
ReturnStart | requestTracking (self, c_int frameRateModeInd) |
request tracking More... | |
def | unrequestTracking (self) |
unrequest tracking More... | |
def | calibrate (self, c_int calibrationModeInd) |
perform calibration (method is blocking until calibration finished) More... | |
(ReturnValidate, ValidationResult) | validate (self) |
perform calibration (method is blocking until calibration finished) - calibration must be performed prior More... | |
main class for communication with the EyeLogic server
def __init__ | ( | self, | |
str | clientName | ||
) |
constructor
clientName | string identifier of the client (shown in the server tool window), may be null |
def calibrate | ( | self, | |
c_int | calibrationModeInd | ||
) |
perform calibration (method is blocking until calibration finished)
ReturnConnect connect | ( | self | ) |
initialize connection to the server (method is blocking until connection established).
The connection is only established for a local server (running on this machine). For connections to a remote server,
ReturnConnect connectRemote | ( | self, | |
ServerInfo | server | ||
) |
initialize connection to a remote server (method is blocking until connection established)
server | Server to connect to |
ScreenConfig getActiveScreen | ( | self | ) |
get stimulus screen configuration
[ScreenConfig] getAvailableScreens | ( | self | ) |
Get a list of screens connected to the local machine.
If there are more screens than 'numScreenConfigs' found, then only the first 'numScreenConfigs' ones are filled.
DeviceConfig getDeviceConfig | ( | self | ) |
get configuration of actual eye tracker device
(ReturnNextData, ELEvent) getNextEvent | ( | self, | |
c_int | timeoutMillis | ||
) |
Obtains the next unread event or blocks until a new event occurs or the given timeout is reached.
The last incoming event is buffered internally and can be obtained by calling this method in a consecutive order. If there is no new event, the method blocks until an event occurs or the given timeout is reached. The method returns SUCCESS if and only if a new event is provided which was not returned before. Therefore, by checking the return value, you can assure to not handle any event twice.
If you want to catch events in a loop, be careful to not wait too long between the calls to this method. Otherwise, you may miss events. If you want to be 100% sure to not miss any event, consider to use the ELEventCallback mechanism.
timeoutMillis | duration in milliseconds, method returns at the latest after this time. May be 0 if the method should return immediatly. |
(ReturnNextData, ELEyeImage) getNextEyeImage | ( | self, | |
c_int | timeoutMillis | ||
) |
Obtains the next unread eye image or blocks until a new eye image is received or the given timeout is reached.
The last incoming eye image is buffered internally and can be obtained by calling this method in a consecutive order. If there is no new eye image, the method blocks until an eye image is received or the given timeout is reached. The method returns SUCCESS if and only if a new eye image is provided which was not returned before. Therefore, by checking the return value, you can assure to not handle any eye image twice.
If you want to catch EyeImages in a loop, be careful to not wait too long between the calls to this method (at least once per frame). Otherwise, you may miss EyeImages. If you want to be 100% sure to not miss any EyeImages, consider to use the ELEyeImagesCallback mechanism.
timeoutMillis | duration in milliseconds, method returns at the latest after this time. May be 0 if the method should return immediatly. |
(ReturnNextData, ELGazeSample) getNextGazeSample | ( | self, | |
c_int | timeoutMillis | ||
) |
Obtains the next unread gazeSample or blocks until a new GazeSample is received or the given timeout is reached.
The last incoming GazeSample is buffered internally and can be obtained by calling this method in a consecutive order. If there is no new GazeSample, the method blocks until a GazeSample arrives or the given timeout is reached. The method returns SUCCESS if and only if a new GazeSample is provided which was not returned before. Therefore, by checking the return value, you can assure to not handle any GazeSample twice.
If you want to catch GazeSamples in a loop, be careful to not wait too long between the calls to this method (at least once per frame). Otherwise, you may miss GazeSamples. If you want to be 100% sure to not miss any GazeSample, consider to use the ELGazeSampleCallback mechanism.
timeoutMillis | duration in milliseconds, method returns at the latest after this time. May be 0 if the method should return immediatly. |
def registerEventCallback | ( | self, | |
EventCallback | eventCallback | ||
) |
registers event callback listener
eventCallback | this callback function is called on eye tracking events, may be null |
def registerEyeImageCallback | ( | self, | |
EyeImageCallback | eyeImageCallback | ||
) |
registers eye image callback listener
eyeImageCallback | this callback function is called on new eye images, may be null |
def registerGazeSampleCallback | ( | self, | |
GazeSampleCallback | sampleCallback | ||
) |
registers sample callback listener
sampleCallback | this callback function is called on new gaze samples, may be null |
[ServerInfo] requestServerList | ( | self, | |
c_int32 | blockingDurationMS, | ||
c_int32 | maxNumServer | ||
) |
Ping all running EyeLogic servers in the local network and wait some time for their response.
blockingDurationMS | waiting duration in milliseconds. Method returns after this time, or if 'serverListLength' many servers responded. |
maxNumServer | maximum number of server to be waited for |
ReturnStart requestTracking | ( | self, | |
c_int | frameRateModeInd | ||
) |
request tracking
If tracking is not yet ongoing, tracking is started in the device. If tracking is already running (e.g. started from another client) with the same frame-rate as requested, all gaze samples are reported to this client as well.
frameRateModeInd | index of the requested frame rate mode (0 .. #frameRateModes-1) |
ReturnSetActiveScreen setActiveScreen | ( | self, | |
str | id, | ||
DeviceGeometry | deviceGeometry | ||
) |
Make a screen connected to this machine to the active screen.
Recording is from now on performed on the new active screen. Remember to perform a calibration on the new screen, otherwise it remains in an uncalibrated state.
id | ID of the new active screen on this machine (even works if the connection to the server is remote). If null, the primary screen of this machine is set as active. |
deviceGeometry | Geometry of the device which is mounted to the screen. |
ReturnStreamEyeImages streamEyeImages | ( | self, | |
c_bool | enable | ||
) |
Enabled/disables eye image stream.
If enabled, eye images are received from eye image listeners,
def unrequestTracking | ( | self | ) |
unrequest tracking
Note that the tracking device may continue if other processes still request tracking. Check the EyeLogic server window to observe the actual state.
(ReturnValidate, ValidationResult) validate | ( | self | ) |
perform calibration (method is blocking until calibration finished) - calibration must be performed prior