コード例 #1
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _event_converter_FramerateChanged(self, payload):
     #    event: FramerateChanged
     #  channel: 1640
     reader = ParamStackReader(payload)
     data = reader.pop()  # element: framerate (type: fixed15x16)
     
     return data
コード例 #2
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_PayPerUseInfo(self, payload):
     #  opcode: 1600
     reader = ParamStackReader(payload) 
     response = PayperuseInfo()
     response.Enabled = reader.pop() > 0 # element: enabled (type: uint32)
     response.Realm = reader.pop()  # element: realm (type: uint32)
     response.Authorized = reader.pop() > 0 # element: authorized (type: uint32)
     
     return response        
コード例 #3
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_AuthorizeChallenge(self, payload):
     #  opcode: 1900
     reader = ParamStackReader(payload) 
     response = AuthorizeChallenge()
     response.RealmId = reader.pop()  # element: realm_ (type: uint32)
     response.Algorithm = reader.pop()  # element: algorithm (type: uint32)
     response.ChallengeData = reader.pop()  # element: challenge_data (type: blob)
     
     return response
コード例 #4
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_XConfiguration(self, payload):
     #  opcode: 1430
     reader = ParamStackReader(payload) 
     response = XConfiguration()
     response.UpperLeft = Point3D._node_converter(reader.pop())  # element: upper_left (type: tree)
     response.UpperRight = Point3D._node_converter(reader.pop())  # element: upper_right (type: tree)
     response.LowerLeft = Point3D._node_converter(reader.pop())  # element: lower_left (type: tree)
     
     return response
コード例 #5
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_UnitInfo(self, payload):
     #  opcode: 1420
     reader = ParamStackReader(payload) 
     response = UnitInfo()
     response.SerialNumber = reader.pop()  # element: serial (type: string)
     response.Model = reader.pop()  # element: model (type: string)
     response.Generation = reader.pop()  # element: generation (type: string)
     response.FirmwareVersion = reader.pop()  # element: version (type: string)
     
     return response
コード例 #6
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _event_converter_XConfigurationChanged(self, payload):
     #    event: XconfigChanged
     #  channel: 1450
     data = XConfiguration()
     
     reader = ParamStackReader(payload)
     data.UpperLeft = Point3D._node_converter(reader.pop())  # element: upper_left (type: tree)
     data.UpperRight = Point3D._node_converter(reader.pop())  # element: upper_right (type: tree)
     data.LowerLeft = Point3D._node_converter(reader.pop())  # element: lower_left (type: tree)
     # ignore tool data element: guidlist (type: vector_string)
     return data
コード例 #7
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_HeadMovementBox(self, payload):
     #  opcode: 1400
     reader = ParamStackReader(payload) 
     response = HeadMovementBox()
     response.Point1 = Point3D._node_converter(reader.pop())  # element: p1 (type: tree)
     response.Point2 = Point3D._node_converter(reader.pop())  # element: p2 (type: tree)
     response.Point3 = Point3D._node_converter(reader.pop())  # element: p3 (type: tree)
     response.Point4 = Point3D._node_converter(reader.pop())  # element: p4 (type: tree)
     response.Point5 = Point3D._node_converter(reader.pop())  # element: p5 (type: tree)
     response.Point6 = Point3D._node_converter(reader.pop())  # element: p6 (type: tree)
     response.Point7 = Point3D._node_converter(reader.pop())  # element: p7 (type: tree)
     response.Point8 = Point3D._node_converter(reader.pop())  # element: p8 (type: tree)
     
     return response
コード例 #8
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _event_converter_GazeDataReceived(self, payload):
     #  channel: 1280
     data = GazeDataItem()
     reader = ParamStackReader(payload)
     data_row = reader.pop()  # element: gaze (type: tree)
     
     data.Timestamp = self.get_gaze_data_column(data_row, GazeDataConstants.TimeStamp)
     
     data.LeftEyePosition3D = Point3D._node_converter(self.get_gaze_data_column(data_row, GazeDataConstants.LeftEyePosition3D))
     data.LeftEyePosition3DRelative = Point3D._node_converter(self.get_gaze_data_column(data_row, GazeDataConstants.LeftEyePosition3DRelative))
     data.LeftGazePoint3D = Point3D._node_converter(self.get_gaze_data_column(data_row, GazeDataConstants.LeftGazePoint3D))
     data.LeftGazePoint2D = Point2D._node_converter(self.get_gaze_data_column(data_row, GazeDataConstants.LeftGazePoint2D))
     data.LeftPupil = self.get_gaze_data_column(data_row, GazeDataConstants.LeftPupil)
     data.LeftValidity = self.get_gaze_data_column(data_row, GazeDataConstants.LeftValidity)
     
     data.RightEyePosition3D = Point3D._node_converter(self.get_gaze_data_column(data_row, GazeDataConstants.RightEyePosition3D))
     data.RightEyePosition3DRelative = Point3D._node_converter(self.get_gaze_data_column(data_row, GazeDataConstants.RightEyePosition3DRelative))
     data.RightGazePoint3D = Point3D._node_converter(self.get_gaze_data_column(data_row, GazeDataConstants.RightGazePoint3D))
     data.RightGazePoint2D = Point2D._node_converter(self.get_gaze_data_column(data_row, GazeDataConstants.RightGazePoint2D))
     data.RightPupil = self.get_gaze_data_column(data_row, GazeDataConstants.RightPupil)
     data.RightValidity = self.get_gaze_data_column(data_row, GazeDataConstants.RightValidity)
     
     return data
コード例 #9
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_AvailableExtensions(self, payload):
     #  opcode: 1810
     reader = ParamStackReader(payload) 
     node = reader.pop()  # element: available_extensions (type: tree)
     
     return self._convert_node_to_extension_list(node)
コード例 #10
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_NameInfo(self, payload):
     #  opcode: 1700
     reader = ParamStackReader(payload) 
     return reader.pop()  # element: name (type: string)
コード例 #11
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_DiagnosticReport(self, payload):
     #  opcode: 1510
     reader = ParamStackReader(payload) 
     return reader.pop()  # element: report (type: blob)
コード例 #12
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_LowblinkMode(self, payload):
     #  opcode: 1920
     reader = ParamStackReader(payload) 
     return reader.pop() > 0 # element: enabled (type: uint32)
コード例 #13
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_FramerateInfo(self, payload):
     #  opcode: 1610
     reader = ParamStackReader(payload) 
     return reader.pop()  # element: framerate (type: fixed15x16)    
コード例 #14
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_AvailableFramerates(self, payload):
     #  opcode: 1630
     reader = ParamStackReader(payload) 
     return reader.pop()  # element: framerates (type: vector_fixed15x16)
コード例 #15
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_EnumerateIlluminationModes(self, payload):
     reader = ParamStackReader(payload) 
     return reader.pop()  # element: illumination modes (type: vector_string)
コード例 #16
0
ファイル: eyetracker.py プロジェクト: Faham/emophiz
 def _response_converter_GetIlluminationMode(self, payload):
     reader = ParamStackReader(payload) 
     return reader.pop()  # element: illumination mode (type: string)