From 68ec84214361aa847783fd3381cb6117c9474398 Mon Sep 17 00:00:00 2001 From: Andreas Thienemann Date: Fri, 28 Oct 2022 00:27:07 +0200 Subject: [PATCH] Update to smllib 1.2, more test data --- requirements.txt | 4 +--- sml_decoder.py | 3 +++ test-data.txt | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 25a21fe..a52da60 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,6 @@ Flask==2.0.3 Flask-Bootstrap==3.3.7.1 flask-nav==0.6 -#smllib==1.1 -# SML Lib with grid freq and current power -git+https://github.com/spacemanspiff2007/SmlLib.git@3d4a106#egg=smllib +smllib==1.2 git+https://github.com/census-instrumentation/opencensus-python/@refs/pull/1072/merge#subdirectory=contrib/opencensus-ext-flask opencensus-ext-azure diff --git a/sml_decoder.py b/sml_decoder.py index 50044e0..99d5ad3 100755 --- a/sml_decoder.py +++ b/sml_decoder.py @@ -138,6 +138,9 @@ def main(): if len(tas.obis_errors) > 0: pprint(tas.obis_errors) + if len(tas.parse_errors) > 0: + pprint(tas.parse_errors) + if __name__ == "__main__": main() diff --git a/test-data.txt b/test-data.txt index 1611853..f5ceee8 100644 --- a/test-data.txt +++ b/test-data.txt @@ -57,3 +57,27 @@ foobar + + + +77 7b 4a aa 1b 2a f5 fd fd 39 f3 7d ff 13 f5 e1 43 4b 6f a7 3b ff 1b 39 fb fd 1d fd 39 67 11 c9 c9 c9 c9 cb ff 75 45 72 + +77 7b 4a aa 1b 2a f5 fd fd 39 01 69 13 f5 e1 43 4b db fa 3b ff 1b 39 fb fd 1d fd 39 ef 53 c9 c9 c9 c9 cb ff bb 19 72 72 + +77 7b 4a aa 1b 2a f5 fd fd 39 27 2d 13 f5 e1 43 4b 6c a7 3b ff 1b 39 fb fd 1d fd 39 89 ed c9 c9 c9 c9 cb ff bf 40 72 72 + +77 7b 4a aa 1b 2a f5 fd fd 39 0f 4a 13 f5 e1 43 4b b5 a7 3b ff 1b 39 fb fd 1d fd 39 55 30 c9 c9 c9 c9 cb ff b7 2b 72 72 + +77 7b 4a aa 1b 2a f5 fd fd 39 ff af 13 f5 e1 43 4b 69 a7 3b ff 1b 39 fb fd 1d fd 39 99 81 ff c9 c9 c9 c9 cb ff 37 33 72 + +77 7b 4a aa 1b 2a f5 fd fd 39 9b 75 13 f5 e1 43 4b b6 fa 3b ff 1b 39 fb fd 1d fd 39 cf 0d c9 c9 c9 c9 cb ff e1 3f 72 72 + +77 7a 7b 7f 5b 56 5a f7 a9 4f fb fd fd 39 15 8a 13 f5 e1 43 4b b3 a7 3b ff 1b 39 f1 fd 11 fd e9 ed fd 6d 59 69 ff f7 a9 + +77 7b 4a aa 1b 2a f5 fd fd 39 bb fb ff 13 f5 e1 43 4b 66 a7 3b ff 1b 39 fb fd 1d fd 39 a9 7c c9 c9 c9 c9 cb ff 89 22 72 + +77 7b 4a aa 1b 2a f5 fd fd 39 ff 68 13 f5 e1 43 4b b2 a7 3b ff 1b 39 fb fd 1d fd 39 21 e7 ff c9 c9 c9 c9 cb ff eb 3f 72 + +77 7b 4a aa 1b 2a f5 fd fd 39 31 35 13 f5 e1 43 4b 63 a7 3b ff 1b 39 fb fd 1d fd 39 b9 df ff c9 c9 c9 c9 cb ff e9 33 72 + +