Ejemplo n.º 1
0
def echo(host, port, calling_ae_title, called_ae_title):
    association = odil.Association()
    association.set_peer_host(host)
    association.set_peer_port(port)
    association.update_parameters()\
        .set_calling_ae_title(calling_ae_title)\
        .set_called_ae_title(called_ae_title) \
        .set_presentation_contexts([
            odil.AssociationParameters.PresentationContext(
                3, odil.registry.VerificationSOPClass,
                [ odil.registry.ImplicitVRLittleEndian ], True, False
            )
        ])
    association.associate()
    logging.info("Association established")

    echo = odil.EchoSCU(association)
    echo.echo()
    logging.info("C-ECHO successful")

    association.release()
    logging.info("Association released")
Ejemplo n.º 2
0
 def test_echo(self):
     echo = odil.EchoSCU(self.association)
     echo.echo()