No project description provided
Project description
Introduction
The main goal
This project access for the serial port and It is able to script control.
Installation
pip install macross-serial
For developers
git clone git@github.com:rondou/macross-serial.git
cd macross-serial
poetry install
Usage
Access for the serial port and run script.
macross-serial run [--repeat N] <port-name> <macro-file>
Show serail port name.
macross-serial list-port
Macro file format
<method> <content> [<timeout-second> [progress-message]]
Simple example
script.tsv
wait_for_str 'system started at UTC'
send 'account\n'
send 'password\n'
wait_for_regex r'\b(([0-9A-Fa-f]{2}:){5})\b'
send 'reboot\n'
Methods
send
Write data to serial port
E.g.
send 'poweroff\n'
wait_for_str
Waiting until for find out a specific string then continue to execute next step.
E.g.
wait_for_str 'system started at UTC'
wait_for_regex
Waiting until for find out a regular expression pattern then continue to execute next step.
E.g.
wait_for_regex r'\b(([0-9A-Fa-f]{2}:){5})\b'
wait_for_second
Wait/sleep/pause for N seconds.
E.g.
wait_for_second 10
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file macross-serial-1.1.0.tar.gz.
File metadata
- Download URL: macross-serial-1.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.3 Darwin/19.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7f286a631556e01ffad556d78953a79dec5fd765163bd3f0e23a78a38f9b057
|
|
| MD5 |
e358cd34fa53b3c63ae04bea0473493f
|
|
| BLAKE2b-256 |
9d6eb16c50d8bff04e8d72961e0fcf968fcf30e7540c6eb78331eba482489ab3
|
File details
Details for the file macross_serial-1.1.0-py3-none-any.whl.
File metadata
- Download URL: macross_serial-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.3 Darwin/19.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd33808d0fcaba389454187dec589b1cf27ae87def42e3e62e55a2faceb3368e
|
|
| MD5 |
2a2d2204507da0f8d21987bfbc3c4c3e
|
|
| BLAKE2b-256 |
9143e54e73f01a76d2459cc576dde613dc91a2008e7756e3292953262b3345e7
|