Control
public class Control : ObservableObject
Control exposes Publisher which hold information about Skyles settings.
These are partially user specific and should be pulled after a user is selected via Profile.select,
Profiles.set or Profiles.delete.
-
A reference to the current client, which represents the gRPC connection. This is automatically updated by
ETwhen a new connection is established.Declaration
Swift
internal var client: Skyle_SkyleNIOClient? -
Internal empty constructor
Declaration
Swift
internal init() -
Internal constructor passing a possible client
Declaration
Swift
internal init(_ client: Skyle_SkyleNIOClient?) -
The
mouseDisabledproperty exposes aPublisherwhich enables / disables HID mouse control. This mode allows a user to pause the cursor movement but keeps gaze data stream enabled if used via the moduleGaze.Declaration
Swift
@Published public var mouseDisabled: Bool { get set } -
The
autoPauseEnabledproperty exposes aPublisherwhich enables / disables the automatic pause mode. This mode allows a user to pause the cursor movement by looking into the camera (center of Skyle) for a couple of seconds.Declaration
Swift
@Published public var autoPauseEnabled: Bool { get set } -
The
autoStandbyEnabledproperty exposes aPublisherwhich enables / disables the automatic standby mode. This mode allows Skyle to go into a standby mode when the iPad’s sceen is locked by pressing the power button for example. Skyle in standby should save some power and let the iPad live longer on battery power.Declaration
Swift
@Published public var autoStandbyEnabled: Bool { get set } -
The
pauseEnabledproperty exposes aPublisherwhich indicates if mouse movement is paused. It can also be set explicitely.Declaration
Swift
@Published public var pauseEnabled: Bool { get set } -
The
enableVideoStreamproperty exposes aPublisherwhich indicates if the video stream is enabled or disabled. This can be set explicitely on Skyle 2. This only reports if the stream is enabled on Skyle 3. Use theVideoclass to enable video streamingDeclaration
Swift
@Published public var videoStreamEnabled: Bool { get set } -
The
enablePositioningStreamproperty exposes aPublisherwhich indicates if the positioning stream is enabled or disabled. This can be set explicitely on Skyle 2. This only reports if the stream is enabled on Skyle 3. Use thePositioningclass to enable postioning streamingDeclaration
Swift
@Published public var positioningStreamEnabled: Bool { get set } -
The
isOldiOsproperty exposes aPublisherwhich indicates if the iOS version is old<iOS version 13.4.Declaration
Swift
@Published private(set) public var isOldiOs: Bool { get set } -
The
isNotZoomedproperty exposes aPublisherwhich indicates if the iPad is using the zoomed UI. Determined by UIScreen.main.nativeScale > 2 means zoomed, UIScreen.main.nativeScale == 2 means not zoomedDeclaration
Swift
@Published private(set) public var isNotZoomed: Bool { get set } -
The
fixationFilterproperty exposes aPublisherwhich indicates the currently active user’s fixation filter setting. This is enabled when the currently active user’s skill is set toSkyle_Profile.Skill.high. minimum value is 3, maximum value is 33Declaration
Swift
@Published private(set) public var fixationFilter: Int { get set } -
The
gazeFilterproperty exposes aPublisherwhich indicates the currently active user’s gaze filter setting. This is enabled when the currently active user’s skill is set toSkyle_Profile.Skill.high. minimum value is 3, maximum value is 33Declaration
Swift
@Published private(set) public var gazeFilter: Int { get set } -
The
optionsproperty exposes aPublisherwhich holds the full set of options. This is just for convenience. Please use thePublishersobove.Declaration
Swift
@Published private(set) public var options: Skyle_Options { get set } -
Gets the current settings of the eyetracker Skyle and the currently active user selected via
Profile.select,Profiles.setorProfiles.delete. This is managed byETwhenever a connection is established or lost. But needs to be done when ever a user profile is selected.- set: A
Boolindicating if the memers should be set, to update UI - completion: A completion handler
- options: A
Skyle_Optionsinstance containing the current settings Skyle and the currently active user or nil - state: A
ET.Statescontaining possible errors.
Declaration
Swift
public func get(set: Bool = true, completion: @escaping (_ options: Skyle_Options?, _ state: ET.States) -> Void = {_, _ in}) - set: A
-
Sets the iPad options
isOldiOsandisNotZoomed.- isOldiOs: Old means iOS version
<13.4. - isNotZoomed: Determined by UIScreen.main.nativeScale
>2 means zoomed, UIScreen.main.nativeScale == 2 means not zoomed - completion: A completion handler
- options: A
Skyle_Optionsinstance containing the current settings Skyle and the currently active user or nil - state: A
ET.Statescontaining possible errors.
Declaration
Swift
public func setiPadOptions(isOldiOs: Bool, isNotZoomed: Bool, completion: @escaping (_ options: Skyle_Options?, _ state: ET.States) -> Void = {_, _ in}) - isOldiOs: Old means iOS version
-
Sets the filter settings.
- gazeFilter: min value = 3, max value 33, the higher the more lag.
- fixationFilter: min value = 3, max value 33, the higher the slower the cursor moves when a fixation has been detected internally.
- completion: A completion handler
- options: A
Skyle_Optionsinstance containing the current settings Skyle and the currently active user or nil - state: A
ET.Statescontaining possible errors.
Declaration
Swift
public func setFilter(gazeFilter: Int, fixationFilter: Int, completion: @escaping (_ options: Skyle_Options?, _ state: ET.States) -> Void = {_, _ in}) -
Sets the gaze filter setting.
- value: min value = 3, max value 33, the higher the more lag.
- completion: A completion handler
- options: A
Skyle_Optionsinstance containing the current settings Skyle and the currently active user or nil - state: A
ET.Statescontaining possible errors.
Declaration
Swift
public func setGazeFilter(_ value: Int, completion: @escaping (_ options: Skyle_Options?, _ state: ET.States) -> Void = {_, _ in}) -
Sets the fixation filter setting.
- value: min value = 3, max value 33, the higher the slower the cursor moves when a fixation has been detected internally. Higher could mean more accurate when closing in on a target.
- completion: A completion handler
- options: A
Skyle_Optionsinstance containing the current settings Skyle and the currently active user or nil - state: A
ET.Statescontaining possible errors.
Declaration
Swift
public func setFixationFilter(_ value: Int, completion: @escaping (_ options: Skyle_Options?, _ state: ET.States) -> Void = {_, _ in}) -
Makes sure the input of a filter setting is between 3 and 33.
- value: Integer input.
Declaration
Swift
public static func filterBoundaries(_ value: Int) -> Int32Return Value
A value between 3 and 33.
-
Undocumented
Declaration
Swift
public func setDisplayDimensions(_ value: (size: CGSize, resolution: CGSize), completion: @escaping (_ options: Skyle_Options?, _ state: ET.States) -> Void = {_, _ in})