Exemple #1
0
        public PmFrameVirtual(PmFrameBase copyFrame) : base()
        {
            var t          = typeof(PmFrameBase);
            var properties = t.GetProperties().Where(p => p.CanWrite && p.CanRead && p.Name != nameof(PmFrameBase.Id));

            foreach (var pi in properties)
            {
                pi.SetValue(this, pi.GetValue(copyFrame, null), null);
            }
        }
 /// <summary>
 ///     Constructor used when creating new one or indexing existing
 /// </summary>
 public PmFrameVirtualBlank(PmFrameBase template, Int64 fraLength, DateTime dateTime)
     : base(template.PmCapture, PmLinkType.Null, dateTime, fraLength, PmFrameType.VirtualBlank, template.FrameIndex, fraLength)
 {
     this.L7PayloadLength = fraLength;
     this.FrameOffset     = 0;
     this.L2Offset        = 0;
     this.L3Offset        = 0;
     this.L4Offset        = 0;
     this.L7Offset        = 0;
     this.DstAddress      = template.DstAddress;
     this.SrcAddress      = template.SrcAddress;
 }
 /// <summary>
 ///     Function gets raw application message data
 /// </summary>
 /// <returns>Returns data in form of byte field or null if data are not present</returns>
 /// <summary>
 ///     Compares timestamps of two IPmFrames and returns the one which has earlier timestamp
 /// </summary>
 /// <param name="other">Another PmFrameBase instance</param>
 /// <returns>Returns PmFrameBase with earlier time stamps or tie in case there is noone to compare</returns>
 public Int32 CompareTo(PmFrameBase other) => other != null?this.TimeStamp.CompareTo(other.TimeStamp) : 0;