Skip to content

Introduction to QuarkRemote¤

How to start¤

start
# pip install quarkstudio (if not installed)
# init or update: quark init/update --mode=remote
quark remote remote.json

QuarkRemote¤

QuarkRemote runs on the device's built-in operating system(often windows or linux) and mainly implements functions such as device control and remote software updates. Below is a simple user manual.

You may place the device driver anywhere. The directory structure is shown below:

remote folder
remote
├── dev
│   ├── VirtualDevice.py # (1)!   └── __init__.py
└── remote.json # (2)!
  1. VirtualDevice driver template
  2. remote
    remote.json
    {
        "ADC": { # alias of the device
            "name": "dev.VirtualDevice", # module path of the driver
            "addr": "192.168.1.42" #  # IP address of the device
            "port": 40001 # service port
        }
    }
    
  3. requirements
    requirements.txt
    waveforms
    quarkstudio[remote]
    
  4. setup
    setup.py
    from setuptools import setup
    
    with open('requirements.txt', encoding='utf-8') as f:
        requirements = f.read()
    
    setup(
        name="driver",
        version='1.0.0',
        author="baqis",
        license="MIT",
        description="driver",
        install_requires=requirements,
        python_requires='>=3.12.0'
    )
    

Then run quark remote remote.json in the remote folder to start the remote service.

To connect the device ADC on another computer within the same local area network (LAN), please refer to the following example

connect to a remote device
# pip install quarkstudio (if not installed)
from quark import connect

adc = connect('ADC',host='192.168.1.42',port=1169)
# driver methods can be called with adc as if it was a local driver instance
adc.getValue('IQ')