示例#1
0
            public override bool Read()
            {
                if (m_index < m_measurements.Length)
                {
                    var measurement = m_measurements[m_index];
                    CurrentKey.Timestamp = (ulong)(long)measurement.Timestamp;
                    CurrentKey.PointId   = measurement.Key.ID;

                    CurrentValue.Value1 = BitMath.ConvertToUInt64((float)measurement.AdjustedValue);

                    CurrentValue.Value3 = (ulong)measurement.StateFlags;

                    m_index++;
                    return(true);
                }
                CurrentKey.Clear();
                CurrentValue.Clear();
                return(false);
            }
示例#2
0
            public bool Read(out ulong timestamp, out ulong pointId, out ulong quality, out ulong value)
            {
                if (m_index < m_measurements.Length)
                {
                    var measurement = m_measurements[m_index];
                    timestamp = (ulong)(long)measurement.Timestamp;
                    pointId   = measurement.Key.ID;
                    quality   = (ulong)measurement.StateFlags;
                    value     = BitMath.ConvertToUInt64((float)measurement.AdjustedValue);
                    m_index++;
                    return(true);
                }

                timestamp = 0;
                pointId   = 0;
                quality   = 0;
                value     = 0;
                return(false);
            }