C# Class ATUAV_RT.EyetrackerConnector

Connects to an eyetracker. Use a new EyetrackerConnector for each eyetracker connection. GazeData and Framerate change events should be subscribed to through the AddGazeDataHandler(1) and AddFramerateChangedHandler(1) methods which check if eyetracker is connected yet and will delay connection if it isn't.
显示文件 Open project: ATUAV/ATUAV Class Usage Examples

Public Methods

Method Description
AddFrameRateChangedHandler ( EventHandler handler ) : void

Adds a frame rate changed event handler to connected eyetracker. If eyetracker is not connected subscription is delayed until eyetracker is connected. Method returns immediately.

AddGazeDataHandler ( EventHandler handler ) : void

Adds a gaze data event handler to connected eyetracker. If eyetracker is not connected, subscription is delayed until eyetracker is connected. Method returns immediately.

Connect ( ) : void

Connects to eyetracker and subscribes to events. Events are received on background thread.

Disconnect ( ) : void

Unsubscribes from events and disconnects eyetracker.

EyetrackerConnector ( EyetrackerInfo info ) : System
RemoveFrameRateChangedHandler ( EventHandler handler ) : void

Removes a frame rate changed event handler from connected eyetracker.

RemoveGazeDataHandler ( EventHandler handler ) : void

Removes a gaze data event handler from connected eyetracker.

Private Methods

Method Description
ConnectionError ( object sender, ConnectionErrorEventArgs e ) : void

Disconnects from eyetracker on error.

Method Details

AddFrameRateChangedHandler() public method

Adds a frame rate changed event handler to connected eyetracker. If eyetracker is not connected subscription is delayed until eyetracker is connected. Method returns immediately.
public AddFrameRateChangedHandler ( EventHandler handler ) : void
handler EventHandler
return void

AddGazeDataHandler() public method

Adds a gaze data event handler to connected eyetracker. If eyetracker is not connected, subscription is delayed until eyetracker is connected. Method returns immediately.
public AddGazeDataHandler ( EventHandler handler ) : void
handler EventHandler
return void

Connect() public method

Connects to eyetracker and subscribes to events. Events are received on background thread.
public Connect ( ) : void
return void

Disconnect() public method

Unsubscribes from events and disconnects eyetracker.
public Disconnect ( ) : void
return void

EyetrackerConnector() public method

public EyetrackerConnector ( EyetrackerInfo info ) : System
info EyetrackerInfo
return System

RemoveFrameRateChangedHandler() public method

Removes a frame rate changed event handler from connected eyetracker.
public RemoveFrameRateChangedHandler ( EventHandler handler ) : void
handler EventHandler
return void

RemoveGazeDataHandler() public method

Removes a gaze data event handler from connected eyetracker.
public RemoveGazeDataHandler ( EventHandler handler ) : void
handler EventHandler
return void