Beispiel #1
0
 public static Action <IDatabase> GetDoubleBinaryAction(DoubleBit bits, byte quality, DateTime timestamp, ushort index)
 {
     return((IDatabase db) =>
     {
         db.Update(new DoubleBitBinary(bits, quality, timestamp), index);
     });
 }
 public static Action<IDatabase> GetDoubleBinaryAction(DoubleBit bits, byte quality, DateTime timestamp, ushort index)
 {
     return (IDatabase db) =>
     {
         db.Update(new DoubleBitBinary(bits, quality, timestamp), index);
     };
 }
Beispiel #3
0
        public static double DoubleToULongBit2(ulong value)
        {
            var bit = new DoubleBit {
                ULongValue = value
            };

            return(bit.ULongValue);
        }
Beispiel #4
0
        public static ulong DoubleToULongBit2(double value)
        {
            var bit = new DoubleBit {
                DoubleValue = value
            };

            return(bit.ULongValue);
        }
Beispiel #5
0
        public static long DoubleToInt64(double value)
        {
            var bit = new DoubleBit
            {
                DoubleValue = value
            };

            return(bit.LongValue);
        }
Beispiel #6
0
        public static double Int64ToDouble(long value)
        {
            var bit = new DoubleBit
            {
                LongValue = value
            };

            return(bit.DoubleValue);
        }
Beispiel #7
0
        public static byte FromDoubleBitValue(byte quality, DoubleBit state)
        {
            byte value = (byte)(((byte)(state)) << 6);

            return((byte)((DoubleQualityMask & quality) | value));
        }