Convert count (storing float) to double

Hi Wenyu,

There are multiple guys before you ask me about this question. Sorry that I have not included this conversion function in the original DNP3 analyzer. The main reason at that time is that this conversion is kind of ad-hoc to DNP3 not very general. My suggestion is to take a look at the DNP3 protocol to see how floating point is stored and then use basic arithmetic calculation to obtain the result of that floating point.

Also, may I ask you why want to use DNP3 to deliver floating point? In many situations, I see that people use integer to store floating point for simplicity. For example, if one wants to deliver floating point 10.012, he first multiplies it by 1000 and delivers the value of 10012. On the receiving end, one just divides the value by 1000 to obtain the floating point.

Hope it helps,

Best,

Hui Lin

As far as I know, there is no built-in function. I don’t think that DNP3 follow a common rule to encode float point number; so I am afraid that you probably need to write a parsing function.

Best,

Hui