Classes
Adapter

The abstraction layer between the Interaction Library and the eyetracking data provider. More...

Classes

struct  IL_AdapterFunctions
 

Functions Called by the Adapter

Typedefs for pointers to functions that the adapter will call. They must be implemented in the adapter.

typedef void(* ILAdapter_BeginTransactionCallback) (void *context)
 
typedef void(* ILAdapter_CommitTransactionCallback) (void *context)
 
typedef void(* ILAdapter_GetStreamTypesProvidedCallback) (const IL_StreamInputType *, unsigned count, void *context)
 
typedef void(* ILAdapter_GetStreamCoordinateTransformInfoCallback) (const IL_StreamCoordinateTransformInfo *, unsigned count, void *context)
 
typedef void(* ILAdapter_PostGazePointDataCallback) (const IL_GazePointData *, void *context)
 
typedef void(* ILAdapter_PostGazeOriginDataCallback) (const IL_GazeOriginData *, void *context)
 
typedef void(* ILAdapter_PostPresenceDataCallback) (const IL_PresenceData *, void *context)
 
typedef void(* ILAdapter_PostHeadPoseDataCallback) (const IL_HeadPoseData *, void *context)
 
typedef void(* ILAdapter_PostResponsiveGazePointDataCallback) (const IL_ResponsiveGazePointData *, void *context)
 
typedef void(* ILAdapter_TrackingStatusCallback) (IL_TrackingStatus, void *context)
 
typedef void(* ILAdapter_DeviceNotificationCallback) (IL_DeviceNotification, void *context)
 
typedef void(* ILAdapter_LoggingCallback) (IL_LoggingLevel level, const char *message, const char *tag1, const char *tag2, const char *formattedMetadata, void *context)
 
typedef void(* ILAdapter_ForwardLoggingStatementCallback) (IL_LoggingLevel level, const char *forwardedLoggingStatement, void *context)
 

Functions Called by InteractionLib

Typedefs for pointers to functions that the Interaction Library will call. They must be implemented in the adapter.

typedef void * ILAdapter_AdapterContext
 Pointer to an adapter-specific implementation detail context. More...
 
typedef bool(* ILAdapter_CreateAdapter) (void *createDestroyContext, ILAdapter_AdapterContext *context)
 Lightweight creation/instantiation of the adapter should happen on this call. All heavy, I/O or IPC operations should be done on ILAdapter_StartAdapter. More...
 
typedef void(* ILAdapter_DestroyAdapter) (void *createDestroyContext, ILAdapter_AdapterContext *context)
 Lightweight destroy of the adapter should happen on this call. All heavy, I/O or IPC operations needed to destroy the adapter should be done on ILAdapter_StopAdapter. More...
 
typedef void(* ILAdapter_StartAdapter) (ILAdapter_AdapterContext, IL_FieldOfUse fieldOfUse)
 The adapter implementation should generate IL_TrackingStatus_Ok on ILAdapter_TrackingStatusCallback when invoked. More...
 
typedef void(* ILAdapter_StopAdapter) (ILAdapter_AdapterContext)
 The adapter implementation should generate IL_TrackingStatus_NotAvailable on ILAdapter_TrackingStatusCallback when invoked. More...
 
typedef void(* ILAdapter_UpdateAdapter) (ILAdapter_AdapterContext)
 The adapter implementation should here generate calls for gaze point data, gaze origin data, etc., on registered callbacks. Expected to be consistent with what is reported by ILAdapter_GetStreamTypesProvided and ILAdapter_GetStreamTypesProvidedCallback. More...
 
typedef bool(* ILAdapter_WaitForDeviceConnection) (ILAdapter_AdapterContext)
 The adapter implementation should block until a device connection is available. More...
 
typedef bool(* ILAdapter_WaitForStreamingDataAvailable) (ILAdapter_AdapterContext)
 The adapter implementation should block until any streaming data is available. More...
 
typedef void(* ILAdapter_GetStreamTypesProvided) (ILAdapter_AdapterContext, ILAdapter_GetStreamTypesProvidedCallback, void *context)
 The adapter implementation should invoke ILAdapter_GetStreamTypesProvidedCallback. More...
 
typedef void(* ILAdapter_GetStreamCoordinateTransformInfo) (ILAdapter_AdapterContext, ILAdapter_GetStreamCoordinateTransformInfoCallback, void *context)
 The adapter implementation should invoke ILAdapter_GetStreamCoordinateTransformInfoCallback. The IL_StreamCoordinateTransformInfo struct and its contents will be copied at the receiving end when the ILAdapter_GetStreamCoordinateTransformInfoCallback callback is invoked and does not need to be kept alive afterwards. More...
 

Callback Registration Functions Called by InteractionLib

Typedefs for pointers to callback registration functions that the Interaction Library will call. The adapter implementation should call the registered callbacks in its ILAdapter_UpdateAdapter function.

All invocations of stream callbacks are expected to be surrounded by calls to ILAdapter_BeginTransactionCallback and ILAdapter_CommitTransactionCallback in ILAdapter_UpdateAdapter.

typedef void(* ILAdapter_RegisterBeginTransactionCallback) (ILAdapter_AdapterContext, ILAdapter_BeginTransactionCallback, void *context)
 
typedef void(* ILAdapter_RegisterCommitTransactionCallback) (ILAdapter_AdapterContext, ILAdapter_BeginTransactionCallback, void *context)
 
typedef bool(* ILAdapter_RegisterPostGazePointDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostGazePointDataCallback, void *context)
 
typedef bool(* ILAdapter_RegisterPostGazeOriginDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostGazeOriginDataCallback, void *context)
 
typedef bool(* ILAdapter_RegisterPostPresenceDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostPresenceDataCallback, void *context)
 
typedef bool(* ILAdapter_RegisterPostHeadPoseDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostHeadPoseDataCallback, void *context)
 
typedef bool(* ILAdapter_RegisterPostResponsiveGazePointDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostResponsiveGazePointDataCallback, void *context)
 
typedef bool(* ILAdapter_RegisterTrackingStatusCallback) (ILAdapter_AdapterContext, ILAdapter_TrackingStatusCallback, void *context)
 ILAdapter_TrackingStatusCallback is expected to be invoked by (at least) ILAdapter_StartAdapter and ILAdapter_StopAdapter. More...
 
typedef bool(* ILAdapter_RegisterDeviceNotificationCallback) (ILAdapter_AdapterContext, ILAdapter_DeviceNotificationCallback, void *context)
 
typedef bool(* ILAdapter_RegisterLoggingCallback) (ILAdapter_AdapterContext, ILAdapter_LoggingCallback, void *context)
 
typedef bool(* ILAdapter_RegisterForwardLoggingStatementCallback) (ILAdapter_AdapterContext, ILAdapter_ForwardLoggingStatementCallback, void *context)
 

Detailed Description

The abstraction layer between the Interaction Library and the eyetracking data provider.

There could be adapter implementations that use real Tobii eyetracking devices and data they provide, or "fake" implementations that generate test data, or even combinations thereof.


Class Documentation

◆ IL_AdapterFunctions

struct IL_AdapterFunctions

Public Attributes

void * createDestroyContext
 
ILAdapter_CreateAdapter createAdapter
 
ILAdapter_DestroyAdapter destroyAdapter
 
ILAdapter_StartAdapter startAdapter
 
ILAdapter_StopAdapter stopAdapter
 
ILAdapter_UpdateAdapter updateAdapter
 
ILAdapter_WaitForDeviceConnection waitForDeviceConnection
 
ILAdapter_WaitForStreamingDataAvailable waitForStreamingDataAvailable
 
ILAdapter_GetStreamTypesProvided getStreamTypesProvided
 
ILAdapter_GetStreamCoordinateTransformInfo getStreamCoordinateTransformInfo
 
ILAdapter_RegisterBeginTransactionCallback registerBeginTransactionCallback
 
ILAdapter_RegisterCommitTransactionCallback registerCommitTransactionCallback
 
ILAdapter_RegisterPostGazePointDataCallback registerPostGazePointDataCallback
 
ILAdapter_RegisterPostGazeOriginDataCallback registerPostGazeOriginDataCallback
 
ILAdapter_RegisterPostPresenceDataCallback registerPostPresenceDataCallback
 
ILAdapter_RegisterPostHeadPoseDataCallback registerPostHeadPoseDataCallback
 
ILAdapter_RegisterPostResponsiveGazePointDataCallback registerPostResponsiveGazePointDataCallback
 
ILAdapter_RegisterTrackingStatusCallback registerTrackingStatusCallback
 
ILAdapter_RegisterDeviceNotificationCallback registerDeviceNotificationCallback
 
ILAdapter_RegisterLoggingCallback registerLoggingCallback
 
ILAdapter_RegisterForwardLoggingStatementCallback registerForwardLoggingStatementCallback
 

Member Data Documentation

◆ createDestroyContext

void* createDestroyContext

◆ createAdapter

ILAdapter_CreateAdapter createAdapter

◆ destroyAdapter

ILAdapter_DestroyAdapter destroyAdapter

◆ startAdapter

ILAdapter_StartAdapter startAdapter

◆ stopAdapter

ILAdapter_StopAdapter stopAdapter

◆ updateAdapter

ILAdapter_UpdateAdapter updateAdapter

◆ waitForDeviceConnection

ILAdapter_WaitForDeviceConnection waitForDeviceConnection

◆ waitForStreamingDataAvailable

ILAdapter_WaitForStreamingDataAvailable waitForStreamingDataAvailable

◆ getStreamTypesProvided

ILAdapter_GetStreamTypesProvided getStreamTypesProvided

◆ getStreamCoordinateTransformInfo

ILAdapter_GetStreamCoordinateTransformInfo getStreamCoordinateTransformInfo

◆ registerBeginTransactionCallback

ILAdapter_RegisterBeginTransactionCallback registerBeginTransactionCallback

◆ registerCommitTransactionCallback

ILAdapter_RegisterCommitTransactionCallback registerCommitTransactionCallback

◆ registerPostGazePointDataCallback

ILAdapter_RegisterPostGazePointDataCallback registerPostGazePointDataCallback

◆ registerPostGazeOriginDataCallback

ILAdapter_RegisterPostGazeOriginDataCallback registerPostGazeOriginDataCallback

◆ registerPostPresenceDataCallback

ILAdapter_RegisterPostPresenceDataCallback registerPostPresenceDataCallback

◆ registerPostHeadPoseDataCallback

ILAdapter_RegisterPostHeadPoseDataCallback registerPostHeadPoseDataCallback

◆ registerPostResponsiveGazePointDataCallback

ILAdapter_RegisterPostResponsiveGazePointDataCallback registerPostResponsiveGazePointDataCallback

◆ registerTrackingStatusCallback

ILAdapter_RegisterTrackingStatusCallback registerTrackingStatusCallback

◆ registerDeviceNotificationCallback

ILAdapter_RegisterDeviceNotificationCallback registerDeviceNotificationCallback

◆ registerLoggingCallback

ILAdapter_RegisterLoggingCallback registerLoggingCallback

◆ registerForwardLoggingStatementCallback

ILAdapter_RegisterForwardLoggingStatementCallback registerForwardLoggingStatementCallback

Typedef Documentation

◆ ILAdapter_BeginTransactionCallback

typedef void(* ILAdapter_BeginTransactionCallback) (void *context)

◆ ILAdapter_CommitTransactionCallback

typedef void(* ILAdapter_CommitTransactionCallback) (void *context)

◆ ILAdapter_GetStreamTypesProvidedCallback

typedef void(* ILAdapter_GetStreamTypesProvidedCallback) (const IL_StreamInputType *, unsigned count, void *context)

◆ ILAdapter_GetStreamCoordinateTransformInfoCallback

typedef void(* ILAdapter_GetStreamCoordinateTransformInfoCallback) (const IL_StreamCoordinateTransformInfo *, unsigned count, void *context)

◆ ILAdapter_PostGazePointDataCallback

typedef void(* ILAdapter_PostGazePointDataCallback) (const IL_GazePointData *, void *context)

◆ ILAdapter_PostGazeOriginDataCallback

typedef void(* ILAdapter_PostGazeOriginDataCallback) (const IL_GazeOriginData *, void *context)

◆ ILAdapter_PostPresenceDataCallback

typedef void(* ILAdapter_PostPresenceDataCallback) (const IL_PresenceData *, void *context)

◆ ILAdapter_PostHeadPoseDataCallback

typedef void(* ILAdapter_PostHeadPoseDataCallback) (const IL_HeadPoseData *, void *context)

◆ ILAdapter_PostResponsiveGazePointDataCallback

typedef void(* ILAdapter_PostResponsiveGazePointDataCallback) (const IL_ResponsiveGazePointData *, void *context)

◆ ILAdapter_TrackingStatusCallback

typedef void(* ILAdapter_TrackingStatusCallback) (IL_TrackingStatus, void *context)

◆ ILAdapter_DeviceNotificationCallback

typedef void(* ILAdapter_DeviceNotificationCallback) (IL_DeviceNotification, void *context)

◆ ILAdapter_LoggingCallback

typedef void(* ILAdapter_LoggingCallback) (IL_LoggingLevel level, const char *message, const char *tag1, const char *tag2, const char *formattedMetadata, void *context)

◆ ILAdapter_ForwardLoggingStatementCallback

typedef void(* ILAdapter_ForwardLoggingStatementCallback) (IL_LoggingLevel level, const char *forwardedLoggingStatement, void *context)

◆ ILAdapter_AdapterContext

typedef void* ILAdapter_AdapterContext

Pointer to an adapter-specific implementation detail context.

◆ ILAdapter_CreateAdapter

typedef bool(* ILAdapter_CreateAdapter) (void *createDestroyContext, ILAdapter_AdapterContext *context)

Lightweight creation/instantiation of the adapter should happen on this call. All heavy, I/O or IPC operations should be done on ILAdapter_StartAdapter.

Parameters
createDestroyContextWhen Interaction Library calls ILAdapter_CreateAdapter this parameter will be set to whatever is in the originally passed IL_AdapterFunctions.createDestroyContext.
context[out]Before calling ILAdapter_CreateAdapter, the caller must set the value pointed at by the parameter context to nullptr. The adapter implementation should set the out parameter context (dereferenced) and return true on success.
Returns
true on success, otherwise false.

◆ ILAdapter_DestroyAdapter

typedef void(* ILAdapter_DestroyAdapter) (void *createDestroyContext, ILAdapter_AdapterContext *context)

Lightweight destroy of the adapter should happen on this call. All heavy, I/O or IPC operations needed to destroy the adapter should be done on ILAdapter_StopAdapter.

Parameters
createDestroyContextWhen Interaction Library calls ILAdapter_DestroyAdapter this parameter will be set to whatever is in the originally passed IL_AdapterFunctions.createDestroyContext.
context[in,out]The adapter implementation should set the out parameter context (dereferenced) to nullptr after destroying the adapter.

◆ ILAdapter_StartAdapter

typedef void(* ILAdapter_StartAdapter) (ILAdapter_AdapterContext, IL_FieldOfUse fieldOfUse)

The adapter implementation should generate IL_TrackingStatus_Ok on ILAdapter_TrackingStatusCallback when invoked.

Parameters
fieldOfUseWill be the value that was used when the Interaction Library was created.

◆ ILAdapter_StopAdapter

typedef void(* ILAdapter_StopAdapter) (ILAdapter_AdapterContext)

The adapter implementation should generate IL_TrackingStatus_NotAvailable on ILAdapter_TrackingStatusCallback when invoked.

◆ ILAdapter_UpdateAdapter

typedef void(* ILAdapter_UpdateAdapter) (ILAdapter_AdapterContext)

The adapter implementation should here generate calls for gaze point data, gaze origin data, etc., on registered callbacks. Expected to be consistent with what is reported by ILAdapter_GetStreamTypesProvided and ILAdapter_GetStreamTypesProvidedCallback.

◆ ILAdapter_WaitForDeviceConnection

typedef bool(* ILAdapter_WaitForDeviceConnection) (ILAdapter_AdapterContext)

The adapter implementation should block until a device connection is available.

◆ ILAdapter_WaitForStreamingDataAvailable

typedef bool(* ILAdapter_WaitForStreamingDataAvailable) (ILAdapter_AdapterContext)

The adapter implementation should block until any streaming data is available.

◆ ILAdapter_GetStreamTypesProvided

typedef void(* ILAdapter_GetStreamTypesProvided) (ILAdapter_AdapterContext, ILAdapter_GetStreamTypesProvidedCallback, void *context)

The adapter implementation should invoke ILAdapter_GetStreamTypesProvidedCallback.

◆ ILAdapter_GetStreamCoordinateTransformInfo

typedef void(* ILAdapter_GetStreamCoordinateTransformInfo) (ILAdapter_AdapterContext, ILAdapter_GetStreamCoordinateTransformInfoCallback, void *context)

The adapter implementation should invoke ILAdapter_GetStreamCoordinateTransformInfoCallback. The IL_StreamCoordinateTransformInfo struct and its contents will be copied at the receiving end when the ILAdapter_GetStreamCoordinateTransformInfoCallback callback is invoked and does not need to be kept alive afterwards.

◆ ILAdapter_RegisterBeginTransactionCallback

typedef void(* ILAdapter_RegisterBeginTransactionCallback) (ILAdapter_AdapterContext, ILAdapter_BeginTransactionCallback, void *context)

◆ ILAdapter_RegisterCommitTransactionCallback

typedef void(* ILAdapter_RegisterCommitTransactionCallback) (ILAdapter_AdapterContext, ILAdapter_BeginTransactionCallback, void *context)

◆ ILAdapter_RegisterPostGazePointDataCallback

typedef bool(* ILAdapter_RegisterPostGazePointDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostGazePointDataCallback, void *context)

◆ ILAdapter_RegisterPostGazeOriginDataCallback

typedef bool(* ILAdapter_RegisterPostGazeOriginDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostGazeOriginDataCallback, void *context)

◆ ILAdapter_RegisterPostPresenceDataCallback

typedef bool(* ILAdapter_RegisterPostPresenceDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostPresenceDataCallback, void *context)

◆ ILAdapter_RegisterPostHeadPoseDataCallback

typedef bool(* ILAdapter_RegisterPostHeadPoseDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostHeadPoseDataCallback, void *context)

◆ ILAdapter_RegisterPostResponsiveGazePointDataCallback

typedef bool(* ILAdapter_RegisterPostResponsiveGazePointDataCallback) (ILAdapter_AdapterContext, ILAdapter_PostResponsiveGazePointDataCallback, void *context)

◆ ILAdapter_RegisterTrackingStatusCallback

typedef bool(* ILAdapter_RegisterTrackingStatusCallback) (ILAdapter_AdapterContext, ILAdapter_TrackingStatusCallback, void *context)

◆ ILAdapter_RegisterDeviceNotificationCallback

typedef bool(* ILAdapter_RegisterDeviceNotificationCallback) (ILAdapter_AdapterContext, ILAdapter_DeviceNotificationCallback, void *context)

◆ ILAdapter_RegisterLoggingCallback

typedef bool(* ILAdapter_RegisterLoggingCallback) (ILAdapter_AdapterContext, ILAdapter_LoggingCallback, void *context)

◆ ILAdapter_RegisterForwardLoggingStatementCallback

typedef bool(* ILAdapter_RegisterForwardLoggingStatementCallback) (ILAdapter_AdapterContext, ILAdapter_ForwardLoggingStatementCallback, void *context)