Python implementation of Microchip LNet protocol
Project description
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
- Navigate to the Examples directory in the mchplnet project to explore the available examples or create a new .py file based on your requirements.
- Import the necessary classes:
from mchplnet.interfaces.factory import InterfaceFactory
from mchplnet.interfaces.factory import InterfaceType as IType
from mchplnet.lnet import LNet
- 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))
- 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)
- 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:
- Fork the repository.
- Create a new branch for your changes.
- Make the necessary changes and commit them.
- Push your changes to your forked repository.
- Open a pull request on the main repository, describing your changes.
We appreciate your contribution!
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
mchplnet-0.2.1.tar.gz
(16.0 kB
view details)
Built Distribution
File details
Details for the file mchplnet-0.2.1.tar.gz
.
File metadata
- Download URL: mchplnet-0.2.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8d466ac8f3abd543aa9d4a6971efb326c582fe075e1079af00d1ad43a1f2f76 |
|
MD5 | ea55dc343ffa9b7415de5784bf1f5fae |
|
BLAKE2b-256 | b047363892faef27c7bd3ac2198d76c0cfbbea0e7e9e0e9af06b814e2fcb8e49 |
File details
Details for the file mchplnet-0.2.1-py2.py3-none-any.whl
.
File metadata
- Download URL: mchplnet-0.2.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8051f21a394f664346345d351265b28464042a6934ddec6c4470eacc6bfa50e9 |
|
MD5 | 854b6910cefe8c39955bcf9ba804ca70 |
|
BLAKE2b-256 | 062da63aeafd70131ad7414518f728cbd7b80eef7a9cde95c1fca68f707bc472 |