Download Pylink api userguide
Transcript
For example: from pylink import * /*Code to open the display */ currentDisplay = getDisplayInformation(); print “Current display settings: “, currentDisplay.width, currentDisplay.height, \ currentDisplay.bits, currentDisplay.refresh 3.6 EyeLinkAddress Class The EyeLinkAddress class is used to hold addresses to EyeLink nodes. An instance of EyelinkAddress class can be initialized with the class constructor: EyeLinkAddress(ip = (100,1,1,1), port = 4000), where ip is a four-item tuple containing the IP address of the EyeLink node and port is the port number of the connection. For example, myAddress = EyeLinkAddress((100, 1, 1, 1), 4000). The EyeLinkAddress class has the following two methods. 3.6.1 getIP getIP() Returns the IP address of the EyeLink node. Parameters None. Return Value A four-item tuple (integer) containing the IP address of the EyeLink node. 3.6.2 getPort getPort() Returns the port number of the EyeLink node. Parameters None. Return Value An integer for the port number of the connection. 3.7 EyelinkMessage EyelinkMessage class, derived from EyelinkAddress class, is used to send and receive messages between EyeLink nodes. Instances of this class are commonly used as the return values of the nodeReceive() and getNode() methods of the EyeLinkListener or Eyelink class. An instance of EyelinkMessage class can be initialized with the class constructor: EyelinkMessage(ip = (100,1,1,1), port = 4000, msg = ""), where ip is a four-item tuple containing the IP address of the EyeLink node, port is the port number of the connection, msg is the message to be sent to or received from the node. For example, Windows EyeLink Programming (11/1/2003) 2002 SR Research Ltd. 46