semvec/pypi-packages huggingface dataset:
ucanlintools 0.0.9
Local Interconnect Network (LIN) support for python
License: MIT
Keywords: LIN,LDF,LUC,uCAN,parser

# LIN Python lib

Library is under development API will change

## Features

- LIN frame transmission / reception
- LDF signals encoding / decoding (only signal and frames currently working, schedule table parsing not implemented, max signal size is 1 byte)
- Works on windows, linux, mac. Supported hardware , [uCAN LIN USB CONVERTER](https://ucandevices.github.io/ulc.html)

## Installation

```python
pip install ucanlintools
```

## Example usage

To load ldf

```python
from ucanlintools.LDF_parser import parseLDF
ldf = parseLDF("D:\\ldfe.ldf") 
message = ldf.get_message_by_name('FRAME_A')
print(message.signals)
```

To decode/ encode frame

```python
aaa = message.encode({'SIGNAL_A': 1})
bbb = b'\x00\x00\x00\x00\x00\x00'
message.decode(bbb)
```

To setup LIN USB Converter

```python

lin = ucanlintools.LUC('COM7')
lin.set_frame_rx_handler(rx_any)
lin.set_new_frame_rx_handler(rx_new_data)

lin.openAsMaster()

lin.addReceptionFrameToTable(52,8)
lin.addReceptionFrameToTable(54,8)
lin.enable()

```

Example data reception handler

```python

def rx_new_data(f):
        global message
        print (hex(f.id) + ": " +(f.data.hex()))
        if (message.id == f.id):
                message.decode(f.data)
                print(message.diff_str())
```

## For more info see

https://ucandevices.github.io
pecpy 0.7
Optimization-based proximity effect correction
License: MIT

The pecpy library provides an implementation of the proximity effect correction (PEC) scheme proposed in [1]. Examples are bundled with the source code in

pecpy/examples

If you use this package in your research, please cite the original publication. If you use Windows, I can recommend [2] for obtaining pre-compiled versions of fftw, shapely, and opencv. Note that the latter two packages are only needed for the gds <-> image mapping.

[1] https://doi.org/10.1016/j.mee.2018.07.013

[2] https://www.lfd.uci.edu/~gohlke/pythonlibs/