I am currently evaluating concepts to represent measured sensor data and I came across JSR-385 which seems to address most topics. Great stuff!
As mentioned in the title, I am however struggling to find how (virtual) boolean data can/should be represented (https://github.com/unitsofmeasurement/uom-systems/issues/115#issuecomment-325332678). Virtual values in general seem to be undefined, but I would have gone with annotated units where possible (i.e. phone battery level = Units.PERCENT annotated with battery_level (or the like)).
Played around with the DimensionLessAbstractUnit.ONE and transforming 0 to false and 1 to true, but I wasn't able to get a working POC.
Hi all
I am currently evaluating concepts to represent measured sensor data and I came across JSR-385 which seems to address most topics. Great stuff!
As mentioned in the title, I am however struggling to find how (virtual) boolean data can/should be represented (https://github.com/unitsofmeasurement/uom-systems/issues/115#issuecomment-325332678). Virtual values in general seem to be undefined, but I would have gone with annotated units where possible (i.e. phone battery level =
Units.PERCENT
annotated withbattery_level
(or the like)).Played around with the
DimensionLess
AbstractUnit.ONE
and transforming0
tofalse
and1
totrue
, but I wasn't able to get a working POC.Possible virtual boolean sensors:
How would one represent such values?