You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel that having a percentage semantic type would be beneficial for a lot of implementations.
It should be fairly easy to add and can protect integer fields from being misinterpreted when doing computation.
(e.g. a percentage should always be >=0 and <=100)
The text was updated successfully, but these errors were encountered:
DTDL v2 supports a percent unit (used with the RelativeHumidity semantic type). Our approach for semantic types (more specifically quantitative types for expressing measurements) has been to use the semantic type to express what the element is measuring (temperature, humidity, etc.) and to use the unit to express the units the measurement is in. Is the quantitative type you're measuring not represented in the set in DTDL v2 (certainly possible since there are many things to measure and DTDL only includes some types)?
Yeah I wanted to have a property representing the percentage of the battery charge of a device, I understand your approach though and it makes total sense but some "universal" types like this could be a great addition in the future.
I feel that having a percentage semantic type would be beneficial for a lot of implementations.
It should be fairly easy to add and can protect integer fields from being misinterpreted when doing computation.
(e.g. a percentage should always be >=0 and <=100)
The text was updated successfully, but these errors were encountered: