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 ET when 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 mouseDisabled property exposes a Publisher which 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 module Gaze.

    Declaration

    Swift

    @Published
    public var mouseDisabled: Bool { get set }
  • The autoPauseEnabled property exposes a Publisher which 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 autoStandbyEnabled property exposes a Publisher which 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 pauseEnabled property exposes a Publisher which indicates if mouse movement is paused. It can also be set explicitely.

    Declaration

    Swift

    @Published
    public var pauseEnabled: Bool { get set }
  • The enableVideoStream property exposes a Publisher which 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 the Video class to enable video streaming

    Declaration

    Swift

    @Published
    public var videoStreamEnabled: Bool { get set }
  • The enablePositioningStream property exposes a Publisher which 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 the Positioning class to enable postioning streaming

    Declaration

    Swift

    @Published
    public var positioningStreamEnabled: Bool { get set }
  • The isOldiOs property exposes a Publisher which indicates if the iOS version is old < iOS version 13.4.

    Declaration

    Swift

    @Published
    private(set) public var isOldiOs: Bool { get set }
  • The isNotZoomed property exposes a Publisher which indicates if the iPad is using the zoomed UI. Determined by UIScreen.main.nativeScale > 2 means zoomed, UIScreen.main.nativeScale == 2 means not zoomed

    Declaration

    Swift

    @Published
    private(set) public var isNotZoomed: Bool { get set }
  • The fixationFilter property exposes a Publisher which indicates the currently active user’s fixation filter setting. This is enabled when the currently active user’s skill is set to Skyle_Profile.Skill.high. minimum value is 3, maximum value is 33

    Declaration

    Swift

    @Published
    private(set) public var fixationFilter: Int { get set }
  • The gazeFilter property exposes a Publisher which indicates the currently active user’s gaze filter setting. This is enabled when the currently active user’s skill is set to Skyle_Profile.Skill.high. minimum value is 3, maximum value is 33

    Declaration

    Swift

    @Published
    private(set) public var gazeFilter: Int { get set }
  • The options property exposes a Publisher which holds the full set of options. This is just for convenience. Please use the Publishers obove.

    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.set or Profiles.delete. This is managed by ET whenever a connection is established or lost. But needs to be done when ever a user profile is selected.

    • set: A Bool indicating if the memers should be set, to update UI
    • completion: A completion handler
    • options: A Skyle_Options instance containing the current settings Skyle and the currently active user or nil
    • state: A ET.States containing possible errors.

    Declaration

    Swift

    public func get(set: Bool = true, completion: @escaping (_ options: Skyle_Options?, _ state: ET.States) -> Void = {_, _ in})
  • Sets the iPad options isOldiOs and isNotZoomed.

    • 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_Options instance containing the current settings Skyle and the currently active user or nil
    • state: A ET.States containing possible errors.

    Declaration

    Swift

    public func setiPadOptions(isOldiOs: Bool,
                               isNotZoomed: Bool,
                               completion: @escaping (_ options: Skyle_Options?, _ state: ET.States) -> Void = {_, _ in})
  • 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_Options instance containing the current settings Skyle and the currently active user or nil
    • state: A ET.States containing 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_Options instance containing the current settings Skyle and the currently active user or nil
    • state: A ET.States containing 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_Options instance containing the current settings Skyle and the currently active user or nil
    • state: A ET.States containing 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) -> Int32

    Return 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})