Skip to content

Commit

Permalink
Merge pull request #31 from olliiiver/develop
Browse files Browse the repository at this point in the history
Adding smlOBISHertz and smlOBISDegree
  • Loading branch information
olliiiver committed Aug 16, 2023
2 parents 611cef2 + f256f69 commit 0ced8d3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"license": "LGPL-2.1-only",
"version": "0.27",
"version": "0.28",
"frameworks": "*",
"platforms": "*"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SML-Parser
version=0.27
version=0.28
author=Olliiiver
maintainer=Olliiiver
sentence=C++ library to parse Smart Message Language (SML) data from smart meters.
Expand Down
16 changes: 16 additions & 0 deletions src/sml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,19 @@ void smlOBISAmpere(double &a)
a = val;
smlPow(a, sc);
}

void smlOBISHertz(double &h)
{
long long int val;
smlOBISByUnit(val, sc, SML_HERTZ);
h = val;
smlPow(h, sc);
}

void smlOBISDegree(double &d)
{
long long int val;
smlOBISByUnit(val, sc, SML_DEGREE);
d = val;
smlPow(d, sc);
}
3 changes: 3 additions & 0 deletions src/sml.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,8 @@ void smlOBISWh(double &wh);
void smlOBISW(double &w);
void smlOBISVolt(double &v);
void smlOBISAmpere(double &a);
void smlOBISHertz(double &h);
void smlOBISDegree(double &d);


#endif

0 comments on commit 0ced8d3

Please sign in to comment.