@startuml {modul}
actor       Nutzer          as n
entity      System          as s    #DA70D5

box EyeTracking
participant EyeTrackingTutorial    as et
participant EyeTrackingSetup       as es
participant EyeTrackingBild        as eb
participant EyeTrackingAuge        as ea
end box

collections Config          as c
collections SpeicherMedium  as sm

activate n
activate s

es -> c : load Data
c --> es : Data
eb -> s : erfrage screensize
s --> eb : screensize : int[2]
es -> eb : loadGrid() : int[2]
eb --> es : screensize : int[2]
n -> s : schaut auf den bildschirm und wird von Kamera gesehen 
ea -> s : erfrage Camstream
s --> ea : Camstream (sendet dauerhaft)

== Tutorial ==
es -> s : erfragt Distanz
n -> s : Eingabe per Tastatur
s --> es : Distanz : float
loop Kalibrierung
  es -> et : tutorialPosition(punkt : int[2]): int[2]
  et -> s : erfragt Mausdaten
  n -> s : Positionsbestätigung mit Maus
  s --> et : Kalibrierungsdaten
  et --> es : position: int[2]
  es -> ea : getEye() : float[2]
  ea --> es : eye : float[2]
  es -> ea : getPupil() : float[2]
  ea --> es : Pupil : float[2]
end

== Versuch ==
loop Visual input
  es -> ea : getEye() : float[2]
  ea -> es : eye : float[2]
  es -> ea : getPupil() : float[2]
  ea -> es : Pupil : float[2]
end
es -> sm: save Data

@enduml
