|
TestCenter Reference
|
The connection's master. More...
Public Member Functions | |
| __init__ (self, connectTimeout=10) | |
| Constructor initializing the master socket. | |
| __del__ (self) | |
| Destructor making sure the socket is deleted. | |
| connect (self, timeout=2) | |
| Wait for a slave to connect and configure the connection. | |
| disconnect (self) | |
| Unlink connection to the slave. | |
| getConnectTimeout (self) | |
| Returns the timeout used by the Master while establishing the connection to the slave. | |
| Public Member Functions inherited from TestCenterAdvanced.IPC.Communicator | |
| __init__ (self) | |
| getPort (self) | |
| Get the port used for connections. | |
| isConnected (self) | |
| Get the connection status of the IPC client. | |
| send (self, data, timeout) | |
| Send the data via the socket using the given timeout. | |
| recv (self, timeout) | |
| Receive data via the socket using the given timeout. | |
| getLastError (self) | |
| Get a tuple describing the last error. | |
| getLastErrorWithMessage (self) | |
| Get a tuple describing the last error. | |
Protected Attributes | |
| _connectTimeout = connectTimeout | |
| Protected Attributes inherited from TestCenterAdvanced.IPC.Communicator | |
| str | _mHost = "localhost" |
| IP to connect to. | |
| int | _mPort = 21319 if not "MeVisLabTestCenterPort" in os.environ else int(os.environ["MeVisLabTestCenterPort"]) |
| Port to use for the connection. | |
| bool | _mConnected = False |
| Status of the connection. | |
| _msocket = None | |
| Main socket of the server. | |
| _csocket = None | |
| Connection socket. | |
| _mErrorCode = Error.OK | |
| Internal error code used to track the last error. | |
| str | _mErrorMsg = "" |
| Internal error messages. | |
Additional Inherited Members | |
| Protected Member Functions inherited from TestCenterAdvanced.IPC.Communicator | |
| _send (self, data, length, timeout) | |
| Send's little helper. | |
| _recv (self, length, timeout) | |
| Receive's little helper. | |
| _handleError (self, errorCode, errorMsg, silent=False) | |
| Set the error code and message and disconnect from network. | |
| Static Protected Attributes inherited from TestCenterAdvanced.IPC.Communicator | |
| int | _mMsgLength = 8192 |
| Length of the messages sent between the two entities. | |
The connection's master.
The master of the connection is the entity waiting for the slave to connect.
| TestCenterAdvanced.IPC.ComMaster.__init__ | ( | self, | |
| connectTimeout = 10 ) |
Constructor initializing the master socket.
Definition at line 249 of file IPC.py.
References __init__().
Referenced by __init__().
| TestCenterAdvanced.IPC.ComMaster.__del__ | ( | self | ) |
| TestCenterAdvanced.IPC.ComMaster.connect | ( | self, | |
| timeout = 2 ) |
| TestCenterAdvanced.IPC.ComMaster.disconnect | ( | self | ) |
Unlink connection to the slave.
Definition at line 309 of file IPC.py.
References TestCenterAdvanced.IPC.Communicator._csocket, TestCenterAdvanced.IPC.Communicator._handleError(), and TestCenterAdvanced.IPC.Communicator._mConnected.
Referenced by TestCenterAdvanced.IPC.Communicator._handleError().
| TestCenterAdvanced.IPC.ComMaster.getConnectTimeout | ( | self | ) |
Returns the timeout used by the Master while establishing the connection to the slave.
Definition at line 322 of file IPC.py.
References _connectTimeout.
|
protected |
Definition at line 252 of file IPC.py.
Referenced by getConnectTimeout().