SML parser: add new OBIS handlers for Hertz and Degrees
copied from the original library.
This commit is contained in:
parent
19a8f6a7bd
commit
5be1615f4e
@ -403,3 +403,19 @@ void smlOBISAmpere(float &a)
|
|||||||
a = val;
|
a = val;
|
||||||
smlPow(a, sc);
|
smlPow(a, sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void smlOBISHertz(float &h)
|
||||||
|
{
|
||||||
|
long long int val;
|
||||||
|
smlOBISByUnit(val, sc, SML_HERTZ);
|
||||||
|
h = val;
|
||||||
|
smlPow(h, sc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void smlOBISDegree(float &d)
|
||||||
|
{
|
||||||
|
long long int val;
|
||||||
|
smlOBISByUnit(val, sc, SML_DEGREE);
|
||||||
|
d = val;
|
||||||
|
smlPow(d, sc);
|
||||||
|
}
|
||||||
|
|||||||
@ -101,5 +101,7 @@ void smlOBISWh(float &wh);
|
|||||||
void smlOBISW(float &w);
|
void smlOBISW(float &w);
|
||||||
void smlOBISVolt(float &v);
|
void smlOBISVolt(float &v);
|
||||||
void smlOBISAmpere(float &a);
|
void smlOBISAmpere(float &a);
|
||||||
|
void smlOBISHertz(float &h);
|
||||||
|
void smlOBISDegree(float &d);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user