예제 #1
0
        private IMeasurement m_lastSortedMeasurement;                                        // Last measurement sorted into this frame             (IFrame.LastSortedMeasurement)

        #endregion

        #region [ Constructors ]

        /// <summary>
        /// Creates a new <see cref="ChannelFrameBase{T}"/> from specified parameters.
        /// </summary>
        /// <param name="idCode">The ID code of this <see cref="ChannelFrameBase{T}"/>.</param>
        /// <param name="cells">The reference to the collection of cells for this <see cref="ChannelFrameBase{T}"/>.</param>
        /// <param name="timestamp">The exact timestamp, in <see cref="Ticks"/>, of the data represented by this <see cref="ChannelFrameBase{T}"/>.</param>
        protected ChannelFrameBase(ushort idCode, IChannelCellCollection <T> cells, Ticks timestamp)
        {
            m_idCode             = idCode;
            m_cells              = cells;
            m_timestamp          = timestamp;
            m_lifespan           = ShortTime.Now;
            m_trustHeaderLength  = true;
            m_validateCheckSum   = true;
            m_measurements       = new ConcurrentDictionary <MeasurementKey, IMeasurement>();
            m_sortedMeasurements = -1;
        }
예제 #2
0
 /// <summary>
 /// Creates a new <see cref="ChannelFrameBase{T}"/> from serialization parameters.
 /// </summary>
 /// <param name="info">The <see cref="SerializationInfo"/> with populated with data.</param>
 /// <param name="context">The source <see cref="StreamingContext"/> for this deserialization.</param>
 protected ChannelFrameBase(SerializationInfo info, StreamingContext context)
 {
     // Deserialize key frame elements...
     m_idCode             = info.GetUInt16("idCode");
     m_cells              = (IChannelCellCollection <T>)info.GetValue("cells", typeof(IChannelCellCollection <T>));
     m_timestamp          = info.GetInt64("timestamp");
     m_lifespan           = ShortTime.Now;
     m_trustHeaderLength  = true;
     m_validateCheckSum   = true;
     m_measurements       = new ConcurrentDictionary <MeasurementKey, IMeasurement>();
     m_sortedMeasurements = -1;
 }