diff --git a/library.json b/library.json index a211813..4c0898e 100644 --- a/library.json +++ b/library.json @@ -14,7 +14,7 @@ } ], "license": "LGPL-2.1-only", - "version": "0.27", + "version": "0.28", "frameworks": "*", "platforms": "*" } diff --git a/library.properties b/library.properties index bdeadfe..2842624 100644 --- a/library.properties +++ b/library.properties @@ -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. diff --git a/src/sml.cpp b/src/sml.cpp index 0edee97..17dbd63 100644 --- a/src/sml.cpp +++ b/src/sml.cpp @@ -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); +} diff --git a/src/sml.h b/src/sml.h index ac6405d..3f774dc 100644 --- a/src/sml.h +++ b/src/sml.h @@ -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