Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
Data format conversion with meta data source
-
Hi all,
I have a problem.
How can I convert a value (x.value) into format IEEE 32 float?
I have not found an example in the help to make a script, can someone please give me a hand?Thank you very much.
-
Values are stored internally as such anyway. But you can do things like this:
var d = 3; return java.lang.Double.doubleToRawLongBits(d);
This returns the bits of the FP value in a long integer.
-
I'm sorry.
I have not explained well.
My problem is this:
I have two word type 2 byte unsigned integer (for example, x.value and y.value) and I get a variable 32 IEEE float.
How can I achieve this by writing a script in a meta data source?thank you very much
-
Still not sure i understand, but maybe you need something more like this: Float.intBitsToFloat()
If not, maybe you can post an example of exactly what x and y are, and what you need them to become.