Skip to content

Access QtSignals from external module / script #48

Discussion options

You must be logged in to vote

I've been successfully using the rpyc client connection from outside qudi. Took me a bit of tinkering, as the documentation wasn't too explicit, but managed to get it working like this:

class qudi_remote_control():

    def __init__(self, host='localhost', port=12345, conn_config={'allow_all_attrs': True}):
        self.host = host
        self.port = port
        self.conn_config = conn_config
        self.connection = rpyc.connect(self.host, self.port, config=self.conn_config)

    def start_timseries(self, *args, **kwargs):
        tm = self.connection.root.getModule('timeserieslogic')
        tm.start_reading()

Its neither the prettiest and might be prone to errors, but it works like…

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@Hundsraudigerrotzbua
Comment options

Comment options

You must be logged in to vote
1 reply
@Hundsraudigerrotzbua
Comment options

Comment options

You must be logged in to vote
1 reply
@Neverhorst
Comment options

Comment options

You must be logged in to vote
1 reply
@Hundsraudigerrotzbua
Comment options

Answer selected by Hundsraudigerrotzbua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants