Exemple #1
0
 public void SetAppearanceHistory(long startVersion, IEnumerable <Packet> history)
 {
     Station.PAHistory pahistory = new Station.PAHistory();
     pahistory.StartVersion = startVersion;
     pahistory.PacketList   = new List <Packet>();
     pahistory.PacketList.AddRange(history);
     this.paHistory = pahistory;
     this.paVersion = startVersion + (long)pahistory.PacketList.Count;
 }
Exemple #2
0
 public void Reset(Station.PAHistory paHistory, long startVersion)
 {
     this.paHistory = paHistory;
     this.index     = (int)(startVersion - paHistory.StartVersion);
     if (this.index < 0)
     {
         this.index = 0;
     }
     this.index--;
 }
Exemple #3
0
        public void RemoveAppearanceHistory(long newStartVersion)
        {
            int x = (int)(this.paVersion - newStartVersion);

            Station.PAHistory pahistory = new Station.PAHistory();
            pahistory.StartVersion = newStartVersion;
            pahistory.PacketList   = new List <Packet>((int)BitOperation.SmallestPow2((uint)x));
            for (int i = (int)(newStartVersion - this.paHistory.StartVersion); i < this.paHistory.PacketList.Count; i++)
            {
                pahistory.PacketList.Add(this.paHistory[(long)i]);
            }
        }