twinleaf-tools

Crates.iotwinleaf-tools
lib.rstwinleaf-tools
version
sourcesrc
created_at2024-11-20 03:09:44.781088
updated_at2024-12-10 17:12:26.262771
descriptionTools for the Twinleaf I/O protocol for reading data from Twinleaf quantum sensors.
homepagehttps://twinleaf.com
repositoryhttps://github.com/twinleaf/twinleaf-rust
max_upload_size
id1454286
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Tom Kornack (tkornack)

documentation

README

Twinleaf I/O Tools in Rust

This repository contains a set of tools that are useful for working with Twinleaf quantum sensors and accessories. The repository contains the twinleaf library and a set of command line tools: a proxy, a utility, and a data monitoring tool.

Proxy

The proxy makes the device's serial port available via ethernet, and supports multiple simultaneous client connections to a single device:

	tio-proxy --auto

When there are more than one serial port available, it is necessary to specify the port

	[linux]  > tio-proxy -r /dev/ttyACM0
	[macOS]  > tio-proxy -r /dev/cu.usbserialXXXXXX
	[windows]> tio-proxy.exe -r COM3

When a sensor is attached to a hub at port 0, it is possible to proxy the data directly to that port using the -s flag:

	tio-proxy --auto -s /0

With the proxy running, a set of tools can be used on the data stream.

Log data to a raw binary file:

	tio-tool log

Parse that log data for stream id 1 to a csv file:

	tio-tool log-csv 1 logfile.tio

Issue commands:

	tio-tool rpc dev.name

List available commands:

	tio-tool rpc-list

Firmware upgrade:

	tio-tool firmware-upgrade <firmware.bin>

Monitoring the data stream:

	tio-tool data-dump

A TUI data monitor:

	tio-monitor

And a variety of additional functions for use with Twinleaf sensors.

Installation

The tools can be installed using

cargo install twinleaf-tools

It is convenient to add the cargo binary directory to the default search paths. Cargo will report where the binaries and installed and which path to add to your environment, if necessary.

The serialport library depends on libudev that is not included on certain linux distributions. To install it use:

	sudo apt install libudev-dev # debian linux

Cross compilation

The tools can be compiled for other platforms by first adding those platform targets:

	rustup target add x86_64-pc-windows-gnu
	rustup toolchain install stable-x86_64-pc-windows-gnu

And then building for the new target:

	cargo build --target x86_64-pc-windows-gnu
Commit count: 78

cargo fmt