Beispiel #1
0
 public FilterTrace(uint devId, BUSDOG_REQUEST_TYPE type, BUSDOG_REQUEST_PARAMS params_, BUSDOG_TIMESTAMP timestamp, byte[] buffer)
 {
     DeviceId  = devId;
     Type      = type;
     Params    = params_;
     Timestamp = timestamp;
     Buffer    = buffer;
 }
Beispiel #2
0
        public BUSDOG_TIMESTAMP GetTimestampDelta(FilterTrace prevTrace)
        {
            BUSDOG_TIMESTAMP delta = new BUSDOG_TIMESTAMP();

            if (prevTrace.Timestamp.Seconds > 0 || prevTrace.Timestamp.USec > 0)
            {
                delta.Seconds = Timestamp.Seconds - prevTrace.Timestamp.Seconds;
                delta.USec    = Timestamp.USec - prevTrace.Timestamp.USec;
                if (delta.USec < 0)
                {
                    delta.USec = 1000000 + delta.USec;
                }
            }
            return(delta);
        }
Beispiel #3
0
 public BUSDOG_TIMESTAMP GetTimestampDelta(FilterTrace prevTrace)
 {
     BUSDOG_TIMESTAMP delta = new BUSDOG_TIMESTAMP();
     if (prevTrace.Timestamp.Seconds > 0 || prevTrace.Timestamp.USec > 0)
     {
         delta.Seconds = Timestamp.Seconds - prevTrace.Timestamp.Seconds;
         delta.USec = Timestamp.USec - prevTrace.Timestamp.USec;
         if (delta.USec < 0)
             delta.USec = 1000000 + delta.USec;
     }
     return delta;
 }
Beispiel #4
0
 public FilterTrace(uint devId, BUSDOG_REQUEST_TYPE type, BUSDOG_REQUEST_PARAMS params_, BUSDOG_TIMESTAMP timestamp, byte[] buffer)
 {
     DeviceId = devId;
     Type = type;
     Params = params_;
     Timestamp = timestamp;
     Buffer = buffer;
 }