qualisys_python_sdk icon indicating copy to clipboard operation
qualisys_python_sdk copied to clipboard

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

Open lks-dev opened this issue 10 months ago • 0 comments

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

lks-dev avatar Feb 03 '25 14:02 lks-dev