TracerLL
TracerLL is a Python package with C++ extension modules for high-performance embedded tracing control.
The native code is built with CMake through scikit-build-core and pybind11.
USB serial transport and COBS framing are implemented in C++, so Python users
read and write decoded message payloads directly. Incoming frames that exceed
the receive limit are discarded through the next delimiter to restore framing.
Requirements
- Python 3.12 or newer (CI tests 3.12–3.15 on Linux, and 3.15 on macOS/Windows)
- CMake 3.16 or newer
- A C++20 compiler
- Git, used by CMake
FetchContentto fetchIntegralMotions/IntegralCommunication
Python build dependencies are declared in pyproject.toml and installed by
pip during build isolation.
Create A Development Environment
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install pybind11 scikit-build-core pytest build
You can also install the same development dependencies through the Makefile:
make setup
Build And Install
Install the package into the active environment:
python -m pip install .
For local development, use editable mode:
python -m pip install -e .
Both commands build the C++ extension modules with CMake. The build downloads
the pinned IntegralCommunication commit declared in CMakeLists.txt.
Run Tests
After installing the package into the active environment, run:
python -m pytest tests
The test suite covers:
- Tracer object construction and basic API behavior
- Embedded tracer protocol parsing and subscriptions
Virtual serial integration test
The integration test connects to the virtual trace device from
IntegralEmbeddedTracing/examples. Start it with make example in that
repository, then use its printed serial port here:
TRACER_SERIAL_TEST=1 TRACER_SERIAL_PORT=/dev/ttys016 python -m pytest -v tests/integration/test_serial_tracing.py
The port defaults to /dev/ttys016, but pseudo-terminal names can change; verify
the printed path before running the test. This test sends commands, so do not run
it against a real device or a port in use by another client. It is skipped during
normal test runs unless TRACER_SERIAL_TEST=1 is set.
CI runs the normal test suite and a separate virtual-serial integration job on
macOS, Linux, and Windows. The integration job checks out
IntegralMotions/IntegralEmbeddedTracing at feature/add-integration-test-code and builds its example;
that branch must include the serial example and Windows COM-port support. On
Windows it installs a checksum-pinned com0com driver and uses a virtual COM pair.
Driver installation and physical COM-port behavior depend on the runner and
hardware respectively.
The Windows integration job also runs the native concurrency and buffer tests
against that COM pair using pyserial for the test peer. To run them locally,
install pyserial and set TRACER_TEST_PORT_A and TRACER_TEST_PORT_B to the two
ends of an unused virtual COM pair before running
python -m pytest -v tests/test_native_concurrency.py.
VS Code clangd
This project uses CMake FetchContent for IntegralCommunication. Configure
CMake once so clangd can read the generated compile database:
python -m pip install pybind11 scikit-build-core
cmake --preset clangd
VS Code is configured to read:
build/clangd/compile_commands.json
After regenerating the compile database, restart clangd from the VS Code command
palette with clangd: Restart language server.
Build A Wheel
To build a distributable wheel:
python -m pip install build
python -m build --wheel
The wheel is written to dist/.
Versioning
The package version is defined in one place:
[project]
version = "0.4.0"
Update the version field in pyproject.toml when preparing a release.
CMake reads that value during configure, so the native build and Python package
metadata stay in sync.
Usage
High-level trace client
EmbeddedTracer discovers scalar variables and starts tracing them using the
current IntegralEmbeddedTracing protocol. Its transport handles COBS; the Python
client validates protocol CRCs and interprets trace values.
from TracerLL import EmbeddedTracer
tracer = EmbeddedTracer("/dev/ttyUSB0", 115200)
try:
tracer.connect()
print(tracer.get_variable_config())
tracer.subscribe("current_u", lambda value: print(value))
tracer.start_trace(["current_u", "counter"])
# Use tracer.values["current_u"] to read the most recent value.
tracer.unsubscribe("current_u")
tracer.stop_trace()
finally:
tracer.close()
Callbacks run on a background reader thread and should return quickly. The
client starts all discovered scalar variables by default, or the specified names
(up to 64). All discovered names remain available in the configuration; values
for unselected variables remain None until they have been traced. Call
stop_trace() and then start_trace() to change the selection without closing
the connection.
Array tracing is not yet supported. This is a partial replacement for
the old MotorDriverDesktop/Tracer client, whose legacy wire format is not
compatible with the current protocol.
Low-level transport
from TracerLL import Tracer
tracer = Tracer.Tracer("/dev/ttyUSB0", 115200)
if tracer.start():
tracer.write_message(b"hello")
messages = tracer.get_messages()
tracer.stop()
On Windows, pass the COM port name:
tracer = Tracer.Tracer("COM10", 115200)
Tracer.write_message(...) accepts bytes or a sequence of integer byte
values. get_messages() returns lists of integer byte values. Message framing
is COBS-based internally. On Linux, supported baud rates are 9600, 19200, 38400,
57600, 115200, 230400, 460800, and 921600.
The receive queue holds up to 1024 messages by default. Set the optional
receive_queue_capacity constructor argument to change the limit. New messages
are dropped when full; dropped_messages() returns a cumulative, saturating
count. The count survives stop/start, while queued messages are cleared on start.
EmbeddedTracer.dropped_messages() exposes the same count.
write_message() returns True only when the complete encoded frame is accepted
by the serial transport. A failure may leave a partial frame on the wire, so
further writes fail until stop() and start(); the peer may also need to be
reset or resynchronized. This does not guarantee peer delivery or processing.
The high-level client raises OSError when a request write fails.
Concurrent writes and start/stop calls are serialized. Writes use a one-second
deadline; stop() waits for an in-progress write and the reader thread. On
Windows, an OS or driver that fails to complete cancellation may delay shutdown
beyond the deadline. Coordinate shutdown with producers.
Modules
TracerLL.Tracer: USB serial tracer using COBS-framed communication.TracerLL.EmbeddedTracer: high-level embedded tracing client.
Metadata
Release files for TracerLL 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 7.8 MB
Release files / tracerll-0.4.0-cp315-cp315-win_amd64.whl
| Download URL | tracerll-0.4.0-cp315-cp315-win_amd64.whl |
|---|---|
| Size | 307.3 kB |
| Tags | CPython 3.15 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4b2c9b747b61f70eba32519d468bce55b79bccba455cd96975f4be2975db2930
|
|
BLAKE2b-256 checksum How to use checksums |
3c1b262155d063b9db2e4b1bb43e83faae2143697356114ffd7425ed4f38ef1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp315-cp315-win32.whl
| Download URL | tracerll-0.4.0-cp315-cp315-win32.whl |
|---|---|
| Size | 291.2 kB |
| Tags | CPython 3.15 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
48334581351009ef37c1085b325d1068d382d1fa0b945378135a449ae98d3e74
|
|
BLAKE2b-256 checksum How to use checksums |
f79a700f6f9ba96d2d6f55ee3afe99ecba1efed91aedc0d06961c99f71114ce1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp315-cp315-musllinux_1_2_x86_64.whl
| Download URL | tracerll-0.4.0-cp315-cp315-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.15 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
6aa9b9df4bfe3e55a7534b9943c20f9eb0cd5357d833329bfca8bca350e61b9a
|
|
BLAKE2b-256 checksum How to use checksums |
29bfd5d272782754bc600b45f5128bc6dc194df085b6422c36035d2d66cc1f98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tracerll-0.4.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 117.4 kB |
| Tags | CPython 3.15 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7d1c62ca443109a18bc3c3f6f994ec4e54b7f074c273ac9fe3371ad550f26e39
|
|
BLAKE2b-256 checksum How to use checksums |
fc8f391308bfbd2740b977c922fd387b9507a57ff3213dd118d226ecb9828cac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp315-cp315-macosx_11_0_arm64.whl
| Download URL | tracerll-0.4.0-cp315-cp315-macosx_11_0_arm64.whl |
|---|---|
| Size | 94.9 kB |
| Tags | CPython 3.15 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
29ccfa45bb71d69f8303d1b640ca8b3cfc81b19485c762f251ef4159ef34c275
|
|
BLAKE2b-256 checksum How to use checksums |
52f38f2f5838a3afee23e717eedff7ffe859b4afa45b78957d41f047bd5abda4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp314-cp314-win_amd64.whl
| Download URL | tracerll-0.4.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 307.3 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d76c91ef7e75344d3673d56c2afffb19eedb7feb370c4f5b61a02b0c80327257
|
|
BLAKE2b-256 checksum How to use checksums |
71dd78a147fd55c45022156c054b5cb6edc5e3fb3c398410acf61e9990e0bc6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp314-cp314-win32.whl
| Download URL | tracerll-0.4.0-cp314-cp314-win32.whl |
|---|---|
| Size | 291.1 kB |
| Tags | CPython 3.14 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
e076e60a1fff5310783f69e8ee20d3a2d36872dc59e26fcb84d40480774d7436
|
|
BLAKE2b-256 checksum How to use checksums |
851567479b236b03639042ba60c9254533106d457b470e1581777a3a780430f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp314-cp314-musllinux_1_2_x86_64.whl
| Download URL | tracerll-0.4.0-cp314-cp314-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.14 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
95ca66b291943846076dd77379d512d291dd09df1f7c9d07a1b0f2acbfb5567e
|
|
BLAKE2b-256 checksum How to use checksums |
6f5631f14d6140d9a56d3f8299ca830596ac109d460f8487358c9c85c2b3c89c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tracerll-0.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 117.4 kB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
686f99bf8b12db8759e20e9658ae8c467dcfc5e4f599225edd1cf570ae105e73
|
|
BLAKE2b-256 checksum How to use checksums |
1e02d568c9fd7da57c9aaff69597e1f7486e8f0cbc2d184a08926df77029626e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | tracerll-0.4.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 94.9 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
997a8a33391a4b7eecd5433fba465dc14ae118ff52bff3344ab19e120fbd980f
|
|
BLAKE2b-256 checksum How to use checksums |
929fcd25ccfe7c24c197ccf78f06c686c6ff7a98c9636a4c4f6b20243617d8b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp313-cp313-win_amd64.whl
| Download URL | tracerll-0.4.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 297.6 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8b4dd9470e220b120d28f99b45662acd4c5b3af7b7fdebab0a262647decfdfca
|
|
BLAKE2b-256 checksum How to use checksums |
e1e75706f6ebbbbe01df042f33eb007275860e1010b0e286bd5e663103fb8399
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp313-cp313-win32.whl
| Download URL | tracerll-0.4.0-cp313-cp313-win32.whl |
|---|---|
| Size | 283.4 kB |
| Tags | CPython 3.13 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
2d26ea13d84b5b6086fca312391b1878d740c45affdb4595d5cd5a85ac4225f2
|
|
BLAKE2b-256 checksum How to use checksums |
7da99c40b6b54d2e03c112399d099cd891a4399accd5c11ba49ec2b37111c5f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | tracerll-0.4.0-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
eca08736b7b37cde21b13bd03131aa920cf5430ae17a726bc1deda55cb2f5904
|
|
BLAKE2b-256 checksum How to use checksums |
c597215c4e420ddb7c9e907919b50d34f04ef0b901f17cca03aee7528c26c092
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tracerll-0.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 117.4 kB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b61f0a56660c8786148f8697cd7a3349a99fa4db4966c3447a90696a2e1e7c4c
|
|
BLAKE2b-256 checksum How to use checksums |
a4dceba4c89ca92511f1a12ef08ad60f8808b85a164284eb8aa903e1f1b4e957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | tracerll-0.4.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 94.7 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c746bc3cbd00169ab56844a00468b4fa3f18f4a231e3d646098af1d9578fed0c
|
|
BLAKE2b-256 checksum How to use checksums |
15a61e0a18448201886e33c9218c8ae162566e297fd31e232858d2bb55a7e584
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp312-cp312-win_amd64.whl
| Download URL | tracerll-0.4.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 297.6 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b5c024bbdb7cda02864c621e55fd34ef6626018d6c28217f4ec1dbdfee2bb734
|
|
BLAKE2b-256 checksum How to use checksums |
1f632f7065967f3462bf147c1c95ee881d9edcd000ea6b194b60f6d900791fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp312-cp312-win32.whl
| Download URL | tracerll-0.4.0-cp312-cp312-win32.whl |
|---|---|
| Size | 283.4 kB |
| Tags | CPython 3.12 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
9667b2543e93c623c00c54a02a01bf8120ef6124556a542791fb691999963c97
|
|
BLAKE2b-256 checksum How to use checksums |
fa83a650339140814b053c6bdb0f96dc82fcb5cb6d8070a066c8be8a8002fb15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | tracerll-0.4.0-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
4734dc5f55a02f64c9d2c56cffe5db024bf4868be19162b6a1df25758433c674
|
|
BLAKE2b-256 checksum How to use checksums |
1b5893524a9f147298be86469a7d53357b4f3beb774347a0d784c7f0f4da92ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tracerll-0.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 117.4 kB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d0ab482bfc61db7cae8bdb2ce4b47b7ebe104444da7cad6c56cb048ba31de715
|
|
BLAKE2b-256 checksum How to use checksums |
a91428779a1c5beb1f933b8874167beb3b06064f59143878547566cb05e98f7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / tracerll-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | tracerll-0.4.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 94.7 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c64581d9501e9dc3e13aa88fd472f056e4884d2e45e9b93ba533e09b3afd63b4
|
|
BLAKE2b-256 checksum How to use checksums |
e34ca3d8184cbbf86ce6fd5434f47accabc533f77a501e0032215f5dc166db5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Security for TracerLL 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.