Exemplo n.º 1
0
        public override void IsFreqHandler(LongReqReader request, IntResWriter response)
        {
            Queue <freqPara> txsQueue = new Queue <freqPara>();

            foreach (Tx tx in Global.LocalStorage.Tx_Selector())
            {
                while (tx.time - txsQueue.Peek().time > request.value)
                {
                    txsQueue.Dequeue();
                }

                List <string> addrs = new List <string>();
                foreach (In _in in tx.ins)
                {
                    addrs.Add(_in.addr);
                }
                foreach (string _out in tx.outs)
                {
                    addrs.Add(_out);
                }

                foreach (freqPara pre in txsQueue)
                {
                    foreach (string addr in pre.addrs)
                    {
                        if (addrs.Contains(addr))
                        {
                            Tx preTx = Global.LocalStorage.UseTx(pre.CellID);
                            preTx.isFreq = true;
                            Tx _tx = Global.LocalStorage.UseTx(tx.CellID);
                            _tx.isFreq = true;
                        }
                    }
                }

                freqPara para;
                para.CellID = tx.CellID;
                para.addrs  = addrs;
                para.time   = tx.time;
                txsQueue.Enqueue(para);
            }
        }
Exemplo n.º 2
0
 public override void IsCircleHandler(LongReqReader request, IntResWriter response)
 {
 }
Exemplo n.º 3
0
 public override void IsFreqHandler(LongReqReader request, IntResWriter response)
 {
     // TODO: Add your code here
     throw new NotImplementedException();
 }