Пример #1
0
 static void TMDecoder(ProtocolMsgEventArgs msg)
 {
     //Array.Copy(msg.data, raw, msg.data.Length);
     //fastDecode();
 }
Пример #2
0
 //static Device _dev;
 static void onDecMsg(ProtocolMsgEventArgs msg)
 {
     //System.Console.WriteLine("addr={0}", msg1.addr);
         System.Console.WriteLine("addr={0} data={1}", msg.Addr, ByteArrayToString(msg.Data, msg.DataLen));
         //AManager.Run(msg as USBProtocolMsg);
 }
Пример #3
0
 /// <summary>
 /// Обертка события: возникновение сообщения протокола в декодере
 /// </summary>
 /// <param name="e">Класс описывающий сообщение протокола</param>
 protected virtual void OnProtocolMsg(ProtocolMsgEventArgs e)
 {
     if (this.GotProtocolMsg != null)
     {
         this.GotProtocolMsg(e);
     }
 }
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="ProtocolUSB5E4DNoHeadCrc" />.
 /// </summary>
 public ProtocolUSB5E4DNoHeadCrc()
 {
     _package = new ProtocolMsgEventArgs(MaxFrameLen);
     _errorFrame = new ProtocolErrorEventArgs(MaxFrameLen);
     Reset();
 }
Пример #5
0
 /// <summary>
 /// Создаем декодер
 /// </summary>
 public ProtocolUSB7C6E()
 {
     _tmpMsg = new ProtocolMsgEventArgs(DECODER_MAX_DATA_LEN);
         _tmpErrMsg = new ProtocolErrorEventArgs(70000);        // FIXIT: убрать константу
         Reset();
 }