Fove SDK  v0.17.0
Public Member Functions | List of all members
fove.headset.ResearchHeadset Class Reference

Class that manages accesses to the ResearchHeadset. More...

Inheritance diagram for fove.headset.ResearchHeadset:
Inheritance graph
[legend]
Collaboration diagram for fove.headset.ResearchHeadset:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, headset, capabilities)
 Gets a ResearchHeadset that can be created from a headset. More...
 
def __enter__ (self)
 Converts an existing headset object into a research headset.
 
def __exit__ (self, _e_type, _e_val, _traceback)
 Destroyes the headset. More...
 
def getGaze (self)
 Returns research-related information from eye tracking. More...
 
def getImage (self, imageType)
 Returns the latest image of the given type. More...
 
def registerCapabilities (self, capabilities)
 Registers a research capability, enabling the required hardware as needed. More...
 
def unregisterCapabilities (self, capabilities)
 Deregisters a research capability previously registed with registerResearchCapabilities. More...
 

Detailed Description

Class that manages accesses to the ResearchHeadset.

All ResearchHeadset-related API requests will be done through an instance of this class.

The ResearchHeadset is destroyed when the input Headset object is destroyed. (It is users' responsibility to ensure that no API functionalities will be used through the ResearchHeadset handler, once the underlying Headset is destroyed.)

There is no destroy/free function for the research headset specifically. But the class still provides ResearchHeadset.__enter__ and ResearchHeadset.__exit__ methods, and the Headset instance has a factory method that creates a ResearchHeadset.

A typical use of this class would be as follows:

with Headset(ClientCapabilities.Gaze) as headset,
headset.getResearchHeadset(ResearchCapabilities.EyeImage) as research_headset:
# use research_headset
pass

Constructor & Destructor Documentation

◆ __init__()

def fove.headset.ResearchHeadset.__init__ (   self,
  headset,
  capabilities 
)

Gets a ResearchHeadset that can be created from a headset.

Normally, this method is invoked through Headset.getResearchHeadset.

Parameters
headsetAn instance of capi.Headset from which this compositor will be created. (Note that it is not an instance of the Headset class defined in this module.)
capabilitiesResearch capabilities
See also
Headset.getResearchHeadset
ResearchHeadset.__enter__

Member Function Documentation

◆ __exit__()

def fove.headset.ResearchHeadset.__exit__ (   self,
  _e_type,
  _e_val,
  _traceback 
)

Destroyes the headset.

(no cleanup needed)

◆ registerCapabilities()

def fove.headset.ResearchHeadset.registerCapabilities (   self,
  capabilities 
)

Registers a research capability, enabling the required hardware as needed.

Normally this is invoked directly via Headset.getResearchHeadset. You can add and remove capabilities while the object is alive.

Parameters
capsA set of capabitilties to register. Reregistering an existing capability is a no-op

◆ unregisterCapabilities()

def fove.headset.ResearchHeadset.unregisterCapabilities (   self,
  capabilities 
)

Deregisters a research capability previously registed with registerResearchCapabilities.

Parameters
capsA set of capabitilties to unregister. Unregistering a non-existing capability is a no-op

◆ getImage()

def fove.headset.ResearchHeadset.getImage (   self,
  imageType 
)

Returns the latest image of the given type.

The image data buffer is invalidated upon the next call to this function with the same image type

Parameters
imageTypetype of image to be obtained [capi.ImageType]

◆ getGaze()

def fove.headset.ResearchHeadset.getGaze (   self)

Returns research-related information from eye tracking.