E1.20 RDM (Remote Device Management) Protocol Forums

E1.20 RDM (Remote Device Management) Protocol Forums (http://www.rdmprotocol.org/forums/index.php)
-   RDM Interpretation Questions (http://www.rdmprotocol.org/forums/forumdisplay.php?f=5)
-   -   E1-20: Sensor Values With Base 2 (http://www.rdmprotocol.org/forums/showthread.php?t=1326)

FishAI April 9th, 2021 11:44 AM

E1-20: Sensor Values With Base 2
 
Hello all you great girls and guys,

please help me out again.

Recently my colleague and I discussed one interesting bit of the E1-20 standard. Beneath Table A-14 is the following annotation:
"When a prefix is used with MEMORY, the multiplier refers to binary multiple. i.e. KILO means multiply by 1024."

We had a great argument about this note.
From our understanding this refers to the interpretation of the sensor value received by SENSOR_VALUE, not the representation of this value.
For example, a sensor reporting a present value of 1 with the sensor's prefix being PREFIX_KILO, the sensor reports a true value of 1024 bytes.
It is not reporting 1000 (true) bytes, which should be represented as ~0.98 kibibyte.

However, we did not figured out whether the multiple of 1024 is only valid if and only if the Sensor Type is SENS_MEMORY.
SENS_MEMORY seems to be the closest match to the mentioned MEMORY, but we are unsure whether the standard does mean any memory related types or indeed solely SENS_MEMORY.

For example manufacturer specific parameters using UNITS_BYTE is a big question here. Should the prefix there also be based on the binary multiple?
Or should a device using manufacturer specific parameters report 1024 UNITS_BYTE to mean 1 kibibyte?

If the binary base refers only to SENS_MEMORY:
Does this mean, that any SENSOR_DEFINITION with its sensor type being different from SENS_MEMORY but its unit being UNITS_BYTE, should NOT use 2 as its base?

Also, there is the special case of exponents being less than 1. What would you expect, if any device reports the following values:
SENSOR_DEFINITION: SENS_MEMORY, UNIT_BYTE, PREFIX_MILLI
SENSOR_VALUE: PresentValue: 0x00000120
Obviously the device reports some sort of undefined partially byte. But would you expect a value of 0.288 millibyte or something different?
We do not know any defined prefix for base 2 with the exponent being less than 1 (like kibi for the exponent being 3). Are there any?

What is the correct interpretation of the mentioned note, what are you recommendation?

Best regards,
FishAI

sblair April 11th, 2021 05:04 PM

Fish,

You raised some very good questions. These are questions we will need to clarify in a future revision to the standard.

I went back to Wayne Howell who wrote that portion of the original document. Here's his comments on the original thinking:

Quote:

For SENS_MEMORY or any sensor type using UNITS_BYTE, the prefix is 1024. So using the commenter’s example:

No Prefix - 1024 UNITS_BYTE = 1024 bytes = 1 Kbyte
Kilo prefix - 1 UNITS_BYTE = 1024 bytes = 1 Kbyte
Kilo prefix - 1000 UNITS_BYTE = 1000 Kbytes
Kilo prefix - 1024 UNITS_BYTE = 1 Mbyte

Using milli etc was never considered and should be thought of as undefined.

FishAI April 12th, 2021 03:24 AM

Hi sblair,

Thank you for the quick reply and for contacting the original author.
We are looking forward to seeing this clarified in future revisions.
Until then, we would probably use the factor 1024 when a value has the unit UNITS_BYTE, as it was surely intended by Mr. Howell.

Best regards,
FishAI

peternewman June 28th, 2021 02:04 AM

Quote:

Originally Posted by FishAI (Post 3380)
Recently my colleague and I discussed one interesting bit of the E1-20 standard. Beneath Table A-14 is the following annotation:
"When a prefix is used with MEMORY, the multiplier refers to binary multiple. i.e. KILO means multiply by 1024."

I suspect you'll find most controllers are probably just concatenating the PREFIX and UNIT fields together, so the multiplier is more for the device end to ensure it sends the correct value, i.e. you need to divide your bytes measurement by 1024 to get the value you send to the controller.


The real edge case here is if they show mkg or g for grammes!


Quote:

Originally Posted by FishAI (Post 3380)
Also, there is the special case of exponents being less than 1. What would you expect, if any device reports the following values:
SENSOR_DEFINITION: SENS_MEMORY, UNIT_BYTE, PREFIX_MILLI
SENSOR_VALUE: PresentValue: 0x00000120
Obviously the device reports some sort of undefined partially byte. But would you expect a value of 0.288 millibyte or something different?
We do not know any defined prefix for base 2 with the exponent being less than 1 (like kibi for the exponent being 3). Are there any?

Quote:

Originally Posted by sblair (Post 3381)
I went back to Wayne Howell who wrote that portion of the original document. Here's his comments on the original thinking:Using milli etc was never considered and should be thought of as undefined.


Couldn't you use 128 millibytes (miB) to represent a bit?! :rolleyes:


All times are GMT -6. The time now is 07:41 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.