Skip to main content

Python implementation of Microchip LNet protocol

Project description

PyX2CScope Logo

mchplnet

  • mchplnet is the Python implementation of the LNet protocol.
  • It implements multiple LNet services to communicate to embedded systems/microcontrollers.
  • Currently only pyserial interface is supported.
  • It is recommended to use the pyx2cscope package, which offers a higher-level interface.

Getting Started

  1. Navigate to the Examples directory in the mchplnet project to explore the available examples or create a new .py file based on your requirements.
  2. Import the necessary classes:
from mchplnet.interfaces.factory import InterfaceFactory
from mchplnet.interfaces.factory import InterfaceType as IType
from mchplnet.lnet import LNet
  1. Create an interface according to your requirements and initialize the LNet with the interface:
interface = InterfaceFactory.get_interface(IType.SERIAL, port="COM8", baudrate=115200)
l_net = mchplnet.LNet(interface))
  1. Use the appropriate functions, such as get_ram, to interact with variables by specifying their address and size:
var_address = 0x00000000
var_size = 4 
var_value = l_net.get_ram(var_address, var_size) 
logging.debug(var_value)
  1. To modify the value of a variable, use the put_ram function:
var_newValue = 500
l_net.put_ram(var_address, var_size, var_newValue)

Contribute

If you discover a bug or have an idea for an improvement, we encourage you to contribute! You can do so by following these steps:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Make the necessary changes and commit them.
  4. Push your changes to your forked repository.
  5. Open a pull request on the main repository, describing your changes.

We appreciate your contribution!


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

mchplnet-0.2.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

mchplnet-0.2.0-py2.py3-none-any.whl (22.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mchplnet-0.2.0.tar.gz.

File metadata

  • Download URL: mchplnet-0.2.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for mchplnet-0.2.0.tar.gz
Algorithm Hash digest
SHA256 868e946b6a1c6572c2b6db5fead1d9ee590d7187b4b0b0e2dfcf43ba0537cfe4
MD5 76687ca774566f8047a2f3f259a3bf81
BLAKE2b-256 0f173fee313230979d37b966db9ebf46e8ad526d35b2bd437ff15e21d0e0ed00

See more details on using hashes here.

File details

Details for the file mchplnet-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: mchplnet-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for mchplnet-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4606b162eeb3c06ca8c70fcaaa76defcdfc1fd81372480cdf0349c1c7e17fa5e
MD5 1bfee9c51bffec4f4dc874672ff87cbf
BLAKE2b-256 73b501aa8458b8316a52ed4896b9d749be479feb92509e04f3ce8b266136b2c9

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