Beispiel #1
0
        /// <summary>
        /// ProtocolItem 객체를 추가
        /// </summary>
        /// <param name="nBufferSize"></param>
        /// <param name="bUsing"></param>
        /// <param name="CheckFunc"></param>
        /// <param name="CatchFunc"></param>
        /// <returns></returns>
        public bool AddProtocolItem(int nBufferSize, bool bUsing, CheckFunction CheckFunc, CatchFunction CatchFunc)
        {
            ProtocolItem pI = new ProtocolItem();

            pI.Queue.SetSize(nBufferSize);
            pI.Using   = bUsing;
            pI.OnCheck = CheckFunc;
            pI.OnCatch = CatchFunc;

            this.m_ProtocolItems.Add(pI);

            return(true);
        }
Beispiel #2
0
 /// <summary>
 /// 원형 큐에 데이터 put
 /// </summary>
 /// <param name="data"></param>
 public void ProtocolProcessing(byte data)
 {
     try
     {
         for (int count = 0; count < this.m_ProtocolItems.Count; count++)
         {
             if (this.m_ProtocolItems[count] is ProtocolItem == true)
             {
                 ProtocolItem pI = (ProtocolItem)this.m_ProtocolItems[count];
                 pI.ProcessingData(data);
             }
         }
     }
     catch (Exception E)
     {
         Debug.WriteLine(E.Message);
     }
 }