Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear Documentation for use of factor in conjunction with minimum and maximum #51

Closed
astedler opened this issue Oct 4, 2016 · 4 comments

Comments

@astedler
Copy link
Contributor

astedler commented Oct 4, 2016

If factor is set, the value given by the provider must be displayed by the consumer dividing value by factor (which then mght change from INTEGER to REAL...
But how to handle the minimum and maximum properties?
Shall i assume the they are also multiplied by factor, so that i can compare the value to minimum and maximum to check whether it is valid or not, or do i have to assume minimum and maximum are given as values already devided by factor and i have to check minimum <= value/factor <= maximum?

???

@mkeuck
Copy link
Contributor

mkeuck commented Oct 4, 2016

Hi,
the parameter properties Value, DefaultValue, Minimum and Maximum shall always be reported in the same unit. So you have to divide all of them by the factor or apply a formula (if provided) to them.

@KimonHoffmann
Copy link
Contributor

Is this explicitly stated in the documentation somewhere, or do we have to clarify this?

@astedler
Copy link
Contributor Author

astedler commented Oct 4, 2016

I was unable to find anything in the Documentation; That is why i asked. I stumbled over a device had a maximum of 320, a factor of 100 and a value of 5217. And my range-check failed; but it was a temperature and therefore 52.17 degree celsius is quite valid ... i guess.

@mkeuck
Copy link
Contributor

mkeuck commented Oct 31, 2016

The documentation now also clarifies that a factor has to be applied to the minimum, maximum and the default value, if specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants