Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Implementation of ClientControl / Documentation of qtm_rt and QTM-RT Protocol #45

Open
lks-dev opened this issue Feb 3, 2025 · 0 comments

Comments

@lks-dev
Copy link

lks-dev commented Feb 3, 2025

Description

QRTConnection.start's doc string states, that one has to in control to successfully call the function: It seems that this is indeed not the case for playback from file. Which is somewhat surprising, as this allows an unprivileged client to start playback, i.e. controlling the instance in this regard. This behavior is repeatable both with QTM Host set up to allow clients to take control and those that do not allow clients to take control.
Calling QRTConnection.stop() then raises: qtm_rt.protocol.QRTCommandException: b'You must be master to issue this command', which is not documented by it's doc string. Generally, the doc strings in qtm_rt could/should be updated as they do not hint that these methods can be used to start/stop actual measurements as well.

As the Documentation of the qtm_rt matches the documentation of the qtm-rt protocol the root cause issue is most likely in the implementation of the protocol in QTM Host. As the Doc-Repo is archived I decided to open issue here.


Minimal 'working' example

To recreate the bug add the IP of a reachable QTM-host with an opened measurement, which is configured to not allow client control.

import asyncio

import qtm_rt


async def main():
    """
    Minimal example code to recreate the issue.

    Setup QTM-Host to not allow client control, or set PW.
    Open .qtm to allow streaming from file.
    """
    connection = await qtm_rt.connect("xxx.xxx.xxx.xxx")
    if connection is None:
        return

    await connection.start(True)


if __name__ == "__main__":
    future = asyncio.ensure_future(main())
    asyncio.get_event_loop().run_until_complete(future)

Versions

qtm_rt v3.0.1
QTM v2023.3 build 12471
QTM-RT Protocol 1.24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant