Gurux.DLMS.GXByteBuffer.GetDouble C# (CSharp) Method

GetDouble() public method

Get double value from byte array from the current position and then increments the position.
public GetDouble ( ) : double
return double
        public double GetDouble()
        {
            byte[] tmp = new byte[8];
            Get(tmp);
            System.Array.Reverse(tmp, 0, 8);
            double value = BitConverter.ToDouble(tmp, 0);
            return value;
        }

Usage Example

Esempio n. 1
0
 private static void GetFloat64(XmlNode node, GXDLMSXmlSettings s)
 {
     GXByteBuffer bb = new GXByteBuffer();
     bb.SetHexString(GetValue(node, s));
     GXCommon.SetData(s.settings, s.data, DataType.Float64, bb.GetDouble());
 }