コード例 #1
0
ファイル: QoS.py プロジェクト: jjpopski/ACS
def setORBTimeout(timeout):
    """
    Sets the timeout (in milliseconds) at the ORB level, affecting all method 
    invocations within the ORB.
    """
    setClientCallTimeout(timeout)
    return
コード例 #2
0
ファイル: QoS.py プロジェクト: jjpopski/ACS
def resetORBTimeout():
    """
    Resets (to zero) the ORB timeout, affecting all method invocations within 
    the ORB (sets to no timeout).
    """
    setClientCallTimeout(0)
    return
コード例 #3
0
def resetORBTimeout():
    '''
    Resets (to zero) the ORB timeout, affecting all method invocations within 
    the ORB (sets to no timeout).
    '''
    setClientCallTimeout(0)
    return
コード例 #4
0
ファイル: QoS.py プロジェクト: jjpopski/ACS
def resetObjectTimeout(objref):
    """
    Resets the timeout (to zero) for calls to the given CORBA object (sets to
    no timeout).
    """
    setClientCallTimeout(objref, 0)
    return
コード例 #5
0
def setORBTimeout(timeout):
    '''
    Sets the timeout (in milliseconds) at the ORB level, affecting all method 
    invocations within the ORB.
    '''
    setClientCallTimeout(timeout)
    return
コード例 #6
0
def resetObjectTimeout(objref):
    '''
    Resets the timeout (to zero) for calls to the given CORBA object (sets to
    no timeout).
    '''
    setClientCallTimeout(objref, 0)
    return
コード例 #7
0
ファイル: QoS.py プロジェクト: jjpopski/ACS
def setObjectTimeout(objref, timeout):
    """
    Sets timeout (in milliseconds) on the given CORBA object. Future calls on 
    the CORBA object will have this timeout, receiving an exception if the call
    takes longer than the timeout value.
    """
    setClientCallTimeout(objref, timeout)
    return
コード例 #8
0
ファイル: QoS.py プロジェクト: tstaig/ACS
def setObjectTimeout(objref, timeout):
    '''
    Sets timeout (in milliseconds) on the given CORBA object. Future calls on 
    the CORBA object will have this timeout, receiving an exception if the call
    takes longer than the timeout value.
    '''
    setClientCallTimeout(objref, timeout)
    return
コード例 #9
0
 def _breakConnection(self, identifier, uses, provides):
     log.debug("Breaking connection '%s'", identifier)
     omniORB.setClientCallTimeout(1500)
     try:
         usesPort = uses.getReference()
         usesPort.disconnectPort(identifier)
     except:
         log.warn("Ignoring exception breaking connection '%s'", identifier)
     omniORB.setClientCallTimeout(0)
     uses.disconnected(identifier)
     provides.disconnected(identifier)
コード例 #10
0
ファイル: QoS.py プロジェクト: jjpopski/ACS
 def set(self, timeout=0):
     """
     Sets the timeout value.
     
     Parameters:
     - timeout the timeout to be set (a long), expressed in milliseconds.
     
     Returns: Nothing
     
     Raises: Nothing
     """
     self.timeout = timeout
     setClientCallTimeout(self.timeout)
     return
コード例 #11
0
ファイル: QoS.py プロジェクト: tstaig/ACS
 def set(self, timeout=0):
     '''
     Sets the timeout value.
     
     Parameters:
     - timeout the timeout to be set (a long), expressed in milliseconds.
     
     Returns: Nothing
     
     Raises: Nothing
     '''
     self.timeout = timeout
     setClientCallTimeout(self.timeout)
     return
コード例 #12
0
ファイル: QoS.py プロジェクト: jjpopski/ACS
 def reset(self):
     """
     Resets the timeout (presently forces it to zero). 
     It should work in such a way that it resets the timeout 
     to the previous value, but the orb implementation does 
     not support functionality to retrieve the previously set timeout.
     So it sets timeout to 0 which means no timeout.
     
     Parameters: Nothing
     
     Returns: Nothing
   
     Raises: Nothing
     """
     setClientCallTimeout(0)
     return
コード例 #13
0
ファイル: QoS.py プロジェクト: tstaig/ACS
 def reset(self):
     '''
     Resets the timeout (presently forces it to zero). 
     It should work in such a way that it resets the timeout 
     to the previous value, but the orb implementation does 
     not support functionality to retrieve the previously set timeout.
     So it sets timeout to 0 which means no timeout.
     
     Parameters: Nothing
     
     Returns: Nothing
   
     Raises: Nothing
     '''
     setClientCallTimeout(0)
     return
コード例 #14
0
try:
    from omniORB import CORBA
    import CosNaming

    from . import CARESS
    from . import _GlobalIDL  # pylint: disable=unused-import
    import omniORB

    sys.modules['CARESS'] = sys.modules['nicos.devices.vendor.caress.CARESS']
    sys.modules['ABSDEV'] = sys.modules[
        'nicos.devices.vendor.caress._GlobalIDL']
    omniORB.updateModule('CARESS')
    omniORB.updateModule('ABSDEV')
    # Clear client timeout to avoid some timeouts due to waitings in CARESS
    omniORB.setClientCallTimeout(0)
    # omniORB.setClientThreadCallTimeout(0)
    # omniORB.setClientConnectTimeout(0)
except ImportError:
    omniORB = None

CORBA_DEVICE = 500

LOADMASTER = 14
LOADSLAVE = 15
RESETMODULE = 16
SPECIALLOAD = 18

MODULE_ERROR = -1
NOT_ACTIVE = 1
ACTIVE = 2
コード例 #15
0
def copy_ref_with_timeout(objref,timeout):
    """ Return a copy of the remote object reference with a client timeout set to it (in seconds)."""
    objref = objref._duplicate(objref) #make a copy of the obj's reference to assign a timeout to it
    omniORB.setClientCallTimeout(objref,timeout*miliseconds)
    return objref