コード例 #1
0
 def __init__(self, LocalAE, ClientSocket=None, RemoteAE=None, AssociateRequestTimeout=30):
     if not ClientSocket and not RemoteAE:
         raise
     if ClientSocket and RemoteAE:
         raise
     if ClientSocket:
         # must respond for request from a remote AE
         self.Mode = 'Acceptor'
     if RemoteAE:
         # must request
         self.Mode = 'Requestor'
     self.ClientSocket = ClientSocket
     self.AE = LocalAE
     self.DUL = DULServiceProvider(ClientSocket,
                                   MaxIdleSeconds=self.AE.MaxAssociationIdleSeconds,
                                   ConnectTimeoutSeconds=self.AE.ConnectTimeoutSeconds)
     self.RemoteAE = RemoteAE
     self._Kill = False
     threading.Thread.__init__(self)
     self.daemon = True
     self.SOPClassesAsSCP = []
     self.SOPClassesAsSCU = []
     self.AssociationEstablished = False
     self.AssociationRefused = None
     self.AssociateRequestTimeout = AssociateRequestTimeout
     self.start()
コード例 #2
0
    def __init__(self, LocalAE, ClientSocket=None, RemoteAE=None, userdata=None):
        if not ClientSocket and not RemoteAE:
            raise
        if ClientSocket and RemoteAE:
            raise
        if ClientSocket:
            # must respond for request from a remote AE
            self.Mode = 'Acceptor'
        if RemoteAE:
            # must request
            self.Mode = 'Requestor'
        self.ClientSocket = ClientSocket
        self.AE = LocalAE
        self.DUL = DULServiceProvider(ClientSocket,
                                      MaxIdleSeconds=self.AE.MaxAssociationIdleSeconds)
        self.RemoteAE = RemoteAE
        self._Kill = False
        threading.Thread.__init__(self)
        self.daemon = True
        self.SOPClassesAsSCP = []
        self.SOPClassesAsSCU = []
        self.AssociationEstablished = False
        self.AssociationRefused = None

        # Store any extended User Information (if any)
        self.UserDataItems = userdata or list()

        self.start()
コード例 #3
0
 def __init__(self, LocalAE, ClientSocket=None, RemoteAE=None):
     if not ClientSocket and not RemoteAE:
         raise
     if ClientSocket and RemoteAE:
         raise
     if ClientSocket:
         # must respond for request from a remote AE
         self.Mode = 'Acceptor'
     if RemoteAE:
         # must request
         self.Mode = 'Requestor'
     self.ClientSocket = ClientSocket
     self.DUL = DULServiceProvider(ClientSocket)
     self.AE = LocalAE
     self.RemoteAE = RemoteAE
     self._Kill = False
     threading.Thread.__init__(self)
     self.SOPClassesAsSCP = []
     self.SOPClassesAsSCU = []
     self.AssociationEstablished = False
     self.AssociationRefused = None
     self.start()