Skip to main content

IO port based on mmap

Project description

mport

IO port based on shared memory map (mmap).

install

pip install mport

Usage

  • Prototype protocols
  • Build control layer and/or data collection layer for AI training applications
  • Broadcast operations to multiple receiving applications
  • Hardware simulation where you have virtual devices running as separate processes yet communicate via ports

Example Reader

import mport

speed_port = mport.Port('io.dat')
light_port = mport.Port('io.dat', offset=2)

while True:
  car.set_speed(speed_port.value)
  car.light(light_port.value)

Example speed controller

import mport

speed_port = mport.Port('io.dat')

speed_port.value = 42

Example light controller

import mport

light_port = mport.Port('io.dat', offset=2)
light_port.value = True

RGB LED Example

python3 -m mport.examples.rgb_led
python3 -m mport.exmaples.rgb_led_drive

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

mport-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

mport-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file mport-0.1.1.tar.gz.

File metadata

  • Download URL: mport-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for mport-0.1.1.tar.gz
Algorithm Hash digest
SHA256 42f03a22ef8524f9b18e7b3358d56d984c6c4dae1137e130ae2d0ddaf06a75ab
MD5 1877991608de3e97bb85c0e83d5837ca
BLAKE2b-256 a942d2a796a2055c742531a4e394e4309a2ef7cd4f59e21f70b994d60b015d87

See more details on using hashes here.

File details

Details for the file mport-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mport-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for mport-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17bb7cae5fae7ef08531a5de4081ab74c6068a0999de6f569c1c04a4fc8c3d17
MD5 95a6024ece809620ef888dfef6fe99d6
BLAKE2b-256 3ad1fcd6dfbd4cac65ceb59bf057c655dadd73e2d031ffcb347c649695eebbeb

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