Пример #1
0
 public CANFrameInfoArgs(FrameInfo frame)
 {
     try
     {
         if (frame == null)
         {
             throw new CANexception("CANFrameInfoArgs 参数不能为空");
         }
         //_canFrameInfos = frameInfos;
         _canFrameInfo = frame;
     }
     catch (Exception e)
     {
         LogHelper.WriteErrorLog(e.Message);
     }
 }
Пример #2
0
 void OnFrameInfoArgs(FrameInfo canframe)
 {
     try
     {
         EventHandler<CANFrameInfoArgs> temp = ReceviedData;
         CANFrameInfoArgs e = new CANFrameInfoArgs(canframe);
         if (temp != null)
         {
             temp(this, e);
         }
     }
     catch (Exception e)
     {
         LogHelper.WriteErrorLog("OnFrameInfoArgs" + e.Message);
     }
 }
Пример #3
0
 public CanFrameArgs(FrameInfo frame)
 {
     _canFrame = frame;
 }
Пример #4
0
 /// <summary>
 /// 增加数据到管理队列
 /// </summary>
 /// <param name="data">数据串</param>
 /// <returns></returns>
 public void Add(FrameInfo data)
 {
     try
     {
         _list.Enqueue(data);
         OnCanReceviedEvent(new CanFrameArgs(data));
     }
     catch (Exception e)
     {
         LogHelper.WriteErrorLog(e.Message);
     }
 }
Пример #5
0
 /// <summary>
 /// 初始化
 /// </summary>
 /// 
 public CanListManager()
 {
     _list = new ConcurrentQueue<FrameInfo>();
     _lastList = new FrameInfo("1", "1", "1", "1", "1");
 }
Пример #6
0
 public CanFrameArgs(FrameInfo frame)
 {
     _canFrame = frame;
 }