TestCenter Reference
TestCenterAdvanced.IPC.ComMaster Class Reference

The connection's master. More...

Inheritance diagram for TestCenterAdvanced.IPC.ComMaster:
TestCenterAdvanced.IPC.Communicator

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)
 
- Public Member Functions inherited from TestCenterAdvanced.IPC.Communicator
 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
 
 _msocket
 
 _mHost
 
 _mPort
 
 _mErrorCode
 
 _mErrorMsg
 
 _csocket
 
 _mConnected
 
- Protected Attributes inherited from TestCenterAdvanced.IPC.Communicator
 _mHost
 IP to connect to.
 
 _mPort
 Port to use for the connection.
 
 _mConnected
 Status of the connection.
 
 _msocket
 Main socket of the server.
 
 _csocket
 Connection socket.
 
 _mErrorCode
 Internal error code used to track the last error.
 
 _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.
 

Detailed Description

The connection's master.

The master of the connection is the entity waiting for the slave to connect.

Definition at line 230 of file IPC.py.

Constructor & Destructor Documentation

◆ __init__()

TestCenterAdvanced.IPC.ComMaster.__init__ ( self,
connectTimeout = 10 )

Constructor initializing the master socket.

Reimplemented from TestCenterAdvanced.IPC.Communicator.

Definition at line 233 of file IPC.py.

References TestCenterAdvanced.IPC.ComMaster.__init__().

Referenced by TestCenterAdvanced.IPC.ComMaster.__init__().

◆ __del__()

Member Function Documentation

◆ connect()

TestCenterAdvanced.IPC.ComMaster.connect ( self,
timeout = 2 )

Wait for a slave to connect and configure the connection.

Definition at line 273 of file IPC.py.

◆ disconnect()

◆ getConnectTimeout()

TestCenterAdvanced.IPC.ComMaster.getConnectTimeout ( self)
Returns the timeout used by the Master while establishing the connection to the slave.

Definition at line 302 of file IPC.py.

References TestCenterAdvanced.IPC.ComMaster._connectTimeout.

Member Data Documentation

◆ _connectTimeout

TestCenterAdvanced.IPC.ComMaster._connectTimeout
protected

Definition at line 236 of file IPC.py.

Referenced by TestCenterAdvanced.IPC.ComMaster.getConnectTimeout().

◆ _csocket

◆ _mConnected

◆ _mErrorCode

◆ _mErrorMsg

TestCenterAdvanced.IPC.ComMaster._mErrorMsg
protected

◆ _mHost

TestCenterAdvanced.IPC.ComMaster._mHost
protected

Definition at line 243 of file IPC.py.

◆ _mPort

TestCenterAdvanced.IPC.ComMaster._mPort
protected

Definition at line 246 of file IPC.py.

Referenced by TestCenterAdvanced.IPC.Communicator.getPort().

◆ _msocket

TestCenterAdvanced.IPC.ComMaster._msocket
protected

Definition at line 237 of file IPC.py.

Referenced by TestCenterAdvanced.IPC.ComMaster.__del__().


The documentation for this class was generated from the following file: