pygmc
Subpackages
- pygmc.connection package
- pygmc.devices package
- Submodules
- pygmc.devices.device module
- pygmc.devices.device_rfc1201 module
DeviceRFC1201DeviceRFC1201.get_config()DeviceRFC1201.get_cpm()DeviceRFC1201.get_datetime()DeviceRFC1201.get_gyro()DeviceRFC1201.get_temp()DeviceRFC1201.get_usv_h()DeviceRFC1201.get_voltage()DeviceRFC1201.heartbeat_live()DeviceRFC1201.heartbeat_live_print()DeviceRFC1201.power_off()DeviceRFC1201.power_on()DeviceRFC1201.reboot()DeviceRFC1201.send_key()DeviceRFC1201.set_datetime()
- pygmc.devices.device_rfc1801 module
DeviceRFC1801DeviceRFC1801.get_config()DeviceRFC1801.get_cpm()DeviceRFC1801.get_cpmh()DeviceRFC1801.get_cpml()DeviceRFC1801.get_cps()DeviceRFC1801.get_datetime()DeviceRFC1801.get_gyro()DeviceRFC1801.get_max_cps()DeviceRFC1801.get_usv_h()DeviceRFC1801.get_voltage()DeviceRFC1801.heartbeat_live()DeviceRFC1801.heartbeat_live_print()DeviceRFC1801.power_off()DeviceRFC1801.power_on()DeviceRFC1801.reboot()DeviceRFC1801.send_key()DeviceRFC1801.set_datetime()
- Module contents
Submodules
pygmc.cli module
Module contents
Python interface/API for GQ GMC Geiger Counter.
github: https://github.com/Wikilicious/pygmc pypi: https://pypi.org/project/pygmc/ readthedocs: https://pygmc.readthedocs.io/
- pygmc.connect(port=None, baudrate=None, vid=None, pid=None, description=None, hardware_id=None)[source]
Connect to device.
If all parameters are None, _auto_connect() flow is used which attempts to connect to all available ports. If ANY parameter is given; it’s used to refine the search, any matches are considered. Parameters are used as an OR search.
- Parameters:
port (str | None, optional) – Exact port (device dev path / com port) e.g. ‘/dev/ttyUSB0’ If port is specified, the following kwargs are ignored: vid, pid, description, hardware_id.
baudrate (int | None) – Device baudrate. Leave None to auto-detect baudrate. Only applicable when port is specified.
vid (str | None, optional) – Device vendor ID as hex, by default None
pid (str | None, optional) – Device product ID as hex, by default None
description (str | None, optional) – Device description, by default None
hardware_id (str | None, optional) – Device hwid, by default None e.g. ‘USB VID:PID=1A86:7523 LOCATION=2-1’ Use hex for vid:pid input
- Raises:
ConnectionError – Unable to connect to device.