eventListToDict elif asType = 'object' : conversionMethod = ioHubConnection. _returnarg if asType = 'dict' : conversionMethod = ioHubConnection. asType = 'namedtuple' if 'asType' in kwargs : asType = kwargs elif 'as_type' in kwargs : asType = kwargs conversionMethod = self. method_name != 'getEvents' : return r # The result of a call to an iohub Device getEvents() method # gets some special handling, converting the returned events # into the desired object type, etc. method_name, args, kwargs )) if r is None : # print("r is None:",('EXP_DEVICE', 'DEV_RPC', vice_class, # thod_name, args, kwargs)) return None r = r if len ( r ) = 1 : r = r if self. ![]() sendToHub (( 'EXP_DEVICE', 'DEV_RPC', self. sendToHub = sendToHub def _returnarg ( a ): # pragma: no cover return a def _call_ ( self, * args, ** kwargs ): # Send the device method call request to the ioHub Server and wait # for the method return value sent back from the ioHub Server. index ( 'log_level' ) def _init_ ( self, sendToHub, device_class, method_name ): self. index ( 'text' ) _log_level_index = LogEvent. EVENT_HUB_TIME_INDEX _log_text_index = LogEvent. Each iohub device method exposed by an ioHubDeviceView is represented by an associated DeviceRPC instance. _qualname_ class DeviceRPC (): ''' ioHubDeviceView creates an RPC interface with the iohub server. _qualname_ # avoid outputs like 'builtins.str' return module + '.' + klass. _module_ if module = 'builtins' : return klass. getDistance ()) return windict def getFullClassName ( klass ): module = klass. monitor : windict = dict ( resolution = win. getTime _currentSessionInfo = None def windowInfoDict ( win ): windict = dict ( handle = win. constants import DeviceConstants, EventConstants from psychopy import constants getTime = Computer. devices.experiment import MessageEvent, LogEvent from. devices import DeviceEvent, import_device from. util import isIterable, updateDict, win32MessagePump from. ![]() errors import print2err, ioHubError, printExceptionDetailsToStdErr from. import os import sys import time import subprocess import json import signal from weakref import proxy import psutil try : import psychopy.logging as psycho_logging except ImportError : psycho_logging = None from. # Distributed under the terms of the GNU General Public License (GPL). #!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |