示例#1
0
 // Collapses a group of packets.  This involves incrementing the group
 // counter and clearing the savedPackets stack by moving top back to 0.
 // If this is the first group to be collapsed, the collapse time needs
 // to be set, which marks when this collapsing began.
 static void collapse(PacketGroup group,
                      CollapseInfo collapseInfo,
                      PacketQueue pktQ)
 {
     collapseInfo.count[(byte)group]++;
     if (collapseInfo.timeSop == 0)
     {
         if (!pktQ.isEmpty())
         {
             collapseInfo.timeSop = pktQ.headSop();
         }
         else
         {
             collapseInfo.timeSop = pktQ.tailSop();
         }
     }
     pktQ.clear();
 }