Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load multiple frames at once and universal support for to_JSON in frames #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blagasz
Copy link
Contributor

@blagasz blagasz commented May 18, 2019

I needed to load multiple frames at once for an mbus project over tcp, so I wanted to add support for it. Hope I found a good way to integrate it with the current code.

I also added to_JSON for all the frame types except for WTelegramSndNr.

If you have any suggestions I am happy to (try to) implement them.

@codecov
Copy link

codecov bot commented May 18, 2019

Codecov Report

Merging #14 into master will decrease coverage by 1.32%.
The diff coverage is 50.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
- Coverage   79.64%   78.32%   -1.33%     
==========================================
  Files          20       20              
  Lines        1538     1578      +40     
==========================================
+ Hits         1225     1236      +11     
- Misses        313      342      +29
Impacted Files Coverage Δ
meterbus/telegram_header.py 100% <ø> (ø) ⬆️
meterbus/telegram_body.py 84.3% <100%> (ø) ⬆️
meterbus/telegram_short.py 96% <100%> (+0.08%) ⬆️
meterbus/telegram_long.py 68.14% <100%> (-0.05%) ⬇️
meterbus/__init__.py 69.11% <40%> (-30.89%) ⬇️
meterbus/telegram_ack.py 81.81% <60%> (-6.42%) ⬇️
meterbus/telegram_control.py 96.55% <60%> (-3.45%) ⬇️
meterbus/exceptions.py 93.75% <0%> (-6.25%) ⬇️
meterbus/serial.py 97.87% <0%> (-2.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f248942...f6b0585. Read the comment docs.

@ganehag
Copy link
Owner

ganehag commented May 21, 2019

I haven't had any time to review it yet. I will do it in the coming days.

@blagasz
Copy link
Contributor Author

blagasz commented May 21, 2019

Ok, no worries. I was wondering if a more efficient internal representation of the telegram objects could be implemented with the help of numpy. Based on this https://www.numpy.org/devdocs/reference/arrays.dtypes.html#specifying-and-constructing-data-types
I would say it is worth considering.

@blagasz
Copy link
Contributor Author

blagasz commented Jun 20, 2019

Encountered a rare error in parse. If my manufacturer specific TelegramLong message has a certain length, then it is parsed as WTelegramSndNr accidentally when parse tries different types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants