Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macross-serial-1.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

macross_serial-1.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

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

Hashes for macross-serial-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e7f286a631556e01ffad556d78953a79dec5fd765163bd3f0e23a78a38f9b057
MD5 e358cd34fa53b3c63ae04bea0473493f
BLAKE2b-256 9d6eb16c50d8bff04e8d72961e0fcf968fcf30e7540c6eb78331eba482489ab3

See more details on using hashes here.

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

Hashes for macross_serial-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd33808d0fcaba389454187dec589b1cf27ae87def42e3e62e55a2faceb3368e
MD5 2a2d2204507da0f8d21987bfbc3c4c3e
BLAKE2b-256 9143e54e73f01a76d2459cc576dde613dc91a2008e7756e3292953262b3345e7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page